34 Commits

Author SHA1 Message Date
Takashi Kajinami
39423a98c5 Use --record instead of deprecated --records
The --records argument was deprecated during queens cycle[1], and
the new --record argument should be used.

[1] 66e4955408eacb4859cfef01a31d013e34c28ffb

Related-Bug: #1736161
Change-Id: Ia4d84e6167d1192fee351d663af3e9f4cda1ea3f
2023-12-27 23:22:53 +09:00
Erik Olof Gunnar Andersson
b6e78fefdd 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: I27d09edb7e75081379002615f4ecdb1aa007dbcf
2023-11-17 09:42:13 -08:00
Zuul
a95d0920c3 Merge "Add hacking check for line continuation backslash" 2023-02-21 05:29:36 +00:00
Michael Johnson
34292ee649 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: I13cd03e16698b7f1d8036815d12a665bd1156f2f
2023-02-13 21:08:15 +00:00
Igor Malinovskiy
bc39d23ff5 Add shared zone commands
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: Iea92371176d9126205384624a18a9097acb3daef
Partial-Bug: #1714088
Depends-On: https://review.opendev.org/#/c/726334/
2023-02-13 20:51:32 +00:00
Hervé Beraud
f02f0090f5 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I3dadeaa3242d0b55ba891a8eb4abb199a8d2468b
2021-11-23 17:27:14 +00:00
Michael Johnson
820f1e9af9 Remove six and update lower-constraints appdirs
This patch removes the use of "six" as the package declares only
python3 support.
It also updates the appdirs lower-constraint to 1.4.0 to support
pip. This version is available on both centos8 and focal.
It also removes the linter related packages from lower-constraints.

Change-Id: I9337f1998749bc40737f2f0e2dcc406b6f3a0ddf
2021-03-26 18:22:44 +00:00
Mike Durnosvystov
196cb61870 Fixed zone transfer accept list command
Change-Id: If7ba1fc9dd3f9d67a49ad3b8ae4c0e0f9733195b
Closes-Bug: 1901172
2020-10-23 13:07:09 +03:00
Rudolf Vriend
b741282eaf Add tsig key support to python-designateclient
This fix adds support for the designate tsig keys api to
python-designateclient.

It will add tsigkey related crud commands to the openstackclient.

Change-Id: I84336c3aca85ca62771fd2115481eda32ee980d2
Closes-Bug: #1702506
2017-07-07 14:16:30 +02:00
Stephen Finucane
6b7b018cb6 Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate the
setting from the old warnerrors one.

This involves a couple of changes to the docs to fix the now broken
build.

Change-Id: I9bee7f6f9c69a9ed7bb22325ad1a0a1316dde526
2017-04-20 13:57:16 +01:00
ghanshyam
e995bfd553 Use tempest instead of Tempest-lib
tempest-lib has been deprecated since a year. All
the interfaces available in tempest-lib are now available
in tempest/lib.

This patch make use of tempest/lib instead of tempest-lib.
Also add tempest in test-requirements.txt

Change-Id: I6cb50b68631391f0368e8a2e6133f94c1da52376
2016-11-22 12:52:16 +09:00
Tony Xu
f1d274aeef Fix pep8 E501 line too long
Wrap line to under 79 characters in
designateclient/functionaltests/datagen.py

Change-Id: I50deb3ffb70a4845fc825f9ee3eef61c40316b5b
2016-09-23 13:30:54 +08:00
Paul Glass
95f5bdb97a Don't use the 'keystone' client (functional tests)
Change-Id: I2568305a5ad779bcd1ca8709f92e2b4d7b4161ff
2016-05-09 16:12:49 +00:00
Paul Glass
7b1caa5944 Fix a race condition in one of the zone import tests
This test would occasionally fail if the import was still PENDING when
the check asserted a COMPLETED status.

Change-Id: Ia2c320d50dd061980c27b0b7ec0cb6c65c13f6e7
2016-04-08 16:00:44 +00:00
Jenkins
a9385ac8f5 Merge "Implement zone import" 2016-04-06 16:58:09 +00:00
Jenkins
ead5a2e224 Merge "Show responses on zone and recordset deletes" 2016-03-31 14:12:53 +00:00
Paul Glass
a5e8206ed6 Show responses on zone and recordset deletes
Change-Id: I1b15c64bac1bc495fe7aecbcf08c28b8ea41b5a7
2016-03-30 17:07:48 +00:00
Rahman Syed
d2b88c88c5 Implement zone import
Zone import commands (create, list, show, delete)
are missing from the python-designateclient.

