2974 Commits

Author SHA1 Message Date
Zuul
866009211f Merge "Fix networking quota usage show" 2025-03-25 13:13:29 +00:00
Slawek Kaplonski
6d27b2f2b6 Fix networking quota usage show
Quotas details returned from the Neutron service are in different format
then quota details returned from Nova and Cinder services. This patch
fixes helper function to convert data from Neutron to the same
format as data from Nova and Cinder is given.

Closes-Bug: #2102513
Change-Id: I18649f6c2ee179b64b7e605f4ea07d4b0c7a1635
2025-03-25 09:52:39 +01:00
Dmitriy Chubinidze
2883f3fb95 Specifying project-domain for project
The fix ensures that if a user wants to set a default project,
they must also provide the project domain. If it's missing,
an explicit error message is shown, making it clear that the
project domain is required.

Also adding some unit tests by modifying respective calls.

Change-Id: Ia6e921a53da55ab1bce85a42c8160872a9d47d64
Closes-Bug: #2102146
2025-03-23 09:38:24 +00:00
Zuul
1763c11963 Merge "Fix image import --disallow-failure flag" 2025-03-19 13:06:38 +00:00
Pavlo Shchelokovskyy
1efca54465 Fix image import --disallow-failure flag
the flag should store False to 'allow_failure', not True.

Also, make the --allow-failure and --disallow-failure flags
mutually exclusive.

Change-Id: I03699e14d4d69d9f08caab647293732fc211dbad
2025-03-14 10:52:39 +00:00
Vladimir Kozhukalov
1458330d3b identity: Fix 'trust' commands to work with SDK
Closes-Bug: #2102039
Change-Id: I632937e06683cc76e78390a4e6f3de4e3c4f1f87
2025-03-11 12:31:09 -05:00
Zuul
4b7e32ca37 Merge "handle 'router create --flavor' option" 2025-02-25 22:48:45 +00:00
Tim Burke
1979c20ff0 Fix credential creation
openstacksdk's Credential expects user_id and project_id, not user and
project. Previously, we would send payloads like

   {'type': 'ec2', 'blob': '{"access": "s3-user1", "secret": "s3-secret1"}'}

which Keystone would reject with

   'user_id' is a required property

Change-Id: I0544bef7df9247395f0726ea075112d6ac992252
2025-02-25 10:30:22 -08:00
Zuul
d22b7732ad Merge "[Neutron] Support `uplink-status-propagation-updatable` extension" 2025-02-24 09:05:05 +00:00
Rodolfo Alonso Hernandez
0ba77e6727 [Neutron] Fix the "port show" command for trunk details
In [1], the "port list --long" command received a new column, showing
the trunk subports related to a parent port. The problem of this patch
is that the ``_formatters`` definition, that is shared with the "port
show" command too, is changed. The "trunk_details" information presented
in both commands differ:
* In the "port list" command, only the subports are presented, in order
  to print a list of dictionaries without showing the ``trunk_id``.
* In the "port show" command, it is presented all the trunk information,
  including the ``trunk_id``.

This patch includes functional tests to validate the fix.

[1]https://review.opendev.org/c/openstack/python-openstackclient/+/926611

Closes-Bug: #2098950
Change-Id: Ib1107fb3dbb025b39a7c55f90f5fe51ae433a72f
2025-02-20 01:07:39 +00:00
Rodolfo Alonso Hernandez
426abbdc68 [Neutron] Support `uplink-status-propagation-updatable` extension
Added ``--enable-uplink-status-propagation`` option and
``--disable-uplink-status-propagation`` option to ``port update``
command.

Now the Neutron extension "uplink-status-propagation-updatable" allows
to update the related value in a port. That was implemented in the
following patches (during 2025.1 Epoxy release):
* https://review.opendev.org/c/openstack/neutron-lib/+/927820
* https://review.opendev.org/c/openstack/neutron-lib/+/936234
* https://review.opendev.org/c/openstack/neutron/+/931641

Related-Bug: #1722720
Change-Id: I99cdcf21438d6d85092c995b50cb10b26ae7c059
2025-02-18 12:09:37 +00:00
Doug Goldstein
1f407afe1c
handle 'router create --flavor' option
The '--flavor' option appears in the usage and arglist but is not
actually parsed. The '--flavor-id' option is what is silently parsed.
Since the goal is to allow the name or the id, this adds the '--flavor'
option to being parsed.

