7714 Commits

Author SHA1 Message Date
Stephen Finucane
edd72883de cloud: Remove check for nova extensions
All Nova extensions are enabled in API v2.1, which is the only API
version we support now. There's no reason to query for these things.

Change-Id: Ib12b2f4fe53182e047d6264de850178909b8fd5d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-24 13:13:59 +01:00
Stephen Finucane
1d95962881 pre-commit: Bump versions
Change-Id: If5d9bd237432b53a9187cac1856215020dc4571f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-24 13:13:59 +01:00
Stephen Finucane
c65b4d7c24 cloud: Replace reference to removed variable
We removed the floating network-specific caching in change
Ife5bda82eeb10c093b6cb55b0027ec16c89734d7 but an errant rebase of change
I10d3782899ac519f715d771d83303990a8289f04 reintroduced some use of the
now removed private variables used for this caching. Remove them again.

Change-Id: I5f867f91bb0e3a564d039d7184eadbe171e8f922
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2073261
2024-07-24 13:09:09 +01:00
Zuul
dfef1d36e8 Merge "baremetal: Enhance VIF attachment with port and portgroup UUIDs" 2024-07-22 21:52:47 +00:00
Zuul
7febed2d42 Merge "exceptions: ResourceNotFound -> NotFoundException" 2024-07-19 16:49:54 +00:00
Zuul
f060c869be Merge "cloud: Fix typo" 2024-07-19 15:23:31 +00:00
Salman Hajizada
3467560977 baremetal: Enhance VIF attachment with port and portgroup UUIDs
This change extends the `attach_vif` and `attach_vif_to_node` methods to
accept optional parameters for VIF port UUID and VIF portgroup UUID.
This enhancement allows for more flexible VIF attachment scenarios while
ensuring that only one of these parameters can be set at a time.

- Added parameters `vif_port_uuid` and `vif_portgroup_uuid` to the
  `attach_vif` method in the `Node` class.
- Updated the `attach_vif_to_node` method in the `Proxy` class to pass
  these parameters to the `attach_vif` method.
- Included a check to ensure only one of `vif_port_uuid` and
  `vif_portgroup_uuid` can be set at a time in both methods.
- Modified the request body in the `attach_vif` method to include these
  parameters if provided.

Change-Id: I4b8487b45ae04f387c2f02a9505916072edc96aa
2024-07-16 12:30:54 +01:00
Stephen Finucane
9145dcec64 compute, volume: Improve 'update_quota_set'
The implementations of these were rather confusing and required two
separate sets of arguments. Simplify them based on the
'delete_quota_set' methods.

Change-Id: I8bb0bfb039593c5b59f1f9c16523a090d899f099
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
3.3.0
2024-07-11 12:59:45 +01:00
Stephen Finucane
d40d6a2e82 compute: Correct base path for default, detailed quotas
For some reason, you need to include the project ID in the path even
though it's wholly ignored.

Change-Id: I805cdfaa89134e92eeb9726697925e9d0657af19
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-10 15:00:33 +01:00
Zuul
1812926973 Merge "baremetal: Adds list node firmware support" 2024-07-08 17:17:34 +00:00
Zuul
10e79efeda Merge "Combine 3 auto_allocated_topology tests into one test" 2024-07-05 04:30:10 +00:00
Michael Still
7040c81d1a Use mypy syntax compatible with older pythons.
Change I1cb1efbf1f243cca0c5bb6e1058d25b2ad863355 introduced mypy
syntax which breaks Python releases before 3.10. Unfortunately, for
2024.2 we commit to supporting Python back to 3.9.

Specifically, you receive this error message if you run pep8 on Rocky 9:

pep8 mypy.....................................................................Failed
pep8 - hook id: mypy
pep8 - exit code: 1
pep8
pep8 openstack/dns/v2/_base.py: note: In member "list" of class "Resource":
pep8 openstack/dns/v2/_base.py:83:27: error: X | Y syntax for unions requires Python 3.10  [syntax]
pep8 Found 1 error in 1 file (checked 414 source files)

