# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1218234088 25200
# Node ID e24b03f7076f18c7960eec81405c591999d8df93
# Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458
Map SHUTDOWN state change to current DISABLED functionality
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 9f2f9b117797 -r e24b03f7076f src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Mon Aug 04 11:57:27 2008 -0700
+++ b/src/Virt_ComputerSystem.c Fri Aug 08 15:21:28 2008 -0700
@@ -793,7 +793,8 @@
ret = virDomainShutdown(dom);
break;
default:
- CU_DEBUG("Cannot go to disabled state from %i",
info->state);
+ CU_DEBUG("Cannot go to disabled/shutdown state from %i",
+ info->state);
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
"Invalid state transition");
@@ -811,6 +812,8 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
int ret = 0;
+
+ info->state = adjust_state_xen(dom, info->state);
switch (info->state) {
case VIR_DOMAIN_RUNNING:
@@ -913,7 +916,7 @@
if (state == CIM_STATE_ENABLED)
s = state_change_enable(dom, &info);
- else if (state == CIM_STATE_DISABLED)
+ else if ((state == CIM_STATE_DISABLED) || (state == CIM_STATE_SHUTDOWN))
s = state_change_disable(dom, &info);
else if (state == CIM_STATE_PAUSED)
s = state_change_pause(dom, &info);
Show replies by date