neutron/neutron/tests/unit/ipam
Ann Kamyshnikova cf34df8572 New enginefacade for networks, subnets.
Usage reader and writer for db operations.

In Neutron code we have common situation like:

with context.session.begin():
   context.session.add(obj)

self._make_obj_dict(obj)

With new enginefacade we change context.session.begin() for
db.context_manager.writer(reader).using(context).

When object leaves this with-block, its reference to session is
cleared because session is discarded. To use this object later to
load some data from its dependencies, we have to provide different
session to work in. To solve this obj either can be moved under
with-block or we have to do context.session.add(obj) one more time
to be able to load relations.

This change also switches to usage of new enginefacade for some db
operations with ports, in order to pass unit and functional tests.

Partially-Implements blueprint: enginefacade-switch

Change-Id: Ia15c63f94d2c67791da3b65546e59f6929c8c685
2017-03-30 01:26:45 -07:00
..
drivers Spin off context module 2017-03-06 16:25:29 +00:00
__init__.py IPAM reference driver 2015-05-19 09:44:11 -07:00
fake_driver.py Enable IPAM drivers to allocate from more than one subnet 2016-05-10 22:00:46 +00:00
test_requests.py Spin off context module 2017-03-06 16:25:29 +00:00
test_subnet_alloc.py New enginefacade for networks, subnets. 2017-03-30 01:26:45 -07:00
test_utils.py Fix issues with allocation pool generation for ::/64 cidr 2015-07-08 10:36:55 +01:00