methods/ai_client.rb
# Main code to actually add a client
Main code to actually add a client
Main code to actually add a client
def configure_ai_client(options)
  if not options['service'].to_s.match(/i386|sparc/)
    options['service'] = options['service']+"_"+options['arch']
  end
  options['ip'] = single_install_ip(options)
  check_ai_client_doesnt_exist(options)
  populate_ai_client_profile_questions(options)
  process_questions(options)
  if options['host-os-name'].to_s.match(/Darwin/)
    tftp_version_dir = options['tftpdir']+"/"+options['service']
    check_osx_iso_mount(tftp_version_dir,options['file'])
  end
  output_file = options['workdir']+"/"+options['name']+"_ai_profile.xml"
  create_ai_client_profile(options,output_file)
  handle_output(options,"Configuring:\tClient #{options['name']} with MAC address #{options['mac']}")
  import_ai_client_profile(options,output_file)
  create_ai_client(options)
  if options['host-os-name'].to_s.match(/SunOS/) and options['host-os-release'].match(/11/)
    clear_solaris_dhcpd(options)
  end
  return
end
def configure_ai_client ( options ) if not options [ 'service' ] . to_s . match ( / i386|sparc / ) options [ 'service' ] = options [ 'service' ] + "_" + options [ 'arch' ] end options [ 'ip' ] = single_install_ip ( options ) check_ai_client_doesnt_exist ( options ) populate_ai_client_profile_questions ( options ) process_questions ( options ) if options [ 'host-os-name' ] . to_s . match ( / Darwin / ) tftp_version_dir = options [ 'tftpdir' ] + "/" + options [ 'service' ] check_osx_iso_mount ( tftp_version_dir , options [ 'file' ] ) end output_file = options [ 'workdir' ] + "/" + options [ 'name' ] + "_ai_profile.xml" create_ai_client_profile ( options , output_file ) handle_output ( options , "Configuring:\tClient #{options['name']} with MAC address #{options['mac']}" ) import_ai_client_profile ( options , output_file ) create_ai_client ( options ) if options [ 'host-os-name' ] . to_s . match ( / SunOS / ) and options [ 'host-os-release' ] . match ( / 11 / ) clear_solaris_dhcpd ( options ) end return end
Main code to actually add a client
Main code to actually add a client
# Populate questions for AI profile
options
<not_specific>