class Chef::Knife::NodeCreate

Public Instance Methods

run() click to toggle source
# File lib/chef/knife/node_create.rb, line 32
def run
  @node_name = @name_args[0]

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

  node = Chef::Node.new
  node.name(@node_name)
  create_object(node)
end