Closes-Bug: 2091731
Change-Id: Id83facd3825f472e7d864427699bd072d1c08779
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-02-15 14:04:28 -06:00
Slawek Kaplonski
3412147372 Add "qinq-vlan" and "no-qinq-vlan" params to the "network create" cmd
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/939703

Related-Bug: #1915151
Change-Id: Icacf83c20c3650a9d75f665f020b8818e1b4a585
2025-02-13 10:10:42 +01:00
Zuul
e27fd93226 Merge "Identity: Migrate 'role' commands to SDK" 2025-02-11 18:10:57 +00:00
Zuul
5de803b39f Merge "Show final image state after image create" 2025-02-10 11:57:11 +00:00
Fernando Royo
d2d7219231 Get "security_groups" when port list
Neutron API is accepting 'security_groups' field  in
order to return the list of security_groups attached
to a port, but openstackclient is parsing the output
over a Openstack Port object that has security_group_ids
to map. This patch sends to the Neutron API the expected
field value and replace the output key to allow the
mapping just in case '--long' argument is passed.

Closes-Bug: #2095414
Change-Id: I188edc3c620ce29d7b16497ca24fd7d972a06618
2025-01-21 18:51:32 +00:00
Zuul
146a1814b6 Merge "Add the trunk subports information to the port list command" 2025-01-18 12:01:38 +00:00
Pavlo Shchelokovskyy
4f95e0aa18 Show final image state after image create
creating the image is a 2step process, first an 'empty' image is created
and then the data is uploaded.
Currently the output of the 'image create' command is that 'empty'
image, in `queued` status etc.
A more user friendly approach would be to make a second refresh call
to show the user image as it is after data was uploaded.

Change-Id: I2f78b113dcc3c941f8cf8dd9b63262971a780a39
2025-01-16 15:35:43 +00:00
ArtofBugs
8f1382eda3 Identity: Migrate 'role' commands to SDK
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/929578
Change-Id: I22254604705080095ac852a1e03506b1552a1fd2
2025-01-13 21:55:10 +00:00
Zuul
eb0dbd5c33 Merge "Fix: Volume backup restore output" 2025-01-07 18:35:53 +00:00
Zuul
6ce1f7730c Merge "identity: Migrate 'trust' commands to SDK" 2024-12-19 21:33:28 +00:00
Rodolfo Alonso Hernandez
2a0431e825 Add the trunk subports information to the port list command
Added the subports information to the port list command, when the
"--long" qualifier is specified.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/926609

Closes-Bug: #2074187
Change-Id: I8ef66c3415279caf0ebea4ba6232ca3696188de9
2024-12-18 15:04:54 +01:00
Zuul
a631014551 Merge "Fix volume backup show by name" 2024-12-17 19:09:39 +00:00
Zuul
4e8be5aa64 Merge "tests: Stop setting attributes on class" 2024-12-17 18:47:00 +00:00
Rajat Dhasmana
03e2fdd162 Fix: Volume backup restore output
Currently the volume backup restore command returns with error
even though the restore is initiated.
This patch corrects the response received from SDK and processes
it in a human readable form.

Change-Id: I7f020631fbb39ceef8740775fd82686d90a6c703
Closes-Bug: #2063335
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/931755
2024-12-17 17:46:35 +00:00
Zuul
c74af3f01e Merge "identity: Migrate 'credential' commands to SDK" 2024-12-16 20:45:20 +00:00
Zuul
fd232a43bc Merge "identity: Migrate 'service provider' commands to SDK" 2024-12-16 19:52:03 +00:00
Antonia Gaete
769bf87d0a identity: Migrate 'trust' commands to SDK
Change-Id: Idb1fda3428ccf3022ee03c8fb7e42c7121683181
2024-12-16 18:24:10 +00:00
Stephen Finucane
38407c6a78 tests: Stop setting attributes on class
For some reason we were setting a property mock on the FakeClientManager
class. In multiple places, no less. This has a nasty habit of causing
side-effects in other tests, depending on the order that tests run in.
Resolve this simply setting the attribute as we'd expect.

