How to reboot Netcup vServer using Python & SCP WSDL API
#!/usr/bin/env python3
from zeep import Client
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--user", required=True, help="The Netcup SCP username. This is typically an integer like 92752")
parser.add_argument("-p", "--password", required=True, help="The Netcup SCP webservice password. This is NOT the SCP login password")
parser.add_argument("-v", "--vserver", required=True, help="The name of the vServer, like v2201261246567246578")
args = parser.parse_args()
client = Client('https://www.servercontrolpanel.de/WSEndUser?wsdl')
print(client.service.vServerReset(args.user, args.password, args.vserver))
Call like this:
./restart-netcup-vserver.py --user 92752 --password su4ahK8ocu --vserver v2201261246567246578