diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 945fc46235..d20202cf57 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -2584,14 +2584,13 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, "to router %(router_id)s") % { 'net_id': net_id, 'router_id': router_ids[0]} + LOG.error(err_msg) if router_id in router_ids: - LOG.error(err_msg) # attach to the same router again raise n_exc.InvalidInput(error_message=err_msg) else: - LOG.error(err_msg) # attach to multiple routers - raise n_exc.Conflict(error_message=err_msg) + raise l3.RouterInterfaceAttachmentConflict(reason=err_msg) def _add_router_interface_wrapper(self, context, router_id, interface_info):