Module: CloudstackClient

Defined in:
lib/connection_helper.rb,
lib/cloudstack_client/client.rb,
lib/cloudstack_client/version.rb,
lib/cloudstack_client/commands/iso.rb,
lib/cloudstack_client/commands/job.rb,
lib/cloudstack_client/commands/pod.rb,
lib/cloudstack_client/commands/host.rb,
lib/cloudstack_client/commands/user.rb,
lib/cloudstack_client/commands/zone.rb,
lib/cloudstack_client/commands/domain.rb,
lib/cloudstack_client/commands/region.rb,
lib/cloudstack_client/commands/router.rb,
lib/cloudstack_client/commands/server.rb,
lib/cloudstack_client/commands/volume.rb,
lib/cloudstack_client/commands/account.rb,
lib/cloudstack_client/commands/cluster.rb,
lib/cloudstack_client/commands/network.rb,
lib/cloudstack_client/commands/project.rb,
lib/cloudstack_client/commands/capacity.rb,
lib/cloudstack_client/commands/snapshot.rb,
lib/cloudstack_client/commands/template.rb,
lib/cloudstack_client/commands/system_vm.rb,
lib/cloudstack_client/commands/ip_address.rb,
lib/cloudstack_client/commands/ssh_key_pair.rb,
lib/cloudstack_client/commands/storage_pool.rb,
lib/cloudstack_client/commands/configuration.rb,
lib/cloudstack_client/commands/disk_offering.rb,
lib/cloudstack_client/commands/affinity_group.rb,
lib/cloudstack_client/commands/resource_limit.rb,
lib/cloudstack_client/commands/service_offering.rb,
lib/cloudstack_client/commands/load_balancer_rule.rb,
lib/cloudstack_client/commands/port_forwarding_rule.rb

Defined Under Namespace

Modules: Account, AffinityGroup, Capacity, Cluster, Configuration, DiskOffering, Domain, Host, IpAddress, Iso, Job, LoadBalancerRule, Network, Pod, PortForwardingRule, Project, Region, ResourceLimit, Router, Server, ServiceOffering, Snapshot, SshKeyPair, StoragePool, SystemVm, Template, User, Volume, Zone Classes: Connection, ConnectionHelper

Constant Summary collapse

VERSION =
"0.9.5"

Instance Method Summary collapse

Instance Method Details

#destroy_system_vm(id, args = {}) ⇒ Object

Destroy sytem VM.



74
75
76
77
78
79
80
# File 'lib/cloudstack_client/commands/system_vm.rb', line 74

def destroy_system_vm(id, args = {})
  params = {
      'command' => 'destroySystemVm',
      'id' => id
  }
  args[:sync] ? send_request(params) : send_async_request(params)['systemvm']
end

#reboot_system_vm(id, args = {}) ⇒ Object

Reboot sytem VM.



62
63
64
65
66
67
68
# File 'lib/cloudstack_client/commands/system_vm.rb', line 62

def reboot_system_vm(id, args = {})
  params = {
    'command' => 'rebootSystemVm',
    'id' => id
  }
  args[:sync] ? send_request(params) : send_async_request(params)['systemvm']
end

#start_system_vm(id, args = {}) ⇒ Object

Start system VM.



50
51
52
53
54
55
56
# File 'lib/cloudstack_client/commands/system_vm.rb', line 50

def start_system_vm(id, args = {})
  params = {
    'command' => 'startSystemVm',
    'id' => id
  }
  args[:sync] ? send_request(params) : send_async_request(params)['systemvm']
end

#stop_system_vm(id, args = {}) ⇒ Object

Stop system VM.



37
38
39
40
41
42
43
44
# File 'lib/cloudstack_client/commands/system_vm.rb', line 37

def stop_system_vm(id, args = {})
  params = {
    'command' => 'stopSystemVm',
    'id' => id
  }
  params['forced'] = true if args[:forced]
  args[:sync] ? send_request(params) : send_async_request(params)['systemvm']
end