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

Add field/model for linking Virtual Circuits to Circuits #43

Open
tyler-8 opened this issue Oct 16, 2020 · 2 comments
Open

Add field/model for linking Virtual Circuits to Circuits #43

tyler-8 opened this issue Oct 16, 2020 · 2 comments

Comments

@tyler-8
Copy link

tyler-8 commented Oct 16, 2020

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.

@hoanhan101
Copy link
Contributor

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

@tyler-8
Copy link
Author

tyler-8 commented Oct 20, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants