Class: Nucleon::Action::Node::Agents
- Inherits:
-
Object
- Object
- Nucleon::Action::Node::Agents
- Defined in:
- lib/nucleon/action/node/agents.rb
Class Method Summary collapse
-
.describe ⇒ Object
—————————————————————————– Info.
Instance Method Summary collapse
-
#configure ⇒ Object
—————————————————————————– Settings.
-
#execute ⇒ Object
—————————————————————————– Operations.
Class Method Details
.describe ⇒ Object
Info
10 11 12 |
# File 'lib/nucleon/action/node/agents.rb', line 10 def self.describe super(:node, :agents, 800) end |
Instance Method Details
#configure ⇒ Object
Settings
17 18 19 20 21 |
# File 'lib/nucleon/action/node/agents.rb', line 17 def configure super do register_translator :format, :json end end |
#execute ⇒ Object
Operations
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/nucleon/action/node/agents.rb', line 26 def execute super do |node| ensure_node(node) do translator = CORL.translator({}, settings[:format]) agent_records = node.agents agent_records.each do |provider, | agent_records[provider][:running] = node.agent_running(provider) end myself.result = agent_records $stderr.puts translator.generate(result) unless result.empty? end end end |