Issue #17086 has been updated by Charlie Sharpsteen.
Redmine Issue [#17086](http://projects.puppetlabs.com/issues/17086) has been migrated to JIRA: <https://tickets.puppetlabs.com/browse/MCO-66> ---------------------------------------- Bug #17086: Improve client usage in more complex ruby scripts https://projects.puppetlabs.com/issues/17086#change-101448 * Author: R.I. Pienaar * Status: Accepted * Priority: Normal * Assignee: * Category: Backlog * Target version: * Keywords: backlog * Branch: * Affected mCollective version: ---------------------------------------- Today the typical way is to use 'include MCollective::RPC' and then use some methods added to Object. This works ok for simple cases and seems to do what most people want however there's a growing number of cases where people want to do much more complex things including multi agent scripts, web consoles, integration into other applications etc where polluting Object is a terrible idea. The RPC::Client class should have a helper that constructs a client in the same was that rpcclient() does today and we should move things like printrpc etc into the client class for this cases. The old method will continue to work, the new one would be along these lines: <pre> require 'mcollective' c = MCollective::RPC.client("rpcutil") c.printrpc c.ping c.printstats </pre> Effectively the same thing as today except there isnt any real pollution or using of variables in the current scope etc, a simple isolated class that does what we do today via the mixin. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.