Commit Graph

284 Commits

Author SHA1 Message Date
Takashi Kajinami 7472f515a6 Bump hacking
hacking 3.0.x is too old. This also removes the note about old behavior
of pip which has been changed in recent versions.

Notes:
- A few errors newly detected are also fixed.

- This also fixes the compatibility with flake8 >= 3.0 because flake8
  is also bumped when we bump hacking.

- pretty_flake8 tool is removed because it's not commonly used but
  needs maintenance effort to keep it in sync with newer releases

Change-Id: I8e91b06199bfbed1d6e9f8d62ddf52fafd60b7f9
2024-01-17 12:37:51 +09:00
Erik Olof Gunnar Andersson 68fc28527a pyupgrade changes for Python3.8+
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
2023-11-03 11:19:07 +00:00
Takashi Kajinami 24a58fce9d Fix python shebang
The current shebang requires /usr/bin/python which is not available in
Ubuntu Jammy by default.

Change-Id: Ife34b32a5e557d2bf893ddc570b0962622129f93
2023-10-24 09:44:11 +09:00
Erik Olof Gunnar Andersson 2868db4f66 Remove deprecated designate-agent
This patch completely removes the designate-agent service
and all agent related plugins.

Change-Id: Ibe4011fb85797282fa44742d4b9c9b7c00e78622
2023-10-04 14:39:57 +00:00
Erik Olof Gunnar Andersson 360433b38b Remove non-functional contrib code
- Remove code that no longer works.
- Minor tweaks to existing contrib content.

Change-Id: I0c7b70bde214da71e1bf3935f1e5f33107410c96
2023-08-27 04:10:49 -07:00
Zuul 716037b901 Merge "Update notification handler sample" 2023-06-05 18:44:19 +00:00
Erik Olof Gunnar Andersson bf45ec737b Removing old archive code
Change-Id: I267ecfe3288ae5ad7a7b5a5fdca0ab5f5e56b082
2023-06-04 22:03:37 -07:00
Erik Olof Gunnar Andersson 0f054b3594 Update notification handler sample
Change-Id: I82ee4da4ec2f2f1227c25d828fd61c435270e036
2023-06-04 21:57:50 -07:00
Michael Johnson 8910a2014b Add hacking check for line continuation backslash
This patch adds a hacking check for line continuation backslashes and fixes the occurences that existed in the code.

Change-Id: I1d1269de231f6e747248a9d816a1d64e3968c69b
2023-02-21 20:12:04 +00:00
Michael Johnson 968e3d348d Remove netaddr module requirement
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
2022-08-02 22:02:13 +00:00
Zuul e0b125c97b Merge "Add template for testing review or branch" 2022-02-17 23:43:59 +00:00
Takashi Kajinami 30b9a0853c setup.cfg: Replace dashes by underscores
Since setuptools v54.1.0[1], the parmeters with dash have been
deprecated in favor of the new parameters with underscore.

