Improve "get_collection_count" calls
Reduce the object retrieval to one single field to improve the collection count. Bumped neutron-lib to 2.16.0. This version contains [1], needed for this patch. [1]https://review.opendev.org/c/openstack/neutron-lib/+/807686 Related-Bug: #1942863 Change-Id: I160e8084e97b23a2bacb49ceb40efbac2d0715be
This commit is contained in:
parent
2b30fa7bed
commit
d4d90fb6d7
@ -50,7 +50,7 @@ msgpack-python==0.4.0
|
|||||||
munch==2.1.0
|
munch==2.1.0
|
||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
netifaces==0.10.4
|
netifaces==0.10.4
|
||||||
neutron-lib==2.15.0
|
neutron-lib==2.16.0
|
||||||
openstacksdk==0.31.2
|
openstacksdk==0.31.2
|
||||||
os-client-config==1.28.0
|
os-client-config==1.28.0
|
||||||
os-ken==2.2.0
|
os-ken==2.2.0
|
||||||
|
@ -563,8 +563,9 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
|
|||||||
|
|
||||||
@db_api.retry_if_session_inactive()
|
@db_api.retry_if_session_inactive()
|
||||||
def get_networks_count(self, context, filters=None):
|
def get_networks_count(self, context, filters=None):
|
||||||
return model_query.get_collection_count(context, models_v2.Network,
|
return model_query.get_collection_count(
|
||||||
filters=filters)
|
context, models_v2.Network, filters=filters,
|
||||||
|
query_field=models_v2.Network.id.key)
|
||||||
|
|
||||||
@db_api.retry_if_session_inactive()
|
@db_api.retry_if_session_inactive()
|
||||||
def create_subnet_bulk(self, context, subnets):
|
def create_subnet_bulk(self, context, subnets):
|
||||||
|
@ -615,8 +615,9 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase,
|
|||||||
|
|
||||||
@db_api.retry_if_session_inactive()
|
@db_api.retry_if_session_inactive()
|
||||||
def get_routers_count(self, context, filters=None):
|
def get_routers_count(self, context, filters=None):
|
||||||
return model_query.get_collection_count(context, l3_models.Router,
|
return model_query.get_collection_count(
|
||||||
filters=filters)
|
context, l3_models.Router, filters=filters,
|
||||||
|
query_field=l3_models.Router.id.key)
|
||||||
|
|
||||||
def _check_for_dup_router_subnets(self, context, router,
|
def _check_for_dup_router_subnets(self, context, router,
|
||||||
network_id, new_subnets):
|
network_id, new_subnets):
|
||||||
|
@ -16,7 +16,7 @@ Jinja2>=2.10 # BSD License (3 clause)
|
|||||||
keystonemiddleware>=5.1.0 # Apache-2.0
|
keystonemiddleware>=5.1.0 # Apache-2.0
|
||||||
netaddr>=0.7.18 # BSD
|
netaddr>=0.7.18 # BSD
|
||||||
netifaces>=0.10.4 # MIT
|
netifaces>=0.10.4 # MIT
|
||||||
neutron-lib>=2.15.0 # Apache-2.0
|
neutron-lib>=2.16.0 # Apache-2.0
|
||||||
python-neutronclient>=6.7.0 # Apache-2.0
|
python-neutronclient>=6.7.0 # Apache-2.0
|
||||||
tenacity>=6.0.0 # Apache-2.0
|
tenacity>=6.0.0 # Apache-2.0
|
||||||
SQLAlchemy>=1.4.23 # MIT
|
SQLAlchemy>=1.4.23 # MIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user