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

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



17
18
19
20
# File 'lib/fog/network/storm_on_demand/models/rulesets.rb', line 17

def all(options = {})
  r = service.list_rulesets(options).body["item"]
  load(r)
end

#create(name, server_id) ⇒ Object



7
8
9
10
# File 'lib/fog/network/storm_on_demand/models/rulesets.rb', line 7

def create(name, server_id)
  r = service.create_ruleset(:name => name, :uniq_id => server_id).body
  new(r)
end

#get(ruleset) ⇒ Object



12
13
14
15
# File 'lib/fog/network/storm_on_demand/models/rulesets.rb', line 12

def get(ruleset)
  r = service.get_ruleset(:ruleset => ruleset).body
  new(r)
end