Signed-off-by: Magnus Therning <[email protected]>

# HG changeset patch
# User Magnus Therning <[email protected]>
# Date 1265812421 0
# Node ID bb25c2df58d5752be841614097f4bca1ff45a6de
# Parent  5f0f093c3dd3f44003c640e36af1469888441e39
Remove the Unknown VM power state.

Signed-off-by: Magnus Therning <[email protected]>

diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/client_records/record_util.ml
--- a/ocaml/client_records/record_util.ml	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/client_records/record_util.ml	Wed Feb 10 14:33:41 2010 +0000
@@ -25,7 +25,6 @@
   | `Suspended -> "Suspended"
   | `ShuttingDown -> "Shutting down"
   | `Migrating -> "Migrating"
-  | `Unknown -> "Unknown"
 
 let vm_operation_table = 
   [
@@ -280,7 +279,6 @@
     | `Suspended -> "suspended"
     | `ShuttingDown -> "shutting down"
     | `Migrating -> "migrating"
-    | `Unknown -> "unknown"
 
 let vdi_type_to_string t =
   match t with
diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/idl/datamodel.ml
--- a/ocaml/idl/datamodel.ml	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/idl/datamodel.ml	Wed Feb 10 14:33:41 2010 +0000
@@ -5368,8 +5368,7 @@
   Enum ("vm_power_state", [ "Halted", "VM is offline and not using any resources";
 			    "Paused", "All resources have been allocated but the VM itself is paused and its vCPUs are not running";
 			    "Running", "Running";
-			    "Suspended", "VM state has been saved to disk and it is nolonger running. Note that disks remain in-use while the VM is suspended.";
-			    "Unknown", "Some other unknown state"])
+				"Suspended", "VM state has been saved to disk and it is nolonger running. Note that disks remain in-use while the VM is suspended."])
 
 let vm_operations = 
   Enum ("vm_operations",
diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/toplevel/testscript.ml
--- a/ocaml/toplevel/testscript.ml	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/toplevel/testscript.ml	Wed Feb 10 14:33:41 2010 +0000
@@ -58,7 +58,6 @@
   | `Suspended -> "Suspended"
   | `ShuttingDown -> "Shutting down"
   | `Migrating -> "Migrating"
-  | `Unknown -> "Unknown"
 	
 let change_vm_state2 session_id vm force state =
   ignore(change_vm_state session_id vm force state);
diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/xapi/stresstest.ml
--- a/ocaml/xapi/stresstest.ml	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/xapi/stresstest.ml	Wed Feb 10 14:33:41 2010 +0000
@@ -28,7 +28,7 @@
 	let password = ref "xenroot"
 	let secure = ref true
 
-	type vmState = Running | Halted | Suspended | Paused | Unknown
+	type vmState = Running | Halted | Suspended | Paused
 
 	let rpc xml =
 		if !secure then
@@ -84,7 +84,6 @@
 		| `Paused -> Paused
 		| `Running -> Running
 		| `Suspended -> Suspended
-		| `Unknown -> Unknown
 
 	let vm_is_running vm = (vm_get_state vm = Running)
 	let vm_is_suspended vm = (vm_get_state vm = Suspended)
@@ -415,8 +414,7 @@
 			| Xapi.Running   -> (Xapi.vm_shutdown_force vm.vmref) :: acc
 			| Xapi.Paused    -> (Xapi.vm_unpause vm.vmref) :: acc
 			| Xapi.Suspended -> (Xapi.vm_resume vm.vmref) :: acc
-			| Xapi.Halted
-			| Xapi.Unknown   -> acc
+			| Xapi.Halted    -> acc
 		) [] vms in
 		if List.length tasks > 0 then ( 
 			wait_tasks tasks 60.;
@@ -505,7 +503,6 @@
 		| Xapi.Paused    -> "paused", [ Op_unpause ]
 		| Xapi.Suspended -> "suspended", [ Op_resume ]
 		| Xapi.Halted    -> "halted", [ Op_start ]
-		| Xapi.Unknown   -> "unknown", [ Op_start ]
 		in
 	let choose_one operations : random_op =
 		let l = List.length operations in
diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/xapi/xapi_vm.mli
--- a/ocaml/xapi/xapi_vm.mli	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/xapi/xapi_vm.mli	Wed Feb 10 14:33:41 2010 +0000
@@ -80,8 +80,7 @@
             | `Running
             | `ShuttingDown
             | `Suspended
-            | `Unknown
-            > `Halted `Paused `Running `Suspended `Unknown ] ->
+            > `Halted `Paused `Running `Suspended ] ->
   unit
 val assert_not_ha_protected : __context:Context.t -> vm:[ `VM ] Ref.t -> unit
 val pause_already_locked : __context:Context.t -> vm:[ `VM ] Ref.t -> unit
diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/xapi/xapi_vm_helpers.ml
--- a/ocaml/xapi/xapi_vm_helpers.ml	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/xapi/xapi_vm_helpers.ml	Wed Feb 10 14:33:41 2010 +0000
@@ -30,7 +30,7 @@
 let compute_memory_overhead ~__context ~vm =
   let snapshot = match Db.VM.get_power_state ~__context ~self:vm with
     | `Paused | `Running | `Suspended -> Helpers.get_boot_record ~__context ~self:vm
-    | `Halted | `Unknown | _ -> Db.VM.get_record ~__context ~self:vm in
+    | `Halted | _ -> Db.VM.get_record ~__context ~self:vm in
   Memory_check.vm_compute_memory_overhead snapshot 
 
 let update_memory_overhead ~__context ~vm = Db.VM.set_memory_overhead ~__context ~self:vm ~value:(compute_memory_overhead ~__context ~vm)
diff -r 5f0f093c3dd3 -r bb25c2df58d5 ocaml/xapimon/xapimon.ml
--- a/ocaml/xapimon/xapimon.ml	Tue Feb 02 15:52:34 2010 +0000
+++ b/ocaml/xapimon/xapimon.ml	Wed Feb 10 14:33:41 2010 +0000
@@ -112,7 +112,6 @@
 		| `Suspended    -> "suspend"
 		| `ShuttingDown -> "shuttingdown"
 		| `Migrating    -> "migrating"
-		| `Unknown      -> "unknown"
 
 	let get_uuid vm =
 		Remote.VM.get_uuid ~rpc ~session_id:!session_id ~self:vm
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to