raise DDNSUpdateError
+class DDNSProviderEntryDNS(DDNSProvider):
+ handle = "entrydns.net"
+ name = "EntryDNS"
+ website = "http://entrydns.net/"
+ protocols = ("ipv4",)
+
+ # Some very tiny details about their so called "Simple API" can be found
+ # here: https://entrydns.net/help
+ url = "https://entrydns.net/records/modify"
+
+ def update(self):
+ data = {
+ "ip" : self.get_address("ipv4")
+ }
+
+ # Add auth token to the update url.
+ url = "%s/%s" % (self.url, self.token)
+
+ # Send update to the server.
+ try:
+ response = self.send_request(url, method="PUT", data=data)
+
+ # Handle error codes
+ except urllib2.HTTPError, e:
+ if e.code == 404:
+ raise DDNSAuthenticationError
+
+ elif e.code == 422:
+ raise DDNSRequestError(_("An invalid IP address was submitted"))
+
+ raise
+
+ # Handle success messages.
+ if response.code == 200:
+ return
+
+ # If we got here, some other update error happened.
+ raise DDNSUpdateError
+
+
class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
handle = "freedns.afraid.org"
name = "freedns.afraid.org"
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"