mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Added VM_metrics.get_all.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
1 parent
eacb86fc1b
commit
b0c9363ed8
2 files changed
+8
No files matched your search
@@ -1516,6 +1516,9 @@ class XendAPI(object):
|
||||
def _VM_metrics_get(self, ref):
|
||||
return XendVMMetrics.get_by_uuid(ref)
|
||||
|
||||
def VM_metrics_get_all(self, _):
|
||||
return xen_api_success(XendVMMetrics.get_all())
|
||||
|
||||
def VM_metrics_get_record(self, _, ref):
|
||||
return xen_api_success(self._VM_metrics_get(ref).get_record())
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@ class XendVMMetrics:
|
||||
return uuid in instances
|
||||
|
||||
is_valid_vm_metrics = classmethod(is_valid_vm_metrics)
|
||||
|
||||
def get_all(_):
|
||||
return instances.keys()
|
||||
|
||||
get_all = classmethod(get_all)
|
||||
|
||||
def __init__(self, uuid, xend_domain_instance):
|
||||
self.uuid = uuid
|
||||
|
||||