Class: Chef::Knife::VcVappReboot

Inherits:
Chef::Knife show all
Includes:
VcCommon, VcVappCommon
Defined in:
lib/chef/knife/vapp/vc_vapp_reboot.rb

Instance Method Summary collapse

Methods included from VcVappCommon

#get_vapp, included

Methods included from VcCommon

#connection, #deprecation_msg, #generate_key, #get_password, included, #locate_config_value, #locate_org_option, #notice_msg, #out_msg, #pretty_symbol, #sort_by_key, #store_config, #store_password, #wait_task

Instance Method Details

#runObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/chef/knife/vapp/vc_vapp_reboot.rb', line 28

def run
  $stdout.sync = true

  vapp_arg = @name_args.shift

  connection.
  vapp = get_vapp(vapp_arg)

  task_id = connection.reboot_vapp vapp[:id]

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

  connection.logout
end