summaryrefslogtreecommitdiffstats
path: root/ovh/soapi/zoneEntryAdd
blob: 68a0b8e3e893dcf5a70f13d2d98ec0f34b6acdd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/python

from os import environ
from SOAPpy import WSDL

soap = WSDL.Proxy('https://www.ovh.com/soapi/soapi-re-1.24.wsdl')

username = environ['KREBS_OVH_USER']
password = environ['KREBS_OVH_PASS']
domain = argv[2]
subdomain = argv[3]
fieldtype = argv[4]
target = argv[5]

#login
session = soap.login(username, password, 'de', 0)
print "login successfull"

#zoneEntryAdd
soap.zoneEntryAdd(session, domain, subdomain, fieldtype, target)
print "zoneEntryAdd successfull"

#logout
soap.logout(session)
print "logout successfull"