aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTom Wilkie <tom.wilkie@gmail.com>2007-05-15 17:01:57 +0100
committerTom Wilkie <tom.wilkie@gmail.com>2007-05-15 17:01:57 +0100
commitb794da2ef6f15b92f9eef09d67834842a7f6fc47 (patch)
tree0a46584b96e541e02306c73f1e35a95812ddb2e0 /tools
parent322a078ab140d3a651f4431023f121cca3fd982a (diff)
downloadxen-b794da2ef6f15b92f9eef09d67834842a7f6fc47.tar.gz
xen-b794da2ef6f15b92f9eef09d67834842a7f6fc47.tar.bz2
xen-b794da2ef6f15b92f9eef09d67834842a7f6fc47.zip
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@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendAPI.py23
-rw-r--r--tools/python/xen/xend/XendNode.py7
2 files changed, 22 insertions, 8 deletions
diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py
index c47470598d..8d3b1f169c 100644
--- a/tools/python/xen/xend/XendAPI.py
+++ b/tools/python/xen/xend/XendAPI.py
@@ -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',
@@ -1572,6 +1581,9 @@ class XendAPI(object):
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):
refs = [d.get_uuid() for d in XendDomain.instance().list('all')]
@@ -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 --git a/tools/python/xen/xend/XendNode.py b/tools/python/xen/xend/XendNode.py
index 44aaa1bbc8..b5fa1b7fb4 100644
--- a/tools/python/xen/xend/XendNode.py
+++ b/tools/python/xen/xend/XendNode.py
@@ -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):