Comment 39 for bug 1488181

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13258
Committed: http://github.org/Juniper/contrail-controller/commit/a4d76bf81e432bc6cc7cd2b71ac7a9cb7ac06585
Submitter: Zuul
Branch: master

commit a4d76bf81e432bc6cc7cd2b71ac7a9cb7ac06585
Author: Sachin Bansal <email address hidden>
Date: Thu Sep 10 16:38:29 2015 -0700

config: sync native-ri create/delete vmi->native-ri ref.

Synchronously create the 'native' routing-instance for a
virtual-network. Also when a virtual-machine-interface is
created, link it to the native routing-instance in the same
context. To achieve this following refactoring is done:

1. create a ApiContext object which will be present
in every request as a 'thread'-local-variable.
2. ApiContext will hold a reference to a <request> object
which could be bottle.request(external) or ApiInternalRequest
which would be requests generated from within api-server.
3. Replace occurences of bottle.request with get_request()
to normalize request structure.
4. Rename and add more interactions from request handling
layer to type-specific handling layer with <pre|post>_dbe_<CUD>
5. Have ApiContext hold a list of undo_callables so that
callee can add to undo-list and caller on any error will
iterate and invoke undo callables.

Closes-Bug: #1488181
Change-Id: Ibf1d5da1d7bd3ce8bc7f1f48eaab0f66d613942c