Class: Fog::Rackspace::AutoScale::Groups
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::Rackspace::AutoScale::Groups
- Defined in:
- lib/fog/rackspace/models/auto_scale/groups.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
-
#all ⇒ Fog::Rackspace::AutoScale::Groups
Returns list of autoscale groups.
-
#get(group_id) ⇒ Fog::Rackspace::AutoScale::Group
Returns an individual autoscale group.
Methods inherited from Collection
#clear, #create, #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 ⇒ Fog::Rackspace::AutoScale::Groups
Returns list of autoscale groups
21 22 23 24 |
# File 'lib/fog/rackspace/models/auto_scale/groups.rb', line 21 def all data = service.list_groups.body['groups'] load(data) end |
#get(group_id) ⇒ Fog::Rackspace::AutoScale::Group
Returns an individual autoscale group
37 38 39 40 41 42 |
# File 'lib/fog/rackspace/models/auto_scale/groups.rb', line 37 def get(group_id) data = service.get_group(group_id).body['group'] new(data) rescue Fog::Rackspace::AutoScale::NotFound nil end |