Adds missing expected_errors for V3 API multinic extension
The V3 API multinic extension is missing the expected errors decorators which means that unexpected internal Nova exceptions are not caught correctly. This patch adds the expected error decorators. Change-Id: I99311275197bb5123079c8910855386252028dec Closes-Bug: 1303781
This commit is contained in:
@@ -39,6 +39,7 @@ class MultinicController(wsgi.Controller):
|
||||
self.compute_api = compute.API()
|
||||
|
||||
@wsgi.action('add_fixed_ip')
|
||||
@extensions.expected_errors(404)
|
||||
@validation.schema(multinic.add_fixed_ip)
|
||||
def _add_fixed_ip(self, req, id, body):
|
||||
"""Adds an IP on a given network to an instance."""
|
||||
@@ -52,6 +53,7 @@ class MultinicController(wsgi.Controller):
|
||||
return webob.Response(status_int=202)
|
||||
|
||||
@wsgi.action('remove_fixed_ip')
|
||||
@extensions.expected_errors((400, 404))
|
||||
@validation.schema(multinic.remove_fixed_ip)
|
||||
def _remove_fixed_ip(self, req, id, body):
|
||||
"""Removes an IP from an instance."""
|
||||
|
||||
Reference in New Issue
Block a user