98 Commits

Author SHA1 Message Date
Zuul
5ec2867ba2 Merge "Activate the --long option for recordset list command" 2025-04-14 22:24:15 +00:00
Zuul
3e4a3369b0 Merge "Activate the --long option for zone list command" 2025-04-14 18:35:35 +00:00
Omer
85033a092a Set email as positional argument on zone create
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
2024-12-19 12:07:11 +00:00
xfrnk2
c5d739269a Activate the --long option for recordset list command
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
2024-10-06 03:42:20 +00:00
xfrnk2
db890ed520 Activate the --long option for zone list command
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
2024-09-16 14:57:34 +01:00
Zuul
90a9fe3d65 Merge "Add new API - zone pool move" 2024-01-10 01:23:59 +00:00
Takashi Kajinami
4efec172d2 Recordset: Remove deprecated --records argument
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
2023-12-27 23:22:56 +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
kpdev
84e585dbc2 Add new API - zone pool move
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
2023-06-09 09:05:52 +00: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
Manish Honap
483e0d16c6 Provide option for delete zonefiles on zone delete
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
2023-01-30 03:44:37 +00:00
Ekaterina Chernova
435f1e7866 Include SECONDARY zones into list command output
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
2022-07-14 20:26:01 +00:00
Dr. Jens Harbott
0d0d339cc6 Fix quota list command for non-admin users
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
2022-07-07 13:09:22 +02:00
Michael Johnson
fba1354e03 Fix missing --target-project-id for transfer req
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
2022-06-03 23:31:23 +00:00
kpdev
52e9ef4a41 Add profiling support to designateclient
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
2021-12-24 17:53:46 +00:00
Michael Chapman
94e7e97e50 Remove edit-managed from unsupported commands
--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
2021-11-25 01:38:25 +00:00
Michael Johnson
5fbc5b1154 Clarify that name or ID can be used on TLDs
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
2021-10-20 18:46:58 +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
Zuul
1465ff203a Merge "Fixed zone transfer accept list command" 2021-03-09 01:53:15 +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
Nicolas Bock
b68b70a097 Add choices to --type command line argument
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>
2020-10-13 06:33:49 -06:00
Nicolas Bock
8f9c503ecc Increase hacking version
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>
2020-10-10 06:47:06 -06:00
Jens Harbott
6be5c7b49e Fix "recordset list --all-projects" in interactive OSC
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
2019-09-18 11:47:09 +00:00
Joseph M
7cc5f8bb2a Fix "zone list --all-projects" in interactive OSC
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
2019-09-16 18:52:53 -04:00
Zuul
a870cffdf9 Merge "Check item is one of six.string_types not just str" 2018-08-11 05:46:59 +00:00
Ben Nemec
9d34339c06 Fix copy-pasta in quota command descriptions
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
2018-06-29 21:12:32 +00:00
Graham Hayes
c0543004d0 Check item is one of six.string_types not just str
Change-Id: I343d9f6bdb3509256191a44e686f24e0ebeb5d22
Closes-Bug: #1762612
2018-04-16 16:01:16 +01:00
Graham Hayes
653643b448 Improve the RecordSet Update UI
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
2018-02-12 13:41:10 +00:00
Jens Harbott
66e4955408 Improve recordset create UI
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
2017-12-07 14:18:31 +00: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
Jenkins
5b8cab8079 Merge "Add attribute support to create zone cli" 2017-02-01 16:28:43 +00:00
Graham Hayes
f265eb18e9 Add attribute support to create zone cli
also format attributes for cli display

Change-Id: Ia338f607e6d4b70610132ab66e15381981beb038
2017-01-31 23:05:08 +00:00
Graham Hayes
f540d1c09b Show proper error on over quota commands
Change-Id: I811a0f0e3dcc3406ba9a07b0d54788a3241a7cd2
Closes-Bug: #1629222
2017-01-31 23:03:19 +00:00
Cedric Brandily
9ceb241491 Ensure X-Designate-Edit-Managed-Records header value is a string
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
2016-12-09 20:15:16 +01:00
Cedric Brandily
850bee7d28 Ensure X-Auth-All-Projects header value is a string
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
2016-10-28 16:38:34 +02:00
Jenkins
32141c1dfc Merge "Resolve FloatingIP PTR records clis argument's description" 2016-08-24 06:17:21 +00:00
sonu.kumar
406a03555b Resolve FloatingIP PTR records clis argument's description
Change-Id: Id284e43a53dddd158c1be3768422df42d49efeca
Closes-Bug: #1600775
2016-08-08 17:12:46 +05:30
sonu.kumar
a9ca09e540 Fix clis related to FloatingIP's ptr records
Change-Id: Ie39f1e86716a096402aafe814fcde821e66dbc5b
Closes-Bug: #1600781
2016-08-08 06:22:53 +00:00
Jenkins
ca14e9d60d Merge "Add quota set / list / reset commands" 2016-07-14 09:22:28 +00:00
Tang Chen
946bd09935 Use osc_lib instead of cliff
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
2016-07-01 10:52:30 +08:00
Jenkins
fd118972b0 Merge "Add global flags to cli" 2016-06-30 16:20:38 +00:00
Graham Hayes
9ac1cd15bd Add quota set / list / reset commands
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
2016-06-29 19:25:25 +01:00
Jenkins
f5a49f2787 Merge "Allow cli to query "v2/recordsets"" 2016-06-29 16:19:04 +00:00
Graham Hayes
3d24d8d3a5 Add global flags to cli
This time, try not to break other peoples plugins

Change-Id: I3ff6f584b0a5c89ac2c6f263549d2a8b74805572
2016-06-28 18:03:07 +01:00
Jenkins
e5f652c630 Merge "Revert "Add Global Flags for filtering results"" 2016-06-24 14:39:07 +00:00
Tang Chen
e5a76f63f4 Use osc-lib instead of openstackclient
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
2016-06-24 13:36:37 +08:00
Ben Nemec
f2a14a4479 Revert "Add Global Flags for filtering results"
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
2016-06-23 18:54:53 +00:00