Can't Remove Untagged Vlan from interface with API #4285

Closed
opened 2025-12-29 18:34:26 +01:00 by adam · 2 comments
Owner

Originally created by @DCAuto on GitHub (Nov 19, 2020).

Environment

  • Python version: 2.7.5
  • NetBox version: v2.9.7

Steps to Reproduce

Updating with Ansible uri module:
''' url: "{{ netbox_url }}/api/dcim/interfaces/{{ INTERFACE.id }}/"
method: PATCH
return_content: yes
status_code: 200
headers:
accept: "application/json"
Authorization: "Token {{ netbox_token }}"
body:
device: 10
name: et-0/0/0
type: virtual
untagged_vlan: null
body_format: json
'''
I have tried several things for the untagged_vlan: null, 0, False all return errors.

Expected Behavior

Remove the currently configured untagged vlan.

Observed Behavior

Various errors not allowing untagged_vlan to be removed.

Originally created by @DCAuto on GitHub (Nov 19, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/g/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 2.7.5 * NetBox version: v2.9.7 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce Updating with Ansible uri module: ''' url: "{{ netbox_url }}/api/dcim/interfaces/{{ INTERFACE.id }}/" method: PATCH return_content: yes status_code: 200 headers: accept: "application/json" Authorization: "Token {{ netbox_token }}" body: device: 10 name: et-0/0/0 type: virtual untagged_vlan: null body_format: json ''' I have tried several things for the untagged_vlan: null, 0, False all return errors. <!-- What did you expect to happen? --> ### Expected Behavior Remove the currently configured untagged vlan. <!-- What happened instead? --> ### Observed Behavior Various errors not allowing untagged_vlan to be removed.
adam closed this issue 2025-12-29 18:34:26 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 19, 2020):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

@jeremystretch commented on GitHub (Nov 19, 2020): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided [here](https://github.com/netbox-community/netbox/issues/new/choose). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) instead.
Author
Owner

@DCAuto commented on GitHub (Nov 20, 2020):

So I suppose this could be a documentation issue then. I'm not getting any traction on the forum and there is nothing in the docs about what the API expects to remove a field. Is this possible to do?

Thanks,
Austin Lewis


Network Systems Specialist
Penn State IT
Data Centers
Office: (814)867-6301
Cell: (814)933-8697


From: Jeremy Stretch notifications@github.com
Sent: Thursday, November 19, 2020 1:00 PM
To: netbox-community/netbox netbox@noreply.github.com
Cc: Lewis, Austin adl20@psu.edu; Author author@noreply.github.com
Subject: Re: [netbox-community/netbox] Can't Remove Untagged Vlan from interface with API (#5359)

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided herehttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2Fnew%2Fchoose&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355165243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KY0dJtAhtTBxYs2oxJkeebWVXknlnpwkVTCH8GDK4DI%3D&reserved=0. For general discussion, questions, or assistance with installation issues, please post to our mailing listhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!forum%2Fnetbox-discuss&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355175239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dBv34Vi7NYWGvLxEL0xn2FDFoga%2BcJbLy29qNtgOqOU%3D&reserved=0 instead.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2F5359%23issuecomment-730542118&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355185230%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ScdAxLFphg2vlil5LYFND3gVs1jJ2xtVKvPmYpMxKak%3D&reserved=0, or unsubscribehttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKE3KA2K5VOGCQMUN2ARZDDSQVMMBANCNFSM4T3WASRA&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355185230%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BUvcxBf82cbykanZRi946T6%2BjLq5Myx5WLpOzGqVpTA%3D&reserved=0.

@DCAuto commented on GitHub (Nov 20, 2020): So I suppose this could be a documentation issue then. I'm not getting any traction on the forum and there is nothing in the docs about what the API expects to remove a field. Is this possible to do? Thanks, Austin Lewis __________________________ Network Systems Specialist Penn State IT Data Centers Office: (814)867-6301 Cell: (814)933-8697 ________________________________ From: Jeremy Stretch <notifications@github.com> Sent: Thursday, November 19, 2020 1:00 PM To: netbox-community/netbox <netbox@noreply.github.com> Cc: Lewis, Austin <adl20@psu.edu>; Author <author@noreply.github.com> Subject: Re: [netbox-community/netbox] Can't Remove Untagged Vlan from interface with API (#5359) Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2Fnew%2Fchoose&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355165243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KY0dJtAhtTBxYs2oxJkeebWVXknlnpwkVTCH8GDK4DI%3D&reserved=0>. For general discussion, questions, or assistance with installation issues, please post to our mailing list<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%23!forum%2Fnetbox-discuss&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355175239%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dBv34Vi7NYWGvLxEL0xn2FDFoga%2BcJbLy29qNtgOqOU%3D&reserved=0> instead. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnetbox-community%2Fnetbox%2Fissues%2F5359%23issuecomment-730542118&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355185230%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ScdAxLFphg2vlil5LYFND3gVs1jJ2xtVKvPmYpMxKak%3D&reserved=0>, or unsubscribe<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKE3KA2K5VOGCQMUN2ARZDDSQVMMBANCNFSM4T3WASRA&data=04%7C01%7Cadl20%40psu.edu%7Cd5281a7db8f445dc4a6d08d88cb5020d%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637414056355185230%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BUvcxBf82cbykanZRi946T6%2BjLq5Myx5WLpOzGqVpTA%3D&reserved=0>.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4285