From 695a7acf30d0f6be1191a162fe147d4810210c52 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 30 Jan 2013 12:44:07 +0100 Subject: //ovh -> //ext/ovh --- ext/ovh/README | 31 + ext/ovh/soapi/Makefile | 25 + ext/ovh/soapi/README | 1 + ext/ovh/soapi/domainCapabilities | 29 + ext/ovh/soapi/domainInfo | 29 + ext/ovh/soapi/domainList | 28 + ext/ovh/soapi/soapi-re-1.24.wsdl | 20105 +++++++++++++++++++++++++++++++++++++ ext/ovh/soapi/zoneEntryAdd | 33 + ext/ovh/soapi/zoneEntryDel | 33 + ext/ovh/soapi/zoneEntryList | 29 + ext/ovh/soapi/zoneExport | 29 + ext/ovh/soapi/zoneImport | 33 + 12 files changed, 20405 insertions(+) create mode 100644 ext/ovh/README create mode 100644 ext/ovh/soapi/Makefile create mode 100644 ext/ovh/soapi/README create mode 100755 ext/ovh/soapi/domainCapabilities create mode 100755 ext/ovh/soapi/domainInfo create mode 100755 ext/ovh/soapi/domainList create mode 100644 ext/ovh/soapi/soapi-re-1.24.wsdl create mode 100755 ext/ovh/soapi/zoneEntryAdd create mode 100755 ext/ovh/soapi/zoneEntryDel create mode 100755 ext/ovh/soapi/zoneEntryList create mode 100755 ext/ovh/soapi/zoneExport create mode 100755 ext/ovh/soapi/zoneImport (limited to 'ext/ovh') diff --git a/ext/ovh/README b/ext/ovh/README new file mode 100644 index 00000000..90b34108 --- /dev/null +++ b/ext/ovh/README @@ -0,0 +1,31 @@ +#? /bin/sh +# This is the project to use the SOAP connector of OVH to change zone +# entries for krebsco.de +set -euf + +# install ovh soapi + +cd /path/to/krebscode/painload + + +make -C ovh/soapi install +// if the command breaks, try: +// pip install soappy + +# edit the zone + +export PATH="$PWD/bin${PATH+:$PATH}" +export KREBS_OVH_USER=... +export KREBS_OVH_PASS=... +// Optional: +// export KREBS_OVH_DOMAIN=... + + +zoneEntryAdd "krebsco.de" "subdomain" "A" "a.b.c.d." + +# ZoneExport Broken since 2012-07-16 +# zoneExport > /tmp/foo +# $EDITOR /tmp/foo +# zoneImport < /tmp/foo + +# Have a nice day!^_^ diff --git a/ext/ovh/soapi/Makefile b/ext/ovh/soapi/Makefile new file mode 100644 index 00000000..15ef8f3f --- /dev/null +++ b/ext/ovh/soapi/Makefile @@ -0,0 +1,25 @@ +.PHONY: all install +all: select-target + +exes := $(shell \ + find . -mindepth 1 -maxdepth 1 -type f -executable -exec basename \{\} \;) + +target_exes := $(addprefix ../../bin/,$(exes)) + +install: $(target_exes) + +../../bin/%: % SOAPpy + ln -snf ../ovh/soapi/$* $@ + +src: + mkdir $@ + +src/SOAPpy: src + cd $< && \ + svn co https://pywebsvcs.svn.sourceforge.net/svnroot/pywebsvcs/trunk/SOAPpy + +src/SOAPpy/build/lib/SOAPpy: src/SOAPpy + cd $< && python setup.py build + +SOAPpy: src/SOAPpy/build/lib.linux-x86_64-2.6/SOAPpy + ln -snf $< diff --git a/ext/ovh/soapi/README b/ext/ovh/soapi/README new file mode 100644 index 00000000..42ad5ebf --- /dev/null +++ b/ext/ovh/soapi/README @@ -0,0 +1 @@ +https://www.ovh.com/soapi/en/ diff --git a/ext/ovh/soapi/domainCapabilities b/ext/ovh/soapi/domainCapabilities new file mode 100755 index 00000000..a438e0b8 --- /dev/null +++ b/ext/ovh/soapi/domainCapabilities @@ -0,0 +1,29 @@ +#!/usr/bin/python + +from os import environ +from os.path import dirname, realpath +from SOAPpy import WSDL +from json import dumps, JSONEncoder + +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'] +domain = environ.get('KREBS_OVH_DOMAIN','krebsco.de') + +session = soap.login(username, password, 'de', 0) + +result = soap.domainCapabilities(session, domain) +print dumps(result, sort_keys=True, indent=2, default=default) + +soap.logout(session) diff --git a/ext/ovh/soapi/domainInfo b/ext/ovh/soapi/domainInfo new file mode 100755 index 00000000..35459d06 --- /dev/null +++ b/ext/ovh/soapi/domainInfo @@ -0,0 +1,29 @@ +#!/usr/bin/python + +from os import environ +from os.path import dirname, realpath +from SOAPpy import WSDL +from json import dumps, JSONEncoder + +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'] +domain = environ.get('KREBS_OVH_DOMAIN','krebsco.de') + +session = soap.login(username, password, 'de', 0) + +result = soap.domainInfo(session, domain) +print dumps(result, sort_keys=True, indent=2, default=default) + +soap.logout(session) diff --git a/ext/ovh/soapi/domainList b/ext/ovh/soapi/domainList new file mode 100755 index 00000000..342eec72 --- /dev/null +++ b/ext/ovh/soapi/domainList @@ -0,0 +1,28 @@ +#!/usr/bin/python + +from os import environ +from os.path import dirname, realpath +from SOAPpy import WSDL +from json import dumps, JSONEncoder + +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'] + +session = soap.login(username, password, 'de', 0) + +result = soap.domainList(session) +print dumps(result, sort_keys=True, indent=2, default=default) + +soap.logout(session) diff --git a/ext/ovh/soapi/soapi-re-1.24.wsdl b/ext/ovh/soapi/soapi-re-1.24.wsdl new file mode 100644 index 00000000..c628c564 --- /dev/null +++ b/ext/ovh/soapi/soapi-re-1.24.wsdl @@ -0,0 +1,20105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <