# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Date 1166712559 0
# Node ID 8348f40ba2b76912efeccd7b04416361b9933cf4
# Parent 43f367b6c16c211021ed51931a25ce351270d9d3
[XEND] Xen API commands cleanup.
Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendAPI.py | 134 ++++++++++++++++----------------
tools/python/xen/xend/XendDomainInfo.py | 5 -
2 files changed, 68 insertions(+), 71 deletions(-)
diff -r 43f367b6c16c -r 8348f40ba2b7 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Thu Dec 21 14:33:37 2006 +0000
+++ b/tools/python/xen/xend/XendAPI.py Thu Dec 21 14:49:19 2006 +0000
@@ -893,55 +893,55 @@ class XendAPI:
dom.setName(label)
return xen_api_success_void()
- def VM_set_name_description(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_user_version(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_is_a_template(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_memory_dynamic_max(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_memory_dynamic_min(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_VCPUs_policy(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_VCPUs_params(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_VCPUs_features_force_on(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_VCPUs_features_force_off(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_actions_after_shutdown(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_actions_after_reboot(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_actions_after_suspend(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_actions_after_crash(self, session, vm_ref):
+ def VM_set_name_description(self, session, vm_ref, desc):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_user_version(self, session, vm_ref, ver):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_is_a_template(self, session, vm_ref, is_template):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_memory_dynamic_max(self, session, vm_ref, mem):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_memory_dynamic_min(self, session, vm_ref, mem):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_VCPUs_policy(self, session, vm_ref, policy):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_VCPUs_params(self, session, vm_ref, params):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_VCPUs_features_force_on(self, session, vm_ref, features):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_VCPUs_features_force_off(self, session, vm_ref, features):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_actions_after_shutdown(self, session, vm_ref, action):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_actions_after_reboot(self, session, vm_ref, action):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_actions_after_suspend(self, session, vm_ref, action):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_actions_after_crash(self, session, vm_ref, action):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
return xen_api_success_void()
@@ -965,27 +965,27 @@ class XendAPI:
def VM_set_platform_std_VGA(self, session, vm_ref):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_platform_serial(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_platform_localtime(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_platform_clock_offset(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
-
- def VM_set_platform_enable_audio(self, session, vm_ref):
- dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
+ return xen_api_todo()
+
+ def VM_set_platform_serial(self, session, vm_ref, serial):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_platform_localtime(self, session, vm_ref, localtime):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_platform_clock_offset(self, session, vm_ref, clock_offset):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
+
+ def VM_set_platform_enable_audio(self, session, vm_ref, enable_audio):
+ dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+ return xen_api_todo()
def VM_set_otherConfig(self, session, vm_ref):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
- return xen_api_success_void()
+ return xen_api_todo()
# class methods
def VM_get_all(self, session):
diff -r 43f367b6c16c -r 8348f40ba2b7 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Thu Dec 21 14:33:37 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Thu Dec 21 14:49:19 2006 +0000
@@ -1831,8 +1831,7 @@ class XendDomainInfo:
return self.info.get('memory_dynamic_max', 0)
def get_memory_dynamic_min(self):
return self.info.get('memory_dynamic_min', 0)
-
-
+
def get_vcpus_policy(self):
sched_id = xc.sched_id_get()
if sched_id == xen.lowlevel.xc.XEN_SCHEDULER_SEDF:
@@ -1847,8 +1846,6 @@ class XendDomainInfo:
return XEN_API_VM_POWER_STATE[self.state]
def get_platform_std_vga(self):
return self.info.get('platform_std_vga', False)
- def get_platform_keymap(self):
- return ''
def get_platform_serial(self):
return self.info.get('platform_serial', '')
def get_platform_localtime(self):
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|