From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: ddns@lists.ipfire.org Subject: Re: [PATCH] ddns: Added new provider Domain-Offensive (http://do.de) Date: Fri, 24 Feb 2017 11:51:06 +0100 Message-ID: <1487933466.8575.0.camel@ipfire.org> In-Reply-To: <1487870272-31233-1-git-send-email-dirk.wagner@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1737783137756688643==" List-Id: --===============1737783137756688643== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Dirk, thanks for sending the patch. I've divided your changes into two patches and merged them. Best regards, -Stefan > Signed-off-by: Dirk Wagner > --- > =C2=A0README=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A01 + > =C2=A0src/ddns/errors.py=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A08 +++++++- > =C2=A0src/ddns/providers.py | 15 ++++++++++++++- > =C2=A0src/ddns/system.py=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A04 ++++ > =C2=A04 files changed, 26 insertions(+), 2 deletions(-) > =C2=A0mode change 100644 =3D> 100755 README > =C2=A0mode change 100644 =3D> 100755 src/ddns/errors.py > =C2=A0mode change 100644 =3D> 100755 src/ddns/providers.py > =C2=A0mode change 100644 =3D> 100755 src/ddns/system.py >=20 > diff --git a/README b/README > old mode 100644 > new mode 100755 > index 40f1e7f..5f1911d > --- a/README > +++ b/README > @@ -55,6 +55,7 @@ SUPPORTED PROVIDERS: > =C2=A0 dns.lightningwirelabs.com > =C2=A0 dnsmadeeasy.com > =C2=A0 dnspark.com > + do.de > =C2=A0 domains.google.com > =C2=A0 domopoli.de > =C2=A0 dtdns.com > diff --git a/src/ddns/errors.py b/src/ddns/errors.py > old mode 100644 > new mode 100755 > index 58a5ba9..e5383dc > --- a/src/ddns/errors.py > +++ b/src/ddns/errors.py > @@ -2,7 +2,7 @@ > =C2=A0#################################################################### > ########### > =C2=A0#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0# ddns - A dynamic DNS client for > IPFire=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0# > -# Copyright (C) 2012 IPFire development > team=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > +# Copyright (C) 2012-2017 IPFire development > team=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0# This program is free software: you can redistribute it and/or > modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0# it under the terms of the GNU General Public License as published > by=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > @@ -160,6 +160,12 @@ class > DDNSServiceUnavailableError(DDNSNetworkError): > =C2=A0 """ > =C2=A0 reason =3D N_("Service unavailable") > =C2=A0 > +=09 > +class DDNSTooManyRequests(DDNSError): > + """ > + Raised when too many requests occured. > + """ > + reason =3D N_("Too many requests") > =C2=A0 > =C2=A0class DDNSUpdateError(DDNSError): > =C2=A0 """ > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > old mode 100644 > new mode 100755 > index 2c30d42..2a74511 > --- a/src/ddns/providers.py > +++ b/src/ddns/providers.py > @@ -2,7 +2,7 @@ > =C2=A0#################################################################### > ########### > =C2=A0#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0# ddns - A dynamic DNS client for > IPFire=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0# > -# Copyright (C) 2012 IPFire development > team=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > +# Copyright (C) 2012-2017 IPFire development > team=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0# This program is free software: you can redistribute it and/or > modify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > =C2=A0# it under the terms of the GNU General Public License as published > by=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# > @@ -840,7 +840,20 @@ class DDNSProviderDynDNS(DDNSProtocolDynDNS2, > DDNSProvider): > =C2=A0 > =C2=A0 url =3D "https://members.dyndns.org/nic/update" > =C2=A0 > +=09 > +class DDNSProviderDomainOffensive(DDNSProtocolDynDNS2, > DDNSProvider): > + handle=C2=A0=C2=A0=C2=A0=C2=A0=3D "do.de" > + name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D "Domain-Offensive" > + website=C2=A0=C2=A0=C2=A0=3D "http://dyn.com/dns/" > + protocols =3D ("ipv4",) > + > + # Detailed information about the request and response codes > + # are available on the providers webpage. > + # https://www.do.de/wiki/FlexDNS_-_Entwickler > +=09 > + url =3D "https://ddns.do.de/" > =C2=A0 > +=09 > =C2=A0class DDNSProviderDynU(DDNSProtocolDynDNS2, DDNSProvider): > =C2=A0 handle=C2=A0=C2=A0=C2=A0=C2=A0=3D "dynu.com" > =C2=A0 name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D "Dynu" > diff --git a/src/ddns/system.py b/src/ddns/system.py > old mode 100644 > new mode 100755 > index c268ba5..67ea553 > --- a/src/ddns/system.py > +++ b/src/ddns/system.py > @@ -194,6 +194,10 @@ class DDNSSystem(object): > =C2=A0 elif e.code =3D=3D 404: > =C2=A0 raise DDNSNotFound(e.reason) > =C2=A0 > + # 429 - Too Many Requests > + elif e.code =3D=3D 429: > + raise DDNSTooManyRequests(e.reason) > + > =C2=A0 # 500 - Internal Server Error > =C2=A0 elif e.code =3D=3D 500: > =C2=A0 raise > DDNSInternalServerError(e.reason) --===============1737783137756688643== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUFC Q2dBR0JRSllzQkFiQUFvSkVFN1hUaFdQazdMZTNJQVFBSyt4VVBUTDlFRUdDWUlLV2wyRFdobHgK UkFFSWRxRjVTNVY3d1UrdHRNcE9IMEdKY1p1ZVNtSHFnbU8xT1RpUmZZWUVBMGhvK2NqTlNPN0Rj cXdqV1oyWQpnUWlkRzZIL1B5b0lTTGpMaHVvTmNzdkdqWit0N09LZkpGS1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