-
Notifications
You must be signed in to change notification settings - Fork 141
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
feat: add 'rd' and 'enforce_unique' fields to vrf #585
feat: add 'rd' and 'enforce_unique' fields to vrf #585
Conversation
Can you include |
Oops i forgot to test it and it was indeed worth adding a test, as it revealed a bug. func main() {
token := "example-token"
netboxHost := "localhost:8000"
transport := httptransport.New(netboxHost, client.DefaultBasePath, []string{"http"})
transport.DefaultAuthentication = httptransport.APIKeyAuth("Authorization", "header", "Token "+token)
c := client.New(transport, nil)
name := "test-vrf"
req := ipam.NewIpamVrfsCreateParams().WithData(&models.WritableVRF{
Name: &name,
EnforceUnique: false, // <- set to false here
ExportTargets: []int64{},
ImportTargets: []int64{},
Tags: []*models.NestedTag{},
})
res, err := c.Ipam.IpamVrfsCreate(req, nil)
if err != nil {
log.Fatalf("Cannot create site: %v", err)
}
log.Infof("res2: %v", res)
} And the Vrf created gets a |
As i don't need enforce_unique to be set to something else than true, I just removed it from this PR |
Nah, you can leave it in, I will do the required change later this week, I'm just really busy atm. Actually, I might just push the required changes to this branch. |
Perfect then, i added them back |
Add 'rd' and 'enforce_unique' fields to the vrf resource.