Skip to content

Conversation

@bruelea
Copy link
Collaborator

@bruelea bruelea commented Jun 26, 2025

This PR fixes a panic that occurred if now matching parent prefix was found for a prefixclaim.

@gdask
Copy link

gdask commented Jun 27, 2025

It looks fine.
A regression test was done:

apiVersion: netbox.dev/v1 kind: PrefixClaim metadata: labels: app.kubernetes.io/name: netbox-operator app.kubernetes.io/managed-by: kustomize name: prefixclaim-parentprefixselector-sample spec: tenant: "MY_TENANT" site: "DM-Akron" description: "some description" comments: "your comments" preserveInNetbox: true prefixLength: "/31" parentPrefixSelector: tenant: "MY_TENANT" family: "IPv4" environment: "Home" poolName: "Pool 1"

After the fix an error "no parent prefix found matching the parenPrefixSelector" is thrown instead of a panic.

@bruelea bruelea merged commit 46310fa into main Jun 27, 2025
11 checks passed
vaishutin pushed a commit to vaishutin/netbox-operator that referenced this pull request Aug 17, 2025
…x-community#346)

distinguish if error occurd or if no matching prefix was found
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.

4 participants