Module: KnifeCloudformation::Knife::Stack
- Defined in:
- lib/knife-cloudformation/knife/stack.rb
Overview
Stack handling helper methods
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.included(klass) ⇒ Object
Load methods into class and define options.
Class Method Details
.included(klass) ⇒ Object
Load methods into class and define options
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/knife-cloudformation/knife/stack.rb', line 58 def self.included(klass) klass.class_eval do extend KnifeCloudformation::Knife::Stack::ClassMethods include KnifeCloudformation::Knife::Stack::InstanceMethods option(:parameter, :short => '-p KEY:VALUE', :long => '--parameter KEY:VALUE', :description => 'Set parameter. Can be used multiple times.', :proc => lambda {|val| parts = val.split(':') key = parts.first value = parts[1, parts.size].join(':') Chef::Config[:knife][:cloudformation][:options][:parameters] ||= Mash.new Chef::Config[:knife][:cloudformation][:options][:parameters][key] = value } ) option(:polling, :long => '--[no-]poll', :description => 'Enable stack event polling.', :boolean => true, :default => true, :proc => lambda {|val| Chef::Config[:knife][:cloudformation][:poll] = val } ) option(:interactive_parameters, :long => '--[no-]parameter-prompts', :boolean => true, :default => true, :description => 'Do not prompt for input on dynamic parameters', :proc => lambda{|val| Chef::Config[:knife][:cloudformation][:interactive_parameters] = val } ) end end |