Class: Fog::Compute::Cloudstack::NetworkOfferings
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Cloudstack::NetworkOfferings
- Defined in:
- lib/fog/cloudstack/models/compute/network_offerings.rb
Instance Method Summary collapse
Instance Method Details
#all(filters = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/fog/cloudstack/models/compute/network_offerings.rb', line 12 def all(filters={}) = (filters) data = service.list_network_offerings()["listnetworkofferingsresponse"]["networkoffering"] || [] load(data) end |
#get(network_offering_id, filters = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/fog/cloudstack/models/compute/network_offerings.rb', line 18 def get(network_offering_id, filters={}) filter_option = (filters) = filter_option.merge('id' => network_offering_id) if data = service.list_network_offerings()["listnetworkofferingsresponse"]["networkoffering"].first new(data) end rescue Fog::Compute::Cloudstack::BadRequest nil end |