Module: Chef::Knife::WinrmSharedOptions

Defined in:
lib/chef/knife/helpers/winrm_shared_options.rb

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object

Shared command line options for knife winrm and knife wsman test



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/chef/knife/helpers/winrm_shared_options.rb', line 25

def self.included(includer)
  includer.class_eval do
    option :manual,
      short: "-m",
      long: "--manual-list",
      boolean: true,
      description: "QUERY is a space separated list of servers",
      default: false

    option :attribute,
      short: "-a ATTR",
      long: "--attribute ATTR",
      description: "The attribute to use for opening the connection - default is fqdn",
      default: "fqdn"

    option :concurrency,
      short: "-C NUM",
      long: "--concurrency NUM",
      description: "The number of allowed concurrent connections - default is number of hosts",
      proc: lambda { |o| o.to_i }
  end
end