Fix errors when accessing floating IP API methods
Commit 520005b13d
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
This commit is contained in:
parent
d4c6ecf885
commit
0a775020bc
@ -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('/<floatingip_id>')
|
||||
@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('/<floatingip_id>')
|
||||
@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()
|
||||
|
Loading…
Reference in New Issue
Block a user