Sha256: 9876d76b75ed7268cd545c442ab3238274b31987e38940635d1fe59e0d2cc70b
Contents?: true
Size: 609 Bytes
Versions: 29
Compression:
Stored size: 609 Bytes
Contents
class MCollective::Application::Find<MCollective::Application description "Find hosts using the discovery system matching filter criteria" def main mc = rpcclient("rpcutil") starttime = Time.now mc.detect_and_set_stdin_discovery nodes = mc.discover discoverytime = Time.now - starttime STDERR.puts if options[:verbose] nodes.each {|c| puts c} STDERR.puts "\nDiscovered %s nodes in %.2f seconds using the %s discovery plugin" % [nodes.size, discoverytime, mc.client.discoverer.discovery_method] if options[:verbose] nodes.size > 0 ? exit(0) : exit(1) end end
Version data entries
29 entries across 29 versions & 2 rubygems