Issue #6705 has been updated by Roman BarczyƄski.

I've added python helper class, you can see it there:
https://github.com/romke/marionette-collective/tree/6705_external_actions/ext/action_helpers/python
----------------------------------------
Feature #6705: Support implimenting actions using external scripts
https://projects.puppetlabs.com/issues/6705

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: R.I. Pienaar
Category: SimpleRPC
Target version: 1.1.4
Keywords: 
Branch: ripienaar/marionette-collective/6705_external_actions
Affected mCollective version: 


Support implementing actions in any language:

<pre>
action "foo" do
   implemented_by "/path/to/foo"
end
</pre>

This should call "/path/to/foo" with 2 arguments:

 * The path to a file with a JSON encoded request
 * The path to a file where the script should write a JSON encoded hash of 
replies

Additionally ENV variables will be set for these 2 files: 
MCOLLECTIVE_REPLY_FILE and MCOLLECTIVE_REQUEST_FILE

Exit codes will correspond to the same numbers you'd use in <em>reply.fail</em>.

Any STDERR text should be logged at level err on the server and send back as 
the fail message if exitcode was not 0
Any STDOUT text should be logged at level info on the server

The request file for agent "test" action "external_test" would be:

<pre>
{"data":{"foo":"bar"},"action":"external_test","uniqid":"557a594187cd7f98879c91dd7a23ac58","agent":"test","sender":"some.box","callerid":"cert=rip"}
</pre>

The reply file should just be a file containing JSON hash.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to