Change-Id: I8bf9055e3f5b885dd5a7a6d751b774934da4a7d7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-12-16 18:23:09 +00:00
Stephen Finucane
32bd5d3562 Adopt sdk_fakes for compute.test_server_volume
Change-Id: I5a82ff970ebb3622e6920cdb240a3c1dbc96e27d
2024-12-12 11:19:27 +00:00
Artem Goncharov
4cef5f5549 Adopt sdk_fakes for compute.test_server_group
Change-Id: I1c97a7b2e28233a3b345a81b62c01e74a0aec914
2024-12-12 11:19:20 +00:00
Stephen Finucane
38029c6988 Adopt sdk_fakes for compute.test_hypervisor
Change-Id: Ibed4390be61c98f8c9e348835493bc714f8b9e87
2024-12-12 11:19:02 +00:00
Artem Goncharov
776b7d0c66 Adopt sdk_fakes for compute.test_usage
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/882682
Change-Id: Ia8fd2ccfd1e86749fdeeb49c2d57de64635cbb82
2024-12-12 11:18:56 +00:00
Stephen Finucane
afc0d3c252 Adopt sdk_fakes for compute.test_service
Change-Id: I331283f42914b91bd80dfca354635214fb7ba8a7
2024-12-12 11:18:49 +00:00
Artem Goncharov
42b1698e5c Adopt sdk_fakes for compute.test_keypair
Change-Id: Ifb5df852a9ae6eea3fabce13d450b16cb8348315
2024-12-12 11:18:42 +00:00
Artem Goncharov
d175dea6bc Adopt sdk_fakes for compute.test_console
Change-Id: I6181009a8b2ae7e632214364527ccc6fdd03fff9
2024-12-12 11:18:34 +00:00
Stephen Finucane
329b351cb8 Adopt sdk_fakes for compute.aggregate
Drop fakes generation for compute aggregates in favor of sdk_fakes

Change-Id: I4965a5fe8fc3d70390ca0268716519b617ca24eb
2024-12-12 10:43:24 +00:00
Antonia Gaete
56baf50655 identity: Migrate 'service provider' commands to SDK
Change-Id: I7f5fba408b7c350bb0a279f8dd17bd7bae451774
2024-12-11 22:37:44 +00:00
Zuul
52b2944b78 Merge "identity: Migrate region commands to SDK" 2024-12-10 18:32:38 +00:00
Zuul
6579daeac7 Merge "tests: Add functional test for adding, removing SGs" 2024-12-10 14:03:51 +00:00
Zuul
83de58fa33 Merge "compute: Workaround bug #2089821" 2024-12-10 14:03:49 +00:00
Stephen Finucane
e736394d1b tests: Add functional test for adding, removing SGs
The fix is in openstacksdk. Let's test it here though.

Change-Id: I661e6d66c8196e8c9ca8b9cda3d08e756e3d5877
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/936947
Related-bug: #2089821
2024-12-09 13:56:58 +00:00
Stephen Finucane
22b30b99ce compute: Workaround bug #2089821
By passing a dict instead of a single value, we force SDK to populate
the correct attribute on the object.

Change-Id: I9f4c5964dc0546215474c92db567966ffad68a1a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-bug: #2089821
2024-12-09 13:56:58 +00:00
Stephen Finucane
c888cf2556 network: Make better use of argparse
Change-Id: I7421a0ab957412a8283eee6ae9783dac9d3f6a4a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-11-29 10:33:36 +00:00
Stephen Finucane
5ef5cc9c82 compute: Add server create --no-security-group option
To allow users to create servers with no security groups associated with
the ports.

Change-Id: I91b1d9dd5c3fbba838640841d98341cd8ccb1b16
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-11-29 10:33:18 +00:00
Antonia Gaete
4c8290012d identity: Migrate region commands to SDK
Change-Id: I980693732d794f1ccbfc8d7f06d61b4a9824ef15
2024-11-20 23:26:30 +00:00
Zuul
6ff3a92089 Merge "Show Created At column for volume backups in v3" 2024-11-20 16:38:57 +00:00
Antonia Gaete
9c6df823e2 identity: Migrate 'credential' commands to SDK
Change-Id: I49391fec3d7b6a1b81438a2a311ac7b86173a6a4
2024-11-13 18:13:19 +00:00
Takashi Natsume
fb1f841d2d Replace deprecated datetime.utcnow()
The datetime.utcnow() is deprecated in Python 3.12.
Replace datetime.utcnow() with
datetime.now(datetime.timezone.utc).replace(tzinfo=None).

Change-Id: Ic20174a9c6cacac05471fa57b105c1f784a73057
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2024-11-13 15:48:59 +00:00
Zuul
79e01a5533 Merge "Add "trusted" attribute to the "port"" 2024-11-08 17:32:37 +00:00