Skip to content

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
vaishutin pushed a commit to vaishutin/netbox-operator that referenced this pull request Aug 17, 2025
* add logic to update site of prefix in netbox

* add validation rule for site
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.

3 participants