This change updates the parameters accordingly to avoid the warnings
like the example below.

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I0c8e6a3a474a5cfa029b741b1a26b7d48d244206
2022-02-06 01:42:08 +09:00
Michael Johnson 0e16095a80 Enable H306 check and fix import ordering
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
2021-11-18 00:30:05 +00:00
kpdev e7b0246609 CERT DNS records
This patchset adds support for DNS CERT Resource Record which is
described in RFC 4398
(https://tools.ietf.org/html/rfc4398)

Closes-Bug: 1937113
Change-Id: I0cdfa1decd28096b7135b820b01ee7ec17b1a57d
2021-07-25 11:12:44 +02:00
Nicolas Bock 9bdc4a69aa
Add template for testing review or branch
This change adds instructions on how to test a Gerrit change or a
particular branch.

Change-Id: Iae8e7b3803c6e7d7d6f95a1c7a2b02f79373f06e
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-12-04 07:17:21 -07:00
Andreas Jaeger 2e3d8ab80d Update hacking for Python3
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
2020-04-01 21:52:38 +00:00
Erik Olof Gunnar Andersson 4869913519 Improve sink recordset creation
Reduced the number of calls we need to make when creating records using
the sink by better using the create/update recordset api.

This also fixes a bug where the sink could trigger a race condition in
the worker causing it to throw a BadAction exception.

Partial-Bug: #1768618
Change-Id: Iaf21ec59755375d3c3bc043b16a1b14aa991475e
2019-12-29 02:48:05 +00:00
Graham Hayes 3734f2a13f
Update vagrant config
* Move to bionic
* Add openSUSE Leap 15
* * Update Bind devstack backend plugin to work on Leap
* Remove port mapping
* Rmove the .gitconfig copy into the VM

Change-Id: I99d228f850e03045febf196f12eef5927f7605b9
Signed-off-by: Graham Hayes <gr@ham.ie>
2019-06-19 14:44:37 +01:00
ZhongShengping 5d0408c719 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: I5cfdd0c3e813f1cb6f72087fdb3ee3957b6e9ea7
2019-04-24 08:47:23 +08:00
Graham Hayes ce00975742
Update Zuul Jobs
- Move default python to py3 for devstack jobs
- Remove old (and non working) experimental jobs
- Move legacy devstack jobs to devstack-tempest based jobs

- Update vagrant plugins nodeset

Change-Id: Ida65852dec370a53641cb6428d50b0a2ac81f387
Signed-off-by: Graham Hayes <gr@ham.ie>
2019-03-25 15:32:40 +00:00
Tytus Kurek c0b54602a4
CAA DNS records
This patchset adds support for DNS CAA (Certification Authority
Authorization) Resource Record which is described in RFC 6844
(https://tools.ietf.org/html/rfc6844)

Change-Id: If9619096f1706d1123895b63b9129b9ffd4fb320
Closes-Bug: 1787552
2018-11-07 16:08:01 +00:00
Tytus Kurek 44d9c02c7c
NAPTR DNS records
This patchset adds support for DNS NAPTR (Naming Authority
Pointer) Resource Record which is described in RFC 2915
(https://tools.ietf.org/html/rfc2915)

Change-Id: Ic7d26a6c653ce46e67438e983476782edd6ec890
Closes-Bug: 1779850
2018-11-06 15:59:04 +00:00
Zuul af6a4cf3a8 Merge "Move pep8 checks to py3 by default" 2018-04-18 03:12:38 +00:00
Graham Hayes d72c652013 Ensure we do not pass invalid data for A records
DNSPython does not allow IPs to have leading zeros
for A records [1] and eventlet agrees [2], so we should
ensure we do not create a situation where a project can
DOS itself.

This patch uses the DNSPython method to ensure it is kept in sync

1 - https://github.com/rthalley/dnspython/blob/v1.15.0/dns/ipv4.py#L52-L54
2 - https://github.com/eventlet/eventlet/blob/v0.20.0/eventlet/support/dns/ipv4.py#L52-L54

Partial-Bug: 1760833
Change-Id: I975b18d390647de9fe11c105cd421b761f88be6c
2018-04-11 15:34:15 +01:00
Graham Hayes 1b0119797f Move pep8 checks to py3 by default
Change-Id: I0964970c1590658754ea59b394835dc1472b7292
2018-04-04 15:37:20 +01:00
Erik Olof Gunnar Andersson 6ad30a39e6 Remove translation of log messages
* Removed all log translation.
* Always lazy-load logging.
* Fixed broken log lines and updated tests.

Logs should no longer be translated (starting with Pike)[1].

Also, according to OpenStack Guideline[2], logged string message should be
interpolated by the logger.

[1]: http://lists.openstack.org/pipermail/openstack-dev/2017-March/thread.html#113365
[2]: https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages

Change-Id: I07825694f173a8bebd7d62ade089c38d3c666283
2018-03-14 12:54:05 -07:00
Graham Hayes c318106c01 Remove v1 API
This completes the long awaited removal of the V1 API.

Change-Id: I30c8a5e8569b1b86286c5e3cb07856c06ebe5803
2018-01-11 14:13:43 +00:00
Zuul b343927604 Merge "Update .gitignore" 2017-12-05 19:50:54 +00:00
caowei 5266252809 Enable worker and producer by default in devstack local.conf
Change-Id: If3988e6dca852da99288a80cc6336baf11bd379e
2017-12-03 18:02:09 +08:00
Kien Nguyen 6bedf6ce3b Update .gitignore
Because egg* already ignores egg-info & .eggs.

Change-Id: Ibeb7fcb497a9a3bf5756efd8bced4bf3e74711a8
2017-12-01 13:20:38 +07:00
Zuul 434a625a29 Merge "Check for multi level tlds" 2017-11-04 23:51:26 +00:00
Zuul 0b64fe765e Merge "Remove explicit lockdown of flake8" 2017-10-24 16:02:00 +00:00
Dirk Mueller 0534c3dc52 Remove explicit lockdown of flake8
The hacking version should require the proper dep
of flake8, which includes pep8 and pyflakes.

Change-Id: Ia55a7f355e4ddd190d5bb66491ba8f76b0912a3b
2017-10-24 14:39:40 +02:00
Nguyen Van Trung e07f601a22 Remove SCREEN_LOGDIR from devstack
Screen support has been completely removed from devstack[1]

[1] I8c27182f60b0f5310b3a8bf5feb02beb7ffbb26a
    and cdba1b371628aa0e8bc5b687351c5ee9b39e9bc6

Change-Id: I363e140ab6ea9b7ac8f422146e70e203d6265e5b
2017-10-23 07:44:32 +00:00
Graham Hayes 5d9f35fea6
Check for multi level tlds
Previously we only checked for the last label of a TLD
which does not work for `co.uk` or custom internal
TLDs that deployers may use

Change-Id: I9bc8d3ac8eb48078723a96d87e023d58b933b183
2017-10-17 17:36:55 +01:00
Graham Hayes 90725f7b8c
Update vagrant boxes
Change-Id: Ie9e0291a59640ef91cb8286358163179d602c53e
2017-10-03 14:34:51 +01:00
Graham Hayes 8274c9394a
Move default DNS driver to bind9
Change-Id: I1791da2b7662620c050257535ed75a7ce8e90068
2017-09-13 10:26:16 -06:00
ChangBo Guo(gcb) 8062c3c3c1 Remove usage of option 'verbose'
Config option 'verbose' wase deprecated on aug 1, 2015 in review:
https://review.openstack.org/#/c/206437/
Oslo team decide to remove this option, need cleanup the usage of
it in consuming project before removing it from oslo.log.

Change-Id: I713e9e5107a64ec29c220d1150c1bf5fcf6f1135
2017-03-10 18:37:19 +08:00
Tim Simmons 93c0161242 Make notifications pluggable
- Defines a plugin interface for what's actually emitted as part
  of designate "notifications".
- The default plugin emits the same thing as notifications did prior
  to this patch.
- The "audit" notification plugin emits recordset data changes and
  zone/recordset names, if they exist, the notifications with this
  plugin look like http://paste.openstack.org/show/545210/
- Adds support for multiple notifications for a single change
- Also adds client IP to the context object, as it's a field that
  may be of interest to some types of notifications
- Many tests

Change-Id: I01118fae8ce6e38ccc61b0ce763fd759affd9a86
2017-01-19 16:10:15 +00:00
Cuong Nguyen 423e539e1e Use designate.utils.generate_uuid instead of str(uuid.uuid4)
This patch replaces str(uuid.uuid4) with designate.utils.generate_uuid

Change-Id: I424a13f9d241930414bfb4c4508fc56de2df0dcc
Closes-Bug: #1656765
2017-01-16 16:12:08 +07:00
Jenkins 7fa57eadbd Merge "Using sys.exit(main()) instead of main()" 2016-10-19 02:44:48 +00:00
Luong Anh Tuan e5cb2569a6 Using sys.exit(main()) instead of main()
TrivialFix: Similar [1] in Kolla project
As we known, Exceptions are raised by the sys.exit() function. When they
are not handled, no stack traceback is printed in the Python interpreter.
Therefore, when using sys.exit(main()) instead of main()
may be more readable and reasonable.

[1] https://review.openstack.org/#/c/349353/

Change-Id: Ied52a7631da82a72f0dcf2fc9ed81840d24041d9
2016-09-26 03:23:44 +00:00
Erik Olof Gunnar Andersson 9648a3d1f5 Updating the sample handler to be compatible with mitaka/newton
Change-Id: I9440a9c7e268df346071b7d23d90ccc87345ee6d
2016-09-17 05:40:01 +02:00
Jenkins 86fcdd48e8 Merge "Add DESIGNATE_AGENT_BACKEND_DRIVER to devstack sample conf" 2016-08-24 15:44:26 +00:00
gecong1973 0c6babde08 Remove white space between print and ()
TrivialFix

Change-Id: I5219e319e9d7e5cc8307e45c60e1e2d2d25d9d5c
2016-08-23 16:14:07 +08:00
Kiall Mac Innes 54cea8955f Add DESIGNATE_AGENT_BACKEND_DRIVER to devstack sample conf
Change-Id: I6803f5993f2af12200bb6f2ce7f215f303d256fb
2016-07-28 11:01:36 +00:00
qinchunhua bb35643c18 Python 3: dict.itervalues()
Replace dict.itervalues() with dict.values(). The Python 3 dict
type has no itervalues() method, the old itervalues() method was
renamed to values().

TrivialFix.

Change-Id: I5d96f26db2bb3490271962d9548672cfdd03357e
2016-07-27 00:37:07 +00:00
Graham Hayes f374b5fe2c Grenade Plugin
Change-Id: I890fd4c6e329ad1875bac00e98156f90f52c78f5
2016-07-14 15:06:45 +01:00
Kiall Mac Innes 5d0e4da38c Add centos7, remove Fedora Vagrant VM
The Fedora box has not been available in some time, and most Designate
deployments running on RH based distros will be RHEL/CentOS.

Change-Id: I05e34c908ac1d5a7a2037d43f47987cad6c25531
2016-06-07 16:32:18 +01:00
Jenkins ab121e66b9 Merge "Add djbdns backend" 2016-06-02 11:35:17 +00:00