Class: Fog::Compute::Cloudstack::DiskOffering

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/cloudstack/models/compute/disk_offering.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



33
34
35
36
37
38
39
40
# File 'lib/fog/cloudstack/models/compute/disk_offering.rb', line 33

def destroy
  requires :id

  response = service.delete_disk_offering('id' => id )
  success_status = response['deletediskofferingresponse']['success']

  success_status == 'true'
end

#saveObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/fog/cloudstack/models/compute/disk_offering.rb', line 16

def save
  requires :display_text, :name

  options = {
    'displaytext' => display_text,
    'name'        => name,
    'customized'  => is_customized,
    'disksize'    => disk_size,
    'domain_id'   => domain_id,
    'storagetype' => storage_type,
    'tags'        => tags
  }

  response = service.create_disk_offering(options)
  merge_attributes(response['creatediskofferingresponse'])
end