From 0a775020bcf273550e6202de3a1facf04cc51b56 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 16 Sep 2019 18:55:49 +0200 Subject: [PATCH] Fix errors when accessing floating IP API methods Commit 520005b13dc47bf78db33a526c1947e4b2c0d681 which recently added microversion support did not update floating IP code to account for the extra parameter passed to all API methods. This resulted in errors like: File "/opt/stack/blazar/blazar/api/v1/utils.py", line 90, in handler return func(flask.request, **kwargs) TypeError: floatingips_list() takes no arguments (1 given) Change-Id: I6820b56d0389ec285789ba38a8f82eac93595afc --- blazar/api/v1/floatingips/v1_0.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blazar/api/v1/floatingips/v1_0.py b/blazar/api/v1/floatingips/v1_0.py index 4a2815e5..436494d3 100644 --- a/blazar/api/v1/floatingips/v1_0.py +++ b/blazar/api/v1/floatingips/v1_0.py @@ -32,27 +32,27 @@ _api = utils.LazyProxy(service.API) # Floatingips operations @rest.get('') -def floatingips_list(): +def floatingips_list(req): """List all existing floatingips.""" return api_utils.render(floatingips=_api.get_floatingips()) @rest.post('') -def floatingips_create(data): +def floatingips_create(req, data): """Create new floatingip.""" return api_utils.render(floatingip=_api.create_floatingip(data)) @rest.get('/') @validation.check_exists(_api.get_floatingip, floatingip_id='floatingip_id') -def floatingips_get(floatingip_id): +def floatingips_get(req, floatingip_id): """Get floatingip by its ID.""" return api_utils.render(floatingip=_api.get_floatingip(floatingip_id)) @rest.delete('/') @validation.check_exists(_api.get_floatingip, floatingip_id='floatingip_id') -def floatingips_delete(floatingip_id): +def floatingips_delete(req, floatingip_id): """Delete specified floatingip.""" _api.delete_floatingip(floatingip_id) return api_utils.render()