]> git.ipfire.org Git - ddns.git/commitdiff
Add opendns as new provider.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 13 Jul 2014 15:44:33 +0000 (17:44 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 14 Jul 2014 12:04:22 +0000 (14:04 +0200)
README
ddns.conf.sample
src/ddns/providers.py

diff --git a/README b/README
index 6002c1912ea25a2acfb3a0b15407e3a1bf6096b4..848a3723e2c21dc58e386e7dfbb0bec32591d270 100644 (file)
--- a/README
+++ b/README
@@ -61,6 +61,7 @@ SUPPORTED PROVIDERS:
        namecheap.com
        no-ip.com
        nsupdate.info
+       opendns.com
        ovh.com
        regfish.com
        selfhost.de
index cc7f25b5fb168f6a65b08d47eae426cb0a8d5115..9a62fd33eac37f204ad68e58621145fb2b249243 100644 (file)
 # secret = secret
 # proto = ipv4 OR ipv6
 
+# [test.opendns.com]
+# handle = opendns.com
+# username = user
+# password = pass
+# proto = ipv4 OR ipv6
+
 # [test.ovh.com]
 # provider = ovh.com
 # username = user
index 512d663480361c58c05fe45f72957e26213c7c18..3927808b19cb494b279623e9022ad973295323ac 100644 (file)
@@ -772,6 +772,30 @@ class DDNSProviderNsupdateINFO(DDNSProtocolDynDNS2, DDNSProvider):
                return data
 
 
+class DDNSProviderOpenDNS(DDNSProtocolDynDNS2, DDNSProvider):
+       handle    = "opendns.com"
+       name      = "OpenDNS"
+       website   = "http://www.opendns.com"
+
+       # Detailed information about the update request and possible
+       # response codes can be obtained from here:
+       # https://support.opendns.com/entries/23891440
+
+       url = "https://updates.opendns.com/nic/update"
+
+       @property
+       def proto(self):
+               return self.get("proto")
+
+       def _prepare_request_data(self):
+               data = {
+                       "hostname" : self.hostname,
+                       "myip"     : self.get_address(self.proto)
+               }
+
+               return data
+
+
 class DDNSProviderOVH(DDNSProtocolDynDNS2, DDNSProvider):
        handle    = "ovh.com"
        name      = "OVH"