]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
l3_db: refactor L3_NAT_DB_mixin
authorIsaku Yamahata <isaku.yamahata@intel.com>
Tue, 22 Jul 2014 08:24:41 +0000 (17:24 +0900)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Tue, 5 Aug 2014 03:18:23 +0000 (12:18 +0900)
commit748f0d53a150ffc46871bc2cd7ab7012105e64de
tree64124889117dc012254042bf35dbe8e818deb0c1
parent6bd6debebe601fa4076dc34e9c9fdac45defdd58
l3_db: refactor L3_NAT_DB_mixin

This patch refactors L3_NAT_DB_mixin to split out db operation and
rpc notification.

l3 plugin for routervm will implement the method for REST resource
operation as something like
    def op_resource():
        additional operation
        with session
            additional db operation
            db operation of super class => super().db_op_resoruce
            additional db operation
        additional operation
        l3 rpc notification

However, The current L3_NAT_DB_mixin intermixes db operations with l3 rpc.
So it is difficult to reuse the db operation code without l3 rpc.
This patch splits db operation from l3 rpc notification so that
db operation logic can be reused easily. Thus the l3 plugin for routervm
will be simplified with this patch.

Related to blueprint cisco-routing-service-vm
Related to blueprint l3-plugin-brocade-vyatta-vrouter

Change-Id: I88f6574f921596426e1a31c9ff2251aa6f4674b8
neutron/db/extraroute_db.py
neutron/db/l3_db.py
neutron/db/l3_dvr_db.py
neutron/db/l3_gwmode_db.py