methods/ai_client.rb
# Routine to actually add a client
Routine to actually add a client
Routine to actually add a client
def create_ai_client(options)
  options['ip'] = single_install_ip(options)
  message    = "Information:\tCreating client entry for #{options['name']} with architecture #{options['arch']} and MAC address #{options['mac']}"
  command    = "installadm create-client -n #{options['service']} -e #{options['mac']}"
   execute_command(options,message,command)
  if options['arch'].to_s.match(/i386/) || options['arch'].to_s.match(/i386/)
    update_ai_client_dhcpd_entry(options)
    update_ai_client_grub_cfg(options)
  else
   add_dhcp_client(options)
  end
  smf_service = "svc:/network/dhcp/server:ipv4"
  refresh_smf_service(options,smf_service)
  return
end
def create_ai_client ( options ) options [ 'ip' ] = single_install_ip ( options ) message = "Information:\tCreating client entry for #{options['name']} with architecture #{options['arch']} and MAC address #{options['mac']}" command = "installadm create-client -n #{options['service']} -e #{options['mac']}" execute_command ( options , message , command ) if options [ 'arch' ] . to_s . match ( / i386 / ) || options [ 'arch' ] . to_s . match ( / i386 / ) update_ai_client_dhcpd_entry ( options ) update_ai_client_grub_cfg ( options ) else add_dhcp_client ( options ) end smf_service = "svc:/network/dhcp/server:ipv4" refresh_smf_service ( options , smf_service ) return end
Routine to actually add a client
Routine to actually add a client
options
<not_specific>