# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com
# Date 1227163333 28800
# Node ID 07c47f60d2f24034714c5aef79ae63f904cf1ffe
# Parent 340a8219c05fd707857536f04b0c0c4ab7fe1337
[TEST] Adding cim_disable() to vxml.py.
Changed the const CIM_START to CIM_ENABLE in const.py.
Adding cim_disable() to vxml.py.
This patch has to be applied on top of "#3 Adding cim_state_change() to VirtCIM class
of vxml".
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 340a8219c05f -r 07c47f60d2f2 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Nov 19 22:29:31 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Nov 19 22:42:13 2008 -0800
@@ -32,14 +32,14 @@ VIRSH_ERROR_DEFINE = "Failed to define a
VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh"
#CIM values for VS State transitions
-CIM_START = 2
-CIM_DEFINE = 3
-CIM_SHUTDOWN = 4
-CIM_NOCHANGE = 5
-CIM_SUSPEND = 6
-CIM_PAUSE = 9
-CIM_REBOOT = 10
-CIM_RESET = 11
+CIM_ENABLE = 2
+CIM_DISABLE = 3
+CIM_SHUTDOWN = 4
+CIM_NOCHANGE = 5
+CIM_SUSPEND = 6
+CIM_PAUSE = 9
+CIM_REBOOT = 10
+CIM_RESET = 11
# Default TimeoutPeriod param for CS.RequestedStateChange()
TIME = "00000000000000.000000:000"
diff -r 340a8219c05f -r 07c47f60d2f2 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 19 22:29:31 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 19 22:42:13 2008 -0800
@@ -585,7 +585,12 @@ class VirtCIM:
def cim_start(self, server, virt, domain_name,
req_time=const.TIME, poll_time=30):
return self.cim_state_change(server, virt, domain_name,
- const.CIM_START, req_time, poll_time)
+ const.CIM_ENABLE, req_time, poll_time)
+
+ def cim_disable(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_DISABLE, req_time, poll_time)
def cim_shutdown(self, server, virt, domain_name,
req_time=const.TIME, poll_time=30):