Class: Fog::Compute::Cloudstack::DiskOfferings
- Inherits:
-
Fog::Collection
- Object
- Array
- Fog::Collection
- Fog::Compute::Cloudstack::DiskOfferings
- Defined in:
- lib/fog/cloudstack/models/compute/disk_offerings.rb
Instance Attribute Summary
Attributes inherited from Fog::Collection
Instance Method Summary collapse
Methods inherited from Fog::Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all(options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/fog/cloudstack/models/compute/disk_offerings.rb', line 12 def all( = {}) response = service.list_disk_offerings() disk_offerings_data = response["listdiskofferingsresponse"]["diskoffering"] || [] load(disk_offerings_data) end |
#get(disk_offering_id) ⇒ Object
18 19 20 21 22 |
# File 'lib/fog/cloudstack/models/compute/disk_offerings.rb', line 18 def get(disk_offering_id) response = service.list_disk_offerings('id' => disk_offering_id) disk_offering_data = response["listdiskofferingsresponse"]["diskoffering"].first new(disk_offering_data) end |