The get_keypair and delete_keypair calls need to specify the user_id if
the keypair belongs to another user. This was only working by accident
because the first element returned by list_users was the current user.
However, the ordering of the user list is now different following a
change in Keystone [1].
This failing test uncovered additionally that keypair methods are not
properly setting user_id into the query parameters. Overload fetch and
delete methods to properly pass user_id as a parameter.
[1] https://review.opendev.org/c/openstack/keystone/+/938814
Closes-Bug: #2095312
Co-Authored-By: Artem Goncharov <artem.goncharov@gmail.com>
Change-Id: Ic552dee83d56278d2b866de0cb365a0c394fe26a
Despite what Nova's api-ref currently says [1], the 'addSecurityGroup'
action only requires a security group name if using nova-network: it
will happily accept either a name or ID if using neutron.
We are using 'Proxy._get_resource' to allow users to pass either an ID
or an 'openstack.network.v2.security_group.SecurityGroup' object
(there's no implementation of Nova's deprecated SecurityGroup resource).
If given an ID, this help method will only populate the 'id' field of
the created resource. Thus, we need to use this if provided.
[1] https://docs.openstack.org/api-ref/compute/#add-security-group-to-a-server-addsecuritygroup-action
Change-Id: I3dd56414b32207a16c6c83971f0494ccb86e07d4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2089821
The tests.functional.compute.v2.test_service.TestService.disable_enable
test seems to sometimes cause following tests to fail until the
compute service has fully recovered.
Change-Id: Ie0c11e487404375d4341bfc50e76aa6b117de601
We also remove an unnecessary 'name' field since it's defined on the
parent Resource class and add a missing links field to Project too.
Change-Id: Id1b7b00fe5b96f0cc922716afabcc678193f0f57
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
openstack/tests/unit/cloud/test_stack.py needs some manual fixes but
this is otherwise auto-generated.
Change-Id: If0d202ece232181c16ee4990eb428e9ad6e91cd5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The stats tests were using an exact value for a timing statistic,
which results in flakey results. Instead, let's set a small
maximum threshold.
Change-Id: I0be868daf3edbc6570585968a573e6e167c6bd1c
This is an extension. We require it to support migration to OSC.
No functional tests are added yet since we don't currently have the
ability to associate a project with an endpoint.
https://docs.openstack.org/api-ref/identity/v3-ext/index.html#create-association
Change-Id: I599ff3e88d4e1e9ffafc638bb74186f2739b5a77
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We also combine two unit test classes since the existing layout was
resulting in unnecessary duplicated tests being run.
Change-Id: I2cfd8593b4b231469d2a0684d20dc3a2fd88290b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The openstack.tests.functional.compute.v2.test_service.TestService.test_update
test seems to sometimes cause following tests to fail until the
compute service has fully recovered.
Change-Id: I69e27afd67dd4f578283a3eafa946bc9aa80bfed
This commit adds functionality for managing TSIG keys for DNS zones, which was missing in the SDK despite being documented in the DNS API.
- Implemented create, delete, and list operations for TSIG keys related to zones.
Change-Id: Id13e434aa1497a46b60d35fe03188d30e974b50e
Previously the backup restore response only included ``id``
whereas the restore API returns ``backup_id``, ``volume_id``
and ``volume_name`` fields.
Turns out the resource_response_key was missing in the translate
response method and the has_body parameter was set to False indicating
that the response doesn't return a body which is not true.
This patch fixes the above stated issues.
Story: 2011235
Task: 51137
Change-Id: Id5c7fd2f0fcb55474b44b688bfdebaca4c670bd2
The test_create_delete_access_rule_with_locks test occasionally fails
because tearDown attempts to delete the share before the access rule,
which involves locking, has been fully removed. This patch ensures
that the access rule is properly removed before proceeding with share
deletion, thus preventing the race condition.
Change-Id: I61f889bc07d84c80116db2f2b15ce6dc5eb10c5d
I added this because showing the info lists for a limit as specified in the DNS API documentation is not implemented in the SDK.
Change-Id: I4d7b9a3c0f652f9a07fbf70df35e3c780462514c