Sha256: 19ebbc6c1a7b6a9e6c880bf0dcb4b16190d56bf9d025df04e11a5dd0f85cb280
Contents?: true
Size: 643 Bytes
Versions: 45
Compression:
Stored size: 643 Bytes
Contents
require 'flydata/helper/base_action' require 'flydata/util/shell' module Flydata module Helper module Action class AgentAction < BaseAction FLYDATA_CMD = "flydata %{command}" 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 # Override this. Needs to be implemented by the subclass #def command #end end end end end
Version data entries
45 entries across 45 versions & 1 rubygems