TOSession - Error when calling TOSession.get_parameters_by_profile_id #6589
Labels
bug
something isn't working as intended
TC Client (python)
related to the Python implementation of a TC client
This Bug Report affects these Traffic Control components:
Current behavior:
When calling TOSession.get_parameters_by_profile_id with a valid profile_id, an error is received. The code used was as follows:
And the error:
ERROR:trafficops.restapi:restapi.py:_build_endpoint:344: Expecting a value for keyword argument ['id'] for format field specification ['profiles/{id:d}/parameters']
ERROR:root:Expecting a value for keyword argument ['id'] for format field specification ['profiles/{id:d}/parameters']
Traceback (most recent call last):
File "/path/to/apache-trafficcontrol-6.0.2/traffic_control/clients/python/trafficops/restapi.py", line 339, in _build_endpoint
new_api_path = api_path.format(**url_params) + qparams
KeyError: 'id'
ValueError: Expecting a value for keyword argument ['id'] for format field specification ['profiles/{id:d}/parameters']
The decorator for method get_parameters_by_profile_id is using a different variable to the one defined in the method ( profile_id vs id ).
Expected behavior:
A list of parameters should be returned.
Steps to reproduce:
The following code could be used to reproduce the issue:
The text was updated successfully, but these errors were encountered: