Class: Chef::Knife::VcVappBootstrap

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

Instance Method Summary collapse

Methods included from VcBootstrapCommon

#bootstrap_vm, included

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
43
44
45
46
47
48
# File 'lib/chef/knife/vapp/vc_vapp_bootstrap.rb', line 28

def run
  $stdout.sync = true
  @test_connection_timeout = 5

  vapp_arg = @name_args.shift

  connection.

  vapp = get_vapp(vapp_arg)

  if locate_config_value(:bootstrap_windows)
    ui.msg "Windows bootstrapping is not available, yet."
  else
    vapp[:vms_hash].each do |vm_name, details|
      addresses = details[:addresses].reject(&:nil?)
      bootstrap_vm(vm_name, details[:id], addresses)
    end
  end

  connection.logout
end