Class: Stackit::StackCli
- Defined in:
- lib/stackit/cli/stack_cli.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#notifier ⇒ Object
Returns the value of attribute notifier.
Instance Method Summary collapse
- #create_stack ⇒ Object
- #delete_stack ⇒ Object
-
#initialize(*args) ⇒ StackCli
constructor
A new instance of StackCli.
- #update_stack ⇒ Object
Methods inherited from BaseCli
banner, exit_on_failure?, subcommand_prefix
Constructor Details
#initialize(*args) ⇒ StackCli
Returns a new instance of StackCli.
10 11 12 13 |
# File 'lib/stackit/cli/stack_cli.rb', line 10 def initialize(*args) super(*args) self.notifier = Stackit::ThorNotifier.new(*args) end |
Instance Attribute Details
#notifier ⇒ Object
Returns the value of attribute notifier.
8 9 10 |
# File 'lib/stackit/cli/stack_cli.rb', line 8 def notifier @notifier end |
Instance Method Details
#create_stack ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/stackit/cli/stack_cli.rb', line 27 def create_stack ManagedStack.new({ template: [:template], stack_name: [:stack_name], stack_policy: [:stack_policy], depends: [:depends], user_defined_parameters: [:parameters], parameters_file: [:parameters_file], parameter_map: [:parameter_map], wait: [:wait], force: [:force], dry_run: [:dry_run], debug: !![:debug] }).create! end |
#delete_stack ⇒ Object
78 79 80 81 82 83 84 85 |
# File 'lib/stackit/cli/stack_cli.rb', line 78 def delete_stack ManagedStack.new({ stack_name: [:stack_name], wait: [:wait], dry_run: [:dry_run], debug: !![:debug] }).delete! end |
#update_stack ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/stackit/cli/stack_cli.rb', line 56 def update_stack ManagedStack.new({ template: [:template], stack_name: [:stack_name], stack_policy: [:stack_policy], stack_policy_during_update: [:stack_policy_during_update], depends: [:depends], user_defined_parameters: [:parameters], parameters_file: [:parameters_file], parameter_map: [:parameter_map], wait: [:wait], force: [:force], dry_run: [:dry_run], debug: !![:debug] }).update! end |