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

error no value given for required property interface_count #182

Open
yourh3ro opened this issue Jul 25, 2024 · 3 comments
Open

error no value given for required property interface_count #182

yourh3ro opened this issue Jul 25, 2024 · 3 comments

Comments

@yourh3ro
Copy link

I was just trying to make it work.

package main

import (
	"context"
	"log"

	"github.com/netbox-community/go-netbox/v4"
)

func main() {
	ctx := context.Background()
	c := netbox.NewAPIClientFor("https://netbox.demo.com", "88x7agsxxyxuhbx8iyg")

	res, _, err := c.VirtualizationAPI.VirtualizationVirtualMachinesList(ctx).Limit(1).Execute()

	if err != nil {
		log.Fatal(err)
	}

	log.Printf("%v", res.Results)
}

I get an error every time

2024/07/25 23:03:53 no value given for required property interface_count
exit status 1

I tried to follow the instructions and add

res, _, err := c.VirtualizationAPI.VirtualizationVirtualMachinesList(ctx).InterfaceCount([]int32{0}).Limit(1).Execute()

But I got the same error

@lucian-tx
Copy link

It seems that the latest release is completely broken 😞

@edualb
Copy link

edualb commented Oct 9, 2024

I don't know if it helps but I rollback to version v3.7.7-0 where has a similar code as v4.0.3-0 and it worked in my context.

https://github.com/netbox-community/go-netbox/tree/v3.7.7-0

@vlaborie
Copy link

I think this the same problem from #177

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

No branches or pull requests

4 participants