class Opsicle::Stack
Public Class Methods
new(client)
click to toggle source
# File lib/opsicle/stack.rb, line 4 def initialize(client) @client = client end
Public Instance Methods
layer_name(layer_id)
click to toggle source
# File lib/opsicle/stack.rb, line 29 def layer_name(layer_id) layers.detect{ |layer| layer[:layer_id] == layer_id }[:shortname] end
layers()
click to toggle source
# File lib/opsicle/stack.rb, line 25 def layers @layers ||= @client.api_call('describe_layers', stack_id: @client.config.opsworks_config[:stack_id])[:layers] end
name()
click to toggle source
# File lib/opsicle/stack.rb, line 17 def name stack_summary[:name] end
stack_id()
click to toggle source
# File lib/opsicle/stack.rb, line 21 def stack_id stack_summary[:stack_id] end
Private Instance Methods
stack_summary(options={})
click to toggle source
# File lib/opsicle/stack.rb, line 8 def stack_summary(options={}) # Only call the API again if you need to @stack_summary = nil if options[:reload] @deployment ||= @client.api_call('describe_stack_summary', :stack_id => @client.config.opsworks_config[:stack_id] )[:stack_summary] end