summaryrefslogtreecommitdiff
path: root/nova/tests/functional/api_samples_test_base.py
diff options
context:
space:
mode:
authorVladik Romanovsky <vromanso@redhat.com>2015-04-20 13:21:37 -0700
committerDan Smith <dansmith@redhat.com>2015-08-04 16:34:24 -0700
commit1b8a2e0a928b142b453dd76dc1afed0b26ee6eae (patch)
treeff52f459e3591da512915b2e2638d2f29faa8220 /nova/tests/functional/api_samples_test_base.py
parent57967ae3515a015e94657b4a10bcd6ef8d3dd439 (diff)
downloadnova-1b8a2e0a928b142b453dd76dc1afed0b26ee6eae.tar.gz
Adding user_id handling to keypair index, show and create api calls
Administering an openstack cluster I found the need to see what keypairs a user had. I found this bug that was requesting the same thing and decided to implement it. This is the update to the api server to handle a query param passed to return a keypair list for a specific user-id. Only a user with admin privileges is allowed to make this call. Allowing the administrators to be able to list and get details of keypairs which owned by users other than themselves, as well as creating new and deleting keypairs on behalf of their users. DocImpact: This adds API microversion Implements blueprint admin-query-any-keypair APIImpact UpgradeImpact: Policy rules of the index, create, delete and show operations has been updated to support the change. os_compute_api:os-keypairs:{index, show, create, delete}: "rule:admin_api or user_id:%(user_id)s Co-Authored-By: Dan Smith <dansmith@redhat.com> Co-Authored-By: Dan Radez <dradez@redhat.com> Closes-Bug: #1182965 Change-Id: I45846f770628e8f24a8c137dcdc46baa64c50801
Diffstat (limited to 'nova/tests/functional/api_samples_test_base.py')
-rw-r--r--nova/tests/functional/api_samples_test_base.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/tests/functional/api_samples_test_base.py b/nova/tests/functional/api_samples_test_base.py
index e78c103dc3..fcf3c6057b 100644
--- a/nova/tests/functional/api_samples_test_base.py
+++ b/nova/tests/functional/api_samples_test_base.py
@@ -304,6 +304,7 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase):
'compute_host': self.compute.host,
'text': text,
'int': '[0-9]+',
+ 'user_id': text,
}
def _get_response(self, url, method, body=None, strip_version=False,