summaryrefslogtreecommitdiffstats
path: root/ovh
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2012-10-05 03:24:08 +0200
committermakefu <github@syntax-fehler.de>2012-10-05 03:24:08 +0200
commit5eb0dd2aa5e5e4d07da0b8f663bb3f2f77bc19e5 (patch)
treed9ef8921f38b47adbdfea0b4f12429b31439deb8 /ovh
parent462a1a45ec08fd5e5e010d266eb3871386511b84 (diff)
make soapi usable for non-krebs urls
Diffstat (limited to 'ovh')
-rw-r--r--ovh/README5
-rwxr-xr-xovh/soapi/domainCapabilities3
-rwxr-xr-xovh/soapi/domainInfo3
-rwxr-xr-xovh/soapi/zoneEntryList3
-rwxr-xr-xovh/soapi/zoneExport3
-rwxr-xr-xovh/soapi/zoneImport3
6 files changed, 15 insertions, 5 deletions
diff --git a/ovh/README b/ovh/README
index 8e1fe24a..90b34108 100644
--- a/ovh/README
+++ b/ovh/README
@@ -7,13 +7,18 @@ set -euf
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."
diff --git a/ovh/soapi/domainCapabilities b/ovh/soapi/domainCapabilities
index dad8311d..a438e0b8 100755
--- a/ovh/soapi/domainCapabilities
+++ b/ovh/soapi/domainCapabilities
@@ -19,10 +19,11 @@ 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, 'krebsco.de')
+result = soap.domainCapabilities(session, domain)
print dumps(result, sort_keys=True, indent=2, default=default)
soap.logout(session)
diff --git a/ovh/soapi/domainInfo b/ovh/soapi/domainInfo
index e32262e1..35459d06 100755
--- a/ovh/soapi/domainInfo
+++ b/ovh/soapi/domainInfo
@@ -19,10 +19,11 @@ 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, 'krebsco.de')
+result = soap.domainInfo(session, domain)
print dumps(result, sort_keys=True, indent=2, default=default)
soap.logout(session)
diff --git a/ovh/soapi/zoneEntryList b/ovh/soapi/zoneEntryList
index af37c112..63d0f1c6 100755
--- a/ovh/soapi/zoneEntryList
+++ b/ovh/soapi/zoneEntryList
@@ -19,10 +19,11 @@ 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.zoneEntryList(session, 'krebsco.de')
+result = soap.zoneEntryList(session, domain)
print dumps(result, sort_keys=True, indent=2, default=default)
soap.logout(session)
diff --git a/ovh/soapi/zoneExport b/ovh/soapi/zoneExport
index 7659d647..7747ded4 100755
--- a/ovh/soapi/zoneExport
+++ b/ovh/soapi/zoneExport
@@ -19,10 +19,11 @@ 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.zoneExport(session, 'krebsco.de')
+result = soap.zoneExport(session, domain)
print result
soap.logout(session)
diff --git a/ovh/soapi/zoneImport b/ovh/soapi/zoneImport
index 141fb4a2..42d46caf 100755
--- a/ovh/soapi/zoneImport
+++ b/ovh/soapi/zoneImport
@@ -21,12 +21,13 @@ soap = WSDL.Proxy(wsdl)
username = environ['KREBS_OVH_USER']
password = environ['KREBS_OVH_PASS']
+domain = environ.get('KREBS_OVH_DOMAIN','krebsco.de')
zone = join(stdin.readlines(),'')
session = soap.login(username, password, 'en', 0)
-result = soap.zoneImport(session, 'krebsco.de', zone)
+result = soap.zoneImport(session, domain, zone)
print result
soap.logout(session)