Sha256: c51d0638fb0a21ea6dafa5c04357ae22fa52797ed47e8249570b46a3599b3372
Contents?: true
Size: 650 Bytes
Versions: 15
Compression:
Stored size: 650 Bytes
Contents
class MCollective::Application::Find < MCollective::Application # rubocop:disable Style/ClassAndModuleChildren 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} warn "\nDiscovered %s nodes in %.2f seconds using the %s discovery plugin" % [nodes.size, discoverytime, mc.client.options[:discovery_method]] if options[:verbose] !nodes.empty? ? exit(0) : exit(1) end end
Version data entries
15 entries across 15 versions & 1 rubygems