neutron/neutron/db
Slawek Kaplonski 062336e59b Set system_scope='all' in elevated context
In case when enforce_new_defaults is set to True and new policy rules
are used, context.is_admin flag isn't really working as it was with old
rules.
But in case when elevated context is needed, it means that we need
context which has full rights to the system. So we should also set
"system_scope" parameter to "all" to be sure that system scope queries
can be done with such elevated context always.

It is needed e.g. when elevated context is used to get some data from
db. In such case we need to have db query which will not be scoped to
the single project_id and with new defaults to achieve that system_scope
has to be set to "all".

Proper fix for that should be done in neutron-lib and it is proposed
in [1] already but as we are have frozen neutron-lib version for
stable/wallaby already this patch for neutron is temporary fix for that
issue.
We can revert that patch as soon as we will be in Xena development cycle
and [1] will be merged and released.

[1] https://review.opendev.org/c/openstack/neutron-lib/+/781625

Related-Bug: #1920001
Change-Id: I0068c1de09f5c6fae5bb5cd0d6f26f451e701939
2021-03-19 12:05:56 +01:00
..
allowed_address_pairs Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
availability_zone remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
extra_dhcp_opt Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
metering Remove duplicated meter_rpc instance initialization 2020-12-14 14:46:02 +08:00
migration Allow sharing of address groups via RBAC mechanism 2021-03-01 18:28:31 -06:00
models Allow sharing of address groups via RBAC mechanism 2021-03-01 18:28:31 -06:00
network_dhcp_agent_binding Move migration to proper dir and fix objects tests 2019-11-04 17:44:44 +00:00
port_security Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
qos Refactor qos_plugin._extend_port_resource_request 2019-07-05 08:10:01 +00:00
quota Adds a unique index to quotas 2020-11-20 14:05:39 +08:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_utils.py Finish the new DB engine facade migration 2020-11-24 09:20:35 +00:00
address_group_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
address_scope_db.py Allow sharing of address scopes via RBAC mechanism 2020-03-19 16:51:39 +02:00
agents_db.py Remove left over code for availability_zone_filter 2020-11-18 19:27:24 +01:00
agentschedulers_db.py Schedule networks to new segments if needed 2021-03-05 16:03:49 +00:00
allowedaddresspairs_db.py use AuthenticIPNetwork and AuthenticEUI from neutron-lib 2019-06-25 08:47:48 -06:00
data_plane_status_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
db_base_plugin_common.py Optimize get_ports with trunk extension 2021-01-12 07:33:06 +00:00
db_base_plugin_v2.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
dns_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
dvr_mac_db.py Optimize DVR related port DB query 2019-08-25 01:24:03 +08:00
external_net_db.py Remove leftovers of get_external_network_id for router 2020-02-28 10:53:29 +00:00
extradhcpopt_db.py Utilize bulk port creation ops in ml2 plugin 2019-03-21 11:31:36 +00:00
extraroute_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
flavors_db.py delete common_db_mixin 2019-04-17 11:25:41 -06:00
ipam_backend_mixin.py Merge "Floating IP for routed networks: network:routed API" 2021-01-06 17:32:23 +00:00
ipam_pluggable_backend.py Switch to new engine facade for IpamPluggableBackend and Ipam driver 2020-12-15 11:10:36 +00:00
l3_agentschedulers_db.py L3 agent scheduler should return a valid index if manual scheduling 2020-06-24 15:37:23 +00:00
l3_attrs_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
l3_dvr_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
l3_dvr_ha_scheduler_db.py Fix connection between 2 dvr routers 2018-11-01 18:01:25 +01:00
l3_dvrscheduler_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
l3_fip_pools_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
l3_fip_port_details.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_fip_qos.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
l3_gateway_ip_qos.py Finish the new DB engine facade migration 2020-11-24 09:20:35 +00:00
l3_gwmode_db.py Finish the new DB engine facade migration 2020-11-24 09:20:35 +00:00
l3_hamode_db.py Set system_scope='all' in elevated context 2021-03-19 12:05:56 +01:00
l3_hascheduler_db.py Merge "Fix _notify_l3_agent_port_update when there is no binding host" 2020-03-15 03:13:52 +00:00
models_v2.py Lock subnets during port creation and subnet deletion 2020-04-23 16:43:19 +00:00
network_ip_availability_db.py Remove "six" library 2020-07-28 16:55:52 +00:00
ovn_hash_ring_db.py [OVN] Add hash ring methods 2019-12-03 08:53:45 +00:00
ovn_revision_numbers_db.py Finish the new DB engine facade migration 2020-11-24 09:20:35 +00:00
port_device_profile_db.py Add port device profile extension 2021-01-22 16:17:30 +00:00
port_numa_affinity_policy_db.py Add port NUMA affinity policy 2020-11-13 15:49:34 +00:00
portbindings_base.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portbindings_db.py remove the neutron.db._model_query module 2019-01-25 08:55:25 -07:00
portsecurity_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
portsecurity_db_common.py Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
provisioning_blocks.py [OVS] Fix live-migration connection disruption 2021-01-13 11:13:41 +00:00
rbac_db_mixin.py rbac: Catch correct exception for duplicated entry 2019-06-06 19:23:17 +00:00
rbac_db_models.py Allow sharing of address groups via RBAC mechanism 2021-03-01 18:28:31 -06:00
securitygroups_db.py Don't try to create default SG when security groups are disabled 2021-02-05 16:07:39 +01:00
securitygroups_rpc_base.py Use normalized_cidr of the SG in the backen drivers 2021-02-22 23:14:50 +01:00
segments_db.py Change provider network segmentation ID 2019-04-01 12:55:50 +00:00
servicetype_db.py Switch to new engine facade for ExtraRoute_dbonly_mixin 2019-06-28 10:30:56 +00:00
standard_attr.py shim standard_attr db for neutron-lib 2019-07-23 14:17:29 -06:00
standardattrdescription_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
subnet_service_type_mixin.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00
uplink_status_propagation_db.py Fix pep8 E128 warnings in non-test code 2019-03-12 21:22:33 +00:00
vlantransparent_db.py remove the neutron.db._resource_extend module 2019-01-02 13:02:06 -07:00