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
(cherry picked from commit a4d76bf81e432bc6cc7cd2b71ac7a9cb7ac06585)
Reviewed: https:/ /review. opencontrail. org/13947 github. org/Juniper/ contrail- controller/ commit/ f3ad822b7961576 69c3ba27044a261 a9eda66cf5
Committed: http://
Submitter: Zuul
Branch: R2.22-dev
commit f3ad822b7961576 69c3ba27044a261 a9eda66cf5
Author: Sachin Bansal <email address hidden>
Date: Tue Jun 9 17:33:25 2015 -0700
config: sync native-ri create/delete vmi->native-ri ref.
Synchronously create the 'native' routing-instance for a machine- interface is
virtual-network. Also when a virtual-
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 -local- variable. request( external) or ApiInternalRequest _dbe_<CUD>
in every request as a 'thread'
2. ApiContext will hold a reference to a <request> object
which could be bottle.
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>
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 e8bc7f1f48eaab0 f66d613942c 6cc7cd2b71ac7a9 cb7ac06585)
Change-Id: Ibf1d5da1d7bd3c
(cherry picked from commit a4d76bf81e432bc