[Bug]: Breaking changes in 3.6.0, choices -> choice_set
NetBox 3.6.x Breaking Changes
The
choicesarray field has been removed from the CustomField model. Any defined choices are automatically migrated to CustomFieldChoiceSets, accessible via the newchoice_setfield on the CustomField model.
Ansible NetBox Collection version
v3.14.0
Ansible version
ansible [core 2.15.2]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
NetBox version
v3.6.1
Python version
3.10
Steps to Reproduce
Execute an ansible playbook that defines a custom field using the select type and pass in choices
- name: Create a custom field of type select
netbox.netbox.netbox_custom_field:
netbox_url: http://netbox.local
netbox_token: thisIsMyToken
data:
name: A Custom Field
type: select
choices:
- Pass
- Fail
- Win
- Lose
Expected Behavior
- The playbook should correctly create the custom field of the appropriate type.
- Support the
Custom Field Choice Setsas of NetBox v3.6.0 - Have the ability to pass in a
Custom Field Choice Setto the modulenetbox.netbox.netbox_custom_field
Observed Behavior
The playbook errors out as this call is not yet supported in this library for NetBox v3.6.0+.
Any updates on this one, or possible workarounds?
Any updates on this one, or possible workarounds?
I have the same question
#1186 should resolve this? It is not part of a release yet, so please pull down the latest via Git and test
That only solves the lookup @sc68cal , right? This doesnt help with creating selection custom fields or creating the choice sets themselves.
A new module is needed for the latter part, afaics?
I have this fixed locally, but I need to fix up the documentation still. (and look into what else is needed re tests etc)