We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Go example for list all enterprises contains couple mistakes. It should have the following changes:
list all enterprises
To avoid SSL error (invalide certificate) we should includ *Session.SetInsecureSkipVerify(true)
Also, err.Description is not a valid method in the bambou package.
Sample code should be rather more like this:
import ( "fmt" "os" "strconv" "github.com/nuagenetworks/vspk-go/vspk" ) var vsdURL = "https://localhost:8443" var vsdUser = "csproot" var vsdPass = "csproot" var vsdEnterprise = "csp" func main() { mysession, root := vspk.NewSession(vsdUser, vsdPass, vsdEnterprise, vsdURL) // Skip x509 Error mysession.SetInsecureSkipVerify(true) if err := mysession.Start(); err != nil { fmt.Println("Unable to connect to Nuage VSD: " + err.Message) //err.Description is not a valid method in bambou package. os.Exit(1) } enterprises, err := root.Enterprises(nil) if err != nil { fmt.Println("Unable to fetch enterprises: " + err.Message) //err.Description is not a valid method in bambou package. os.Exit(1) } fmt.Println("Number of enterprises retrieved: " + strconv.Itoa(len(enterprises))) for _, enterprise := range enterprises { fmt.Println(enterprise.Name) } }
Thanks for sharing the examples!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Go example for
list all enterprises
contains couple mistakes. It should have the following changes:To avoid SSL error (invalide certificate) we should includ *Session.SetInsecureSkipVerify(true)
Also, err.Description is not a valid method in the bambou package.
Sample code should be rather more like this:
Thanks for sharing the examples!
The text was updated successfully, but these errors were encountered: