Merge pull request #9966 from fatmcgav/openstack_update_gophercloud_vendor
vendor: Update github.com/gophercloud/gophercloud
This commit is contained in:
commit
cfa4d9b63b
11
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
generated
vendored
11
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
generated
vendored
|
@ -145,7 +145,7 @@ type CreateOpts struct {
|
|||
SecurityGroups []string `json:"-"`
|
||||
|
||||
// UserData contains configuration information or scripts to use upon launch.
|
||||
// Create will base64-encode it for you.
|
||||
// Create will base64-encode it for you, if it isn't already.
|
||||
UserData []byte `json:"-"`
|
||||
|
||||
// AvailabilityZone in which to launch the server.
|
||||
|
@ -190,8 +190,13 @@ func (opts CreateOpts) ToServerCreateMap() (map[string]interface{}, error) {
|
|||
}
|
||||
|
||||
if opts.UserData != nil {
|
||||
encoded := base64.StdEncoding.EncodeToString(opts.UserData)
|
||||
b["user_data"] = &encoded
|
||||
var userData string
|
||||
if _, err := base64.StdEncoding.DecodeString(string(opts.UserData)); err != nil {
|
||||
userData = base64.StdEncoding.EncodeToString(opts.UserData)
|
||||
} else {
|
||||
userData = string(opts.UserData)
|
||||
}
|
||||
b["user_data"] = &userData
|
||||
}
|
||||
|
||||
if len(opts.SecurityGroups) > 0 {
|
||||
|
|
|
@ -1060,10 +1060,10 @@
|
|||
"revisionTime": "2016-10-25T18:03:21Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "8QsTL/u0QRMoQE9lJSE55/3YKvg=",
|
||||
"checksumSHA1": "8rOLNDSqwz/DSKL1BoPqjtWSWAE=",
|
||||
"path": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers",
|
||||
"revision": "e3d6384a3714b335d075862e6eb0a681180643df",
|
||||
"revisionTime": "2016-10-25T18:03:21Z"
|
||||
"revision": "21a44e132331d6d46ab4187411c85ced6b1a9963",
|
||||
"revisionTime": "2016-11-08T07:34:31Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "1sVqsZBZBNhDXLY9XzjMkcOkcbg=",
|
||||
|
|
Loading…
Reference in New Issue