cobbler api python3调用,创建system,删除system
cobbler api python3调用,创建system,删除system 可以根据mac 地址 调用API 创建任务,安装完成之后,再把任务删除掉。 #!/usr/bin/python3.6 import xmlrpc.client server = 'http://192.168.100.52/cobbler_api' user = 'admin' password = '123456' if __name__ == '__main__': try: remote_server = xmlrpc.client.Server(server) token = remote_server.login(user, password) print(remote_server.ping()) # cobbler服务器状态监测 print(remote_server.find_distro()) print(remote_server.find_system()) # 创建 system_id = remote_server.new_system(token) remote_server.modify_system(system_id, "name", "web1", token) remote_server.modify_system(system_id, "hostname",