mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
Feature #1631: Rearrange History Actions so NONE is 0
This commit is contained in:
parent
4abedb3dd9
commit
002ec7e915
@ -37,6 +37,7 @@ public:
|
||||
|
||||
enum VMAction
|
||||
{
|
||||
NONE_ACTION,
|
||||
MIGRATE_ACTION,
|
||||
LIVE_MIGRATE_ACTION,
|
||||
SHUTDOWN_ACTION,
|
||||
@ -56,8 +57,7 @@ public:
|
||||
RESCHED_ACTION,
|
||||
UNRESCHED_ACTION,
|
||||
POWEROFF_ACTION,
|
||||
POWEROFF_HARD_ACTION,
|
||||
NONE_ACTION
|
||||
POWEROFF_HARD_ACTION
|
||||
};
|
||||
|
||||
static string action_to_str(VMAction action)
|
||||
|
@ -345,7 +345,7 @@ public:
|
||||
|
||||
static string db_version()
|
||||
{
|
||||
return "3.9.80";
|
||||
return "4.0.0";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,27 +38,27 @@
|
||||
<xs:element name="REASON" type="xs:integer"/>
|
||||
|
||||
<!-- ACTION values:
|
||||
MIGRATE_ACTION = 0
|
||||
LIVE_MIGRATE_ACTION = 1
|
||||
SHUTDOWN_ACTION = 2
|
||||
SHUTDOWN_HARD_ACTION = 3
|
||||
UNDEPLOY_ACTION = 4
|
||||
UNDEPLOY_HARD_ACTION = 5
|
||||
HOLD_ACTION = 6
|
||||
RELEASE_ACTION = 7
|
||||
STOP_ACTION = 8
|
||||
SUSPEND_ACTION = 9
|
||||
RESUME_ACTION = 10
|
||||
BOOT_ACTION = 11
|
||||
DESTROY_ACTION = 12
|
||||
DESTROY_RECREATE_ACTION = 13
|
||||
REBOOT_ACTION = 14
|
||||
REBOOT_HARD_ACTION = 15
|
||||
RESCHED_ACTION = 16
|
||||
UNRESCHED_ACTION = 17
|
||||
POWEROFF_ACTION = 18
|
||||
POWEROFF_HARD_ACTION = 19
|
||||
NONE_ACTION = 20
|
||||
NONE_ACTION = 0
|
||||
MIGRATE_ACTION = 1
|
||||
LIVE_MIGRATE_ACTION = 2
|
||||
SHUTDOWN_ACTION = 3
|
||||
SHUTDOWN_HARD_ACTION = 4
|
||||
UNDEPLOY_ACTION = 5
|
||||
UNDEPLOY_HARD_ACTION = 6
|
||||
HOLD_ACTION = 7
|
||||
RELEASE_ACTION = 8
|
||||
STOP_ACTION = 9
|
||||
SUSPEND_ACTION = 10
|
||||
RESUME_ACTION = 11
|
||||
BOOT_ACTION = 12
|
||||
DESTROY_ACTION = 13
|
||||
DESTROY_RECREATE_ACTION = 14
|
||||
REBOOT_ACTION = 15
|
||||
REBOOT_HARD_ACTION = 16
|
||||
RESCHED_ACTION = 17
|
||||
UNRESCHED_ACTION = 18
|
||||
POWEROFF_ACTION = 19
|
||||
POWEROFF_HARD_ACTION = 20
|
||||
-->
|
||||
<xs:element name="ACTION" type="xs:integer"/>
|
||||
|
||||
|
@ -125,27 +125,27 @@
|
||||
<xs:element name="REASON" type="xs:integer"/>
|
||||
|
||||
<!-- ACTION values:
|
||||
MIGRATE_ACTION = 0
|
||||
LIVE_MIGRATE_ACTION = 1
|
||||
SHUTDOWN_ACTION = 2
|
||||
SHUTDOWN_HARD_ACTION = 3
|
||||
UNDEPLOY_ACTION = 4
|
||||
UNDEPLOY_HARD_ACTION = 5
|
||||
HOLD_ACTION = 6
|
||||
RELEASE_ACTION = 7
|
||||
STOP_ACTION = 8
|
||||
SUSPEND_ACTION = 9
|
||||
RESUME_ACTION = 10
|
||||
BOOT_ACTION = 11
|
||||
DESTROY_ACTION = 12
|
||||
DESTROY_RECREATE_ACTION = 13
|
||||
REBOOT_ACTION = 14
|
||||
REBOOT_HARD_ACTION = 15
|
||||
RESCHED_ACTION = 16
|
||||
UNRESCHED_ACTION = 17
|
||||
POWEROFF_ACTION = 18
|
||||
POWEROFF_HARD_ACTION = 19
|
||||
NONE_ACTION = 20
|
||||
NONE_ACTION = 0
|
||||
MIGRATE_ACTION = 1
|
||||
LIVE_MIGRATE_ACTION = 2
|
||||
SHUTDOWN_ACTION = 3
|
||||
SHUTDOWN_HARD_ACTION = 4
|
||||
UNDEPLOY_ACTION = 5
|
||||
UNDEPLOY_HARD_ACTION = 6
|
||||
HOLD_ACTION = 7
|
||||
RELEASE_ACTION = 8
|
||||
STOP_ACTION = 9
|
||||
SUSPEND_ACTION = 10
|
||||
RESUME_ACTION = 11
|
||||
BOOT_ACTION = 12
|
||||
DESTROY_ACTION = 13
|
||||
DESTROY_RECREATE_ACTION = 14
|
||||
REBOOT_ACTION = 15
|
||||
REBOOT_HARD_ACTION = 16
|
||||
RESCHED_ACTION = 17
|
||||
UNRESCHED_ACTION = 18
|
||||
POWEROFF_ACTION = 19
|
||||
POWEROFF_HARD_ACTION = 20
|
||||
-->
|
||||
<xs:element name="ACTION" type="xs:integer"/>
|
||||
</xs:sequence>
|
||||
|
@ -111,10 +111,10 @@ module OpenNebula
|
||||
"USER" => "user"
|
||||
}
|
||||
|
||||
HISTORY_ACTION=%w{migrate migrate-live shutdown shutdown-hard undeploy
|
||||
undeploy-hard hold release stop suspend resume boot destroy
|
||||
HISTORY_ACTION=%w{none migrate migrate-live shutdown shutdown-hard
|
||||
undeploy undeploy-hard hold release stop suspend resume boot destroy
|
||||
destroy-recreate reboot reboot-hard resched unresched poweroff
|
||||
poweroff-hard none}
|
||||
poweroff-hard}
|
||||
|
||||
# Creates a VirtualMachine description with just its identifier
|
||||
# this method should be used to create plain VirtualMachine objects.
|
||||
|
@ -83,7 +83,7 @@ module Migrator
|
||||
end
|
||||
|
||||
def update_history(history_elem)
|
||||
history_elem.add_element("ACTION").text = "20" # NONE_ACTION
|
||||
history_elem.add_element("ACTION").text = "0" # NONE_ACTION
|
||||
|
||||
# History reason enum has changed from
|
||||
# NONE, ERROR, STOP_RESUME, USER, CANCEL to
|
||||
|
Loading…
Reference in New Issue
Block a user