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

[Xen-changelog] [xen-unstable] Add some fields from XenAPI docs to implementation.



# HG changeset patch
# User Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1179244917 -3600
# Node ID e1f43038f1d803aabbb9b25f1713cfea0123c053
# Parent  d4a0706d6747cd54613328fe630c3bcb7cafbac5
Add some fields from XenAPI docs to implementation.
Add stefan's patch to swap mtu and mac, so they're correct.

signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py  |   23 ++++++++++++++++++-----
 tools/python/xen/xend/XendNode.py |    7 ++++---
 2 files changed, 22 insertions(+), 8 deletions(-)

diff -r d4a0706d6747 -r e1f43038f1d8 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Tue May 15 15:14:02 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Tue May 15 17:01:57 2007 +0100
@@ -882,7 +882,8 @@ class XendAPI(object):
     
     host_attr_rw = ['name_label',
                     'name_description',
-                    'other_config']
+                    'other_config',
+                    'logging']
 
     host_methods = [('disable', None),
                     ('enable', None),
@@ -957,7 +958,11 @@ class XendAPI(object):
         return xen_api_success(XendNode.instance().get_vcpus_policy())
     def host_get_cpu_configuration(self, _, host_ref):
         return xen_api_success(XendNode.instance().get_cpu_configuration())
-    
+    def host_set_logging(self, _, host_ref, logging):
+        return xen_api_todo()
+    def host_get_logging(self, _, host_ref):
+        return xen_api_todo()
+
     # object methods
     def host_disable(self, session, host_ref):
         XendDomain.instance().set_allow_new_domains(False)
@@ -1010,7 +1015,10 @@ class XendAPI(object):
                   'metrics': node.host_metrics_uuid,
                   'capabilities': node.get_capabilities(),
                   'supported_bootloaders': ['pygrub'],
-                  'sched_policy': node.get_vcpus_policy()}
+                  'sched_policy': node.get_vcpus_policy(),
+                  'logging': {},
+                  'PIFs': XendPIF.get_all(),
+                  'PBDs': XendPBD.get_all()}
         return xen_api_success(record)
 
     # class methods
@@ -1133,7 +1141,8 @@ class XendAPI(object):
                   'tools_version',
                   'domid',
                   'is_control_domain',
-                  'metrics'
+                  'metrics',
+                  'crash_dumps',
                   ]
                   
     VM_attr_rw = ['name_label',
@@ -1571,6 +1580,9 @@ class XendAPI(object):
             return self._VM_save(dom)
         else:
             return xen_api_success_void()
+
+    def VM_get_crash_dumps(self, _, vm_ref):
+        return xen_api_todo()
 
     # class methods
     def VM_get_all(self, session):
@@ -1636,7 +1648,8 @@ class XendAPI(object):
             'other_config': xeninfo.info.get('other_config', {}),
             'domid': domid is None and -1 or domid,
             'is_control_domain': xeninfo.info['is_control_domain'],
-            'metrics': xeninfo.get_metrics()
+            'metrics': xeninfo.get_metrics(),
+            'crash_dumps': []
         }
         return xen_api_success(record)
 
diff -r d4a0706d6747 -r e1f43038f1d8 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Tue May 15 15:14:02 2007 +0100
+++ b/tools/python/xen/xend/XendNode.py Tue May 15 17:01:57 2007 +0100
@@ -195,7 +195,7 @@ class XendNode:
                         network_uuid, 'network')
                     if network.get_name_label() == bridge_name:
                         XendPIF.create_phy(network_uuid, name,
-                                           mtu, mac)
+                                           mac, mtu)
                         break
                 else:
                     log.debug("Cannot find network for bridge %s "
@@ -233,8 +233,9 @@ class XendNode:
   ##      self.save_networks()
 
 
-##    def get_PIF_refs(self):
-##       return self.pifs[:]
+    def get_PIF_refs(self):
+        log.debug(XendPIF.get_all())
+        return XendPIF.get_all()
 
 ##   def _PIF_create(self, name, mtu, vlan, mac, network, persist = True,
 ##                     pif_uuid = None, metrics_uuid = None):

_______________________________________________
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®.