From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: ddns@lists.ipfire.org Subject: Re: [PATCH 1/2] Add new provider Servercow Date: Thu, 16 Feb 2017 10:06:17 +0100 Message-ID: <1487235977.2191.1.camel@ipfire.org> In-Reply-To: <1486990868.24657.143.camel@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5746141440671967154==" List-Id: --===============5746141440671967154== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hello Jonatan and Michael, thanks for sending in this patch and for testing. Merged. Best regards, -Stefan > Hello Jonatan, > > thanks for sending in this patch. I have seen this work already, so I > ACK this > patch. > > Reviewed-by: Michael Tremer > > Good work! > > Best, > -Michael > > On Fri, 2017-02-10 at 15:35 +0100, Jonatan Schlag wrote: > > Tested-by: Jonatan Schlag > > Signed-off-by: Jonatan Schlag > > --- > >  src/ddns/providers.py | 35 +++++++++++++++++++++++++++++++++++ > >  1 file changed, 35 insertions(+) > > > > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > > index 2c30d42..01d7827 100644 > > --- a/src/ddns/providers.py > > +++ b/src/ddns/providers.py > > @@ -1452,6 +1452,41 @@ class > > DDNSProviderSelfhost(DDNSProtocolDynDNS2, > > DDNSProvider): > >   return data > >   > >   > > +class DDNSProviderServercow(DDNSProvider): > > + handle    = "servercow.de" > > + name      = "servercow.de" > > + website   = "https://servercow.de/" > > + protocols = ("ipv4", "ipv6") > > + > > + url = "https://www.servercow.de/dnsupdate/update.php" > > + can_remove_records = False > > + > > + def update_protocol(self, proto): > > + data = { > > + "ipaddr"   : self.get_address(proto), > > + "hostname" : self.hostname, > > + "username" : self.username, > > + "pass"     : self.password, > > + } > > + > > + # Send request to provider > > + response = self.send_request(self.url, data=data) > > + > > + # Read response > > + output = response.read() > > + > > + # Server responds with OK if update was successful > > + if output.startswith("OK"): > > + return > > + > > + # Catch any errors > > + elif output.startswith("FAILED - Authentication > > failed"): > > + raise DDNSAuthenticationError > > + > > + # If we got here, some other update error happened > > + raise DDNSUpdateError(output) > > + > > + > >  class DDNSProviderSPDNS(DDNSProtocolDynDNS2, DDNSProvider): > >   handle    = "spdns.org" > >   name      = "SPDYN" > > _______________________________________________ > ddns mailing list > ddns(a)lists.ipfire.org > http://lists.ipfire.org/mailman/listinfo/ddns --===============5746141440671967154== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUFC Q2dBR0JRSllwV3VLQUFvSkVFN1hUaFdQazdMZTF6WVArUUdTZmpob1MrR1JDUDJBVWpTVncrWmsK VEl6NFdINUdWRk1UQWY5WFp0dFJ0OHNjRGoyQlVkSk1KY000NDhSSkdab3h3SzhLLzlSQTlLdnJy Y2ZaTU9ZUgorUmdlVEJCRStvVkdwelB1bzFvV2ZFQ2R5WUEyR3YrRHlvcjNhYTJ6YTY3bWJjSmNU REQrcDJ6VWFKMnZqSHNKClhzU1dUaXppcjhRRXowOW9wamJyeDVoS2JrV3V1eEtZRDA0OWo0UEor MjFuOThWMzhRVGZQNElJSUxSbVhkN3UKdUkyd1hmUmlDdVFIRUdlTzEvazdhUEVkRTZmNG94SVVK V1NmdmNDWEFmdERLbmM5QSsrVFVMOFFTWExPMEVjWQp0eE14NG5mNTRaNlFtaWtmSnNCRW92elAr Z3RkK1o2TnNJZGFnWVRwYUpidzNqZmZjK0dVUEE1aXRVMkhBOHpTCmdwemZWeVp4ZW50WjZmSkk4 cWF4ZFBwOFBvc0J5bmtSQ3l0US9DejZDWlorQ004T3ZjWVR6T3JkZjBsY0NMbmMKMzNySkYwWWxK dENvbTVPMm9qZE9DSzlPNUlxM0cvUitUa2FMOGJ5WVNSdUs5eWZSMmI3c2NGLy8yNUxPT3orMwpO aWVUVkVOZUVpa09tTEVJRU85MGtnK3hicnFzdUI4dEtSVURwbVBKLzlrOVBDe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