Method: CM::Plugin::Plan#execute

Defined in:
lib/core/plugin/plan.rb

#execute(operation, check_only = false) ⇒ Object




190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/core/plugin/plan.rb', line 190

def execute(operation, check_only = false)
  success = true

  if initialized?
    if ::File.exist?(manifest_path)
      method = "operation_#{operation}"

      if respond_to?(method) && load(check_only)
        init_tokens
        success = send(method) unless check_only
      else
        success = false
      end
    else
      error('manifest_file', { :file => manifest_path })
      success = false
    end
  else
    success = false
  end
  success
end