Add OVH as new provider.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 16 Jun 2014 15:56:52 +0000 (17:56 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 16 Jun 2014 15:56:52 +0000 (17:56 +0200)
ddns.conf.sample
src/ddns/__init__.py
src/ddns/providers.py

index 3d08267..bc41f83 100644 (file)
 # username = user
 # password = pass
 
+# [test.ovh.com]
+# provider = ovh.com
+# username = user
+# password = pass
+
 # [test.selfhost.de]
 # provider = selfhost.de
 # username = user
index f731887..30a1b8a 100644 (file)
@@ -98,6 +98,7 @@ class DDNSCore(object):
                        DDNSProviderFreeDNSAfraidOrg,
                        DDNSProviderNOIP,
                        DDNSProviderLightningWireLabs,
+                       DDNSProviderOVH,
                        DDNSProviderSelfhost,
                        DDNSProviderSPDNS,
                        DDNSProviderVariomedia,
index 9eea16d..e936d72 100644 (file)
@@ -486,6 +486,30 @@ class DDNSProviderNOIP(DDNSProviderDynDNS):
                return data
 
 
+class DDNSProviderOVH(DDNSProviderDynDNS):
+       INFO = {
+               "handle"    : "ovh.com",
+               "name"      : "OVH",
+               "website"   : "http://www.ovh.com/",
+               "protocols" : ["ipv4",]
+       }
+
+       # OVH only provides very limited information about how to
+       # update a DynDNS host. They only provide the update url
+       # on the their german subpage.
+       #
+       # http://hilfe.ovh.de/DomainDynHost
+
+       url = "https://www.ovh.com/nic/update"
+
+       def _prepare_request_data(self):
+               data = {
+                       "hostname" : self.hostname,
+                       "myip"     : self.get_address("ipv4"),
+                       "system"   : "dyndns",
+               }
+
+
 class DDNSProviderSelfhost(DDNSProvider):
        INFO = {
                "handle"    : "selfhost.de",