Sha256: 039416d1048efed2905006fd2371f4faea129c839b92eb20954bd78c1c4ad45f

Contents?: true

Size: 570 Bytes

Versions: 12

Compression:

Stored size: 570 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

    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

12 entries across 12 versions & 1 rubygems

Version Path
mcollective-client-2.8.7 lib/mcollective/application/find.rb
mcollective-client-2.8.5 lib/mcollective/application/find.rb
mcollective-client-2.8.8 lib/mcollective/application/find.rb
mcollective-client-2.8.6 lib/mcollective/application/find.rb
mcollective-client-2.9.1 lib/mcollective/application/find.rb
mcollective-client-2.9.0 lib/mcollective/application/find.rb
mcollective-client-2.8.9 lib/mcollective/application/find.rb
mcollective-client-2.8.4 lib/mcollective/application/find.rb
mcollective-client-2.8.3 lib/mcollective/application/find.rb
mcollective-client-2.8.2 lib/mcollective/application/find.rb
mcollective-client-2.8.1 lib/mcollective/application/find.rb
mcollective-client-2.8.0 lib/mcollective/application/find.rb