So far email did not appear as a positional argument in
designate-pythonclient command line interface when one ran
openstack zone create --help.
This patch requires email as a positional argument on zone creation.
Closes-Bug: #2064129
Change-Id: I8a909a4ed475067ab8ef290ba3363f93e10a0731
Activate the --long option for openstack recordset list command
When this option is used, additional columns and values are displayed.
The new columns are ttl, version, and description.
Add test code for the new columns.
Change-Id: I69f15bc56cc0f637c66ad975d8019757adfab038
Activate the --long option for openstack zone list command
When this option is used, additional columns and values are displayed.
The new columns are ttl, pool_id, email, attributes, and masters.
Add test code for the new columns.
Change-Id: I67262571639623de160688afb3f9f4a9ecb81534
The --records argument was deprecated in 2.8.0[1], which was released
during queens cycle. Multiple cycles have passed since then so we can
remove these deprecated options now.
[1] 66e4955408
Related-Bug: #1736161
Change-Id: Ic49d9b350a890d435b525bae611c8ba22cd29339
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
The new API would be v2/zones/<zone_id>/tasks/pool_move
Only POST would be allowed on this API.
Implements: blueprint zone-move
Change-Id: I41525a005e98244c60078e7004c2a75dd170f06e
This patch adds a hacking check for line continuation backslashes and fixes the occurences that existed in the code.
Change-Id: I13cd03e16698b7f1d8036815d12a665bd1156f2f
This commit provides an header option (hard-delete) for deletion of
zonefiles on backend as part of zone delete API.
Main patch (in Designate) is:
https://review.opendev.org/c/openstack/designate/+/835317
Change-Id: I0080c028466d809f4f5118fec05d9e46b2dfce84
PRIMARY zone type is set by default, so SECONDARY
zones were not included in the command output.
Now all types are in output by default and specific type
can be passed as an argument like before
Closes-Bug: #1940544
Change-Id: Idbba68ebd3f74bde74f0b50ffcb233673dff2303
Due to a logic error the all-projects header was being set if no
explicit project was being specified.
Closes-Bug: 1980942
Change-Id: I3c492b4ffd1b75a42a6a152b1dea219e4986f411
The zone transfer request set command was missing the
--target-project-id option so you cannot change the target project ID of
a zone transfer request after creation with the CLI.
This option is supported by the API and documented in the API reference
guide.
This patch adds this option.
Closes-Bug: #1977625
Change-Id: Idd570a5aef57c06971db2450fdfb823cf0c07bfd
To be able to create profiling traces for Designate, client should
be able to send special HTTP header that contains trace info.
Don't worry no security issue here, trace information is signed by HMAC
key that is setted in api-paste.ini. So only person that knows HMAC key
is able to send proper header.
Main patch (in Designate) is:
https://review.opendev.org/c/openstack/designate/+/773574
Change-Id: I4b84ac1a5d4f84da3a38e4e0cb0990a54c6044ef
--edit-managed sets a header x-designate-edit-managed-records
that indicates the current request wishes to modify managed records
such as the SOA or NS record created for a zone. This is only used
by the recordset update and delete API methods so can be removed
elsewhere.
Closes-Bug: 1928411
Change-Id: I18bfdae045c8b5e589075865eb024cee4852d8f9
We had a question about whether the TLD name could be used as the
"id" positional argument when show/set/delete a TLD.
This patch clarifies that names or IDs will work with those commands
in the OpenStack client.
Change-Id: I93952596f3c82ae37d903a8ea4dd8700ae8fc314
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
We only allow `PRIMARY` and `SECONDARY` zones. Instead of testing for
either one of those two choices later in the code, we can offload this
test to the parser.
Change-Id: I8244e13303646e6686e4233e1edbd2bbc788e054
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
Increase the hacking version in test-requirements to match the
version used in the `designate` project.
This change fixes a few errors that the more recent `pyflakes` flags.
Change-Id: If7afefde0f33161016a27774021d27239c642eb5
Co-Authored-By: Michael Chapman <woppin@gmail.com>
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
Class variables get re-used when multiple commands are executed in a row
within a single OSC interactive session. So we need to take a copy
before modifying in order to avoid unwanted side-effects.
Change-Id: I9716014d65a3f649c23eb78faca2cb6dbf5eb5db
Related-Bug: 1844028
The current zone list function does not check to see if project_id is
already a column to be output when adding it during an --all-projects
list. This causes a duplicate field name to be added which is then
passed to prettytables which subsequently throws an exception. Create a
copy of the columns list so it is not appended to with every
command.
Change-Id: I5f62500086a807d5082221993c3b491f3b6a1db0
Closes-Bug: #1844028
These seem to have been copied from the blacklist command and don't
make sense for quotas. They also appear in the openstackclient help
output which is confusing.
Change-Id: Ib5d2c0fd7da8cb18e230d84c5f344217ad853da7
This adds the logic introduced in
I8fefd9d0f104170d50c5d5dc3cbcc53facda9baf to the "recordset set"
command as well.
This helps with the consistancy, and fixes some of the same issues
in the set command.
Change-Id: Ib943ed0eea436ad1a7ad0c3717f0fb6bd6b5b3f0
The current implementation has '--records' as a quasi-positional
argument, with the nargs='+' parameter it can only be used at the end of
the command, which is confusing to users and doesn't comply with the
help message.
Add a new option '--record' that takes only exactly one record as
parameter and can be repeated when multiple records are present.
Deprecate the old option so it can be removed in the future.
Change-Id: I8fefd9d0f104170d50c5d5dc3cbcc53facda9baf
Closes-Bug: 1736161
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
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
Header values are strings so we should provide a string as
X-Designate-Edit-Managed-Records header value instead of a boolean
(which is transformed into: "<type 'bool'>" by python-requests).
Change-Id: Iaf248a0e817fe65785ddcdca46663e7273a6dad0
Header values are strings so we should provide a string as
X-Auth-All-Projects header value instead of a boolean (which is
transformed into: "<type 'bool'>" by python-requests)
Change-Id: Id4172f424565da5afb1f310195a0b7ba37674064
Base classes of commands are defined in cliff,
but have been encapsulated again in osc-lib for
all plugin clients. So use osc-lib instead of
cliff.
Change-Id: I9ec5dc794d8449bc3618889f68993cea734cb0a9
Added:
openstack dns quota
- list
- set
- reset
All sub commands can be scoped to a project using --project-id
If the --project-id does not match the current project id
it will set X-Auth-All-Projects:True
This cannot be a standard quota command as osc does
not allow us to access that command
Change-Id: I8e22535be042608022ef1d1cb3866e7aa5324e84
Depends-On: I7a0b828824ad6f274d922748f5f9a68157cd939a
Related-Bug: #1587927
osc-lib is a package of common support modules for writing
OSC plugins. All common functions, classes such as exceptions,
utils, logs and so on have been moved from openstackclient to
osc-lib.
So use osc-lib instead of openstackclient.
Change-Id: I4377951ba0b58ea94a43c688b66c0b87dda7225d
Registering these options as global flags pollutes the global opt
namespace and is masking plugin-specific options in other plugins.
Partial-Bug: 1595616
This reverts commit 0b2b870237.
Change-Id: I7ef5c5511adc40d603374c4963ba22556f16252e