# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170165224 0
# Node ID bb34cc5784c13fffc9f8663d4c2c61db5ad2e284
# Parent aff5b538fcdf53dc7b232bc6d20a8b6458ed3c10
Added backreference from PIF_metrics to PIF, and added a uuid to the session
record.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendAPI.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff -r aff5b538fcdf -r bb34cc5784c1 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Tue Jan 30 13:52:03 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py Tue Jan 30 13:53:44 2007 +0000
@@ -497,7 +497,8 @@ class XendAPI(object):
auth_manager().logout(session)
return xen_api_success_void()
def session_get_record(self, session):
- record = {'this_host': XendNode.instance().uuid,
+ record = {'uuid' : session,
+ 'this_host': XendNode.instance().uuid,
'this_user': auth_manager().get_user(session)}
return xen_api_success(record)
def session_get_all(self):
@@ -902,7 +903,8 @@ class XendAPI(object):
# Xen API: Class PIF_metrics
# ----------------------------------------------------------------
- PIF_metrics_attr_ro = ['io_read_kbs',
+ PIF_metrics_attr_ro = ['PIF',
+ 'io_read_kbs',
'io_write_kbs']
PIF_metrics_attr_rw = []
PIF_methods = []
@@ -912,6 +914,9 @@ class XendAPI(object):
def PIF_metrics_get_record(self, _, ref):
return xen_api_success(self._PIF_metrics_get(ref).get_record())
+
+ def PIF_metrics_get_PIF(self, _, ref):
+ return xen_api_success(self._PIF_metrics_get(ref).pif.uuid)
def PIF_metrics_get_io_read_kbs(self, _, ref):
return xen_api_success(self._PIF_metrics_get(ref).get_io_read_kbs())
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|