Prepend a string to the User-Agent.

For both OpenStack and Rackspace drivers.

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
This commit is contained in:
Ash Wilson
2015-03-13 14:26:46 -04:00
parent a963b90ea0
commit 549afa8ac5

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}