

def _port_filter_hook(self, context, original_model, conditions):
    if self.model_query_scope(context, original_model):
        conditions |= ((context.tenant_id == models_v2.Network.tenant_id) & (models_v2.Network.id == models_v2.Port.network_id))
    return conditions

dataset/ETHPy150Open openstack/neutron/neutron/db/db_base_plugin_common.py DbBasePluginCommon._port_filter_hook/original