class Chef::Knife::VcVappDelete

Public Instance Methods

run() click to toggle source
# File lib/chef/knife/vapp/vc_vapp_delete.rb, line 27
def run
  $stdout.sync = true

  vapp_arg = @name_args.shift

  connection.login

  vapp = get_vapp(vapp_arg)

  if ui.confirm("Do you really want to #{ui.color('DELETE', :red)} vApp #{vapp[:name]} (ID: #{vapp[:id]})")
    task_id = connection.delete_vapp vapp[:id]

    ui.msg "vApp deletion..."
    wait_task(connection, task_id)

  end
  connection.logout
end