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

Move Session model to use the NetBox core ASN model #99

Merged
merged 4 commits into from Sep 14, 2022

Conversation

christianpinger
Copy link
Contributor

ported @nahun's commit to latest k01ek/netbox-bgp@develop
Credits: Nathan Wheeler nathan.wheeler@zoom.us
nahun@6b870b0

NetBox v3.1 added a native ASN model. The plugin should utilize that model instead of a separate model that is specific to BGP.

Fixes #82

ported @nahun's commit to latest k01ek/netbox-bgp@develop
Credits: Nathan Wheeler <nathan.wheeler@zoom.us>
nahun@6b870b0
You must create an core ASN object (ipam.asn) for each ASN used in a
BGPSession. Otherwise migrations will fail.
@christianpinger
Copy link
Contributor Author

I've added data migrations for ASN objects.

A native ASN object must be created for every ASN used in a BGPSession, before running this migration. Afterwards every Session will reference to the native ASN object.

@k01ek
Copy link
Collaborator

k01ek commented Aug 19, 2022

Thanks @christianharendt and @nahun for your work, in next release I provide tool for migration plugin ASN objects to native NetBox ASN objects. So plugin ASN model will be removed later, I think in next minor release.

@christianpinger
Copy link
Contributor Author

Thanks @k01ek
I was also considering to create a native ASN object for each plugin ASN during migration, but the native ASN model has a mandatory field: RIR. I was unsure what to insert there as a safe default. Maybe the first RIR found or create a meta RIR "netbox-bgp"?

@k01ek
Copy link
Collaborator

k01ek commented Aug 25, 2022

@christianharendt yea, just create some default RIR. I think change RIR for ASN is easier than create all ASN numbers by hands.

@christianpinger
Copy link
Contributor Author

I've updated the code to be compatible with the latest develop commits

@k01ek k01ek merged commit 855ecde into netbox-community:develop Sep 14, 2022
@christianpinger christianpinger deleted the core_asn branch January 6, 2023 08:24
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.

None yet

2 participants