neutron/neutron/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 New enginefacade for networks, subnets. 2017-03-30 01:26:45 -07:00
__init__.py Make IPAM more pythonic 2015-07-09 17:33:17 +00:00
driver.py Avoid IPAM driver reusing a session that has been rolled back 2016-08-12 15:53:57 +00:00
exceptions.py Use ipam AllocationOnAutoAddressSubnet class 2017-02-07 14:56:33 -05:00
requests.py Use method get_ipv6_addr_by_EUI64 from oslo.utils 2016-08-30 19:49:09 +08:00
subnet_alloc.py New enginefacade for networks, subnets. 2017-03-30 01:26:45 -07:00
utils.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00