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