direct-io.hg

changeset 13720:bb34cc5784c1

Added backreference from PIF_metrics to PIF, and added a uuid to the session
record.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Jan 30 13:53:44 2007 +0000 (2007-01-30)
parents aff5b538fcdf
children 26943e88349f
files tools/python/xen/xend/XendAPI.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Tue Jan 30 13:52:03 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Tue Jan 30 13:53:44 2007 +0000
     1.3 @@ -497,7 +497,8 @@ class XendAPI(object):
     1.4          auth_manager().logout(session)
     1.5          return xen_api_success_void()
     1.6      def session_get_record(self, session):
     1.7 -        record = {'this_host': XendNode.instance().uuid,
     1.8 +        record = {'uuid'     : session,
     1.9 +                  'this_host': XendNode.instance().uuid,
    1.10                    'this_user': auth_manager().get_user(session)}
    1.11          return xen_api_success(record)
    1.12      def session_get_all(self):
    1.13 @@ -902,7 +903,8 @@ class XendAPI(object):
    1.14      # Xen API: Class PIF_metrics
    1.15      # ----------------------------------------------------------------
    1.16  
    1.17 -    PIF_metrics_attr_ro = ['io_read_kbs',
    1.18 +    PIF_metrics_attr_ro = ['PIF',
    1.19 +                           'io_read_kbs',
    1.20                             'io_write_kbs']
    1.21      PIF_metrics_attr_rw = []
    1.22      PIF_methods = []
    1.23 @@ -913,6 +915,9 @@ class XendAPI(object):
    1.24      def PIF_metrics_get_record(self, _, ref):
    1.25          return xen_api_success(self._PIF_metrics_get(ref).get_record())
    1.26  
    1.27 +    def PIF_metrics_get_PIF(self, _, ref):
    1.28 +        return xen_api_success(self._PIF_metrics_get(ref).pif.uuid)
    1.29 +
    1.30      def PIF_metrics_get_io_read_kbs(self, _, ref):
    1.31          return xen_api_success(self._PIF_metrics_get(ref).get_io_read_kbs())
    1.32