aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-01-30 13:53:44 +0000
committerEwan Mellor <ewan@xensource.com>2007-01-30 13:53:44 +0000
commita417e6aaaf55ce65a0da87016f2885f198e309d2 (patch)
tree164df7c161c288d72255232794b97cd9a330de2e /tools
parent4704ee85403afb872c495016d4f166fd8067cbe2 (diff)
downloadxen-a417e6aaaf55ce65a0da87016f2885f198e309d2.tar.gz
xen-a417e6aaaf55ce65a0da87016f2885f198e309d2.tar.bz2
xen-a417e6aaaf55ce65a0da87016f2885f198e309d2.zip
Added backreference from PIF_metrics to PIF, and added a uuid to the session
record. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendAPI.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py
index 519b00a71f..354e0d8932 100644
--- a/tools/python/xen/xend/XendAPI.py
+++ b/tools/python/xen/xend/XendAPI.py
@@ -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 = []
@@ -913,6 +915,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())