Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant create vm mac-address via api #18363

Closed
ITJamie opened this issue Jan 9, 2025 · 0 comments · Fixed by #18367
Closed

cant create vm mac-address via api #18363

ITJamie opened this issue Jan 9, 2025 · 0 comments · Fixed by #18367
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@ITJamie
Copy link
Contributor

ITJamie commented Jan 9, 2025

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.2.1

Python Version

3.10

Steps to Reproduce

  1. create an interface on a vm
  2. attempt to use the api to create a mac address linked to the interface id (curl example from swagger)
curl -X 'POST' \
  'https://netbox.dev.domain/api/dcim/mac-addresses/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFTOKEN:{removed}' \
  -d '{
  "mac_address": "BC:24:11:7E:0E:BF",
  "assigned_object_type": "virtualization.vminterface",
  "assigned_object_id": 1
}'

Expected Behavior

mac address gets created

Observed Behavior

400 response:

Error: Bad Request

Response body
Download
{
  "assigned_object_id": [
    "This field cannot be null."
  ]
}
@ITJamie ITJamie added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Jan 9, 2025
@jeremystretch jeremystretch self-assigned this Jan 9, 2025
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation severity: medium Results in substantial degraded or broken functionality for specfic workflows and removed status: needs triage This issue is awaiting triage by a maintainer labels Jan 9, 2025
@jeremystretch jeremystretch marked this as a duplicate of #18415 Jan 16, 2025
bctiemann pushed a commit that referenced this issue Jan 28, 2025
…API (#18367)

* Fixes #18363: Fix assignment of MAC addresses to interfaces via REST API

* Add missing API & view tests
bctiemann pushed a commit that referenced this issue Jan 29, 2025
…API (#18367)

* Fixes #18363: Fix assignment of MAC addresses to interfaces via REST API

* Add missing API & view tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants