Sha256: c48729eb36b8df483be963fd50aac91f6c76ba68840ebc467a1a41f206a47897
Contents?: true
Size: 643 Bytes
Versions: 14
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
14 entries across 14 versions & 1 rubygems