[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Implemented host.get_PIFs.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174590285 0
# Node ID a234dcbd8357d70ee0c6e6d71969ea0d7584d376
# Parent  2d918219f234705158c194f866a20e9fba6b68a9
Implemented host.get_PIFs.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py  |    3 +++
 tools/python/xen/xend/XendNode.py |    4 ++++
 2 files changed, 7 insertions(+)

diff -r 2d918219f234 -r a234dcbd8357 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Thu Mar 22 18:41:15 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Thu Mar 22 19:04:45 2007 +0000
@@ -643,6 +643,7 @@ class XendAPI(object):
 
     host_attr_ro = ['software_version',
                     'resident_VMs',
+                    'PIFs',
                     'host_CPUs',
                     'cpu_configuration',
                     'metrics',
@@ -712,6 +713,8 @@ class XendAPI(object):
         return xen_api_success(XendNode.instance().xen_version())
     def host_get_resident_VMs(self, session, host_ref):
         return xen_api_success(XendDomain.instance().get_domain_refs())
+    def host_get_PIFs(self, session, ref):
+        return xen_api_success(XendNode.instance().get_PIF_refs())
     def host_get_host_CPUs(self, session, host_ref):
         return xen_api_success(XendNode.instance().get_host_cpu_refs())
     def host_get_metrics(self, _, ref):
diff -r 2d918219f234 -r a234dcbd8357 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Thu Mar 22 18:41:15 2007 +0000
+++ b/tools/python/xen/xend/XendNode.py Thu Mar 22 19:04:45 2007 +0000
@@ -215,6 +215,10 @@ class XendNode:
         self.save_networks()
 
 
+    def get_PIF_refs(self):
+        return self.pifs.keys()
+
+
     def _PIF_create(self, name, mtu, vlan, mac, network, persist = True,
                     pif_uuid = None, metrics_uuid = None):
         for pif in self.pifs.values():

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.