From 44a3b4f5cec7c77c906d913116701c7ec4b8bc6c Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 22 Aug 2011 16:06:13 +0200 Subject: ovh soapi *: use local wsdl copy --- ovh/soapi/domainCapabilities | 24 +- ovh/soapi/domainList | 4 +- ovh/soapi/soapi-re-1.24.wsdl | 20105 +++++++++++++++++++++++++++++++++++++++++ ovh/soapi/zoneEntryAdd | 24 +- ovh/soapi/zoneEntryDel | 24 +- ovh/soapi/zoneEntryList | 4 +- 6 files changed, 20157 insertions(+), 28 deletions(-) create mode 100644 ovh/soapi/soapi-re-1.24.wsdl diff --git a/ovh/soapi/domainCapabilities b/ovh/soapi/domainCapabilities index edce3f0d..dad8311d 100755 --- a/ovh/soapi/domainCapabilities +++ b/ovh/soapi/domainCapabilities @@ -1,24 +1,28 @@ #!/usr/bin/python from os import environ -import pprint +from os.path import dirname, realpath from SOAPpy import WSDL +from json import dumps, JSONEncoder -soap = WSDL.Proxy('https://www.ovh.com/soapi/soapi-re-1.24.wsdl') +def default(o): + try: + iterable = iter(o) + except TypeError: + pass + else: + return list(iterable) + return JSONEncoder.default(o) + +wsdl = dirname(realpath(__file__)) + '/soapi-re-1.24.wsdl' +soap = WSDL.Proxy(wsdl) username = environ['KREBS_OVH_USER'] password = environ['KREBS_OVH_PASS'] -#login session = soap.login(username, password, 'de', 0) -print "login successfull" -#domainCapabilities result = soap.domainCapabilities(session, 'krebsco.de') -print "domainCapabilities successfull" -pp = pprint.PrettyPrinter(indent=4) -pp.pprint(result) # your code here ... +print dumps(result, sort_keys=True, indent=2, default=default) -#logout soap.logout(session) -print "logout successfull" diff --git a/ovh/soapi/domainList b/ovh/soapi/domainList index b089f6a4..342eec72 100755 --- a/ovh/soapi/domainList +++ b/ovh/soapi/domainList @@ -1,6 +1,7 @@ #!/usr/bin/python from os import environ +from os.path import dirname, realpath from SOAPpy import WSDL from json import dumps, JSONEncoder @@ -13,7 +14,8 @@ def default(o): return list(iterable) return JSONEncoder.default(o) -soap = WSDL.Proxy('https://www.ovh.com/soapi/soapi-re-1.24.wsdl') +wsdl = dirname(realpath(__file__)) + '/soapi-re-1.24.wsdl' +soap = WSDL.Proxy(wsdl) username = environ['KREBS_OVH_USER'] password = environ['KREBS_OVH_PASS'] diff --git a/ovh/soapi/soapi-re-1.24.wsdl b/ovh/soapi/soapi-re-1.24.wsdl new file mode 100644 index 00000000..c628c564 --- /dev/null +++ b/ovh/soapi/soapi-re-1.24.wsdl @@ -0,0 +1,20105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +