Class: Commands::DeployGroupList
- Inherits:
-
Object
- Object
- Commands::DeployGroupList
- Defined in:
- lib/commands/deploy_group_list.rb
Instance Method Summary collapse
-
#options ⇒ Object
holds the options that were passed you can set any initial defaults here.
- #register(opts, global_options) ⇒ Object
-
#required_options ⇒ Object
required options.
- #run(global_options, amazon) ⇒ Object
Instance Method Details
#options ⇒ Object
holds the options that were passed you can set any initial defaults here
6 7 8 9 |
# File 'lib/commands/deploy_group_list.rb', line 6 def @options ||= { } end |
#register(opts, global_options) ⇒ Object
17 18 19 20 21 |
# File 'lib/commands/deploy_group_list.rb', line 17 def register(opts, ) opts. = "Usage: deploy_group_list [options]" opts.description = "List the deploy groups" end |
#required_options ⇒ Object
required options
12 13 14 15 |
# File 'lib/commands/deploy_group_list.rb', line 12 def @required_options ||= Set.new [ ] end |
#run(global_options, amazon) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/commands/deploy_group_list.rb', line 24 def run(, amazon) ec2 = amazon.ec2 # first see if already exists deploy_groups = ZZSharedLib::DeployGroupSimpleDB.find_all_by_zz_object_type(ZZSharedLib::DeployGroupSimpleDB.object_type, :auto_load => true) deploy_groups.each do |deploy_group| puts "Name: #{deploy_group[:group]}" puts "Recipes_deploy_tag: #{deploy_group[:recipes_deploy_tag]}" puts "App_deploy_tag: #{deploy_group[:app_deploy_tag]}" puts "Config Json:" pretty = JSON.pretty_generate(deploy_group.config) puts "#{pretty}" puts end end |