Skip to content

The device field on device-components (except InventoryItem) should not be writeable via. the API #11432

@kkthxbye-code

Description

@kkthxbye-code

NetBox version

v3.4.2

Python version

3.10

Steps to Reproduce

  1. Create a device with database id 1 and an interface with database id 1
  2. Create a device with database id 2
  3. Send the following request to the API:
    URL: http://127.0.0.1:8000/api/dcim/interfaces/1/
    JSON data:
{
  "device": 2
}

Expected Behavior

The interface should not be able to be moved to another device. We do not allow this in the UI. There are potential issue regarding cables and caching of paths.

Observed Behavior

The interface is moved to the other device.

We should disallow this for all devicecomponents except InventoryItem, as this is the way it works in the UI now.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for 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