There was a large config refactor many releases ago, but
we never standardized on the new pattern. This will also
help ensure that config is always loaded in the right order.
- Standardize how config is setup throughout designate.
- Removed unecessary import_opt.
Change-Id: I8913d2569f174208740a76c474c73316f6c1d89e
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1] and Octavia [2]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place designate
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
[2]: https://review.opendev.org/c/openstack/octavia/+/899263
Change-Id: Idfa757d7ba238012db116fdb3e98cc7c5ff4b169
Designate does not delete the zone-files on the back-end when zone is
deleted. This results in thousands leftover zone files on backend e.g.
bind. Add option in designate zone delete API to force clean/delete
zone-files on the back-end. This option is restricted for admin or
owner roles.
Closes-Bug: 1966517
Change-Id: Ic7b8fee4d4702b0632774d32542b23d7d2a8c253
This patch removes the 'netaddr' module from the Designate requirements list.
It replaces the use of netaddr in Designate with the python standard library 'ipaddress' module.
Change-Id: I2fb1549e1d6cbccf58c03810c7d74c8c378682d5
Adds a configuration variable that allows a user to
declare the CA certificate to be used to verify
traffic with a PowerDNS API endpoint.
Closes-Bug: #1971856
Signed-off-by: Juan Pablo Suazo <jsuazo@whitestack.com>
Change-Id: I57f3d5a1d1f79186cc5b38e76d30f62e01b60482
To better align with other OpenStack projects and to reduce the
ongoing problem with duplicate imports, this patch re-enables the
H306 check for proper module import order.
Change-Id: Iced92590829f6d9177d64ad4868aebe6eafd6a8a
This should prevent us from obsessing over zones that are in the
designate DB but not in the pdns backend due to races/incomplete
transactions/etc.
Bug: 1880230
Change-Id: I00ae6227edf21007c39a7d55221898ae5c10dda2
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8.
# to unbreak gate:
Depends-on: https://review.opendev.org/715835
Change-Id: Icc2f4368cc90689d74510ce36fe77d2346aec625
* Change dns backends and pools.yaml to use
ipv6 addresses not wrapped in brackets.
* Changed MySQL backends to use MYSQL_HOST.
* Fixed bug in pdns4 driver not allowing
masters to use an ipv6 address.
Depends-On: https://review.opendev.org/#/c/678324/
Change-Id: I8f469e732618732f5417c1b5e6c2049eaa83ea78
Other drivers will delete and / or overwrite zones that pre-exist on a server.
Updates the pdns4 driver to act the same way, and also clean up zones
that were not created properly.
Also send a notify immedidiately after creation to force a sync from the pdns
server, instead of waiting for the timer to trigger the first transfer.
Change-Id: I59fe82220adef4b28d4621e093064ee971e1dea8
Signed-off-by: Graham Hayes <gr@ham.ie>
Allow a new config item in pools.yaml to set the pdns tsigkey to use for
AFXR queries.
Change-Id: Ibb4fb604957286c6edfe85f72321f199eb3167a7
Closes-Bug: #1820089
Signed-off-by: Graham Hayes <gr@ham.ie>
sqlalchemy 1.1 is more strict on enum values. Because of that, the fact
that the two RECORD_TYPES enums are out of sync makes things sad.
This patch also pin eventlet version to 0.19.0 since eventlet >=0.20.0 in
upper constraint still make UT fail.
Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I4de68749e9eddbddbc7f8d8df68ce3ea71cc4fcb