Invoke _process_l3_create within plugin session
_process_l3_create should be invoked with a plugin session, else externalnetworks table is not populated for networks with router:external=True. Added the missing plugin session. Change-Id: I09c49dea9474f91a70aef829c1596fbb9089d6cf Closes-Bug: #1299946
This commit is contained in:
parent
f377600f19
commit
784618f115
@ -185,17 +185,19 @@ class OneConvergencePluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
|
|
||||||
network['network']['id'] = net['id']
|
network['network']['id'] = net['id']
|
||||||
|
|
||||||
try:
|
with context.session.begin(subtransactions=True):
|
||||||
neutron_net = super(OneConvergencePluginV2,
|
try:
|
||||||
self).create_network(context, network)
|
neutron_net = super(OneConvergencePluginV2,
|
||||||
|
self).create_network(context, network)
|
||||||
|
|
||||||
#following call checks whether the network is external or not and
|
#following call checks whether the network is external or not
|
||||||
#if it is external then adds this network to externalnetworks
|
#and if it is external then adds this network to
|
||||||
#table of neutron db
|
#externalnetworks table of neutron db
|
||||||
self._process_l3_create(context, neutron_net, network['network'])
|
self._process_l3_create(context, neutron_net,
|
||||||
except nvsdexception.NVSDAPIException:
|
network['network'])
|
||||||
with excutils.save_and_reraise_exception():
|
except nvsdexception.NVSDAPIException:
|
||||||
self.nvsdlib.delete_network(net)
|
with excutils.save_and_reraise_exception():
|
||||||
|
self.nvsdlib.delete_network(net)
|
||||||
|
|
||||||
return neutron_net
|
return neutron_net
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user