Dict_of_str not used in custom_caller
Closed this issue · 2 comments
erraa commented
Prerequisites
- [x ] Have you tested the operation in the API directly?
- [x ] Do you have the latest SDK version?
Describe the bug
When adding a custom api caller the headers aren't processed through the dict_of_str function
Expected behavior
Expecting the same behaviour as in the non custom modules.
Example:
dnacentersdk/dnacentersdk/api/v2_2_3_3/sda.py
Line 117 in 495bffc
Environment (please complete the following information):
- Cisco DNA Center Version and patch: N/A
- Python version: N/A
- SDK version: dnacentersdk==2.5.4
- OS Version: N/A
Additional context
Workaround is to import it on your own.
from dnacentersdk.utils import dict_of_str
dnac.custom_caller.add_api("get_vns", lambda headers: dnac.custom_caller.call_api("GET", "api/v1/aca-controller-service/getAcaVnSummary", headers=dict_of_str(headers)))