direct-io.hg

changeset 14381:036e42d1c9bb

Added VM_metrics.get_all.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Ewan Mellor <ewan@xensource.com>
date Wed Mar 14 21:04:04 2007 +0000 (2007-03-14)
parents 0c354aa0bb4a
children e1281da27313
files tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendVMMetrics.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Wed Mar 14 21:02:58 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Wed Mar 14 21:04:04 2007 +0000
     1.3 @@ -1516,6 +1516,9 @@ class XendAPI(object):
     1.4      def _VM_metrics_get(self, ref):
     1.5          return XendVMMetrics.get_by_uuid(ref)
     1.6  
     1.7 +    def VM_metrics_get_all(self, _):
     1.8 +        return xen_api_success(XendVMMetrics.get_all())
     1.9 +
    1.10      def VM_metrics_get_record(self, _, ref):
    1.11          return xen_api_success(self._VM_metrics_get(ref).get_record())
    1.12  
     2.1 --- a/tools/python/xen/xend/XendVMMetrics.py	Wed Mar 14 21:02:58 2007 +0000
     2.2 +++ b/tools/python/xen/xend/XendVMMetrics.py	Wed Mar 14 21:04:04 2007 +0000
     2.3 @@ -31,6 +31,11 @@ class XendVMMetrics:
     2.4          return uuid in instances
     2.5  
     2.6      is_valid_vm_metrics = classmethod(is_valid_vm_metrics)
     2.7 +
     2.8 +    def get_all(_):
     2.9 +        return instances.keys()
    2.10 +
    2.11 +    get_all = classmethod(get_all)
    2.12     
    2.13      def __init__(self, uuid, xend_domain_instance):
    2.14          self.uuid = uuid