Sha256: 1065131438367d3c9e40b9f5d68d5bb4573118e83f2a22228d360e0716494e7e

Contents?: true

Size: 940 Bytes

Versions: 7

Compression:

Stored size: 940 Bytes

Contents

module MCollective
  module Agent
    # Discovery agent for The Marionette Collective
    #
    # Released under the Apache License, Version 2
    class Discovery
      attr_reader :timeout, :meta

      def initialize
        config = Config.instance.pluginconf

        @timeout = 5
        @meta = {:license => "Apache License, Version 2",
                 :author => "R.I.Pienaar <rip@devco.net>",
                 :timeout => @timeout,
                 :name => "Discovery Agent",
                 :version => MCollective.version,
                 :url => "http://www.marionette-collective.org",
                 :description => "MCollective Discovery Agent"}
      end

      def handlemsg(msg, stomp)
        reply = "unknown request"

        case msg[:body]
          when "ping"
            reply = "pong"

          else
            reply = "Unknown Request: #{msg[:body]}"
        end

        reply
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mcollective-client-2.8.5 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.6 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.4 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.3 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.2 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.1 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.0 lib/mcollective/agent/discovery.rb