netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.33k stars 2.6k forks source link

Change Virtualization Interfaces to not require being bound to Virtual Machines #18050

Closed AskskwBv8T2nrm4Qnj closed 2 days ago

AskskwBv8T2nrm4Qnj commented 2 days ago

NetBox version

v4.1.6

Feature type

Change to existing functionality

Triage priority

N/A

Proposed functionality

When creating an Interface in the Netbox web-interface Virtualization section, a hard-requirement is associating said Interface with a Virtual Machine. I want to request that said requirement becomes optional rather than required.

A soft-consequence of this change would be swapping positions of the "Virtual Machine" and "Name" fields in the "Add a new interface" web-interface form, so that the only required field: "Name", would be on top of the form. In addition I suppose the same thing should happen in the "Import" page of Interfaces.

Use case

In AWS and OpenStack, Interfaces may be created without being attached to Virtual Machines. Said Interfaces are objects to which an IP-address is bound directly. The Interface object can, at any point, be attached to a Virtual Machine or detached from a Virtual Machine while keeping the associated IP-address bound to the Interface object. This maps well to the binding Netbox allows between Interfaces and IP-addresses, the only problem there being that Netbox Virtualization Interfaces require being bound to Virtual Machines...

Furthermore, in AWS and OpenStack there exist Interfaces which are never bound to "Virtual Machines", such as DHCP-agents. DHCP-agents live in a customers' subnet, while being bound to a non-Virtual Machine Interface. There are additional 'services/agents' similar to DHCP-agents, and an Interface may be in certain states such as 'Down' or 'Reserved'. To provide capability for defining such mappings, information and states, my suggestion is to loosen the requirement of having Netbox Virtualization Interfaces be bound to a Virtual Machines.

Database changes

No response

External dependencies

No response

jeremystretch commented 2 days ago

I'm sorry but it sounds like you're trying to use this model for something very different from its intended purpose. The proposed change is not tenable.

You might consider starting a discussion to source ideas for achieving what you're trying to do.