Class: Deployment
- Inherits:
-
RightResource::Base
- Object
- RightResource::Base
- Deployment
- Defined in:
- lib/right_resource/deployment.rb
Overview
Define methods
deployment actions (start_all, stop_all, duplicate)
Parameters
-
id
- RightScale deployment resource id(my.rightscale.com/deployments/RightResource::Base#id)
Instance Attribute Summary
Attributes inherited from RightResource::Base
Class Method Summary collapse
-
.index(params = {}) ⇒ Object
Override RightResource::Base#index Hash2Object of RightScale servers.
-
.show(id, params = {}) ⇒ Object
Override RightResource::Base#show Hash2Object of RightScale servers.
Instance Method Summary collapse
-
#servers ⇒ Object
Convert servers.
Methods inherited from RightResource::Base
action, #clone, collection_path, connection, connection=, correct_attributes, create, #destory, destory, #dup, element_path, format, format=, headers, #initialize, #known_attributes, #loads, logger, logger=, #new?, #reload, resource_id, resource_name, #respond_to?, #respond_to_without_attributes?, #save, #schema, status_code, update, #update_attribute, #update_attributes
Constructor Details
This class inherits a constructor from RightResource::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightResource::Base
Class Method Details
.index(params = {}) ⇒ Object
Override RightResource::Base#index Hash2Object of RightScale servers
9 10 11 12 13 14 15 16 |
# File 'lib/right_resource/deployment.rb', line 9 def index(params = {}) deployments = super deployments.each do |deployment| deployment.servers end deployments end |
.show(id, params = {}) ⇒ Object
Override RightResource::Base#show Hash2Object of RightScale servers
20 21 22 23 24 25 26 27 |
# File 'lib/right_resource/deployment.rb', line 20 def show(id, params = {}) deployment = super unless deployment.nil? deployment.servers end deployment end |