mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Added host.capabilities field.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
d8f5871da1
commit
496ee4e22a
6 files changed
+93
No files matched your search
@@ -630,6 +630,7 @@ class XendAPI(object):
|
||||
'resident_VMs',
|
||||
'host_CPUs',
|
||||
'metrics',
|
||||
'capabilities',
|
||||
'supported_bootloaders',
|
||||
'API_version_major',
|
||||
'API_version_minor',
|
||||
@@ -694,6 +695,8 @@ class XendAPI(object):
|
||||
return xen_api_success(XendNode.instance().get_host_cpu_refs())
|
||||
def host_get_metrics(self, _, ref):
|
||||
return xen_api_success(XendNode.instance().host_metrics_uuid)
|
||||
def host_get_capabilities(self, session, host_ref):
|
||||
return xen_api_success(XendNode.instance().get_capabilities())
|
||||
def host_get_supported_bootloaders(self, session, host_ref):
|
||||
return xen_api_success(['pygrub'])
|
||||
|
||||
@@ -732,6 +735,7 @@ class XendAPI(object):
|
||||
'resident_VMs': dom.get_domain_refs(),
|
||||
'host_CPUs': node.get_host_cpu_refs(),
|
||||
'metrics': node.host_metrics_uuid,
|
||||
'capabilities': node.get_capabilities(),
|
||||
'supported_bootloaders': 'pygrub'}
|
||||
return xen_api_success(record)
|
||||
|
||||
|
||||
@@ -353,6 +353,9 @@ class XendNode:
|
||||
def get_uuid(self):
|
||||
return self.uuid
|
||||
|
||||
def get_capabilities(self):
|
||||
return self.xc.xeninfo()['xen_caps'].split(" ")
|
||||
|
||||
#
|
||||
# Host CPU Functions
|
||||
#
|
||||
|
||||