Class: ServerArray

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

Instance Attribute Summary

Attributes inherited from RightResource::Base

#attributes, #id

Class Method Summary collapse

Methods inherited from RightResource::Base

collection_path, connection, connection=, create, #destory, destory, element_path, format, format=, generate_attributes, headers, index, #initialize, #load_accessor, #loads, logger, logger=, #new?, resource_id, resource_name, #save, show, status, update, #update_attributes

Constructor Details

This class inherits a constructor from RightResource::Base

Class Method Details

.instances(id) ⇒ Object



15
16
17
18
19
20
# File 'lib/right_resource/server_array.rb', line 15

def instances(id)
  path = element_path(id, :instances)
  result = format.decode(connection.get(path)).map do |instance|
    generate_attributes(instance)
  end
end

.launch(id) ⇒ Object



3
4
5
# File 'lib/right_resource/server_array.rb', line 3

def launch(id)
  connection.post(element_path(id, :launch))
end

.run_script_on_all(id) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/right_resource/server_array.rb', line 11

def run_script_on_all(id)
  raise NotImplementedError
end

.terminate_all(id) ⇒ Object



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

def terminate_all(id)
  connection.post(element_path(id, :terminate_all))
end