|
remote = xmlrpclib.Server("http://127.0.0.1/cobbler_api")
token = remote.login(SATELLITE_USER,SATELLITE_PASSWORD)
system_id = remote.new_system(token)
remote.modify_system(system_id,"name","hostname",token)
remote.modify_system(system_id,"hostname","hostname.example.com",token)
remote.modify_system(system_id,'modify_interface', {
"macaddress-eth0" : "01:02:03:04:05:06",
"ipaddress-eth0" : "192.168.0.1",
"dnsname-eth0" : "hostname.example.com",
}, token)
remote.modify_system(system_id,"profile","rhel6-x86_64",token)
remote.modify_system(system_id,"kernel_options", "foo=bar some=thing", token)
remote.modify_system(system_id,"ks_meta", "foo=bar some=thing", token)
remote.save_system(system_id, token)
remote.sync(token) |
|
|