So instead, let's use typing syntax compatible with other pythons.

Change-Id: Ifcf68075e572ccfc910dbef449cd58986c2a1bf5
2024-07-04 16:53:01 +00:00
Slawek Kaplonski
8cfb60ec1c Combine 3 auto_allocated_topology tests into one test
As preparation for those tests is pretty expensive, we can save few
seconds of the execution time by combining all the checks into one
single test.

Change-Id: I6be713773bc66938348462f226517b4eb5ed673a
2024-07-03 16:44:07 +01:00
Slawek Kaplonski
3ee18eb171 Run auto_allocated_topology functional tests in the own project
To avoid accidental usage of the 'auto_allocate_network' which is created by
Neutron automatically when 'get_auto_allocated_topology' API is called,
by other tests those auto_allocated_topology tests are now run in own
project which is destroyed after tests are done.

Closes-Bug: #2071784
Change-Id: Ib92913204bd90c2fb56268f58b089a2d3ba45644
2024-07-03 16:43:47 +01:00
Ebil Jacob
c6281c5bc7 baremetal: Adds list node firmware support
Added support to list the firmware components of a node under
the baremetal service.

- Created new functions `list_node_firmware` in baremetal proxy
  and `list_firmware` in baremetal node resource.
- Added new release note to describe the new feature.
- Added unit and functional tests for the new functions.

Change-Id: Ib4b1584f24b0d4beb1594f97e1bbb8c81f5a84d5
2024-07-01 20:21:51 +03:00
Stephen Finucane
8ccf5132ec cloud: Fix typo
Change-Id: Ifd8b3a96c86b96b258193612223026dd1179eda3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-27 15:32:02 +01:00
Zuul
10e5e20fc0 Merge "compute, block storage: Add support for quota class sets" 3.2.0 2024-06-18 15:06:59 +00:00
Stephen Finucane
d84ef4f945 tests: Rework warnings-related tests
These were causing test failures due to warnings being raised by another
package (keystoneauth) under Python 3.12. Rework things such that this
is no longer an issue by removing one filter (which wasn't really doing
anything) and reworking another to ignore DeprecationWarning-style
warnings.

Change-Id: I9aa73c59683dd9ee5fa701c436b860ce09740896
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-14 11:54:22 +01:00
Stephen Finucane
14c1ebbeb8 exceptions: ResourceNotFound -> NotFoundException
Invert the order of these such that ResourceNotFound is an alias of
NotFoundException rather than the other way around. This is more
consistent with the other HTTP-related exceptions.

Change-Id: I3b669494cf7dc4e540a54070de42b1befe803e14
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-13 12:39:24 +01:00
Stephen Finucane
4275dfc53c compute, block storage: Add support for quota class sets
Change-Id: I2d0b9a900d60d666ba07b759eccdb9a8e1c164bb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-13 11:23:21 +00:00
Stephen Finucane
0f311ff3e2 compute: Add additional server create parameters
Change-Id: Icfb8cbefca8bd7e246137c7f1fae94b81148fe2e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-12 14:15:21 +00:00
Stephen Finucane
dbf5c975ce compute: Add additional options to Server.rebuild
We also start using a sentinel value here since None is a useful value
for unsetting things.

Change-Id: I3bc3150877c6c00aa9ec4355104308d7755aa1d4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-11 13:14:44 +01:00
Stephen Finucane
0bd02b3a04 compute: Add support for legacy 'onSharedStorage' param
This is supported by early revisions of the server evacuate action.

Change-Id: I452fa9bb7077b3a1ce66552bbbf68ffd6702d1e2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-11 13:14:44 +01:00
Stephen Finucane
6d98de4f33 compute: Add server tag proxy methods
To add a tag, remove a tag, and remove all tags.

