Update version according to OSCI-883
[packages/precise/mcollective.git] / doc / MCollective / RPC.html
diff --git a/doc/MCollective/RPC.html b/doc/MCollective/RPC.html
new file mode 100644 (file)
index 0000000..9749273
--- /dev/null
@@ -0,0 +1,848 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+
+       <title>Module: MCollective::RPC</title>
+
+       <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
+
+       <script src="../js/jquery.js" type="text/javascript"
+               charset="utf-8"></script>
+       <script src="../js/thickbox-compressed.js" type="text/javascript"
+               charset="utf-8"></script>
+       <script src="../js/quicksearch.js" type="text/javascript"
+               charset="utf-8"></script>
+       <script src="../js/darkfish.js" type="text/javascript"
+               charset="utf-8"></script>
+
+</head>
+<body class="module">
+
+       <div id="metadata">
+               <div id="file-metadata">
+                       <div id="file-list-section" class="section">
+                               <h3 class="section-header">In Files</h3>
+                               <div class="section-body">
+                                       <ul>
+                                       
+                                               <li><a href="../lib/mcollective/rpc_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc.rb">lib/mcollective/rpc.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/actionrunner_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/actionrunner.rb">lib/mcollective/rpc/actionrunner.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/reply_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/reply.rb">lib/mcollective/rpc/reply.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/progress_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/progress.rb">lib/mcollective/rpc/progress.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/agent_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/agent.rb">lib/mcollective/rpc/agent.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/request_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/request.rb">lib/mcollective/rpc/request.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/audit_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/audit.rb">lib/mcollective/rpc/audit.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/stats_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/stats.rb">lib/mcollective/rpc/stats.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/result_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/result.rb">lib/mcollective/rpc/result.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/helpers_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/helpers.rb">lib/mcollective/rpc/helpers.rb</a></li>
+                                       
+                                               <li><a href="../lib/mcollective/rpc/client_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
+                                                       class="thickbox" title="lib/mcollective/rpc/client.rb">lib/mcollective/rpc/client.rb</a></li>
+                                       
+                                       </ul>
+                               </div>
+                       </div>
+
+                       
+               </div>
+
+               <div id="class-metadata">
+
+                       <!-- Parent Class -->
+                       
+
+                       <!-- Namespace Contents -->
+                       
+                       <div id="namespace-list-section" class="section">
+                               <h3 class="section-header">Namespace</h3>
+                               <ul class="link-list">
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Agent.html">MCollective::RPC::Agent</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Audit.html">MCollective::RPC::Audit</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Client.html">MCollective::RPC::Client</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Progress.html">MCollective::RPC::Progress</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Reply.html">MCollective::RPC::Reply</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Request.html">MCollective::RPC::Request</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Result.html">MCollective::RPC::Result</a></li>
+                                       
+                                       <li><span class="type">CLASS</span> <a href="RPC/Stats.html">MCollective::RPC::Stats</a></li>
+                                       
+                               </ul>
+                       </div>
+                       
+
+                       <!-- Method Quickref -->
+                       
+                       <div id="method-list-section" class="section">
+                               <h3 class="section-header">Methods</h3>
+                               <ul class="link-list">
+                                       
+                                       <li><a href="#M000327">::const_missing</a></li>
+                                       
+                                       <li><a href="#M000320">::discovered</a></li>
+                                       
+                                       <li><a href="#M000319">::stats</a></li>
+                                       
+                                       <li><a href="#M000324">#empty_filter?</a></li>
+                                       
+                                       <li><a href="#M000323">#printrpc</a></li>
+                                       
+                                       <li><a href="#M000321">#printrpcstats</a></li>
+                                       
+                                       <li><a href="#M000314">#rpcclient</a></li>
+                                       
+                                       <li><a href="#M000310">#rpcoptions</a></li>
+                                       
+                               </ul>
+                       </div>
+                       
+
+                       <!-- Included Modules -->
+                       
+               </div>
+
+               <div id="project-metadata">
+                       
+                       
+                       <div id="fileindex-section" class="section project-section">
+                               <h3 class="section-header">Files</h3>
+                               <ul>
+                               
+                                       <li class="file"><a href="../COPYING.html">COPYING</a></li>
+                               
+                                       <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
+                               
+                                       <li class="file"><a href="../README.html">README</a></li>
+                               
+                                       <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
+                               
+                                       <li class="file"><a href="../etc/client_cfg_dist.html">client.cfg.dist</a></li>
+                               
+                                       <li class="file"><a href="../etc/data-help_erb.html">data-help.erb</a></li>
+                               
+                                       <li class="file"><a href="../etc/discovery-help_erb.html">discovery-help.erb</a></li>
+                               
+                                       <li class="file"><a href="../etc/facts_yaml_dist.html">facts.yaml.dist</a></li>
+                               
+                                       <li class="file"><a href="../etc/metadata-help_erb.html">metadata-help.erb</a></li>
+                               
+                                       <li class="file"><a href="../etc/msg-help_erb.html">msg-help.erb</a></li>
+                               
+                                       <li class="file"><a href="../etc/rpc-help_erb.html">rpc-help.erb</a></li>
+                               
+                                       <li class="file"><a href="../etc/server_cfg_dist.html">server.cfg.dist</a></li>
+                               
+                                       <li class="file"><a href="../etc/ssl/PLACEHOLDER.html">PLACEHOLDER</a></li>
+                               
+                                       <li class="file"><a href="../etc/ssl/clients/PLACEHOLDER.html">PLACEHOLDER</a></li>
+                               
+                                       <li class="file"><a href="../lib/mcollective/generators/templates/action_snippet_erb.html">action_snippet.erb</a></li>
+                               
+                                       <li class="file"><a href="../lib/mcollective/generators/templates/data_input_snippet_erb.html">data_input_snippet.erb</a></li>
+                               
+                                       <li class="file"><a href="../lib/mcollective/generators/templates/ddl_erb.html">ddl.erb</a></li>
+                               
+                                       <li class="file"><a href="../lib/mcollective/generators/templates/plugin_erb.html">plugin.erb</a></li>
+                               
+                                       <li class="file"><a href="../lib/mcollective/locales/en_yml.html">en.yml</a></li>
+                               
+                                       <li class="file"><a href="../mcollective_init.html">mcollective.init</a></li>
+                               
+                               </ul>
+                       </div>
+                       
+
+                       <div id="classindex-section" class="section project-section">
+                               <h3 class="section-header">Class Index
+                                       <span class="search-toggle"><img src="../images/find.png"
+                                               height="16" width="16" alt="[+]"
+                                               title="show/hide quicksearch" /></span></h3>
+                               <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
+                               <fieldset>
+                                       <legend>Quicksearch</legend>
+                                       <input type="text" name="quicksearch" value=""
+                                               class="quicksearch-field" />
+                               </fieldset>
+                               </form>
+
+                               <ul class="link-list">
+                               
+                                       <li><a href="../MCollective.html">MCollective</a></li>
+                               
+                                       <li><a href="../MCollective/Agent.html">MCollective::Agent</a></li>
+                               
+                                       <li><a href="../MCollective/Agents.html">MCollective::Agents</a></li>
+                               
+                                       <li><a href="../MCollective/Aggregate.html">MCollective::Aggregate</a></li>
+                               
+                                       <li><a href="../MCollective/Aggregate/Base.html">MCollective::Aggregate::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Aggregate/Result.html">MCollective::Aggregate::Result</a></li>
+                               
+                                       <li><a href="../MCollective/Aggregate/Result/Base.html">MCollective::Aggregate::Result::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Aggregate/Result/CollectionResult.html">MCollective::Aggregate::Result::CollectionResult</a></li>
+                               
+                                       <li><a href="../MCollective/Aggregate/Result/NumericResult.html">MCollective::Aggregate::Result::NumericResult</a></li>
+                               
+                                       <li><a href="../MCollective/Application.html">MCollective::Application</a></li>
+                               
+                                       <li><a href="../MCollective/Applications.html">MCollective::Applications</a></li>
+                               
+                                       <li><a href="../MCollective/Cache.html">MCollective::Cache</a></li>
+                               
+                                       <li><a href="../MCollective/Client.html">MCollective::Client</a></li>
+                               
+                                       <li><a href="../MCollective/CodedError.html">MCollective::CodedError</a></li>
+                               
+                                       <li><a href="../MCollective/Config.html">MCollective::Config</a></li>
+                               
+                                       <li><a href="../MCollective/Connector.html">MCollective::Connector</a></li>
+                               
+                                       <li><a href="../MCollective/Connector/Base.html">MCollective::Connector::Base</a></li>
+                               
+                                       <li><a href="../MCollective/DDL.html">MCollective::DDL</a></li>
+                               
+                                       <li><a href="../MCollective/DDL/AgentDDL.html">MCollective::DDL::AgentDDL</a></li>
+                               
+                                       <li><a href="../MCollective/DDL/Base.html">MCollective::DDL::Base</a></li>
+                               
+                                       <li><a href="../MCollective/DDL/DataDDL.html">MCollective::DDL::DataDDL</a></li>
+                               
+                                       <li><a href="../MCollective/DDL/DiscoveryDDL.html">MCollective::DDL::DiscoveryDDL</a></li>
+                               
+                                       <li><a href="../MCollective/DDL/ValidatorDDL.html">MCollective::DDL::ValidatorDDL</a></li>
+                               
+                                       <li><a href="../MCollective/DDLValidationError.html">MCollective::DDLValidationError</a></li>
+                               
+                                       <li><a href="../MCollective/Data.html">MCollective::Data</a></li>
+                               
+                                       <li><a href="../MCollective/Data/Base.html">MCollective::Data::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Data/Result.html">MCollective::Data::Result</a></li>
+                               
+                                       <li><a href="../MCollective/Discovery.html">MCollective::Discovery</a></li>
+                               
+                                       <li><a href="../MCollective/Facts.html">MCollective::Facts</a></li>
+                               
+                                       <li><a href="../MCollective/Facts/Base.html">MCollective::Facts::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Generators.html">MCollective::Generators</a></li>
+                               
+                                       <li><a href="../MCollective/Generators/AgentGenerator.html">MCollective::Generators::AgentGenerator</a></li>
+                               
+                                       <li><a href="../MCollective/Generators/Base.html">MCollective::Generators::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Generators/DataGenerator.html">MCollective::Generators::DataGenerator</a></li>
+                               
+                                       <li><a href="../MCollective/InvalidRPCData.html">MCollective::InvalidRPCData</a></li>
+                               
+                                       <li><a href="../MCollective/Log.html">MCollective::Log</a></li>
+                               
+                                       <li><a href="../MCollective/Logger.html">MCollective::Logger</a></li>
+                               
+                                       <li><a href="../MCollective/Logger/Base.html">MCollective::Logger::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Logger/Console_logger.html">MCollective::Logger::Console_logger</a></li>
+                               
+                                       <li><a href="../MCollective/Logger/File_logger.html">MCollective::Logger::File_logger</a></li>
+                               
+                                       <li><a href="../MCollective/Logger/Syslog_logger.html">MCollective::Logger::Syslog_logger</a></li>
+                               
+                                       <li><a href="../MCollective/Matcher.html">MCollective::Matcher</a></li>
+                               
+                                       <li><a href="../MCollective/Matcher/Parser.html">MCollective::Matcher::Parser</a></li>
+                               
+                                       <li><a href="../MCollective/Matcher/Scanner.html">MCollective::Matcher::Scanner</a></li>
+                               
+                                       <li><a href="../MCollective/Message.html">MCollective::Message</a></li>
+                               
+                                       <li><a href="../MCollective/MissingRPCData.html">MCollective::MissingRPCData</a></li>
+                               
+                                       <li><a href="../MCollective/MsgDoesNotMatchRequestID.html">MCollective::MsgDoesNotMatchRequestID</a></li>
+                               
+                                       <li><a href="../MCollective/MsgTTLExpired.html">MCollective::MsgTTLExpired</a></li>
+                               
+                                       <li><a href="../MCollective/NotTargettedAtUs.html">MCollective::NotTargettedAtUs</a></li>
+                               
+                                       <li><a href="../MCollective/Optionparser.html">MCollective::Optionparser</a></li>
+                               
+                                       <li><a href="../MCollective/PluginManager.html">MCollective::PluginManager</a></li>
+                               
+                                       <li><a href="../MCollective/PluginPackager.html">MCollective::PluginPackager</a></li>
+                               
+                                       <li><a href="../MCollective/PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
+                               
+                                       <li><a href="../MCollective/PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
+                               
+                                       <li><a href="../MCollective/RPC.html">MCollective::RPC</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Agent.html">MCollective::RPC::Agent</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Audit.html">MCollective::RPC::Audit</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Client.html">MCollective::RPC::Client</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Progress.html">MCollective::RPC::Progress</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Reply.html">MCollective::RPC::Reply</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Request.html">MCollective::RPC::Request</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Result.html">MCollective::RPC::Result</a></li>
+                               
+                                       <li><a href="../MCollective/RPC/Stats.html">MCollective::RPC::Stats</a></li>
+                               
+                                       <li><a href="../MCollective/RPCAborted.html">MCollective::RPCAborted</a></li>
+                               
+                                       <li><a href="../MCollective/RPCError.html">MCollective::RPCError</a></li>
+                               
+                                       <li><a href="../MCollective/Registration.html">MCollective::Registration</a></li>
+                               
+                                       <li><a href="../MCollective/Registration/Base.html">MCollective::Registration::Base</a></li>
+                               
+                                       <li><a href="../MCollective/Runner.html">MCollective::Runner</a></li>
+                               
+                                       <li><a href="../MCollective/RunnerStats.html">MCollective::RunnerStats</a></li>
+                               
+                                       <li><a href="../MCollective/SSL.html">MCollective::SSL</a></li>
+                               
+                                       <li><a href="../MCollective/Security.html">MCollective::Security</a></li>
+                               
+                                       <li><a href="../MCollective/Security/Base.html">MCollective::Security::Base</a></li>
+                               
+                                       <li><a href="../MCollective/SecurityValidationFailed.html">MCollective::SecurityValidationFailed</a></li>
+                               
+                                       <li><a href="../MCollective/Shell.html">MCollective::Shell</a></li>
+                               
+                                       <li><a href="../MCollective/Translatable.html">MCollective::Translatable</a></li>
+                               
+                                       <li><a href="../MCollective/UnixDaemon.html">MCollective::UnixDaemon</a></li>
+                               
+                                       <li><a href="../MCollective/UnknownRPCAction.html">MCollective::UnknownRPCAction</a></li>
+                               
+                                       <li><a href="../MCollective/UnknownRPCError.html">MCollective::UnknownRPCError</a></li>
+                               
+                                       <li><a href="../MCollective/Util.html">MCollective::Util</a></li>
+                               
+                                       <li><a href="../MCollective/Validator.html">MCollective::Validator</a></li>
+                               
+                                       <li><a href="../MCollective/ValidatorError.html">MCollective::ValidatorError</a></li>
+                               
+                                       <li><a href="../MCollective/WindowsDaemon.html">MCollective::WindowsDaemon</a></li>
+                               
+                                       <li><a href="../Array.html">Array</a></li>
+                               
+                                       <li><a href="../Dir.html">Dir</a></li>
+                               
+                                       <li><a href="../Object.html">Object</a></li>
+                               
+                                       <li><a href="../String.html">String</a></li>
+                               
+                                       <li><a href="../Symbol.html">Symbol</a></li>
+                               
+                               </ul>
+                               <div id="no-class-search-results" style="display: none;">No matching classes.</div>
+                       </div>
+
+                       
+               </div>
+       </div>
+
+       <div id="documentation">
+               <h1 class="module">MCollective::RPC</h1>
+
+               <div id="description">
+                       <p>
+Toolset to create a standard interface of client and agent using an <a
+href="RPC.html">RPC</a> metaphor, standard compliant agents will make it
+easier to create generic clients like web interfaces etc
+</p>
+
+               </div>
+
+               <!-- Constants -->
+               
+
+               <!-- Attributes -->
+               
+
+               <!-- Methods -->
+               
+               <div id="public-class-method-details" class="method-section section">
+                       <h3 class="section-header">Public Class Methods</h3>
+
+               
+                       <div id="const-missing-method" class="method-detail ">
+                               <a name="M000327"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">const_missing</span><span
+                                               class="method-args">(const_name)</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p class="missing-docs">(Not documented)</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="const-missing-source">
+<pre>
+     <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 175</span>
+175:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_missing</span>(<span class="ruby-identifier">const_name</span>)
+176:       <span class="ruby-keyword kw">super</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">const_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:DDL</span>
+177: 
+178:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-value str">&quot;MCollective::RPC::DDL is deprecatd, please use MCollective::DDL instead&quot;</span>)
+179:       <span class="ruby-constant">MCollective</span><span class="ruby-operator">::</span><span class="ruby-constant">DDL</span>
+180:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+                       <div id="discovered-method" class="method-detail ">
+                               <a name="M000320"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">discovered</span><span
+                                               class="method-args">(discovered)</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+means for other classes to drop discovered hosts into this module its a bit
+hacky but needed so that the mixin methods like printrpcstats can easily
+get access to it without users having to pass it around in params.
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="discovered-source">
+<pre>
+     <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 107</span>
+107:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">discovered</span>(<span class="ruby-identifier">discovered</span>)
+108:       <span class="ruby-ivar">@@discovered</span> = <span class="ruby-identifier">discovered</span>
+109:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+                       <div id="stats-method" class="method-detail ">
+                               <a name="M000319"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">stats</span><span
+                                               class="method-args">(stats)</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+means for other classes to drop stats into this module its a bit hacky but
+needed so that the mixin methods like printrpcstats can easily get access
+to it without users having to pass it around in params.
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="stats-source">
+<pre>
+     <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 99</span>
+ 99:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">stats</span>(<span class="ruby-identifier">stats</span>)
+100:       <span class="ruby-ivar">@@stats</span> = <span class="ruby-identifier">stats</span>
+101:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+               </div>
+       
+               <div id="public-instance-method-details" class="method-section section">
+                       <h3 class="section-header">Public Instance Methods</h3>
+
+               
+                       <div id="empty-filter--method" class="method-detail ">
+                               <a name="M000324"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">empty_filter?</span><span
+                                               class="method-args">(options)</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+Wrapper for <a href="Util.html#M000300">MCollective::Util.empty_filter?</a>
+to make clients less fugly to write - ticket 18
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="empty-filter--source">
+<pre>
+     <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 167</span>
+167:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">empty_filter?</span>(<span class="ruby-identifier">options</span>)
+168:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:filter</span>)
+169:         <span class="ruby-constant">Util</span>.<span class="ruby-identifier">empty_filter?</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:filter</span>])
+170:       <span class="ruby-keyword kw">else</span>
+171:         <span class="ruby-constant">Util</span>.<span class="ruby-identifier">empty_filter?</span>(<span class="ruby-identifier">options</span>)
+172:       <span class="ruby-keyword kw">end</span>
+173:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+                       <div id="printrpc-method" class="method-detail ">
+                               <a name="M000323"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">printrpc</span><span
+                                               class="method-args">(result, flags = {})</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+Prints the result of an <a href="RPC.html">RPC</a> call.
+</p>
+<p>
+In the default quiet mode - no flattening or verbose - only results that
+produce an error will be printed
+</p>
+<p>
+To get details of each result run with the -v command line option.
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="printrpc-source">
+<pre>
+     <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 146</span>
+146:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">printrpc</span>(<span class="ruby-identifier">result</span>, <span class="ruby-identifier">flags</span> = {})
+147:       <span class="ruby-identifier">verbose</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:verbose</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-identifier">verbose</span> = <span class="ruby-keyword kw">false</span>
+148:       <span class="ruby-identifier">verbose</span> = <span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:verbose</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">verbose</span>
+149:       <span class="ruby-identifier">flatten</span> = <span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:flatten</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
+150:       <span class="ruby-identifier">format</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:output_format</span>]
+151:       <span class="ruby-identifier">forced_mode</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:force_display_mode</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
+152: 
+153:       <span class="ruby-identifier">result_text</span> =  <span class="ruby-constant">Helpers</span>.<span class="ruby-identifier">rpcresults</span>(<span class="ruby-identifier">result</span>, {<span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">verbose</span>, <span class="ruby-identifier">:flatten</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">flatten</span>, <span class="ruby-identifier">:format</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">format</span>, <span class="ruby-identifier">:force_display_mode</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">forced_mode</span>})
+154: 
+155:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">format</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:console</span>
+156:         <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\n%s\n&quot;</span> <span class="ruby-operator">%</span> [ <span class="ruby-identifier">result_text</span> ]
+157:       <span class="ruby-keyword kw">else</span>
+158:         <span class="ruby-comment cmt"># when we get just one result to print dont pad them all with</span>
+159:         <span class="ruby-comment cmt"># blank spaces etc, just print the individual result with no</span>
+160:         <span class="ruby-comment cmt"># padding</span>
+161:         <span class="ruby-identifier">puts</span> <span class="ruby-identifier">result_text</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">result_text</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>
+162:       <span class="ruby-keyword kw">end</span>
+163:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+                       <div id="printrpcstats-method" class="method-detail ">
+                               <a name="M000321"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">printrpcstats</span><span
+                                               class="method-args">(flags={})</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+Prints stats, requires stats to be saved from elsewhere using the <a
+href="RPC.html#M000319">MCollective::RPC.stats</a> method.
+</p>
+<p>
+If you&#8217;ve passed -v on the command line a detailed stat block will be
+printed, else just a one liner.
+</p>
+<p>
+You can pass flags into it:
+</p>
+<pre>
+  printrpcstats :caption =&gt; &quot;Foo&quot;, :summarize =&gt; true
+</pre>
+<p>
+This will use &#8220;Foo&#8221; as the caption to the stats in verbose mode
+and print out any aggregate summary information if present
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="printrpcstats-source">
+<pre>
+     <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 123</span>
+123:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">printrpcstats</span>(<span class="ruby-identifier">flags</span>={})
+124:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:output_format</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">:console</span>
+125: 
+126:       <span class="ruby-identifier">flags</span> = {<span class="ruby-identifier">:summarize</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:caption</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;rpc stats&quot;</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">flags</span>)
+127: 
+128:       <span class="ruby-identifier">verbose</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:verbose</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-identifier">verbose</span> = <span class="ruby-keyword kw">false</span>
+129: 
+130:       <span class="ruby-keyword kw">begin</span>
+131:         <span class="ruby-identifier">stats</span> = <span class="ruby-ivar">@@stats</span>
+132:       <span class="ruby-keyword kw">rescue</span>
+133:         <span class="ruby-identifier">puts</span>(<span class="ruby-value str">&quot;no stats to display&quot;</span>)
+134:         <span class="ruby-keyword kw">return</span>
+135:       <span class="ruby-keyword kw">end</span>
+136: 
+137:       <span class="ruby-identifier">puts</span> <span class="ruby-identifier">stats</span>.<span class="ruby-identifier">report</span>(<span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:caption</span>], <span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:summarize</span>], <span class="ruby-identifier">verbose</span>)
+138:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+                       <div id="rpcclient-method" class="method-detail ">
+                               <a name="M000314"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">rpcclient</span><span
+                                               class="method-args">(agent, flags = {})</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+Wrapper to create clients, supposed to be used as a mixin:
+</p>
+<p>
+include <a href="RPC.html">MCollective::RPC</a>
+</p>
+<p>
+exim = rpcclient(&#8220;exim&#8221;) printrpc exim.mailq
+</p>
+<p>
+or
+</p>
+<p>
+rpcclient(&#8220;exim&#8221;) do |exim|
+</p>
+<pre>
+   printrpc exim.mailq
+</pre>
+<p>
+end
+</p>
+<p>
+It will take a few flags:
+</p>
+<pre>
+   :configfile =&gt; &quot;etc/client.cfg&quot;
+   :options =&gt; options
+   :exit_on_failure =&gt; true
+</pre>
+<p>
+Options would be a build up options hash from the <a
+href="Optionparser.html">Optionparser</a> you can use the rpcoptions helper
+to create this
+</p>
+<p>
+:exit_on_failure is true by default, and causes the application to exit if
+there is a failure constructing the <a href="RPC.html">RPC</a> client. Set
+this flag to false to cause an Exception to be raised instead.
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="rpcclient-source">
+<pre>
+    <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 60</span>
+60:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rpcclient</span>(<span class="ruby-identifier">agent</span>, <span class="ruby-identifier">flags</span> = {})
+61:       <span class="ruby-identifier">configfile</span> = <span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:configfile</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;/etc/mcollective/client.cfg&quot;</span>
+62:       <span class="ruby-identifier">options</span> = <span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:options</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">nil</span>
+63: 
+64:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:exit_on_failure</span>)
+65:         <span class="ruby-identifier">exit_on_failure</span> = <span class="ruby-identifier">flags</span>[<span class="ruby-identifier">:exit_on_failure</span>]
+66:       <span class="ruby-keyword kw">else</span>
+67:         <span class="ruby-comment cmt"># We exit on failure by default for CLI-friendliness</span>
+68:         <span class="ruby-identifier">exit_on_failure</span> = <span class="ruby-keyword kw">true</span>
+69:       <span class="ruby-keyword kw">end</span>
+70: 
+71:       <span class="ruby-keyword kw">begin</span>
+72:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>
+73:           <span class="ruby-identifier">rpc</span> = <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">agent</span>, <span class="ruby-identifier">:configfile</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:config</span>], <span class="ruby-identifier">:options</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">options</span>)
+74:           <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">rpc</span>.<span class="ruby-identifier">options</span>
+75:         <span class="ruby-keyword kw">else</span>
+76:           <span class="ruby-identifier">rpc</span> = <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">agent</span>, <span class="ruby-identifier">:configfile</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">configfile</span>)
+77:           <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">rpc</span>.<span class="ruby-identifier">options</span>
+78:         <span class="ruby-keyword kw">end</span>
+79:       <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
+80:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exit_on_failure</span>
+81:           <span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;Could not create RPC client: #{e}&quot;</span>)
+82:           <span class="ruby-identifier">exit!</span>
+83:         <span class="ruby-keyword kw">else</span>
+84:           <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
+85:         <span class="ruby-keyword kw">end</span>
+86:       <span class="ruby-keyword kw">end</span>
+87: 
+88:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
+89:         <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">rpc</span>)
+90:       <span class="ruby-keyword kw">else</span>
+91:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">rpc</span>
+92:       <span class="ruby-keyword kw">end</span>
+93:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+                       <div id="rpcoptions-method" class="method-detail ">
+                               <a name="M000310"></a>
+
+                               <div class="method-heading">
+                               
+                                       <span class="method-name">rpcoptions</span><span
+                                               class="method-args">()</span>
+                                       <span class="method-click-advice">click to toggle source</span>
+                               
+                               </div>
+
+                               <div class="method-description">
+                                       
+                                       <p>
+Creates a standard options hash, pass in a block to add extra headings etc
+see <a href="Optionparser.html">Optionparser</a>
+</p>
+                                       
+
+                                       
+                                       <div class="method-source-code"
+                                               id="rpcoptions-source">
+<pre>
+    <span class="ruby-comment cmt"># File lib/mcollective/rpc.rb, line 21</span>
+21:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rpcoptions</span>
+22:       <span class="ruby-identifier">oparser</span> = <span class="ruby-constant">MCollective</span><span class="ruby-operator">::</span><span class="ruby-constant">Optionparser</span>.<span class="ruby-identifier">new</span>({<span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:progress_bar</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>}, <span class="ruby-value str">&quot;filter&quot;</span>)
+23: 
+24:       <span class="ruby-identifier">options</span> = <span class="ruby-identifier">oparser</span>.<span class="ruby-identifier">parse</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">parser</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
+25:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
+26:           <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">parser</span>, <span class="ruby-identifier">options</span>)
+27:         <span class="ruby-keyword kw">end</span>
+28: 
+29:         <span class="ruby-constant">Helpers</span>.<span class="ruby-identifier">add_simplerpc_options</span>(<span class="ruby-identifier">parser</span>, <span class="ruby-identifier">options</span>)
+30:       <span class="ruby-keyword kw">end</span>
+31: 
+32:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">options</span>
+33:     <span class="ruby-keyword kw">end</span></pre>
+                                       </div>
+                                       
+                               </div>
+
+                               
+                       </div>
+
+               
+               </div>
+       
+
+       </div>
+
+
+       <div id="rdoc-debugging-section-dump" class="debugging-section">
+       
+               <p>Disabled; run with --debug to generate this.</p>
+       
+       </div>
+
+       <div id="validator-badges">
+               <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+               <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
+                       Rdoc Generator</a> 1.1.6</small>.</p>
+       </div>
+
+</body>
+</html>
+