nova/nova/tests/unit/api/openstack
Ghanshyam Mann 58701be615 Fix os-ips policy to be admin_or_owner
os-ips API policy is default to admin_or_owner[1] but API
is allowed for everyone.

We can see the test trying with other project context can access the API
- https://review.opendev.org/#/c/715477

This is because API does not pass the server project_id in policy target[2]
and if no target is passed then, policy.py add the default targets which is
nothing but context.project_id (allow for everyone who try to access)[3]

This commit fix this policy by passing the server's project_id in policy
target.

Closes-bug: #1869396
[1] eaf08c0b7b/nova/policies/ips.py (L27)

Change-Id: Ie7bcb6537f90813cc5b23d69c886037d25b15a42
2020-03-28 20:56:46 -05:00
..
compute Fix os-ips policy to be admin_or_owner 2020-03-28 20:56:46 -05:00
__init__.py
common.py [python3] Webob request body should be bytes 2015-12-28 13:51:29 -05:00
fakes.py nova-net: Remove layer of indirection in 'nova.network' 2020-01-15 14:57:49 +00:00
test_api_version_request.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_auth.py Noauth should also use request_id from compute_req_id.py 2018-04-04 14:21:01 -04:00
test_common.py nova-net: Remove layer of indirection in 'nova.network' 2020-01-15 14:57:49 +00:00
test_faults.py [Py34] api.openstack.test_faults.TestFaultWrapper 2015-12-10 20:56:42 +00:00
test_legacy_v2_compatible_wrapper.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test_mapper.py [Py34] Enable api.openstack.test_mapper unit test 2015-10-05 18:59:28 +03:00
test_requestlog.py Stop using NoAuthMiddleware in tests 2019-10-14 11:43:52 -05:00
test_wsgi.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00