netbox-virtual-circuit-plugin icon indicating copy to clipboard operation
netbox-virtual-circuit-plugin copied to clipboard

Add field/model for linking Virtual Circuits to Circuits

Open tyler-8 opened this issue 5 years ago • 2 comments

I would find a ton of value in being able to link the virtual circuit model to a physical "Circuit" model from NetBox.

Just a rough draft idea of what that could look like:

class VirtualCircuitPhysicalCircuit(ChangeLoggedModel):
    """Virtual Circuit to Physical Circuit relationship."""

    virtual_circuit = models.ForeignKey(
        to=VirtualCircuit,
        on_delete=models.CASCADE,
        related_name='circuits',
        verbose_name='Virtual Circuit',
    )
    circuit = models.OneToOneField(
        to=Circuit,
        on_delete=models.CASCADE,
        related_name='circuit_of',
        verbose_name='Circuit',
    )

Happy to have more discussion around the idea.

tyler-8 avatar Oct 16 '20 19:10 tyler-8

May I ask what are your use cases? Are you using any workaround for this and seeking a better solution?

hoanhan101 avatar Oct 20 '20 17:10 hoanhan101

I have X numbers of sites, with 2-4 circuits at each, and only one of those has 'virtual' circuits riding across it, in the form of multiple VLANs+Prefixes. Those services are directly tied to the physical circuit so being able to track them all together would be very handy.

Right now I'm using a combination of tags to help model the relationship between the VLANs/virtual circuits & physical circuit, but it's not ideal and doesn't provide any concrete linkage between them.

tyler-8 avatar Oct 20 '20 18:10 tyler-8