Class: Fog::Rackspace::AutoScale::LaunchConfig
- Inherits:
-
Model
- Object
- Model
- Fog::Rackspace::AutoScale::LaunchConfig
- Defined in:
- lib/fog/rackspace/models/auto_scale/launch_config.rb
Instance Attribute Summary collapse
-
#args ⇒ Fog::Rackspace::AutoScale::Group
readonly
The arguments for the operation.
-
#group ⇒ Fog::Rackspace::AutoScale::Group
readonly
The parent group.
-
#type ⇒ Fog::Rackspace::AutoScale::Group
readonly
The type of operation (usually “launch_server”).
Instance Method Summary collapse
-
#reload ⇒ Object
Reloads group launch configuration.
-
#save ⇒ Boolean
Saves group launch configuration.
-
#update ⇒ Boolean
Update this group’s launch configuration.
Instance Attribute Details
#args ⇒ Fog::Rackspace::AutoScale::Group (readonly)
Returns The arguments for the operation.
17 |
# File 'lib/fog/rackspace/models/auto_scale/launch_config.rb', line 17 attribute :args |
#group ⇒ Fog::Rackspace::AutoScale::Group (readonly)
Returns The parent group.
9 |
# File 'lib/fog/rackspace/models/auto_scale/launch_config.rb', line 9 attribute :group |
#type ⇒ Fog::Rackspace::AutoScale::Group (readonly)
Returns The type of operation (usually “launch_server”).
13 |
# File 'lib/fog/rackspace/models/auto_scale/launch_config.rb', line 13 attribute :type |
Instance Method Details
#reload ⇒ Object
Reloads group launch configuration
52 53 54 55 56 57 |
# File 'lib/fog/rackspace/models/auto_scale/launch_config.rb', line 52 def reload if group.id data = service.get_launch_config(group.id) merge_attributes data.body['launchConfiguration'] end end |
#save ⇒ Boolean
Saves group launch configuration. This method will only save existing group configurations. New group configurations are created when a scaling group is created
42 43 44 45 46 47 48 49 |
# File 'lib/fog/rackspace/models/auto_scale/launch_config.rb', line 42 def save if group.id update true else raise "New #{self.class} are created when a new Fog::Rackspace::AutoScale::Group is created" end end |
#update ⇒ Boolean
Update this group’s launch configuration
29 30 31 32 33 34 35 36 |
# File 'lib/fog/rackspace/models/auto_scale/launch_config.rb', line 29 def update = {} ['type'] = type unless type.nil? ['args'] = args unless args.nil? service.update_launch_config(group.id, ) true end |