Revision 728d0435 src/oca/ruby/opennebula/virtual_machine.rb

View differences:

src/oca/ruby/opennebula/virtual_machine.rb
47 47
        }
48 48

  
49 49
        VM_STATE=%w{INIT PENDING HOLD ACTIVE STOPPED SUSPENDED DONE FAILED
50
            POWEROFF SHUTDOWN_SAVED}
50
            POWEROFF UNDEPLOYED}
51 51

  
52 52
        LCM_STATE=%w{LCM_INIT PROLOG BOOT RUNNING MIGRATE SAVE_STOP SAVE_SUSPEND
53 53
            SAVE_MIGRATE PROLOG_MIGRATE PROLOG_RESUME EPILOG_STOP EPILOG
54 54
            SHUTDOWN CANCEL FAILURE CLEANUP_RESUBMIT UNKNOWN HOTPLUG SHUTDOWN_POWEROFF
55 55
            BOOT_UNKNOWN BOOT_POWEROFF BOOT_SUSPENDED BOOT_STOPPED CLEANUP_DELETE
56 56
            HOTPLUG_SNAPSHOT HOTPLUG_NIC HOTPLUG_SAVEAS HOTPLUG_SAVEAS_POWEROFF
57
            HOTPLUG_SAVEAS_SUSPENDED SHUTDOWN_SAVE EPILOG_SHUTDOWN_SAVE
58
            PROLOG_SHUTDOWN_SAVE}
57
            HOTPLUG_SAVEAS_SUSPENDED UNDEPLOYING EPILOG_UNDEPLOY PROLOG_UNDEPLOY}
59 58

  
60 59
        SHORT_VM_STATES={
61 60
            "INIT"      => "init",
......
67 66
            "DONE"      => "done",
68 67
            "FAILED"    => "fail",
69 68
            "POWEROFF"  => "poff",
70
            "SHUTDOWN_SAVED"  => "shut"
69
            "UNDEPLOYING"  => "unde"
71 70
        }
72 71

  
73 72
        SHORT_LCM_STATES={
......
99 98
            "HOTPLUG_SAVEAS"           => "hotp",
100 99
            "HOTPLUG_SAVEAS_POWEROFF"  => "hotp",
101 100
            "HOTPLUG_SAVEAS_SUSPENDED" => "hotp",
102
            "SHUTDOWN_SAVE"            => "shut",
103
            "EPILOG_SHUTDOWN_SAVE"     => "epil",
104
            "PROLOG_SHUTDOWN_SAVE"     => "prol"
101
            "UNDEPLOYING"       => "unde",
102
            "EPILOG_UNDEPLOY"   => "epil",
103
            "PROLOG_UNDEPLOY"   => "prol"
105 104
        }
106 105

  
107 106
        MIGRATE_REASON=%w{NONE ERROR STOP_RESUME USER CANCEL}
......
215 214
            action(hard ? 'shutdown-hard' : 'shutdown')
216 215
        end
217 216

  
218
        # Shutdowns an already deployed VM
219
        def shutdown_save(hard=false)
220
            action(hard ? 'shutdown-save-hard' : 'shutdown-save')
217
        # Shuts down an already deployed VM, saving its state in the system DS
218
        def undeploy(hard=false)
219
            action(hard ? 'undeploy-hard' : 'undeploy')
221 220
        end
222 221

  
223

  
224 222
        # Powers off a running VM
225 223
        def poweroff
226 224
            action('poweroff')

Also available in: Unified diff