Bug report criteria
What happened?
If you use a PrefixClaim using parentPrefixSelector with an invalid Tenant (a Tenant that doesn't exist in NetBox), the Event will show
The parent prefix was not able to be computed. no parent prefix can be obtained with the query conditions set in ParentPrefixSelector, err = <nil>, number of candidates = 0
See #90 (comment)
What did you expect to happen?
An error message such as invalid Tenant supplied should be returned.
How can we reproduce it (as minimally and precisely as possible)?
Use the following CR
apiVersion: netbox.dev/v1
kind: PrefixClaim
metadata:
name: prefixclaim-customfields-sample
spec:
tenant: "MY_TENANT that doesn't exist"
site: "DM-Akron"
preserveInNetbox: true
prefixLength: "/31"
parentPrefixSelector: # The keys and values are case-sensitive
environment: "PostProduction"
poolName: "Pool 1"
Netbox operator version
Latest on main (the issue was discovered on #90 before merging)
Netbox operator configuration (command line flags or environment variables)
No response
Relevant log output
No response
Anything else we need to know?
No response