Module: Lunanode::APIActions::Volume

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

Instance Method Summary collapse

Instance Method Details

#volume_attach(region:, volume_id:, vm_id:, target:) ⇒ Object


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

def volume_attach(region:, volume_id:, vm_id:, target:)
  action(:volume, :attach, region: region, volume_id: volume_id, vm_id: vm_id, target: target)
end

#volume_create(region:, label:, size:, image: nil, snapshot_id: nil) ⇒ Object


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

def volume_create(region:, label:, size:, image: nil, snapshot_id: nil)
  action(:volume, :create, region: region, label: label, size: size, image: image, snapshot_id: snapshot_id)
end

#volume_delete(region:, volume_id:) ⇒ Object


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

def volume_delete(region:, volume_id:)
  action(:volume, :delete, region: region, volume_id: volume_id)
end

#volume_detach(region:, volume_id:) ⇒ Object


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

def volume_detach(region:, volume_id:)
  action(:volume, :detach, region: region, volume_id: volume_id)
end

#volume_extend(region:, volume_id:, size:) ⇒ Object


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

def volume_extend(region:, volume_id:, size:)
  action(:volume, :extend, region: region, volume_id: volume_id, size: size)
end

#volume_info(region:, volume_id:) ⇒ Object


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

def volume_info(region:, volume_id:)
  action(:volume, :info, region: region, volume_id: volume_id)
end

#volume_list(region:) ⇒ Object


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

def volume_list(region:)
  action(:volume, :list, region: region)
end

#volume_snapshot_create(region:, volume_id:, label:) ⇒ Object


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

def volume_snapshot_create(region:, volume_id:, label:)
  action(:volume, :"snapshot-create", region: region, volume_id: volume_id, label: label)
end

#volume_snapshot_delete(region:, snapshot_id:) ⇒ Object


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

def volume_snapshot_delete(region:, snapshot_id:)
  action(:volume, :"snapshot-delete", region: region, snapshot_id: snapshot_id)
end

#volume_snapshot_list(region:) ⇒ Object


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

def volume_snapshot_list(region:)
  action(:volume, :"snapshot-list", region: region)
end