nsupdate.info: Use generic url for IPv4 and v6 address updates.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 14 Sep 2014 20:47:38 +0000 (22:47 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 14 Sep 2014 20:47:38 +0000 (22:47 +0200)
src/ddns/providers.py

index 0bd21b8..797ef3d 100644 (file)
@@ -1006,6 +1006,8 @@ class DDNSProviderNsupdateINFO(DDNSProtocolDynDNS2, DDNSProvider):
        # after login on the provider user interface and here:
        # http://nsupdateinfo.readthedocs.org/en/latest/user.html
 
+       url = "https://nsupdate.info/nic/update"
+
        # TODO nsupdate.info can actually do this, but the functionality
        # has not been implemented here, yet.
        can_remove_records = False
@@ -1020,16 +1022,6 @@ class DDNSProviderNsupdateINFO(DDNSProtocolDynDNS2, DDNSProvider):
        def password(self):
                return self.token or self.get("secret")
 
-       @property
-       def url(self):
-               # The update URL is different by the used protocol.
-               if self.proto == "ipv4":
-                       return "https://ipv4.nsupdate.info/nic/update"
-               elif self.proto == "ipv6":
-                       return "https://ipv6.nsupdate.info/nic/update"
-               else:
-                       raise DDNSUpdateError(_("Invalid protocol has been given"))
-
        def prepare_request_data(self, proto):
                data = {
                        "myip" : self.get_address(proto),