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

Version Path
flydata-0.7.19 lib/flydata/helper/action/agent_action.rb
flydata-0.7.18 lib/flydata/helper/action/agent_action.rb
flydata-0.7.17 lib/flydata/helper/action/agent_action.rb
flydata-0.7.16 lib/flydata/helper/action/agent_action.rb
flydata-0.7.15 lib/flydata/helper/action/agent_action.rb
flydata-0.7.14 lib/flydata/helper/action/agent_action.rb
flydata-0.7.13 lib/flydata/helper/action/agent_action.rb
flydata-0.7.12 lib/flydata/helper/action/agent_action.rb
flydata-0.7.11 lib/flydata/helper/action/agent_action.rb
flydata-0.7.10 lib/flydata/helper/action/agent_action.rb
flydata-0.7.9 lib/flydata/helper/action/agent_action.rb
flydata-0.7.8 lib/flydata/helper/action/agent_action.rb
flydata-0.7.7 lib/flydata/helper/action/agent_action.rb
flydata-0.7.6 lib/flydata/helper/action/agent_action.rb
flydata-0.7.5 lib/flydata/helper/action/agent_action.rb
flydata-0.7.4 lib/flydata/helper/action/agent_action.rb
flydata-0.7.2.1 lib/flydata/helper/action/agent_action.rb
flydata-0.7.2 lib/flydata/helper/action/agent_action.rb
flydata-0.7.1 lib/flydata/helper/action/agent_action.rb
flydata-0.7.0 lib/flydata/helper/action/agent_action.rb