Class: Fog::Compute::Cloudstack::DiskOfferings

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/cloudstack/models/compute/disk_offerings.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object


10
11
12
13
14
# File 'lib/fog/cloudstack/models/compute/disk_offerings.rb', line 10

def all(options = {})
  response = service.list_disk_offerings(options)
  disk_offerings_data = response["listdiskofferingsresponse"]["diskoffering"] || []
  load(disk_offerings_data)
end

#get(disk_offering_id) ⇒ Object


16
17
18
19
20
# File 'lib/fog/cloudstack/models/compute/disk_offerings.rb', line 16

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