Class: ServerTemplate

Inherits:
RightResource::Base show all
Defined in:
lib/right_resource/server_template.rb

Instance Attribute Summary

Attributes inherited from RightResource::Base

#attributes, #id

Class Method Summary collapse

Methods inherited from RightResource::Base

action, #clone, collection_path, connection, connection=, correct_attributes, create, destory, #destory, #dup, element_path, format, format=, headers, index, #initialize, #known_attributes, #loads, logger, logger=, #new?, #reload, resource_id, resource_name, #respond_to?, #respond_to_without_attributes?, #save, #schema, show, 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

.executables(id, params = {}) ⇒ Object

Get scripts added to the ServerTemplate every phases

Parameters

  • id - ServerTemplate id

  • params - Hash (keys = [:phase]) ex. ‘boot’, ‘operational’, ‘decommission’ if not defined, all phases



7
8
9
10
# File 'lib/right_resource/server_template.rb', line 7

def executables(id, params={})
  path = element_path(id, :executables, params)
  format.decode(connection.get(path)).map {|resource| correct_attributes(resource)}
end