Sha256: e90c23301051f5452aa862631ca034dbe374086913f4479d2f8353c87becb678

Contents?: true

Size: 718 Bytes

Versions: 1

Compression:

Stored size: 718 Bytes

Contents

module Fog
  module Compute
    class Cloudstack

      class Real
        # Reboots a virtual machine.
        #
        # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/rebootVirtualMachine.html]
        def reboot_virtual_machine(id, options={})
          options.merge!(
            'command' => 'rebootVirtualMachine', 
            'id' => id  
          )
          request(options)
        end
      end
 
      class Mock
        def reboot_virtual_machine(options={})
          job_id = Fog::Cloudstack.uuid
          {
            "rebootvirtualmachineresponse" => {
              "jobid" => job_id
            }
          }
        end
      end 
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-1.23.0 lib/fog/cloudstack/requests/compute/reboot_virtual_machine.rb