Merge branch 'database'
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 14 Sep 2014 18:10:43 +0000 (18:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 14 Sep 2014 18:10:43 +0000 (18:10 +0000)
README
ddns.conf.sample
src/ddns/providers.py

diff --git a/README b/README
index fe6893e..5944102 100644 (file)
--- a/README
+++ b/README
@@ -61,6 +61,7 @@ SUPPORTED PROVIDERS:
        enom.com
        entrydns.net
        freedns.afraid.org
+       myonlineportal.net
        namecheap.com
        no-ip.com
        nsupdate.info
index c05a1ce..d3ac53f 100644 (file)
 # provider = freedns.afraid.org
 # token = token
 
+# [test.myonlineportal.net]
+# provider = myonlineportal.net
+# username = user
+# password = pass
+
 # [test.namecheap.com]
 # provider = namecheap.com
 # password = pass
@@ -88,7 +93,7 @@
 
 # [test.nsupdate.info]
 # provider = nsupdate.info
-# secret = secret
+# token = token
 
 # [test.opendns.com]
 # handle = opendns.com
index 28bdf41..c6ef5c0 100644 (file)
@@ -864,6 +864,25 @@ class DDNSProviderLightningWireLabs(DDNSProvider):
                raise DDNSUpdateError
 
 
+class DDNSProviderMyOnlinePortal(DDNSProtocolDynDNS2, DDNSProvider):
+       handle    = "myonlineportal.net"
+       name      = "myonlineportal.net"
+       website   = "https:/myonlineportal.net/"
+
+       # Information about the request and response can be obtained here:
+       # https://myonlineportal.net/howto_dyndns
+
+       url = "https://myonlineportal.net/updateddns"
+
+       def prepare_request_data(self, proto):
+               data = {
+                       "hostname" : self.hostname,
+                       "ip"     : self.get_address(proto),
+               }
+
+               return data
+
+
 class DDNSProviderNamecheap(DDNSResponseParserXML, DDNSProvider):
        handle    = "namecheap.com"
        name      = "Namecheap"
@@ -954,7 +973,7 @@ class DDNSProviderNsupdateINFO(DDNSProtocolDynDNS2, DDNSProvider):
 
        @property
        def password(self):
-               return self.get("secret")
+               return self.token or self.get("secret")
 
        @property
        def url(self):
@@ -1109,7 +1128,6 @@ class DDNSProviderSPDNS(DDNSProtocolDynDNS2, DDNSProvider):
        handle    = "spdns.org"
        name      = "SPDNS"
        website   = "http://spdns.org/"
-       protocols = ("ipv4",)
 
        # Detailed information about request and response codes are provided
        # by the vendor. They are using almost the same mechanism and status