nova/nova/tests/unit/api/openstack/compute
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
..
__init__.py
admin_only_action_common.py Ensure source service is up before resizing/migrating 2019-12-19 15:24:34 -05:00
dummy_schema.py
microversions.py Remove the extensions framework from wsgi.py 2018-10-18 02:01:03 +00:00
test_access_ips.py nova-net: Convert remaining API tests to use neutron 2019-12-10 11:03:57 +00:00
test_admin_actions.py Add test coverage of existing admin_actions policies 2019-12-04 19:19:53 +00:00
test_admin_password.py Add test coverage of existing admin_password policies 2020-02-08 13:23:26 -06:00
test_agents.py Add test coverage of existing os-agents policies 2020-03-02 10:26:48 +00:00
test_aggregates.py Validate id as integer for os-aggregates 2020-03-06 12:46:12 +01:00
test_api.py Remove unnecessary setUp function in testcase 2017-03-30 12:55:16 +08:00
test_attach_interfaces.py Add test coverage of existing attach_interfaces policies 2020-03-04 21:11:10 +00:00
test_auth.py Tests: use fakes.HTTPRequest in compute tests 2016-08-24 19:03:54 +03:00
test_availability_zone.py trivial: Fetch 'Service' objects once when building AZs 2020-02-05 21:26:23 +00:00
test_baremetal_nodes.py Deprecate Baremetal and fping API 2016-07-26 14:14:44 +08:00
test_certificates.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_cloudpipe.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_cloudpipe_update.py Remove cloudpipe APIs 2017-05-04 16:13:45 +08:00
test_console_auth_tokens.py Remove nova-consoleauth 2019-07-05 15:04:47 +00:00
test_console_output.py Add test coverage of existing console_output policies 2020-03-06 01:28:11 +00:00
test_create_backup.py Add test coverage of existing create_backup policies 2020-03-06 01:39:22 +00:00
test_deferred_delete.py Add test coverage of existing deferred_delete policies 2020-03-04 09:58:13 +00:00
test_disk_config.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_evacuate.py Add test coverage of existing evacuate policies 2020-02-17 13:07:12 -06:00
test_extended_hypervisors.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_extended_ips.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_extended_ips_mac.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_extension_info.py Totally freeze the extension_info API 2017-05-08 16:32:48 +08:00
test_flavor_access.py Add test coverage of existing flavor_access policies 2020-03-17 15:03:19 -05:00
test_flavor_disabled.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_flavor_manage.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_flavorextradata.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_flavors.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_flavors_extra_specs.py trivial: Use recognized extra specs in tests 2020-02-19 08:24:31 +00:00
test_floating_ip_pools.py nova-net: Remove use of legacy 'FloatingIP' object 2019-12-03 15:04:41 +00:00
test_floating_ips.py nova-net: Remove unnecessary exception handling, mocks 2020-02-18 11:45:39 +00:00
test_hosts.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_hypervisor_status.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_hypervisors.py Fix hypervisors paginted collection_name. 2020-02-24 16:49:35 +08:00
test_image_metadata.py Remove 'nova.image.api' module 2020-02-18 11:45:39 +00:00
test_images.py Remove 'nova.image.api' module 2020-02-18 11:45:39 +00:00
test_instance_actions.py Store instance action event exc_val fault details 2020-03-21 06:08:34 +00:00
test_instance_usage_audit_log.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_keypairs.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_limits.py Multiple API cleanup changes 2019-08-12 08:52:38 -05:00
test_lock_server.py Microversion 2.73: Support adding the reason behind a server lock 2019-05-11 21:48:27 +00:00
test_microversions.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_migrate_server.py Enable unshelve with qos ports 2020-03-18 17:38:55 +01:00
test_migrations.py Filter migrations by user_id/project_id 2019-10-14 11:35:11 -07:00
test_multinic.py nova-net: Remove unused nova-network objects 2020-02-18 13:19:43 +00:00
test_networks.py nova-net: Remove use of legacy 'Network' object 2019-12-03 15:43:18 +00:00
test_pause_server.py Remove mox in tests/unit/api/openstack/compute 2018-05-24 21:31:44 +00:00
test_quota_classes.py nova-net: Remove remaining nova-network quotas 2019-12-02 17:39:23 +00:00
test_quotas.py nova-net: Remove remaining nova-network quotas 2019-12-02 17:39:23 +00:00
test_remote_consoles.py Stop using mox stubs in test_remote_consoles.py 2017-07-18 00:39:01 +00:00
test_rescue.py Merge "Remove mox from api/openstack/compute/test_rescue.py" 2017-01-03 17:06:30 +00:00
test_security_groups.py nova-net: Remove layer of indirection in 'nova.network' 2020-01-15 14:57:49 +00:00
test_server_actions.py Enable unshelve with qos ports 2020-03-18 17:38:55 +01:00
test_server_diagnostics.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_server_external_events.py Define Cyborg ARQ binding notification event. 2020-03-01 13:52:51 -08:00
test_server_group_quotas.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_server_groups.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_server_metadata.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_server_migrations.py Merge "Remove compute compat checks for aborting queued live migrations" 2019-10-23 08:08:36 +00:00
test_server_password.py Remove mox in unit/api/*/test_server_password.py 2018-04-09 16:28:08 +09:00
test_server_reset_state.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_server_start_stop.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_server_tags.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_server_topology.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_serversV21.py Fix os-ips policy to be admin_or_owner 2020-03-28 20:56:46 -05:00
test_services.py Add new default roles in os-services API policies 2019-12-03 23:40:07 +00:00
test_shelve.py Avoid error 500 on shelve task_state race 2019-10-30 15:56:47 -04:00
test_simple_tenant_usage.py Multiple API cleanup changes 2019-08-12 08:52:38 -05:00
test_snapshots.py Replace 'fake' with a real project ID 2019-09-30 14:40:20 +09:00
test_suspend_server.py Reject live migration and suspend on SEV guests 2019-09-10 13:59:02 +01:00
test_tenant_networks.py nova-net: Remove use of legacy 'Network' object 2019-12-03 15:43:18 +00:00
test_urlmap.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_versions.py conf: Remove deprecated 'project_id_regex' opt 2019-09-27 18:59:02 +09:00
test_volumes.py Add test coverage of existing os-volumes-attachments policies 2020-03-06 15:27:55 +08:00