Merge "Make router-interface-delete work in N1kv plugin"

This commit is contained in:
Jenkins 2013-09-18 13:57:27 +00:00 committed by Gerrit Code Review
commit b800c68668

View File

@ -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)