Plugin module fails when using a DICT in the attr section of a task for my custom plugin #300
Labels
status: gathering feedback
Further discussion is needed to determine this issue's scope and/or implementation
ISSUE TYPE
SOFTWARE VERSIONS
pynautobot
1.5.0
Ansible:
ansible [core 2.13.13]
Nautobot:
1.5.7
Collection:
networktocode.nautobot 4.4.0
SUMMARY
When describing a task to create or modify a field in my plugin the attributes failes when attempting to utilize a dictionary
STEPS TO REPRODUCE
Run the playbook that creates or updates a model in my plugin.
ansible-playbook pb.load-betacdn-to-dev.yml
If the attributes are not referenced by the UUID then the playbook will fail with
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: expected string or bytes-like object
playbook:
input data:
EXPECTED RESULTS
ACTUAL RESULTS
I played around with the utils.py and updated the _to_slug function from:
to:
This resolves my issue when using attributes in the plugins module.
Here is the plugin repo
https://github.com/byrn-baker/nautobot-cdn-models
The text was updated successfully, but these errors were encountered: