data = DDNSProtocolDynDNS2._prepare_request_data(self)
# This one supports IPv6
- data.update({
- "myipv6" : self.get_address("ipv6"),
- })
+ myipv6 = self.get_address("ipv6")
+
+ # Add update information if we have an IPv6 address.
+ if myipv6:
+ data["myipv6"] = myipv6
return data
# Send update to the server.
try:
- response = self.send_request(url, method="PUT", data=data)
+ response = self.send_request(url, data=data)
# Handle error codes
except urllib2.HTTPError, e:
class DDNSProviderNsupdateINFO(DDNSProtocolDynDNS2, DDNSProvider):
handle = "nsupdate.info"
name = "nsupdate.info"
- website = "http://www.nsupdate.info/"
+ website = "http://nsupdate.info/"
protocols = ("ipv6", "ipv4",)
# Information about the format of the HTTP request can be found
- # after login on the provider user intrface and here:
+ # after login on the provider user interface and here:
# http://nsupdateinfo.readthedocs.org/en/latest/user.html
# Nsupdate.info uses the hostname as user part for the HTTP basic auth,
url = "https://update.spdns.de/nic/update"
+ @property
+ def username(self):
+ return self.get("username") or self.hostname
+
+ @property
+ def password(self):
+ return self.get("username") or self.token
+
class DDNSProviderStrato(DDNSProtocolDynDNS2, DDNSProvider):
handle = "strato.com"