Skip to content

netbox_device_interface - type or form_factor not accepted #208

Closed
@bsmeding

Description

@bsmeding
ISSUE TYPE
  • Bug Report
SOFTWARE VERSIONS
Ansible:

ansible 2.9.2

Netbox:

b7a37e8cbe63 (v2.8.4)

Collection:

0.2.1

SUMMARY

The module netbox_device_interface is not accepting the entry: 'type' for media type. Formally known as 'form_factor'. But changed by Netbox version 2.7.
Only the type is not accepted as the module only accept the old 'form_factor'.

"Unsupported parameters for (netbox.netbox.netbox_device_interface) module: type found in data. Supported parameters include: description, device, enabled, form_factor, lag, mac_address, mgmt_only, mode, mtu, name, tagged_vlans, tags, untagged_vlan"}

Only when switching back to form_factor, it works only once. When running second time the error shows:
"msg": "form_factor does not exist on existing object. Check to make sure valid field."}

STEPS TO REPRODUCE
    - name: Check physical interfaces
      netbox.netbox.netbox_device_interface:
        netbox_url: "{{ netbox_url }}"
        netbox_token: "{{ netbox_token }}"
        data:
          device: test-device-01
          name: GigabitEthernet2/13
          type: 1000BASE-T (1GE)
          #form_factor: 1000BASE-T (1GE)
        state: present
EXPECTED RESULTS

OK (Ansible interface setting correct) or Changed:

ACTUAL RESULTS

Error that even the option 'type' is not valid otherwise when using 'form_factor' that the form_factor can only be set on first creation so it is not idempotent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions