You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2021/05/02 21:20:35 UTC
[libcloud] branch trunk updated: Also pass None instead of string
null for priority, port, weight parameter in DigitalOcean DNS driver,
add changelog entry for #1570.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
The following commit(s) were added to refs/heads/trunk by this push:
new d4ef332 Also pass None instead of string null for priority, port, weight parameter in DigitalOcean DNS driver, add changelog entry for #1570.
d4ef332 is described below
commit d4ef3323fa05959bc7d4e34a717a0d831a6aafb2
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sun May 2 23:20:05 2021 +0200
Also pass None instead of string null for priority, port, weight
parameter in DigitalOcean DNS driver, add changelog entry for #1570.
---
CHANGES.rst | 6 ++++++
libcloud/dns/drivers/digitalocean.py | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index d94c049..7c012fe 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -57,6 +57,12 @@ DNS
- [CloudFlare] Enable authentication via API Tokens.
[Clemens Wolff - @c-w]
+- [DigitalOcean] Fix ``create_record()`` and ``update_record()`` method and
+ pass ``None`` instead of string value ``null`` for priority, port and weight
+ parameters if they are not provided as method arguments.
+ (GITHUB-1570)
+ [Gasper Vozel - @karantan]
+
Changes in Apache Libcloud 3.3.1
--------------------------------
diff --git a/libcloud/dns/drivers/digitalocean.py b/libcloud/dns/drivers/digitalocean.py
index 08f413b..9e88b57 100644
--- a/libcloud/dns/drivers/digitalocean.py
+++ b/libcloud/dns/drivers/digitalocean.py
@@ -230,15 +230,15 @@ class DigitalOceanDNSDriver(DigitalOcean_v2_BaseDriver, DNSDriver):
try:
params['priority'] = extra['priority']
except KeyError:
- params['priority'] = 'null'
+ params['priority'] = None
try:
params['port'] = extra['port']
except KeyError:
- params['port'] = 'null'
+ params['port'] = None
try:
params['weight'] = extra['weight']
except KeyError:
- params['weight'] = 'null'
+ params['weight'] = None
if 'ttl' in extra:
params['ttl'] = extra['ttl']