Module: Fog::Kubevirt::Compute::VmAction
Instance Method Summary collapse
Instance Method Details
#start(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/kubevirt/compute/models/vm_action.rb', line 5 def start( = {}) # Change the `running` attribute to `true` so that the virtual machine controller will take it and # create the virtual machine instance. vm = service.get_raw_vm(name) vm = deep_merge!(vm, :spec => { :running => true } ) service.update_vm(vm) end |
#stop(options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/fog/kubevirt/compute/models/vm_action.rb', line 17 def stop( = {}) vm = service.get_raw_vm(name) vm = deep_merge!(vm, :spec => { :running => false } ) service.update_vm(vm) end |