When trying to migrate from distributed router to centralized
a NotImplementedError occurs with empty message.
Need to concretize a message.
Closes-Bug: #
1477509
Change-Id: I2b57ec5af38a0f87c1ab256cb8af66bc443be824
message = _("The service is unavailable")
+class NotSupported(NeutronException):
+ message = _('Not supported: %(msg)s')
+
+
class AdminRequired(NotAuthorized):
message = _("User does not have admin privileges: %(reason)s")
router_res.get('distributed') is False):
LOG.info(_LI("Centralizing distributed router %s "
"is not supported"), router_db['id'])
- raise NotImplementedError()
+ raise n_exc.NotSupported(msg=_("Migration from distributed router "
+ "to centralized"))
elif (not router_db.extra_attributes.distributed and
router_res.get('distributed')):
# Notify advanced services of the imminent state transition
'distributed': True
}
router_db = self._create_router(router)
- self.assertRaises(NotImplementedError,
+ self.assertRaises(exceptions.NotSupported,
self.mixin._validate_router_migration,
self.ctx, router_db, {'distributed': False})