Merge pull request #780 from smashwilson/set-useragent

Set the User-Agent for OpenStack and Rackspace drivers
This commit is contained in:
Evan Hazlett 2015-03-24 05:17:45 -07:00
commit 98dc91a6d8
1 changed files with 4 additions and 0 deletions

View File

@ -2,9 +2,11 @@ package openstack
import (
"crypto/tls"
"fmt"
"net/http"
log "github.com/Sirupsen/logrus"
"github.com/docker/machine/version"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/openstack"
"github.com/rackspace/gophercloud/openstack/compute/v2/extensions/keypairs"
@ -416,6 +418,8 @@ func (c *GenericClient) Authenticate(d *Driver) error {
return err
}
provider.UserAgent.Prepend(fmt.Sprintf("docker-machine/v%s", version.VERSION))
if d.Insecure {
// Configure custom TLS settings.
config := &tls.Config{InsecureSkipVerify: true}