class Chef::Knife::Cloud::VcenterVmCreate
Extends the ServerCreateCommand for specific vCenter
Public Instance Methods
before_exec_command()
click to toggle source
Sets up the create options and puts them
Calls superclass method
# File lib/chef/knife/vcenter_vm_create.rb, line 73 def before_exec_command super @create_options = { name: @name_args[0], type: "create", targethost: config[:targethost], folder: config[:folder], datastore: config[:datastore], resource_pool: config[:resource_pool], } puts @create_options end
validate_params!()
click to toggle source
Validates the parameters, you need that unique name person!
Calls superclass method
# File lib/chef/knife/vcenter_vm_create.rb, line 61 def validate_params! super if @name_args.empty? ui.error("You must provide the name of the new machine") end check_for_missing_config_values!(:targethost, :datastore, :folder) end