Closed embano1 closed 2 years ago
Current workaround seems to manually create session via SkipSessionAuth: true
and handling err = nsxt.GetDefaultHeaders(nsxClient)
You are correct @embano1, however fixing this would change behavior for users. Just to verify - are you seeing change of behavior due to recent PR https://github.com/vmware/go-vmware-nsxt/pull/48?
Thx!
You are correct @embano1, however fixing this would change behavior for users.
Agree, though I'd argue this change in behavior would be preferred for most users, can be documented and is an explicit opt-in for existing users of the package once they upgrade to this new version.
Just to verify - are you seeing change of behavior due to recent PR https://github.com/vmware/go-vmware-nsxt/pull/48?
Just started using the package (after the PR landed) so can't compare.
Thanks for your feedback. Since you are a fresh user, have you considered using https://github.com/vmware/vsphere-automation-sdk-go instead? That's an officially supported and up-to-date sdk. This repository, however, is not actively maintained and not recommended for new users.
Thx for the note, wasn't aware that this repo is supposed to be used only by existing library users.
I just checked the automation-sdk-go and tbh I'm going to stick with this library and my workarounds for now ,)
Describe the bug
Calling
nsxt.NewAPIClient(&nsxCfg)
with invalid username/password should fail. Instead a warning with a hardcoded logger (see #50 ) is printed:Reproduction steps
Expected behavior
nsxt.NewAPIClient(&nsxCfg)
with invalid username/password should return anerror
instead ofnil
error
.Additional context
No response