Class: Bcome::Node::Estate
Instance Attribute Summary
Attributes inherited from Base
#meta_data, #stack_peer
Instance Method Summary
collapse
Methods included from Selections
#add, #add!, #add_object, #clear!, #find_resource_by_identifier, #get, #in_resources?, #manage_object, #no_selections?, #no_selections_error, #object_in_selections?, #put, #remove, #remove_object, #selections
Methods inherited from Base
#initialize, #interactive, #method_missing, #set_parent_reference, #set_stack_peer
#run_local
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Bcome::Node::Base
Instance Method Details
#environments ⇒ Object
26
27
28
|
# File 'lib/nodes/estate.rb', line 26
def environments
@environments ||= platforms.collect(&:environments).flatten
end
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/nodes/estate.rb', line 30
def list_all
estate_machine_list = "\n"
platforms.each do |platform|
estate_machine_list += "* #{platform.identifier}\n"
platform.environments.each do |environment|
estate_machine_list += "\t- #{environment.identifier}\n"
environment.instances.each do |instance|
estate_machine_list += "\t\t / #{instance.identifier} (#{instance.public_ip_address})\n"
end
end
end
puts estate_machine_list
return ""
end
|
14
15
16
|
# File 'lib/nodes/estate.rb', line 14
def ls
self.stack_peer.ls
end
|
6
7
8
|
# File 'lib/nodes/estate.rb', line 6
def machines
platforms.collect(&:machines).flatten
end
|
#namespace ⇒ Object
10
11
12
|
# File 'lib/nodes/estate.rb', line 10
def namespace
""
end
|
#run(raw_command, bootstrap = false) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/nodes/estate.rb', line 18
def run(raw_command, bootstrap = false)
return unless platforms
platforms.pmap {|platform|
platform.run(raw_command, bootstrap)
}
return
end
|