From 96b2926671d66e7a1b32cdfec645aa9dd143aa48 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 4 Jun 2021 11:18:53 +0000 Subject: [PATCH] Add CONTEXT_READER to "get_reservations_for_resources" The method executes DB operations outside a DB context and with an inactive session. Change-Id: Ifd1c7b99421768dfa9462237e2b1b14af0e68f41 Closes-Bug: #1930876 --- neutron/db/quota/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/neutron/db/quota/api.py b/neutron/db/quota/api.py index 2df9f052e08..89ef9ae7832 100644 --- a/neutron/db/quota/api.py +++ b/neutron/db/quota/api.py @@ -214,6 +214,7 @@ def remove_reservation(context, reservation_id, set_dirty=False): @db_api.retry_if_session_inactive() +@db_api.CONTEXT_READER def get_reservations_for_resources(context, tenant_id, resources, expired=False): """Retrieve total amount of reservations for specified resources.