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.
Reviewed: https:/ /review. opencontrail. org/13258 github. org/Juniper/ contrail- controller/ commit/ a4d76bf81e432bc 6cc7cd2b71ac7a9 cb7ac06585
Committed: http://
Submitter: Zuul
Branch: master
commit a4d76bf81e432bc 6cc7cd2b71ac7a9 cb7ac06585
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 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
Change-Id: Ibf1d5da1d7bd3c