mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[openstack|compute] Add volume method to server model
This commit is contained in:
parent
3d679b9cbf
commit
8b84922ac7
1 changed files with 7 additions and 0 deletions
|
@ -243,6 +243,13 @@ module Fog
|
|||
service.networks(:server => self)
|
||||
end
|
||||
|
||||
def volumes
|
||||
requires :id
|
||||
service.volumes.find_all do |vol|
|
||||
vol.attachments.find { |attachment| attachment["serverId"] == id }
|
||||
end
|
||||
end
|
||||
|
||||
def volume_attachments
|
||||
requires :id
|
||||
service.get_server_volumes(id).body['volumeAttachments']
|
||||
|
|
Loading…
Add table
Reference in a new issue