Class: Fog::Network::StormOnDemand::Rulesets
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::Network::StormOnDemand::Rulesets
- Defined in:
- lib/fog/storm_on_demand/models/network/rulesets.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Collection
#clear, #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 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
20 21 22 23 |
# File 'lib/fog/storm_on_demand/models/network/rulesets.rb', line 20 def all(={}) r = service.list_rulesets().body['item'] load(r) end |
#create(name, server_id) ⇒ Object
10 11 12 13 |
# File 'lib/fog/storm_on_demand/models/network/rulesets.rb', line 10 def create(name, server_id) r = service.create_ruleset(:name => name, :uniq_id => server_id).body new(r) end |
#get(ruleset) ⇒ Object
15 16 17 18 |
# File 'lib/fog/storm_on_demand/models/network/rulesets.rb', line 15 def get(ruleset) r = service.get_ruleset(:ruleset => ruleset).body new(r) end |