Class: Fog::Network::StormOnDemand::Rulesets

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/storm_on_demand/models/network/rulesets.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



20
21
22
23
# File 'lib/fog/storm_on_demand/models/network/rulesets.rb', line 20

def all(options={})
  r = service.list_rulesets(options).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