summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2012-07-16 16:40:17 +0200
committerEUcancER <root@euer.krebsco.de>2012-07-16 16:40:17 +0200
commit3dcd5cf2a9650a8d91afbbfaab49ee054ddd6185 (patch)
treeed4878b78dab0c22e9778108d273d2e797328de9
parent7e5d2f686c11113f2d8723bf00b36fe6fe038d88 (diff)
fix zoneEntryAdd
-rw-r--r--ovh/README10
-rwxr-xr-xovh/soapi/zoneEntryAdd10
2 files changed, 12 insertions, 8 deletions
diff --git a/ovh/README b/ovh/README
index 43020fd9..8e1fe24a 100644
--- a/ovh/README
+++ b/ovh/README
@@ -15,8 +15,12 @@ export PATH="$PWD/bin${PATH+:$PATH}"
export KREBS_OVH_USER=...
export KREBS_OVH_PASS=...
-zoneExport > /tmp/foo
-$EDITOR /tmp/foo
-zoneImport < /tmp/foo
+
+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/ovh/soapi/zoneEntryAdd b/ovh/soapi/zoneEntryAdd
index bf1f4a92..20ecd1fd 100755
--- a/ovh/soapi/zoneEntryAdd
+++ b/ovh/soapi/zoneEntryAdd
@@ -20,14 +20,14 @@ soap = WSDL.Proxy(wsdl)
username = environ['KREBS_OVH_USER']
password = environ['KREBS_OVH_PASS']
-domain = argv[2]
-subdomain = argv[3]
-fieldtype = argv[4]
-target = argv[5]
+domain = argv[1]
+subdomain = argv[2] if argv[2] is not " " else ""
+fieldtype = argv[3]
+target = argv[4]
session = soap.login(username, password, 'de', 0)
-result = soap.zoneEntryAdd(session, domain, subdomain, fieldtype, target)
+result = soap.zoneEntryAdd(session, domain, subdomain, fieldtype, target,1)
print dumps(result, sort_keys=True, indent=2, default=default)
soap.logout(session)