Sha256: 0d3ce68123e6a9f3d61f57afa6f9f63c5919b7586345f4ec7181d5b0af807ccb

Contents?: true

Size: 944 Bytes

Versions: 21

Compression:

Stored size: 944 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 => "https://docs.puppetlabs.com/mcollective/",
                 :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

21 entries across 21 versions & 1 rubygems

Version Path
mcollective-client-2.12.5 lib/mcollective/agent/discovery.rb
mcollective-client-2.12.4 lib/mcollective/agent/discovery.rb
mcollective-client-2.12.3 lib/mcollective/agent/discovery.rb
mcollective-client-2.12.1 lib/mcollective/agent/discovery.rb
mcollective-client-2.12.0 lib/mcollective/agent/discovery.rb
mcollective-client-2.10.6 lib/mcollective/agent/discovery.rb
mcollective-client-2.11.4 lib/mcollective/agent/discovery.rb
mcollective-client-2.11.3 lib/mcollective/agent/discovery.rb
mcollective-client-2.11.2 lib/mcollective/agent/discovery.rb
mcollective-client-2.11.1 lib/mcollective/agent/discovery.rb
mcollective-client-2.11.0 lib/mcollective/agent/discovery.rb
mcollective-client-2.10.4 lib/mcollective/agent/discovery.rb
mcollective-client-2.10.3 lib/mcollective/agent/discovery.rb
mcollective-client-2.10.2 lib/mcollective/agent/discovery.rb
mcollective-client-2.10.1 lib/mcollective/agent/discovery.rb
mcollective-client-2.10.0 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.7 lib/mcollective/agent/discovery.rb
mcollective-client-2.8.8 lib/mcollective/agent/discovery.rb
mcollective-client-2.9.1 lib/mcollective/agent/discovery.rb
mcollective-client-2.9.0 lib/mcollective/agent/discovery.rb