class Chef::Knife::Cloud::VcenterVmDelete
Extends the SeverDeleteCommand for specifically vCenter
Public Instance Methods
execute_command()
click to toggle source
Executes the command against vCenter and the Chef
Server
# File lib/chef/knife/vcenter_vm_delete.rb, line 53 def execute_command @name_args.each do |name| service.delete_vm(name) delete_from_chef(name) end end
validate_params!()
click to toggle source
rubocop:disable Style/GuardClause Validates the parameters to make sure we're good.
# File lib/chef/knife/vcenter_vm_delete.rb, line 44 def validate_params! if @name_args.empty? ui.error("You must supply the name of the virtual machine to delete.") exit(1) if @name_args.empty? end end