class LsnConfigurationConflict(NsxPluginException):
message = _("Configuration conflict on Logical Service Node %(lsn_id)s")
-
-
-class ReadOnlyAttribute(NsxPluginException):
- message = _("Cannot update read-only attribute %(attribute)s")
webob.exc.HTTPBadRequest,
nsx_exc.NoMorePortsException:
webob.exc.HTTPBadRequest,
- nsx_exc.ReadOnlyAttribute:
- webob.exc.HTTPBadRequest,
nsx_exc.MaintenanceInProgress:
webob.exc.HTTPServiceUnavailable,
nsx_exc.InvalidSecurityCertificate:
self.cluster, nsx_router_id, routes)
def update_router(self, context, router_id, router):
- if isinstance(router['router'].get('distributed'), bool):
- # Router conversion is not supported
- raise nsx_exc.ReadOnlyAttribute(attribute='distributed')
# Either nexthop is updated or should be kept as it was before
r = router['router']
nexthop = None
self._test_remove_router_interface_nsx_out_of_sync(unsync_action)
- def test_update_router_distributed_bad_request(self):
- res = self._create_router('json', 'tenant')
- router = self.deserialize('json', res)
- req = self.new_update_request(
- 'routers',
- {'router': {'distributed': True}},
- router['router']['id'])
- res = req.get_response(self.ext_api)
- self.assertEqual(res.status_int, 400)
-
def test_update_router_not_in_nsx(self):
res = self._create_router('json', 'tenant')
router = self.deserialize('json', res)