8 Commits

Author SHA1 Message Date
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
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
Erik Olof Gunnar Andersson
093d8d7170 Removing v1 api support
The v1 has officially been removed from Designate since
the Queens release, and was deperecated long before that.

Change-Id: Ic5b44761ff939e2b319924af87849b3a79f9cb07
2019-09-10 20:53:25 -07:00
Clenimar Filemon
69f4597bf1 Update doc examples to use keystoneauth
As keystoneclient's Session and auth plugins have been deprecated in
favor of keystoneauth, the documentation examples must reflect that.

This patch updates all examples in order to show keystoneauth Session
usage instead of deprecated keystoneclient Session. Also, the python API
bindings were updated too.

Change-Id: I4b64fee4f526cc5b4a5e36cc8edb61164ceded51
2016-05-06 21:06:04 -03:00
Jenkins
9803b87a31 Merge "Implement socket timeout in v1" 2015-09-08 13:40:16 +00:00
Federico Ceratto
2ec96b6672 Implement socket timeout in v1
Add endpoint_override keyword to v2.Client() and check for the
session argument in DesignateAdapter()
Add unit test, fix minor typos

Change-Id: I038ec7b0d1feadc9642bd47285e397b3fe84c13c
Closes-Bug: 1469739
2015-08-11 18:36:56 +02:00
sonu.kumar
866114dbf6 Replacing print with print() to provide py 2/3 compatibility
Replaced print in python 2 to print() to provide py 2/3 compatibility

Change-Id: I805ecdbdd07ea89c1595c045fc5b380f9bb42335
2015-07-20 15:01:42 +05:30
Endre Karlson
2a2c85ce21 V2 Bindings
This provides bindings for:

- zones
- recordsets
- tlds
- blacklists
- limits
- nameservers

With associated unit tests.

Change-Id: Ie9b79340bd327b78916fd038633842da3ace881b
2015-05-07 17:23:09 +02:00