mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[cloudstack] Add get volumes for server
This commit is contained in:
parent
e7d28fe82c
commit
8c415efd50
2 changed files with 9 additions and 3 deletions
|
@ -50,7 +50,12 @@ module Fog
|
|||
end
|
||||
|
||||
def ip_addresses
|
||||
addresses.map{|a| a.ip_address}
|
||||
addresses.map(&:ip_address)
|
||||
end
|
||||
|
||||
def volumes
|
||||
requires :id
|
||||
service.volumes.all('virtualmachineid' => id)
|
||||
end
|
||||
|
||||
def public_ip_addresses
|
||||
|
|
|
@ -7,8 +7,9 @@ module Fog
|
|||
class Volumes < Fog::Collection
|
||||
model Fog::Compute::Cloudstack::Volume
|
||||
|
||||
def all
|
||||
data = service.list_volumes["listvolumesresponse"]["volume"] || []
|
||||
def all(attributes = {})
|
||||
response = service.list_volumes(attributes)
|
||||
data = response["listvolumesresponse"]["volume"] || []
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue