Class: Nucleon::Action::Resource::Run
- Inherits:
-
Object
- Object
- Nucleon::Action::Resource::Run
- Defined in:
- lib/nucleon/action/resource/run.rb
Class Method Summary collapse
-
.describe ⇒ Object
—————————————————————————– Info.
Instance Method Summary collapse
-
#arguments ⇒ Object
—.
-
#configure ⇒ Object
—————————————————————————– Settings.
-
#execute ⇒ Object
—————————————————————————– Action operations.
Class Method Details
.describe ⇒ Object
Info
10 11 12 |
# File 'lib/nucleon/action/resource/run.rb', line 10 def self.describe super(:resource, :run, 500) end |
Instance Method Details
#arguments ⇒ Object
28 29 30 |
# File 'lib/nucleon/action/resource/run.rb', line 28 def arguments [:provider, :operation] end |
#configure ⇒ Object
Settings
17 18 19 20 21 22 23 24 |
# File 'lib/nucleon/action/resource/run.rb', line 17 def configure super do codes :run_failed register_str :provider, nil register_str :operation, nil end end |
#execute ⇒ Object
Action operations
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/nucleon/action/resource/run.rb', line 35 def execute super do resource = nil if plan.execute(settings[:operation], true) resource = plan.create_resource(settings[:resource_config]) resource.execute(settings[:operation]) end myself.status = code.run_failed unless resource && resource.status == code.success end end |