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
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/knife-cloudformation/knife/stack.rb', line 163 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 |