ia64/xen-unstable

changeset 14525:a234dcbd8357

Implemented host.get_PIFs.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Mar 22 19:04:45 2007 +0000 (2007-03-22)
parents 2d918219f234
children 2cecfa20ffa9
files tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendNode.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Thu Mar 22 18:41:15 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Thu Mar 22 19:04:45 2007 +0000
     1.3 @@ -643,6 +643,7 @@ class XendAPI(object):
     1.4  
     1.5      host_attr_ro = ['software_version',
     1.6                      'resident_VMs',
     1.7 +                    'PIFs',
     1.8                      'host_CPUs',
     1.9                      'cpu_configuration',
    1.10                      'metrics',
    1.11 @@ -712,6 +713,8 @@ class XendAPI(object):
    1.12          return xen_api_success(XendNode.instance().xen_version())
    1.13      def host_get_resident_VMs(self, session, host_ref):
    1.14          return xen_api_success(XendDomain.instance().get_domain_refs())
    1.15 +    def host_get_PIFs(self, session, ref):
    1.16 +        return xen_api_success(XendNode.instance().get_PIF_refs())
    1.17      def host_get_host_CPUs(self, session, host_ref):
    1.18          return xen_api_success(XendNode.instance().get_host_cpu_refs())
    1.19      def host_get_metrics(self, _, ref):
     2.1 --- a/tools/python/xen/xend/XendNode.py	Thu Mar 22 18:41:15 2007 +0000
     2.2 +++ b/tools/python/xen/xend/XendNode.py	Thu Mar 22 19:04:45 2007 +0000
     2.3 @@ -215,6 +215,10 @@ class XendNode:
     2.4          self.save_networks()
     2.5  
     2.6  
     2.7 +    def get_PIF_refs(self):
     2.8 +        return self.pifs.keys()
     2.9 +
    2.10 +
    2.11      def _PIF_create(self, name, mtu, vlan, mac, network, persist = True,
    2.12                      pif_uuid = None, metrics_uuid = None):
    2.13          for pif in self.pifs.values():