Class: Fog::OpenStack::Compute::Aggregates
- Inherits:
-
Fog::OpenStack::Collection
- Object
- Collection
- Fog::OpenStack::Collection
- Fog::OpenStack::Compute::Aggregates
- Defined in:
- lib/fog/openstack/compute/models/aggregates.rb
Instance Attribute Summary
Attributes inherited from Fog::OpenStack::Collection
Instance Method Summary collapse
Methods inherited from Fog::OpenStack::Collection
Instance Method Details
#all(options = {}) ⇒ Object
10 11 12 |
# File 'lib/fog/openstack/compute/models/aggregates.rb', line 10 def all( = {}) load_response(service.list_aggregates(), 'aggregates') end |
#destroy(id) ⇒ Object
19 20 21 22 |
# File 'lib/fog/openstack/compute/models/aggregates.rb', line 19 def destroy(id) aggregate = find_by_id(id) aggregate.destroy end |
#find_by_id(id) ⇒ Object Also known as: get
14 15 16 |
# File 'lib/fog/openstack/compute/models/aggregates.rb', line 14 def find_by_id(id) new(service.get_aggregate(id).body['aggregate']) end |