Skip to content

Commit

Permalink
Helper methods for for new “rename” action on image and volume. Thank…
Browse files Browse the repository at this point in the history
…s, LN!
  • Loading branch information
nomoon committed Feb 10, 2017
1 parent c61d249 commit 7595565
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/lunanode/api_actions/default/image.rb
Expand Up @@ -26,6 +26,10 @@ def image_fetch(region:, name:, location:, format:, virtio: nil)
def image_retrieve(image_id:)
action(:image, :retrieve, image_id: image_id)
end

def image_rename(image_id:, name:)
action(:image, :rename, image_id: image_id, name: name)
end
end
end
end
4 changes: 4 additions & 0 deletions lib/lunanode/api_actions/default/volume.rb
Expand Up @@ -42,6 +42,10 @@ def volume_snapshot_delete(region:, snapshot_id:)
def volume_snapshot_list(region:)
action(:volume, :"snapshot-list", region: region)
end

def volume_rename(volume_id:, name:)
action(:volume, :rename, volume_id: volume_id, name: name)
end
end
end
end
8 changes: 8 additions & 0 deletions lunanode_api_def.yaml
Expand Up @@ -160,6 +160,10 @@
:retrieve:
:keyreq:
- image_id
:rename:
:keyreq:
- image_id
- name
:volume:
:list:
:keyreq:
Expand Down Expand Up @@ -207,6 +211,10 @@
:snapshot-list:
:keyreq:
- region
:rename:
:keyreq:
- volume_id
- name
:floating:
:list:
:add:
Expand Down

0 comments on commit 7595565

Please sign in to comment.