--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Class: MCollective::RPC::ActionRunner</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Class</strong></td>
+ <td class="class-name-in-header">MCollective::RPC::ActionRunner</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../../files/lib/mcollective/rpc/actionrunner_rb.html">
+ lib/mcollective/rpc/actionrunner.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ <tr class="top-aligned-row">
+ <td><strong>Parent:</strong></td>
+ <td>
+ Object
+ </td>
+ </tr>
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+A helper used by RPC::Agent#implemented_by to delegate an action to an
+external script. At present only JSON based serialization is supported in
+future ones based on key=val pairs etc will be added
+</p>
+<p>
+It serializes the request object into an input file and creates an empty
+output file. It then calls the external command reading the output file at
+the end.
+</p>
+<p>
+any STDERR gets logged at error level and any STDOUT gets logged at info
+level.
+</p>
+<p>
+It will interpret the exit code from the application the same way <a
+href="Reply.html#M000074">RPC::Reply#fail</a>! and fail handles their codes
+creating a consistent interface, the message part of the fail message will
+come from STDERR
+</p>
+<p>
+Generally externals should just exit with code 1 on failure and print to
+STDERR, this is exactly what Perl die() does and translates perfectly to
+our model
+</p>
+<p>
+It uses the <a href="../Shell.html">MCollective::Shell</a> wrapper to call
+the external application
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000066">canrun?</a>
+ <a href="#M000063">load_json_results</a>
+ <a href="#M000062">load_results</a>
+ <a href="#M000059">new</a>
+ <a href="#M000069">path_to_command</a>
+ <a href="#M000060">run</a>
+ <a href="#M000065">save_json_request</a>
+ <a href="#M000064">saverequest</a>
+ <a href="#M000061">shell</a>
+ <a href="#M000068">tempfile</a>
+ <a href="#M000067">to_s</a>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+ <div id="attribute-list">
+ <h3 class="section-bar">Attributes</h3>
+
+ <div class="name-list">
+ <table>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">action</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">agent</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">command</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">format</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">request</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">stderr</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">stdout</td>
+ <td class="context-item-value"> [R] </td>
+ <td class="context-item-desc"></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Class methods</h3>
+
+ <div id="method-M000059" class="method-detail">
+ <a name="M000059"></a>
+
+ <div class="method-heading">
+ <a href="#M000059" class="method-signature">
+ <span class="method-name">new</span><span class="method-args">(command, request, format=:json)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000059-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 26</span>
+26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">request</span>, <span class="ruby-identifier">format</span>=<span class="ruby-identifier">:json</span>)
+27: <span class="ruby-ivar">@agent</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">agent</span>
+28: <span class="ruby-ivar">@action</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">action</span>
+29: <span class="ruby-ivar">@format</span> = <span class="ruby-identifier">format</span>
+30: <span class="ruby-ivar">@request</span> = <span class="ruby-identifier">request</span>
+31: <span class="ruby-ivar">@command</span> = <span class="ruby-identifier">path_to_command</span>(<span class="ruby-identifier">command</span>)
+32: <span class="ruby-ivar">@stdout</span> = <span class="ruby-value str">""</span>
+33: <span class="ruby-ivar">@stderr</span> = <span class="ruby-value str">""</span>
+34: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000066" class="method-detail">
+ <a name="M000066"></a>
+
+ <div class="method-heading">
+ <a href="#M000066" class="method-signature">
+ <span class="method-name">canrun?</span><span class="method-args">(command)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000066-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 117</span>
+117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">canrun?</span>(<span class="ruby-identifier">command</span>)
+118: <span class="ruby-constant">File</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-identifier">command</span>)
+119: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000063" class="method-detail">
+ <a name="M000063"></a>
+
+ <div class="method-heading">
+ <a href="#M000063" class="method-signature">
+ <span class="method-name">load_json_results</span><span class="method-args">(file)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000063-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 91</span>
+91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_json_results</span>(<span class="ruby-identifier">file</span>)
+92: <span class="ruby-keyword kw">return</span> {} <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span>(<span class="ruby-identifier">file</span>)
+93:
+94: <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">load</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">file</span>)) <span class="ruby-operator">||</span> {}
+95: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span>
+96: {}
+97: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000062" class="method-detail">
+ <a name="M000062"></a>
+
+ <div class="method-heading">
+ <a href="#M000062" class="method-signature">
+ <span class="method-name">load_results</span><span class="method-args">(file)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000062-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 73</span>
+73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_results</span>(<span class="ruby-identifier">file</span>)
+74: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Attempting to load results in #{format} format from #{file}"</span>)
+75:
+76: <span class="ruby-identifier">data</span> = {}
+77:
+78: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"load_#{format}_results"</span>)
+79: <span class="ruby-identifier">tempdata</span> = <span class="ruby-identifier">send</span>(<span class="ruby-node">"load_#{format}_results"</span>, <span class="ruby-identifier">file</span>)
+80:
+81: <span class="ruby-identifier">tempdata</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
+82: <span class="ruby-identifier">data</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">v</span>
+83: <span class="ruby-keyword kw">end</span>
+84: <span class="ruby-keyword kw">end</span>
+85:
+86: <span class="ruby-identifier">data</span>
+87: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
+88: {}
+89: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000069" class="method-detail">
+ <a name="M000069"></a>
+
+ <div class="method-heading">
+ <a href="#M000069" class="method-signature">
+ <span class="method-name">path_to_command</span><span class="method-args">(command)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000069-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 129</span>
+129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_to_command</span>(<span class="ruby-identifier">command</span>)
+130: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">command</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">SEPARATOR</span>
+131: <span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">libdir</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">libdir</span><span class="ruby-operator">|</span>
+132: <span class="ruby-identifier">command_file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">libdir</span>, <span class="ruby-value str">"agent"</span>, <span class="ruby-identifier">agent</span>, <span class="ruby-identifier">command</span>)
+133:
+134: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command_file</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">command_file</span>)
+135: <span class="ruby-keyword kw">end</span>
+136: <span class="ruby-keyword kw">end</span>
+137:
+138: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
+139: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000060" class="method-detail">
+ <a name="M000060"></a>
+
+ <div class="method-heading">
+ <a href="#M000060" class="method-signature">
+ <span class="method-name">run</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000060-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 36</span>
+36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
+37: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">canrun?</span>(<span class="ruby-identifier">command</span>)
+38: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-node">"Cannot run #{to_s}"</span>)
+39: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RPCAborted</span>, <span class="ruby-node">"Cannot execute #{to_s}"</span>
+40: <span class="ruby-keyword kw">end</span>
+41:
+42: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Running #{to_s}"</span>)
+43:
+44: <span class="ruby-identifier">request_file</span> = <span class="ruby-identifier">saverequest</span>(<span class="ruby-identifier">request</span>)
+45: <span class="ruby-identifier">reply_file</span> = <span class="ruby-identifier">tempfile</span>(<span class="ruby-value str">"reply"</span>)
+46: <span class="ruby-identifier">reply_file</span>.<span class="ruby-identifier">close</span>
+47:
+48: <span class="ruby-identifier">runner</span> = <span class="ruby-identifier">shell</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">request_file</span>.<span class="ruby-identifier">path</span>, <span class="ruby-identifier">reply_file</span>.<span class="ruby-identifier">path</span>)
+49:
+50: <span class="ruby-identifier">runner</span>.<span class="ruby-identifier">runcommand</span>
+51:
+52: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"#{command} exited with #{runner.status.exitstatus}"</span>)
+53:
+54: <span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">each_line</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-constant">Log</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"#{to_s}: #{l.chomp}"</span>)} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">stderr</span>.<span class="ruby-identifier">empty?</span>
+55: <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">each_line</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-constant">Log</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"#{to_s}: #{l.chomp}"</span>)} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">empty?</span>
+56:
+57: {<span class="ruby-identifier">:exitstatus</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">runner</span>.<span class="ruby-identifier">status</span>.<span class="ruby-identifier">exitstatus</span>,
+58: <span class="ruby-identifier">:stdout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">runner</span>.<span class="ruby-identifier">stdout</span>,
+59: <span class="ruby-identifier">:stderr</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">runner</span>.<span class="ruby-identifier">stderr</span>,
+60: <span class="ruby-identifier">:data</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">load_results</span>(<span class="ruby-identifier">reply_file</span>.<span class="ruby-identifier">path</span>)}
+61: <span class="ruby-keyword kw">ensure</span>
+62: <span class="ruby-identifier">request_file</span>.<span class="ruby-identifier">close!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">request_file</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">"close!"</span>)
+63: <span class="ruby-identifier">reply_file</span>.<span class="ruby-identifier">close!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reply_file</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">"close"</span>)
+64: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000065" class="method-detail">
+ <a name="M000065"></a>
+
+ <div class="method-heading">
+ <a href="#M000065" class="method-signature">
+ <span class="method-name">save_json_request</span><span class="method-args">(req)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000065-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 113</span>
+113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_json_request</span>(<span class="ruby-identifier">req</span>)
+114: <span class="ruby-identifier">req</span>.<span class="ruby-identifier">to_json</span>
+115: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000064" class="method-detail">
+ <a name="M000064"></a>
+
+ <div class="method-heading">
+ <a href="#M000064" class="method-signature">
+ <span class="method-name">saverequest</span><span class="method-args">(req)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000064-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 99</span>
+ 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">saverequest</span>(<span class="ruby-identifier">req</span>)
+100: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Attempting to save request in #{format} format"</span>)
+101:
+102: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"save_#{format}_request"</span>)
+103: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">send</span>(<span class="ruby-node">"save_#{format}_request"</span>, <span class="ruby-identifier">req</span>)
+104:
+105: <span class="ruby-identifier">request_file</span> = <span class="ruby-identifier">tempfile</span>(<span class="ruby-value str">"request"</span>)
+106: <span class="ruby-identifier">request_file</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">data</span>
+107: <span class="ruby-identifier">request_file</span>.<span class="ruby-identifier">close</span>
+108: <span class="ruby-keyword kw">end</span>
+109:
+110: <span class="ruby-identifier">request_file</span>
+111: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000061" class="method-detail">
+ <a name="M000061"></a>
+
+ <div class="method-heading">
+ <a href="#M000061" class="method-signature">
+ <span class="method-name">shell</span><span class="method-args">(command, infile, outfile)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000061-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 66</span>
+66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shell</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">infile</span>, <span class="ruby-identifier">outfile</span>)
+67: <span class="ruby-identifier">env</span> = {<span class="ruby-value str">"MCOLLECTIVE_REQUEST_FILE"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">infile</span>,
+68: <span class="ruby-value str">"MCOLLECTIVE_REPLY_FILE"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">outfile</span>}
+69:
+70: <span class="ruby-constant">Shell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{command} #{infile} #{outfile}"</span>, <span class="ruby-identifier">:cwd</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">tmpdir</span>, <span class="ruby-identifier">:stdout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">stdout</span>, <span class="ruby-identifier">:stderr</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">stderr</span>, <span class="ruby-identifier">:environment</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">env</span>)
+71: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000068" class="method-detail">
+ <a name="M000068"></a>
+
+ <div class="method-heading">
+ <a href="#M000068" class="method-signature">
+ <span class="method-name">tempfile</span><span class="method-args">(prefix)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000068-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 125</span>
+125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tempfile</span>(<span class="ruby-identifier">prefix</span>)
+126: <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"mcollective_#{prefix}"</span>, <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">tmpdir</span>)
+127: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+ <div id="method-M000067" class="method-detail">
+ <a name="M000067"></a>
+
+ <div class="method-heading">
+ <a href="#M000067" class="method-signature">
+ <span class="method-name">to_s</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000067-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/rpc/actionrunner.rb, line 121</span>
+121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
+122: <span class="ruby-value str">"%s#%s command: %s"</span> <span class="ruby-operator">%</span> [ <span class="ruby-identifier">agent</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">command</span> ]
+123: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file