Class: KnifeSpork::SporkNodeCreate
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- KnifeSpork::SporkNodeCreate
- Includes:
- Runner
- Defined in:
- lib/chef/knife/spork-node-create.rb
Instance Method Summary collapse
Methods included from Runner
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/chef/knife/spork-node-create.rb', line 11 def run self.config = Chef::Config.merge!(config) if @name_args.empty? show_usage ui.error("You must specify a node name") exit 1 end @object_name = @name_args.first run_plugins(:before_nodecreate) pre_node = {} node_create post_node = load_node(@object_name) @object_difference = json_diff(pre_node,post_node).to_s run_plugins(:after_nodecreate) end |