Class: Chef::Knife::ClientShow

Inherits:
Knife
  • Object
show all
Includes:
Chef::Knife::Core::MultiAttributeReturnOption
Defined in:
lib/chef/knife/client_show.rb

Instance Method Summary collapse

Methods included from Chef::Knife::Core::MultiAttributeReturnOption

included

Instance Method Details

#runObject



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/chef/knife/client_show.rb', line 33

def run
  @client_name = @name_args[0]

  if @client_name.nil?
    show_usage
    ui.fatal("You must specify a client name")
    exit 1
  end

  client = Chef::ApiClientV1.load(@client_name)
  output(format_for_display(client))
end