* [PATCH] ddns: Added new provider Domain-Offensive (http://do.de)
@ 2017-02-23 17:17 Dirk Wagner
2017-02-24 10:51 ` Stefan Schantl
0 siblings, 1 reply; 2+ messages in thread
From: Dirk Wagner @ 2017-02-23 17:17 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 3863 bytes --]
Signed-off-by: Dirk Wagner <dirk.wagner(a)ipfire.org>
---
README | 1 +
src/ddns/errors.py | 8 +++++++-
src/ddns/providers.py | 15 ++++++++++++++-
src/ddns/system.py | 4 ++++
4 files changed, 26 insertions(+), 2 deletions(-)
mode change 100644 => 100755 README
mode change 100644 => 100755 src/ddns/errors.py
mode change 100644 => 100755 src/ddns/providers.py
mode change 100644 => 100755 src/ddns/system.py
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:
dns.lightningwirelabs.com
dnsmadeeasy.com
dnspark.com
+ do.de
domains.google.com
domopoli.de
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 @@
###############################################################################
# #
# ddns - A dynamic DNS client for IPFire #
-# Copyright (C) 2012 IPFire development team #
+# Copyright (C) 2012-2017 IPFire development team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -160,6 +160,12 @@ class DDNSServiceUnavailableError(DDNSNetworkError):
"""
reason = N_("Service unavailable")
+
+class DDNSTooManyRequests(DDNSError):
+ """
+ Raised when too many requests occured.
+ """
+ reason = N_("Too many requests")
class DDNSUpdateError(DDNSError):
"""
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 @@
###############################################################################
# #
# ddns - A dynamic DNS client for IPFire #
-# Copyright (C) 2012 IPFire development team #
+# Copyright (C) 2012-2017 IPFire development team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -840,7 +840,20 @@ class DDNSProviderDynDNS(DDNSProtocolDynDNS2, DDNSProvider):
url = "https://members.dyndns.org/nic/update"
+
+class DDNSProviderDomainOffensive(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "do.de"
+ name = "Domain-Offensive"
+ website = "http://dyn.com/dns/"
+ protocols = ("ipv4",)
+
+ # Detailed information about the request and response codes
+ # are available on the providers webpage.
+ # https://www.do.de/wiki/FlexDNS_-_Entwickler
+
+ url = "https://ddns.do.de/"
+
class DDNSProviderDynU(DDNSProtocolDynDNS2, DDNSProvider):
handle = "dynu.com"
name = "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):
elif e.code == 404:
raise DDNSNotFound(e.reason)
+ # 429 - Too Many Requests
+ elif e.code == 429:
+ raise DDNSTooManyRequests(e.reason)
+
# 500 - Internal Server Error
elif e.code == 500:
raise DDNSInternalServerError(e.reason)
--
2.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ddns: Added new provider Domain-Offensive (http://do.de)
2017-02-23 17:17 [PATCH] ddns: Added new provider Domain-Offensive (http://do.de) Dirk Wagner
@ 2017-02-24 10:51 ` Stefan Schantl
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Schantl @ 2017-02-24 10:51 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 4905 bytes --]
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 <dirk.wagner(a)ipfire.org>
> ---
> README | 1 +
> src/ddns/errors.py | 8 +++++++-
> src/ddns/providers.py | 15 ++++++++++++++-
> src/ddns/system.py | 4 ++++
> 4 files changed, 26 insertions(+), 2 deletions(-)
> mode change 100644 => 100755 README
> mode change 100644 => 100755 src/ddns/errors.py
> mode change 100644 => 100755 src/ddns/providers.py
> mode change 100644 => 100755 src/ddns/system.py
>
> 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:
> dns.lightningwirelabs.com
> dnsmadeeasy.com
> dnspark.com
> + do.de
> domains.google.com
> domopoli.de
> 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 @@
> ####################################################################
> ###########
> #
> #
> # ddns - A dynamic DNS client for
> IPFire #
> -# Copyright (C) 2012 IPFire development
> team #
> +# Copyright (C) 2012-2017 IPFire development
> team #
> #
> #
> # This program is free software: you can redistribute it and/or
> modify #
> # it under the terms of the GNU General Public License as published
> by #
> @@ -160,6 +160,12 @@ class
> DDNSServiceUnavailableError(DDNSNetworkError):
> """
> reason = N_("Service unavailable")
>
> +
> +class DDNSTooManyRequests(DDNSError):
> + """
> + Raised when too many requests occured.
> + """
> + reason = N_("Too many requests")
>
> class DDNSUpdateError(DDNSError):
> """
> 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 @@
> ####################################################################
> ###########
> #
> #
> # ddns - A dynamic DNS client for
> IPFire #
> -# Copyright (C) 2012 IPFire development
> team #
> +# Copyright (C) 2012-2017 IPFire development
> team #
> #
> #
> # This program is free software: you can redistribute it and/or
> modify #
> # it under the terms of the GNU General Public License as published
> by #
> @@ -840,7 +840,20 @@ class DDNSProviderDynDNS(DDNSProtocolDynDNS2,
> DDNSProvider):
>
> url = "https://members.dyndns.org/nic/update"
>
> +
> +class DDNSProviderDomainOffensive(DDNSProtocolDynDNS2,
> DDNSProvider):
> + handle = "do.de"
> + name = "Domain-Offensive"
> + website = "http://dyn.com/dns/"
> + protocols = ("ipv4",)
> +
> + # Detailed information about the request and response codes
> + # are available on the providers webpage.
> + # https://www.do.de/wiki/FlexDNS_-_Entwickler
> +
> + url = "https://ddns.do.de/"
>
> +
> class DDNSProviderDynU(DDNSProtocolDynDNS2, DDNSProvider):
> handle = "dynu.com"
> name = "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):
> elif e.code == 404:
> raise DDNSNotFound(e.reason)
>
> + # 429 - Too Many Requests
> + elif e.code == 429:
> + raise DDNSTooManyRequests(e.reason)
> +
> # 500 - Internal Server Error
> elif e.code == 500:
> raise
> DDNSInternalServerError(e.reason)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-24 10:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 17:17 [PATCH] ddns: Added new provider Domain-Offensive (http://do.de) Dirk Wagner
2017-02-24 10:51 ` Stefan Schantl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox