class Chef::Knife::VcVappBootstrap

Public Instance Methods

run() click to toggle source
# 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.login

  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