]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Separate rbac calculation from _make_network_dict
authorKevin Benton <blak111@gmail.com>
Fri, 11 Dec 2015 17:56:01 +0000 (09:56 -0800)
committerKevin Benton <kevinbenton@buttewifi.com>
Mon, 14 Dec 2015 19:09:20 +0000 (19:09 +0000)
commitf5b950dffecc049df11981dcfb5574121be3eb69
tree159eb08f8833ae7332777aee267a8cb9cfebfeec
parent08bd35fa6f89911086877252e5d158db31f4ce21
Separate rbac calculation from _make_network_dict

When a subnet dict was being created, it was calling
_make_network_dict to get the 'shared' flag for the
subnet. The issue with this is that the _make_network_dict
function would iterate over the subnets on the passed in
network object, which would trigger a database lookup
of all of the subnets.

This patch just separates the 'shared' flag calculation out
into a separate function that both calls can leverage.

Change-Id: I2cb766ce1fd8ddcc75209f9e92221a3b77015ea2
Closes-Bug: #1525295
Partial-Bug: #1513782
neutron/db/db_base_plugin_common.py