Raising proper error in case of router-interface addition
Currently when user tries to add a logical switch to 2nd router a proper error message is not generated. This patch takes care of it. Change-Id: If81aea2c11235df71498ea2d68e03c7c7176445e
This commit is contained in:
parent
455bb910d2
commit
8dd65f08d5
@ -2584,14 +2584,13 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
|||||||
"to router %(router_id)s") % {
|
"to router %(router_id)s") % {
|
||||||
'net_id': net_id,
|
'net_id': net_id,
|
||||||
'router_id': router_ids[0]}
|
'router_id': router_ids[0]}
|
||||||
if router_id in router_ids:
|
|
||||||
LOG.error(err_msg)
|
LOG.error(err_msg)
|
||||||
|
if router_id in router_ids:
|
||||||
# attach to the same router again
|
# attach to the same router again
|
||||||
raise n_exc.InvalidInput(error_message=err_msg)
|
raise n_exc.InvalidInput(error_message=err_msg)
|
||||||
else:
|
else:
|
||||||
LOG.error(err_msg)
|
|
||||||
# attach to multiple routers
|
# 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,
|
def _add_router_interface_wrapper(self, context, router_id,
|
||||||
interface_info):
|
interface_info):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user