From: <jh...@us...> - 2010-10-20 20:54:57
|
Revision: 220 http://etch.svn.sourceforge.net/etch/?rev=220&view=rev Author: jheiss Date: 2010-10-20 20:54:51 +0000 (Wed, 20 Oct 2010) Log Message: ----------- Switch to nVentory's new get_objects syntax. Update more info URL in the comment at the top of the script. Modified Paths: -------------- trunk/etchserver-samples/nventory/nodegrouper Modified: trunk/etchserver-samples/nventory/nodegrouper =================================================================== --- trunk/etchserver-samples/nventory/nodegrouper 2010-10-20 18:42:17 UTC (rev 219) +++ trunk/etchserver-samples/nventory/nodegrouper 2010-10-20 20:54:51 UTC (rev 220) @@ -1,7 +1,7 @@ #!/usr/bin/ruby -w ############################################################################## # This is a node grouping script for etch which gets groups from nVentory -# http://etch.wiki.sourceforge.net/NodeGroups +# http://sourceforge.net/apps/trac/etch/wiki/NodeGroups ############################################################################## require 'nventory' @@ -13,7 +13,7 @@ # nvclient = NVentory::Client.new -results = nvclient.get_objects('nodes', {}, { 'name' => name }, {}, {}, ['node_groups']) +results = nvclient.get_objects(:objecttype => 'nodes', :exactget => { 'name' => name }, :includes => ['node_groups']) if results.include?(name) && results[name].include?('node_groups') results[name]['node_groups'].each do |ng| This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |