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(volume_id:, vm_id:, target:) ⇒ Object


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

def volume_attach(volume_id:, vm_id:, target:)
  action(:volume, :attach, 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(volume_id:) ⇒ Object


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

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

#volume_detach(volume_id:) ⇒ Object


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

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

#volume_extend(volume_id:, size:) ⇒ Object


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

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

#volume_info(volume_id:) ⇒ Object


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

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

#volume_listObject


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

def volume_list
  action(:volume, :list)
end

#volume_rename(volume_id:, name:) ⇒ Object


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

def volume_rename(volume_id:, name:)
  action(:volume, :rename, volume_id: volume_id, name: name)
end

#volume_snapshot_create(volume_id:, label:) ⇒ Object


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

def volume_snapshot_create(volume_id:, label:)
  action(:volume, :"snapshot-create", 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

#volume_snapshot_replicate(region:, snapshot_id:, image_name:, dst_region:) ⇒ Object


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

def volume_snapshot_replicate(region:, snapshot_id:, image_name:, dst_region:)
  action(:volume, :"snapshot-list", region: region, snapshot_id: snapshot_id, image_name: image_name, dst_region: dst_region)
end