Change-Id: I4c7533007bcc85e713c532830b979b9d3fedb612
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-11 13:14:44 +01:00
Stephen Finucane
67cd66688d compute: Add Server.clear_password action
Change-Id: I5960605944fef2a300d6a3a9ff723a701e32cb64
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-11 13:14:44 +01:00
Stephen Finucane
916f9af658 compute, block storage: Minor fixes to limits
Add a proper RateLimit class for compute (even though this is no longer
a thing starting in Newton) and use consistent naming across services.

Change-Id: Ib8a926900dca77cf48492839664bf2c5c13aab70
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-11 13:14:44 +01:00
Zuul
6328a8fb2f Merge "[func test] Fix race between attachment delete and server delete" 2024-06-07 17:58:54 +00:00
Rajat Dhasmana
850c99cf8b [func test] Fix race between attachment delete and server delete
Recently openstacksdk functional test, test_volume_attachment,
started failing frequently.
It mostly failed during the tearDown step trying to delete
the volume as the volume delete was already issued by
server delete (which it shouldn't be).

Looking into the issue, I found out the problem to be in
a race between the BDM record of instance being deleted (during
volume attachment delete) and trying to delete the server.
The sequence of operations that trigger this issue are:

1. Delete volume attachment
2. Wait for volume to become available
3. Delete server

In step (2), nova sends a request to Cinder to delete the
volume attachment[1], making the volume in available state[2], BUT
the operation is still ongoing on nova side to delete the BDM
record[3].
Hence we end up in a race, where nova is trying to delete the
BDM record and we issue a server delete (overlapping request), which
in turn consumes that BDM record and sends request to (which it shouldn't):

1. delete attachment (which is already deleted, hence returns 404)
2. delete volume

Later when the functional test issue another request to delete the volume,
we fail since the volume is already in the process of being deleted
(by the server delete operation -- delete_on_termination is set to true).

This analysis can yield a number of fixes in nova and cinder, namely:

1. Nova to prevent the race of BDM being deleted and being used at the same time.
2. Cinder to detect the volume being deleted and return success for
subsequent delete requests (and not fail with 400 BadRequest).

This patch focuses on fixing this on the SDK side where the flow
of operations happens too fast triggering this race condition.

We introduce a wait mechanism to wait for the VolumeAttachment resource
to be deleted and later verify that the number of attachments for the
server to be 0 before moving to the tearDown that deletes the server
and the volume.

there is a 1 second gap race happening which can be seen here:

1. server delete starting at 17:13:49

2024-06-05 17:13:49,892 openstack.iterate_timeout        ****Timeout is 300 --- wait is 2.0 --- start time is 1717607629.892198 ----
2024-06-05 17:13:49,892 openstack.iterate_timeout        $$$$ Count is 1 --- time difference is 299.99977254867554
2024-06-05 17:13:50,133 openstack.iterate_timeout        Waiting 2.0 seconds

2. BDM being deleted at 17:13:50
(already used by server delete to do attachment and volume delete calls)

*************************** 2. row ***************************
            created_at: 2024-06-05 17:13:11
            ...
            deleted_at: 2024-06-05 17:13:50
            ...
            device_name: /dev/vdb
            volume_id: c13a3070-c5ab-4c8a-bb7e-5c7527fdf0df
            attachment_id: a1280ca9-4f88-49f7-9ba2-1e796688ebcc
            instance_uuid: 98bc13b2-50fe-4681-b263-80abf08929ac
            ...

[1] 7dc4b1ea62/nova/virt/block_device.py (L553)
[2] 9f1292ad06/cinder/volume/api.py (L2685)
[3] 7dc4b1ea62/nova/compute/manager.py (L7658-L7659)

Closes-Bug: #2067869
Change-Id: Ia59df9640d778bec4b22e608d111f82b759ac610
2024-06-06 13:35:51 +05:30
Zuul
771740caba Merge "baremetal: Decode 'config_drive' argument to 'set_provision_state'" 2024-06-05 14:16:45 +00:00
Zuul
e3196baed0 Merge "Allow project switching for Designate API" 2024-05-28 18:57:12 +00:00
Ghanshyam Mann
8091075e3b Remove retired project Senlin job
Senlin project has been retired[1] so removing
its ref and job from sdk gate otherwise it will fail.

[1] https://review.opendev.org/c/openstack/governance/+/919347

Change-Id: I7e25e30b95ebb8df7984a706ece432813554a395
2024-05-17 12:00:28 -07:00
Stephen Finucane
2b6b32fa3d baremetal: Decode 'config_drive' argument to 'set_provision_state'
ironicclient automatically decoded the base64-encoded byte strings
provided to the 'node.set_provision_state' method. We should do the
same.

Change-Id: Ib4997d11b460078cddf2f422223a67a216cf17df
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-05-13 14:23:05 +00:00
Zuul
0d5d48f65f Merge "Add support for federation service providers" 2024-05-13 13:19:34 +00:00
Zuul
9af5594e3c Merge "Identity: Add support for inherited_to for role_assignments" 2024-05-10 18:44:57 +00:00
ArtofBugs
00ed7a5eed Identity: Add support for inherited_to for role_assignments
Change-Id: I977fba4a49d8bd779fc14851ab4145cebb66d46c
2024-05-08 09:42:08 -07:00
Zuul
ff2d0a5bd0 Merge "Extend project cleanup" 2024-05-07 14:52:01 +00:00
Zuul
9cb8d42f09 Merge "docs: Add missing identity v3 proxy API docs" 2024-05-07 14:50:52 +00:00
Zuul
f4116492fb Merge "pre-commit: Add pyupgrade hook" 2024-05-03 19:54:51 +00:00
Zuul
4a5701d874 Merge "trivial: Prepare for pyupgrade pre-commit hook" 2024-05-03 19:54:49 +00:00
Stephen Finucane
46af31f627 Add support for federation service providers
Change-Id: I0c4c1ee77b0bbccd18af5b9b84a585a79f1a500c
2024-05-03 19:25:39 +01:00
Stephen Finucane
ba97594942 docs: Add missing identity v3 proxy API docs
We also reorder the proxy API to combine two groups.

Change-Id: Id9cb8f7cdffa374bdb4f744cf2d12fbe2709904e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-05-03 19:25:36 +01:00
30d5753bcf reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: I94119d23f1b956c4552238dcc668adbbda2a780f
2024-04-29 10:47:49 +00:00
Zuul
d58b895fdc Merge "tox: Don't install package in pep8" 2024-04-29 10:24:22 +00:00
Zuul
67887103ac Merge "Allow filtering BGPVPNs" 2024-04-26 20:07:41 +00:00
Zuul
e4cd7e0abc Merge "Add quota class set to shared file system" 2024-04-26 18:28:24 +00:00
Stephen Finucane
fc539d10fa pre-commit: Add pyupgrade hook
Another day, another useful hook

Change-Id: I2386981aac4b6061247ec5c7acd58ba50ad4bfec
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-26 17:38:56 +01:00
Stephen Finucane
8b02b04572 trivial: Prepare for pyupgrade pre-commit hook
This is kept separate from addition of the actual hook so that we can
ignore the commit later.

Change-Id: I3af752894490d619b3ef755aca5e717edafe104c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-26 17:38:54 +01:00
Zuul
37db30af3c Merge "Fix AttributeError in delete_limit method" 2024-04-26 15:04:13 +00:00
Zuul
1b6292c5a3 Merge "cloud: Do not reference other cloud mixin's methods" 2024-04-26 14:06:02 +00:00
Zuul
5041ea8687 Merge "cloud: Trivial fixes" 2024-04-26 13:53:55 +00:00