Class: Fog::Compute::OpenStack::Volumes
- Inherits:
-
OpenStack::Collection
- Object
- Fog::Collection
- OpenStack::Collection
- Fog::Compute::OpenStack::Volumes
- Defined in:
- lib/fog/openstack/models/compute/volumes.rb
Instance Attribute Summary
Attributes inherited from OpenStack::Collection
Instance Method Summary collapse
Methods inherited from OpenStack::Collection
Instance Method Details
#all(options = true) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fog/openstack/models/compute/volumes.rb', line 10 def all( = true) if !.is_a?(Hash) if Fog::Logger.deprecation('Calling OpenStack[:compute].volumes.all(true) is deprecated, use .volumes.all') else Fog::Logger.deprecation('Calling OpenStack[:compute].volumes.all(false) is deprecated, use .volumes.summary') end load_response(service.list_volumes(), 'volumes') else load_response(service.list_volumes_detail(), 'volumes') end end |
#get(volume_id) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/fog/openstack/models/compute/volumes.rb', line 27 def get(volume_id) if volume = service.get_volume_details(volume_id).body['volume'] new(volume) end rescue Fog::Compute::OpenStack::NotFound nil end |
#summary(options = {}) ⇒ Object
23 24 25 |
# File 'lib/fog/openstack/models/compute/volumes.rb', line 23 def summary( = {}) load_response(service.list_volumes(), 'volumes') end |