Make router-interface-delete work in N1kv plugin
Fixes bug 1226729 Change-Id: If2c6bc544dfa45cb98d5951c99f158d49191b031
This commit is contained in:
parent
151cff7554
commit
5b056ecc73
@ -1283,7 +1283,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
self._extend_port_dict_profile(context, port)
|
||||
return port
|
||||
|
||||
def delete_port(self, context, id):
|
||||
def delete_port(self, context, id, l3_port_check=True):
|
||||
"""
|
||||
Delete a port.
|
||||
|
||||
@ -1291,6 +1291,11 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
:param id: UUID representing the port to delete
|
||||
:returns: deleted port object
|
||||
"""
|
||||
# if needed, check to see if this is a port owned by
|
||||
# and l3-router. If so, we should prevent deletion.
|
||||
if l3_port_check:
|
||||
self.prevent_l3_port_deletion(context, id)
|
||||
self.disassociate_floatingips(context, id)
|
||||
self._send_delete_port_request(context, id)
|
||||
return super(N1kvNeutronPluginV2, self).delete_port(context, id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user