summaryrefslogtreecommitdiffstats
path: root/ovh/soapi/domainList
blob: 3f829ebe5713daef51521dfa551423b4b0fc0bf5 (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
#!/usr/bin/python

from os import environ
import pprint
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']

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

#domainHostList
result = soap.domainList(session)
print "domainList successfull"
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(result) # your code here ...

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