Class: Fog::Compute::Cloudstack::DiskOffering
- Defined in:
- lib/fog/cloudstack/models/compute/disk_offering.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
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::Model
Instance Method Details
#destroy ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/fog/cloudstack/models/compute/disk_offering.rb', line 34 def destroy requires :id response = service.delete_disk_offering('id' => id ) success_status = response['deletediskofferingresponse']['success'] success_status == 'true' end |
#save ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fog/cloudstack/models/compute/disk_offering.rb', line 17 def save requires :display_text, :name = { 'displaytext' => display_text, 'name' => name, 'customized' => is_customized, 'disksize' => disk_size, 'domain_id' => domain_id, 'storagetype' => storage_type, 'tags' => } response = service.create_disk_offering() merge_attributes(response['creatediskofferingresponse']) end |