module Fog::Kubevirt::Compute::VmAction

Public Instance Methods

start(options = {}) click to toggle source
# File lib/fog/kubevirt/compute/models/vm_action.rb, line 5
def start(options = {})
  # 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 = {}) click to toggle source
# File lib/fog/kubevirt/compute/models/vm_action.rb, line 17
def stop(options = {})
  vm = service.get_raw_vm(name)
  vm = deep_merge!(vm,
    :spec => {
      :running => false
    }
  )
  service.update_vm(vm)
end