module MCollective module Agent class Rpcutil target_agent, :license => "unknown", :timeout => agent.timeout, :description => "unknown", :name => target_agent, :url => "unknown", :version => "unknown", :author => "unknown"} agent_data.merge!(agent.meta) reply[:agents] << agent_data end end # Retrieves a single config property that is in effect action "get_config_item" do reply.fail! "Unknown config property #{request[:item]}" unless config.respond_to?(request[:item]) reply[:item] = request[:item] reply[:value] = config.send(request[:item]) end # Responds to PING requests with the local timestamp action "ping" do reply[:pong] = Time.now.to_i end # Returns all configured collectives action "collective_info" do config = Config.instance reply[:main_collective] = config.main_collective reply[:collectives] = config.collectives end action "get_data" do if request[:query] query = Data.ddl_transform_input(Data.ddl(request[:source]), request[:query].to_s) else query = nil end data = Data[ request[:source] ].lookup(query) data.keys.each do |key| reply[key] = data[key] end end end end end