Skip to content

Create of VLAN using the API and /available-vlans/ fails when role or tenant is present #13440

@einaram

Description

@einaram

NetBox version

v3.6-beta1

Python version

3.10

Steps to Reproduce

  1. Create a tenant and note the ID
  2. Create a VLAN group and note the ID
  3. Run a POST to `api/ipam/vlan-groups//available-vlans/ like:

curl -X 'POST' \
  'https://demo.netbox.dev/api/ipam/vlan-groups/2/available-vlans/' \
  -d '{
  "name": "a_VLAN_name",
  "tenant": 2
}'

Expected Behavior

A new VLAN should be created

Observed Behavior

Bad request is returned with an error message that indicates that the deserialization used the tenant object instead of the ID:

  "tenant": [
    "Related objects must be referenced by numeric ID or by dictionary of attributes. Received an unrecognized value: Strickland Propane"
  ]
}

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: under reviewFurther discussion is needed to determine this issue's scope and/or implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions