Class: Flydata::Helper::Action::AgentAction
- Inherits:
-
BaseAction
- Object
- BaseAction
- Flydata::Helper::Action::AgentAction
- Defined in:
- lib/flydata/helper/action/agent_action.rb
Direct Known Subclasses
Constant Summary collapse
- FLYDATA_CMD =
"flydata %{command}"
Instance Attribute Summary
Attributes inherited from BaseAction
Instance Method Summary collapse
Methods inherited from BaseAction
Constructor Details
This class inherits a constructor from Flydata::Helper::BaseAction
Instance Method Details
#execute(opts = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/flydata/helper/action/agent_action.rb', line 10 def execute(opts = {}) cmd = FLYDATA_CMD % { command: command } log_debug("Executing #{cmd}") o, e, s = Util::Shell.run_cmd(cmd) log_error(e) if not e.to_s.empty? log.error("Could not execute #{cmd}. Response status : #{s}") unless (s.to_i == 0) end |