Class: McDeployment
- Inherits:
-
Object
- Object
- McDeployment
- Defined in:
- lib/rest_connection/rightscale/mc_deployment.rb
Overview
API 1.5
Instance Attribute Summary
Attributes included from RightScale::Api::Base
Class Method Summary collapse
- .create(opts) ⇒ Object
- .filters ⇒ Object
- .resource_plural_name ⇒ Object
- .resource_singular_name ⇒ Object
Instance Method Summary collapse
-
#destroy ⇒ Object
TODO Add server method.
- #resource_plural_name ⇒ Object
- #resource_singular_name ⇒ Object
- #save ⇒ Object
Methods included from RightScale::Api::GatewayExtend
create, filters, find, find_all, find_by, find_with_filter, load, load_all, parse_args, resource_post_name
Methods included from RightScale::Api::GatewayConnection
Methods included from RightScale::Api::BaseExtend
#[], #create, #deny_methods, #filters, #find, #find_all, #find_by, #find_by_cloud_id, #find_by_id, #find_by_nickname, #find_by_nickname_speed, #find_with_filter
Methods included from RightScale::Api::BaseConnection
Methods included from RightScale::Api::McTaggableExtend
Methods included from RightScale::Api::McInput
Methods included from RightScale::Api::McTaggable
#add_tags, #remove_tags, #tags
Methods included from RightScale::Api::Taggable
#add_tags, #clear_tags, #get_info_tags, #get_tags_by_namespace, #remove_info_tags, #remove_tags, #remove_tags_by_namespace, #set_info_tags, #set_tags_by_namespace, #set_tags_to, #tags
Methods included from RightScale::Api::Gateway
#[], #[]=, #actions, #hash_of_links, #href, #initialize, #load, #method_missing, #nickname, #parse_params, #rediscover
Methods included from RightScale::Api::Base
#[], #[]=, #initialize, #method_missing, #reload, #rs_id
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightScale::Api::Gateway
Class Method Details
.create(opts) ⇒ Object
54 55 56 57 58 59 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 54 def self.create(opts) location = connection.post(resource_plural_name, opts) newrecord = self.new('href' => location) newrecord.show newrecord end |
.filters ⇒ Object
50 51 52 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 50 def self.filters [:description, :name] end |
.resource_plural_name ⇒ Object
42 43 44 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 42 def self.resource_plural_name "deployments" end |
.resource_singular_name ⇒ Object
46 47 48 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 46 def self.resource_singular_name "deployment" end |
Instance Method Details
#destroy ⇒ Object
TODO Add server method
68 69 70 71 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 68 def destroy deploy_href = URI.parse(self.href) connection.delete(deploy_href.path) end |
#resource_plural_name ⇒ Object
34 35 36 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 34 def resource_plural_name "deployments" end |
#resource_singular_name ⇒ Object
38 39 40 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 38 def resource_singular_name "deployment" end |
#save ⇒ Object
61 62 63 64 |
# File 'lib/rest_connection/rightscale/mc_deployment.rb', line 61 def save inst_href = URI.parse(self.href) connection.put(inst_href.path, @params) end |