Skip to content

[Bug]: Breaking changes in 3.6.0, choices -> choice_set #1069

@josh-d-smith

Description

@josh-d-smith

NetBox 3.6.x Breaking Changes

v3.6 Breaking Changes

The choices array field has been removed from the CustomField model. Any defined choices are automatically migrated to CustomFieldChoiceSets, accessible via the new choice_set field 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 Sets as of NetBox v3.6.0
  • Have the ability to pass in a Custom Field Choice Set to the module netbox.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+.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions