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

Fix: add logic to update site of prefix in netbox #107

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

bruelea
Copy link
Collaborator

@bruelea bruelea commented Oct 25, 2024

Currently, the site that is set in a prefixclaim CR is not updated in NetBox. This PR focuses on fixing the underlying logic to ensure accurate updates.

Using the go-netbox client the site is not removed from the resource in NetBox with the IpamPrefixesUpdate function. To avoid inconsistent state between the Prefix CR and the Prefix Resource in NetBox a validation rule was added to the prefix type which does not allow the deletion of the site field once it was created.

@bruelea bruelea self-assigned this Oct 25, 2024
@bruelea bruelea force-pushed the fix/add-site-to-resource-in-netbox branch from 7568285 to 06d0221 Compare October 30, 2024 07:15
@henrybear327 henrybear327 force-pushed the fix/add-site-to-resource-in-netbox branch from 06d0221 to cca5ea8 Compare November 8, 2024 08:25
@bruelea bruelea force-pushed the fix/add-site-to-resource-in-netbox branch from cca5ea8 to b82870c Compare November 8, 2024 08:41
@henrybear327 henrybear327 force-pushed the fix/add-site-to-resource-in-netbox branch from b82870c to 27973d4 Compare November 11, 2024 10:17
@henrybear327 henrybear327 force-pushed the fix/add-site-to-resource-in-netbox branch from 27973d4 to f521fd9 Compare November 11, 2024 12:39
@bruelea bruelea merged commit 3282272 into main Nov 11, 2024
5 checks passed
@henrybear327 henrybear327 deleted the fix/add-site-to-resource-in-netbox branch November 11, 2024 13:29
@henrybear327 henrybear327 restored the fix/add-site-to-resource-in-netbox branch November 11, 2024 13:30
@henrybear327 henrybear327 deleted the fix/add-site-to-resource-in-netbox branch November 11, 2024 13:31
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