Module: Lunanode::APIActions::VM

Included in:
Lunanode::APIActions
Defined in:
lib/lunanode/api_actions/vm.rb,
lib/lunanode/api_actions/default/vm.rb

Instance Method Summary collapse

Instance Method Details

#vm_create(hostname:, plan_id:, image_id:, region: nil, ip: nil, net_id: nil, securitygroups: nil, scripts: nil, volume_id: nil, volume_virtio: nil, key_id: nil, set_password: nil, affinity_group: nil) ⇒ Object


74
75
76
# File 'lib/lunanode/api_actions/default/vm.rb', line 74

def vm_create(hostname:, plan_id:, image_id:, region: nil, ip: nil, net_id: nil, securitygroups: nil, scripts: nil, volume_id: nil, volume_virtio: nil, key_id: nil, set_password: nil, affinity_group: nil)
  action(:vm, :create, hostname: hostname, plan_id: plan_id, image_id: image_id, region: region, ip: ip, net_id: net_id, securitygroups: securitygroups, scripts: scripts, volume_id: volume_id, volume_virtio: volume_virtio, key_id: key_id, set_password: set_password, affinity_group: affinity_group)
end

#vm_delete(vm_id:) ⇒ Object


26
27
28
# File 'lib/lunanode/api_actions/default/vm.rb', line 26

def vm_delete(vm_id:)
  action(:vm, :delete, vm_id: vm_id)
end

#vm_diskswap(vm_id:) ⇒ Object


18
19
20
# File 'lib/lunanode/api_actions/default/vm.rb', line 18

def vm_diskswap(vm_id:)
  action(:vm, :diskswap, vm_id: vm_id)
end

#vm_floatingip_add(vm_id:, ip: nil, private_ip: nil) ⇒ Object


46
47
48
# File 'lib/lunanode/api_actions/default/vm.rb', line 46

def vm_floatingip_add(vm_id:, ip: nil, private_ip: nil)
  action(:vm, :"floatingip-add", vm_id: vm_id, ip: ip, private_ip: private_ip)
end

#vm_floatingip_delete(vm_id:, ip: nil, keep: nil) ⇒ Object


50
51
52
# File 'lib/lunanode/api_actions/default/vm.rb', line 50

def vm_floatingip_delete(vm_id:, ip: nil, keep: nil)
  action(:vm, :"floatingip-delete", vm_id: vm_id, ip: ip, keep: keep)
end

#vm_info(vm_id:) ⇒ Object


22
23
24
# File 'lib/lunanode/api_actions/default/vm.rb', line 22

def vm_info(vm_id:)
  action(:vm, :info, vm_id: vm_id)
end

#vm_ip_add(vm_id:, ip: nil) ⇒ Object


58
59
60
# File 'lib/lunanode/api_actions/default/vm.rb', line 58

def vm_ip_add(vm_id:, ip: nil)
  action(:vm, :"ip-add", vm_id: vm_id, ip: ip)
end

#vm_ip_delete(vm_id:, ip:) ⇒ Object


62
63
64
# File 'lib/lunanode/api_actions/default/vm.rb', line 62

def vm_ip_delete(vm_id:, ip:)
  action(:vm, :"ip-delete", vm_id: vm_id, ip: ip)
end

#vm_iplist(vm_id:) ⇒ Object


54
55
56
# File 'lib/lunanode/api_actions/default/vm.rb', line 54

def vm_iplist(vm_id:)
  action(:vm, :iplist, vm_id: vm_id)
end

#vm_listObject


82
83
84
# File 'lib/lunanode/api_actions/default/vm.rb', line 82

def vm_list
  action(:vm, :list)
end

#vm_reboot(vm_id:) ⇒ Object


14
15
16
# File 'lib/lunanode/api_actions/default/vm.rb', line 14

def vm_reboot(vm_id:)
  action(:vm, :reboot, vm_id: vm_id)
end

#vm_reimage(vm_id:, image_id:) ⇒ Object


30
31
32
# File 'lib/lunanode/api_actions/default/vm.rb', line 30

def vm_reimage(vm_id:, image_id:)
  action(:vm, :reimage, vm_id: vm_id, image_id: image_id)
end

#vm_rename(vm_id:, hostname:) ⇒ Object


94
95
96
# File 'lib/lunanode/api_actions/default/vm.rb', line 94

def vm_rename(vm_id:, hostname:)
  action(:vm, :rename, vm_id: vm_id, hostname: hostname)
end

#vm_rescue(vm_id:) ⇒ Object


38
39
40
# File 'lib/lunanode/api_actions/default/vm.rb', line 38

def vm_rescue(vm_id:)
  action(:vm, :rescue, vm_id: vm_id)
end

#vm_resize(vm_id:, plan_id:) ⇒ Object


34
35
36
# File 'lib/lunanode/api_actions/default/vm.rb', line 34

def vm_resize(vm_id:, plan_id:)
  action(:vm, :resize, vm_id: vm_id, plan_id: plan_id)
end

#vm_securitygroup_add(vm_id:, group_id:) ⇒ Object


66
67
68
# File 'lib/lunanode/api_actions/default/vm.rb', line 66

def vm_securitygroup_add(vm_id:, group_id:)
  action(:vm, :"securitygroup-add", vm_id: vm_id, group_id: group_id)
end

#vm_securitygroup_remove(vm_id:, group_id:) ⇒ Object


70
71
72
# File 'lib/lunanode/api_actions/default/vm.rb', line 70

def vm_securitygroup_remove(vm_id:, group_id:)
  action(:vm, :"securitygroup-remove", vm_id: vm_id, group_id: group_id)
end

#vm_shelve(vm_id:) ⇒ Object


86
87
88
# File 'lib/lunanode/api_actions/default/vm.rb', line 86

def vm_shelve(vm_id:)
  action(:vm, :shelve, vm_id: vm_id)
end

#vm_snapshot(vm_id:, name:) ⇒ Object


78
79
80
# File 'lib/lunanode/api_actions/default/vm.rb', line 78

def vm_snapshot(vm_id:, name:)
  action(:vm, :snapshot, vm_id: vm_id, name: name)
end

#vm_start(vm_id:) ⇒ Object


6
7
8
# File 'lib/lunanode/api_actions/default/vm.rb', line 6

def vm_start(vm_id:)
  action(:vm, :start, vm_id: vm_id)
end

#vm_stop(vm_id:) ⇒ Object


10
11
12
# File 'lib/lunanode/api_actions/default/vm.rb', line 10

def vm_stop(vm_id:)
  action(:vm, :stop, vm_id: vm_id)
end

#vm_unshelve(vm_id:) ⇒ Object


90
91
92
# File 'lib/lunanode/api_actions/default/vm.rb', line 90

def vm_unshelve(vm_id:)
  action(:vm, :unshelve, vm_id: vm_id)
end

#vm_vnc(vm_id:) ⇒ Object


42
43
44
# File 'lib/lunanode/api_actions/default/vm.rb', line 42

def vm_vnc(vm_id:)
  action(:vm, :vnc, vm_id: vm_id)
end