Hello All,

I am working on building a "live agent" to tie into Cobbler. Essentially, a new system is powered on, automatically PXE boots with this live agent, and would register itself to Cobbler, at which point a person can select the profile, and add in the customizations for ksmeta, and then reboot to be installed.

My problem is that I can't seem to find the proper object name for adding the mac address when registering the server. I get the error:

xmlrpclib.Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'object has no method: mac_address'">


The code snippet is:

def registerSelf():
    mac = commands.getoutput("ifconfig eth0 | grep HWaddr | awk {'print $5'}")
    mem = commands.getoutput("cat /proc/meminfo | grep MemTotal | awk {'print $2 $3'}")
    cpu = commands.getoutput("cat /proc/cpuinfo | grep 'model name' | uniq | cut -f1,2 | awk {'print $0'}")
    numproc = commands.getoutput("cat /proc/cpuinfo | grep 'processor' | uniq ")

    print "MAC: %s" % mac
    print "Memory: %s" % mem
    print "CPU: %s" % cpu
   
    object = server.new_system(token)
    server.modify_system(object, "name", mac, token)
    server.modify_system(object, "profile", "Registration", token)
    server.modify_system(object, "mac_address", mac, token)
   
    result = server.save_system(object, token)

I am trying to find where in the remote.py or any of the packages that has the correct naming for the model, so any help would be greatly appreciated.

Thanks,

Eric