Class: Fog::Compute::Cloudstack::Volumes
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Cloudstack::Volumes
- Defined in:
- lib/fog/cloudstack/models/compute/volumes.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
12 13 14 15 |
# File 'lib/fog/cloudstack/models/compute/volumes.rb', line 12 def all data = service.list_volumes["listvolumesresponse"]["volume"] || [] load(data) end |
#get(volume_id) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/fog/cloudstack/models/compute/volumes.rb', line 17 def get(volume_id) if volume = service.list_volumes('id' => volume_id)["listvolumesresponse"]["volume"].first new(volume) end rescue Fog::Compute::Cloudstack::BadRequest nil end |