add ability to view stack servers via console

This commit is contained in:
Anton Chuchkalov 2015-07-21 20:47:16 +04:00
parent 75ffceaa7d
commit 0066b1cefd
2 changed files with 8 additions and 3 deletions

View File

@ -30,7 +30,11 @@ class Stack < Handler
output output
when :resources when :resources
resources_handler resources_handler
output(resource: @args[3]) if @args[3]
output(format: 'json', resource: true)
else
output
end
end end
end end

View File

@ -184,7 +184,7 @@ module Provider
end end
def compute def compute
connection_compute(self.connection_options) @compute ||= connection_compute(connection_options)
end end
def network def network
@ -218,7 +218,8 @@ module Provider
end end
def stack_resource(stack, resource_id) def stack_resource(stack, resource_id)
fog_stack(stack).resources.get(resource_id) physical_id = fog_stack(stack).resources.get(resource_id).physical_resource_id
compute.servers.get(physical_id).attributes
end end
private private