lib/sfn/command/describe.rb in sfn-0.3.2 vs lib/sfn/command/describe.rb in sfn-0.3.4

- old
+ new

@@ -7,11 +7,11 @@ include Sfn::CommandModule::Base # information available unless(defined?(AVAILABLE_DISPLAYS)) - AVAILABLE_DISPLAYS = [:resources, :outputs] + AVAILABLE_DISPLAYS = [:resources, :outputs, :tags] end # Run the stack describe action def execute! stack_name = name_args.last @@ -72,9 +72,23 @@ key = snake(key).to_s.split('_').map(&:capitalize).join(' ') ui.info [' ', ui.color("#{key}:", :bold), value].join(' ') end else ui.info " #{ui.color('No outputs found')}" + end + end + + # Display tags + # + # @param stack [Miasma::Models::Orchestration::Stack] + def tags(stack) + ui.info "Tags for stack: #{ui.color(stack.name, :bold)}" + unless(stack.tags.empty?) + stack.tags.each do |key, value| + ui.info [' ', ui.color("#{key}:", :bold), value].join(' ') + end + else + ui.info " #{ui.color('No tags found')}" end end # @return [Array<String>] default attributes def default_attributes