Sha256: fedb1121bb8197ce7bf38676db88d30042627893ff4d34eb0ea6e2c80dd3aaf6
Contents?: true
Size: 1.26 KB
Versions: 11
Compression:
Stored size: 1.26 KB
Contents
require 'trollop' module SimpleDeploy module CLI class Instances include Shared def list @opts = Trollop::options do version SimpleDeploy::VERSION banner <<-EOS List instances for stack. simple_deploy instances -n STACK_NAME -e ENVIRONMENT EOS opt :help, "Display Help" opt :environment, "Set the target environment", :type => :string opt :name, "Stack name to manage", :type => :string opt :internal, "Use internal IP for ssh commands" end valid_options? :provided => @opts, :required => [:environment, :name] SimpleDeploy.create_config @opts[:environment] logger = SimpleDeploy.logger @opts[:log_level] stack = Stack.new :name => @opts[:name], :environment => @opts[:environment], :internal => @opts[:internal] exit 1 unless stack.exists? instances = stack.instances if instances.nil? || instances.empty? logger.info "Stack '#{@opts[:name]}' does not have any instances." else puts stack.instances end end def command_summary 'List instances for stack' end end end end
Version data entries
11 entries across 11 versions & 1 rubygems