This change includes implementation, as well as unit tests
and functionaltests.

Change-Id: I635431b5ef11989247e8d185ad692e4fee9bebba
Closes-Bug: #1550532
2016-03-30 11:23:27 -05:00
Paul Glass
74bb5cec85 Fix an issue causing a blacklist test to fail
Change-Id: I028278faed1a40c5d52f8a608393c953f127a63e
2016-03-30 15:23:31 +00:00
Jenkins
d89f0a3889 Merge "Add a service catalog override to the functional tests" 2016-03-30 14:56:34 +00:00
Rahman Syed
ce50ad9444 Implement zone export
Zone export commands (create, list, show, delete, showfile)
are missing from the python-designateclient.

This change includes implementation, as well as unit tests
and functionaltests.

Change-Id: I957946d739bceea1074e2fda2ce7f841143b0611
Partial-Bug: #1550532
2016-03-23 20:34:14 -05:00
Eric Wehrmeister
319a331e51 Improved TestRecordsetNegative
Added a parent to the class and hardcoded the zone id and name in one of the tests.

Change-Id: I8f973e52561d4644821148690430be4c0c1944c0
2016-03-04 11:53:08 -06:00
Paul Glass
38e9fa8505 Add a service catalog override to the functional tests
This allows us to run the functional tests against environments than
what's in the service catalog.

note: ideally, this would allow us to run against a Designate in
noauth mode. And it does, however there's not a way to pass in the
X-Auth-Project-ID header, so the tests will always use the
noauth-project (tests involving multiple users like, zone transfer
tests, won't work).

Change-Id: If9306b27d78d7c774911d3c1abb46bfbf72539f1
2016-02-24 20:20:47 +00:00
Paul Glass
0c58fc7c4a Log stacktraces of MultipleExceptions in functionaltests
Change-Id: I479bdb59d06c561c49ae63d8bcbe2e5c8f67577a
2016-02-15 20:29:34 +00:00
sonu.kumar
fa5f6c4b56 Adds changes related to py3 compatibility
This patch replaces map() and zip() with six.moves.map()
and six.moves.zip() respectively  to provide py2/3
compatibility.

Change-Id: I2e4b61c67ee34247f4c9e77f593df18d9dfd574b
Partially-Implements: blueprint designate-py3
2015-11-24 16:35:14 +05:30
Jenkins
dca1ccba74 Merge "Add functional tests for blacklists" 2015-11-09 15:54:23 +00:00
Jenkins
665bc6bd05 Merge "Add functional tests for tlds" 2015-11-09 15:54:18 +00:00
Jenkins
0c965ec1a9 Merge "Fixes order of argument in assertEqual" 2015-11-04 21:43:36 +00:00
Paul Glass
eea5b4d87f Add functional tests for blacklists
Change-Id: If600dd567553459e54ac68e379732d3226fe90b2
2015-10-21 19:49:53 +00:00
Paul Glass
a98de81298 Add functional tests for tlds
The tld tests will create/remove tlds which would cause problems
when running zone tests in parallel. To solve this, a separate tld
is created for each zone.

Change-Id: I8957f6f294bc5624ce049e36bef4a948cef3e380
2015-10-21 18:30:38 +00:00
sonu.kumar
6d9a45bf16 Fixes order of argument in assertEqual
Some tests in designateclient used incorrect
argument order in assertEqual(observed, expected).
The correct order expected by testtools is
assertEqual(expected, observed).

Partial-Bug: #1259292

Change-Id: Icc53b2f21e557170a61ceb52cd6f04c31e3b8425
2015-10-13 13:20:36 +05:30
Paul Glass
b4674f85d1 Add functional tests for recordsets
Change-Id: I7ed14924ea6d4b612e8f1c0b526211f8ba8471b6
2015-10-12 21:08:39 +00:00
Paul Glass
374970cd10 Flesh out zone-related test cases
Change-Id: I387179b0c8f80e87436be0dc841a47f0b0aed598
2015-10-12 21:08:39 +00:00
Paul Glass
6daf82777e Layout some functional tests for the V2 CLI
Change-Id: Ib2d1261bcb0362c586c0aae4b9c5a8a563f07c71
2015-09-23 14:30:35 +00:00