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>
This commit is contained in:
Tom Wilkie committed 2007-05-15 17:01:57 +01:00
1 parent 322a078ab1
commit b794da2ef6
2 files changed
+22 -8

No files matched your search

+18 -5
View File
@@ -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)
+4 -3
View File
@@ -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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.