SELECT networkrbacs.tenant_id AS networkrbacs_tenant_id, networkrbacs.id AS networkrbacs_id, networkrbacs.target_tenant AS networkrbacs_target_tenant, networkrbacs.action AS networkrbacs_action, networkrbacs.object_id AS networkrbacs_object_id, subnets_1.network_id AS subnets_1_network_id
FROM (
SELECT DISTINCT networks.id AS networks_id
FROM networks
LEFT OUTER JOIN networkrbacs ON networks.id = networkrbacs.object_id ------1---> https://github.com/openstack/neutron-lib/blob/master/neutron_lib/db/model_query.py#L121
LEFT OUTER JOIN externalnetworks ON networks.id = externalnetworks.network_id
LEFT OUTER JOIN ml2_network_segments ON networks.id = ml2_network_segments.network_id
JOIN standardattributes ON standardattributes.id = networks.standard_attr_id
WHERE ml2_network_segments.is_dynamic IS false AND (networks.tenant_id = 'fd27c1f66a5d4f888672a18b1b0c95b6' OR networkrbacs.action = 'access_as_shared' AND (networkrbacs.target_tenant = 'fd27c1f66a5d4f888672a18b1b0c95b6' OR networkrbacs.target_tenant = '*')) AND networks.name IN ('cmnet01_net0116') AND externalnetworks.network_id IS NOT NULL) AS anon_1
JOIN subnets AS subnets_1 ON anon_1.networks_id = subnets_1.network_id -----2-----> https://github.com/openstack/neutron/blob/master/neutron/db/models_v2.py#L258
JOIN networkrbacs ON subnets_1.network_id = networkrbacs.object_id -----3---> https://github.com/openstack/neutron/blob/master/neutron/db/models_v2.py#L203
ORDER BY subnets_1.network_id
when get network, I think in the step1 already join rbac and process, there's no need to join rbac again after join subnet table. right?
SELECT networkrbacs. tenant_ id AS networkrbacs_ tenant_ id, networkrbacs.id AS networkrbacs_id, networkrbacs. target_ tenant AS networkrbacs_ target_ tenant, networkrbacs.action AS networkrbacs_ action, networkrbacs. object_ id AS networkrbacs_ object_ id, subnets_ 1.network_ id AS subnets_ 1_network_ id object_ id ------1---> https:/ /github. com/openstack/ neutron- lib/blob/ master/ neutron_ lib/db/ model_query. py#L121 s.network_ id segments ON networks.id = ml2_network_ segments. network_ id tes.id = networks. standard_ attr_id segments. is_dynamic IS false AND (networks.tenant_id = 'fd27c1f66a5d4f 888672a18b1b0c9 5b6' OR networkrbacs.action = 'access_as_shared' AND (networkrbacs. target_ tenant = 'fd27c1f66a5d4f 888672a18b1b0c9 5b6' OR networkrbacs. target_ tenant = '*')) AND networks.name IN ('cmnet01_net0116') AND externalnetwork s.network_ id IS NOT NULL) AS anon_1 1.network_ id -----2-----> https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ db/models_ v2.py#L258 1.network_ id = networkrbacs. object_ id -----3---> https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ db/models_ v2.py#L203 1.network_ id
FROM (
SELECT DISTINCT networks.id AS networks_id
FROM networks
LEFT OUTER JOIN networkrbacs ON networks.id = networkrbacs.
LEFT OUTER JOIN externalnetworks ON networks.id = externalnetwork
LEFT OUTER JOIN ml2_network_
JOIN standardattributes ON standardattribu
WHERE ml2_network_
JOIN subnets AS subnets_1 ON anon_1.networks_id = subnets_
JOIN networkrbacs ON subnets_
ORDER BY subnets_
when get network, I think in the step1 already join rbac and process, there's no need to join rbac again after join subnet table. right?