Virtual machine serializer does not require cluster assignment #2123

Closed
opened 2025-12-29 17:22:28 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Nov 14, 2018).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.4.7

Steps to Reproduce

Attempt to create a new virtual machine via the REST API with no cluster assignment:

curl -X POST \
-H "Authorization: Token <token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
http://localhost:8000/api/virtualization/virtual-machines/ \
--data '{"name": "test-vm1"}'

Expected Behavior

The response should indicate that the cluster field is required.

Observed Behavior

The request yields an IntegrityError exception.

Originally created by @jeremystretch on GitHub (Nov 14, 2018). ### Environment * Python version: 3.5.2 * NetBox version: 2.4.7 ### Steps to Reproduce Attempt to create a new virtual machine via the REST API with no cluster assignment: ``` curl -X POST \ -H "Authorization: Token <token>" \ -H "Content-Type: application/json" \ -H "Accept: application/json; indent=4" \ http://localhost:8000/api/virtualization/virtual-machines/ \ --data '{"name": "test-vm1"}' ``` ### Expected Behavior The response should indicate that the `cluster` field is required. ### Observed Behavior The request yields an `IntegrityError` exception.
adam added the type: bugstatus: accepted labels 2025-12-29 17:22:28 +01:00
adam closed this issue 2025-12-29 17:22:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2123