methods/ai_client.rb
# Check AI client doesn't exist
Check AI client doesn't exist
Check AI client doesn ' t exist
def check_ai_client_doesnt_exist(options)
  options['mac'] = options['mac'].upcase
  message = "Information:\tChecking client "+options['name']+" doesn't exist"
  command = "installadm list -p |grep '#{options['mac']}'"
  output  = execute_command(options,message,command)
  if output.match(/#{options['name']}/)
    handle_output(options,"Warning:\tProfile already exists for #{options['name']}")
    if options['yes'] == true
      handle_output(options,"Deleting:\rtClient #{options['name']}")
      unconfigure_ai_client(options)
    else
      quit(options)
    end
  end
  return
end
def check_ai_client_doesnt_exist ( options ) options [ 'mac' ] = options [ 'mac' ] . upcase message = "Information:\tChecking client " + options [ 'name' ] + " doesn't exist" command = "installadm list -p |grep '#{options['mac']}'" output = execute_command ( options , message , command ) if output . match ( / #{ options [ 'name' ] } / ) handle_output ( options , "Warning:\tProfile already exists for #{options['name']}" ) if options [ 'yes' ] == true handle_output ( options , "Deleting:\rtClient #{options['name']}" ) unconfigure_ai_client ( options ) else quit ( options ) end end return end
Check AI client doesn't exist
Check AI client doesn ' t exist
options
<not_specific>