Method: KnifeCloudstack::CsStackCreate#run_actions

Defined in:
lib/chef/knife/cs_stack_create.rb

#run_actions(actions) ⇒ Object



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/chef/knife/cs_stack_create.rb', line 145

def run_actions(actions)
  puts "\n"
  ui.msg("Processing actions...")
  sleep 1 # pause for e.g. chef solr indexing
  actions ||= []
  actions.each do |cmd|
    cmd ||= {}
    cmd.each do |name, args|
      case name
        when 'knife_ssh'
          knife_ssh_action(*args)
        when 'http_request'
          http_request(args)
        when 'run_list_remove'
          run_list_remove(*args)
        when 'sleep'
          dur = args || 5
          sleep dur
      end
    end
  end

end