]> git.ipfire.org Git - oddments/ddns.git/commitdiff
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 0bd21b83939c11d75af83c35f993537275b43e0b..797ef3d7a2a03d98a7e7daf6b0fcc02284081909 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
 
        # 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
        # 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")
 
        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),
        def prepare_request_data(self, proto):
                data = {
                        "myip" : self.get_address(proto),