Module: Chef::Knife::Cloud::ServerOptions

Defined in:
lib/chef/knife/cloud/server/options.rb

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/chef/knife/cloud/server/options.rb', line 23

def self.included(includer)
  includer.class_eval do
    option :chef_node_name,
      short: "-N NAME",
      long: "--node-name NAME",
      description: "The name of the node and client to delete, if it differs from the server name. Only has meaning when used with the '--purge' option."

    option :custom_attributes,
      long: "--custom-attributes CUSTOM_ATTRIBUTES",
      description: "Custom attributes to be passed to Fog.",
      proc: Proc.new { |args| args.split(";").map { |keys| keys.split("=") }.map { |j| Hash[*j.map(&:strip)] } }
  end
end