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 Tenancy support to tunnels #12

Merged
merged 4 commits into from
Jul 25, 2023

Conversation

p-rintz
Copy link
Contributor

@p-rintz p-rintz commented Jul 21, 2023

This PR adds support for tenancy to the tunnels.

I ran the tox tests, as well as extended the netbox tests with tenant support and ran those as well.

@robertlynch3
Copy link
Owner

Tenancy makes perfect sense.

Looks like the CI jobs are failing.

IntegrityError: null value in column "tenant_id" of relation 
"netbox_tunnels2_tunnel" violates not-null constraint
DETAIL:  Failing row contains (3, 2023-07-21 16:53:31.528302+00, 2023-07-21 
16:53:31.528316+00, {}, Test Tunnel3, pending-config, null, null, , , , 1, 2, 
null, null, 1, null).


----------------------------------------------------------------------
Ran 2 tests in 1.228s

FAILED (errors=1)
Destroying test database for alias 'default'...
Error: Process completed with exit code 1.

I will see if I can dive into this.

@p-rintz
Copy link
Contributor Author

p-rintz commented Jul 21, 2023

Hm, that looks like the error I got before I made tenancy optional in the model.
Which is strange, since it definitely is optional now.

Oh, I might have forgotten to copy the migrations, when they likely were changed afterwards.

I can look at that tomorrow if you haven’t done that yet.

@p-rintz
Copy link
Contributor Author

p-rintz commented Jul 21, 2023

Couldnt help myself and looked at it just now.
It was the migrations.

@robertlynch3
Copy link
Owner

I resolved the migration file issue in 424bce3.

@p-rintz
Copy link
Contributor Author

p-rintz commented Jul 22, 2023

I added the "new" selectors to forms on the A&B side of VRFs&Devices, and removed the tenant query param from the B side, as I dont think it fits very well there, by default.

With the selectors, it gets way less confusing to find a specific device/vrf.
This is especially true for the B side where the tenant may be different than the A side.

@robertlynch3 robertlynch3 merged commit b77dd70 into robertlynch3:master Jul 25, 2023
@p-rintz p-rintz deleted the tenant-support branch July 25, 2023 15:29
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

Successfully merging this pull request may close these issues.

2 participants