-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add User-Agent header to all API calls #566
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firs pass. LGTM
Added support for VCD 10.2
- what was change to make it work?
It was a change done previously by @dataclouder in go-vcloud-director (vmware/go-vcloud-director#327) however we have not included that note in terraform-provider-vcd changelog and I think it is quite important. |
Let's not forget to run full test before release then for this specific version |
This PR will use new govcd functionality to send HTTP User-Agent (introduced in vmware/go-vcloud-director#336).
The sample header
User-Agent: [terraform-provider-vcd/v2.9.0-16-gb1cfc7b5 (darwin/amd64; isProvider:true)]
(for stable version -User-Agent: [terraform-provider-vcd/v2.9.0 (darwin/amd64; isProvider:true)]
)Version is to be output of
git describe
. OS is described by GOOS and GOARCH.isProvider
is set ifSysorg==System
.git describe
is injected in during build time usinggo build -ldflags
flag inside Makefile.Note If user uses
go install
theBuildVersion
variable will remain default ("unset")In addition this PR bumps Travis config to use Go 1.15 for testing as this is the version used now.