1
0
Fork 0
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:
Ferran Rodenas 2013-04-04 00:14:54 +02:00
parent 3d679b9cbf
commit 8b84922ac7

View file

@ -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']