Merge pull request #9966 from fatmcgav/openstack_update_gophercloud_vendor

vendor: Update github.com/gophercloud/gophercloud
This commit is contained in:
Joe Topjian 2016-11-08 19:40:02 -07:00 committed by GitHub
commit cfa4d9b63b
2 changed files with 11 additions and 6 deletions

View File

@ -145,7 +145,7 @@ type CreateOpts struct {
SecurityGroups []string `json:"-"` SecurityGroups []string `json:"-"`
// UserData contains configuration information or scripts to use upon launch. // 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:"-"` UserData []byte `json:"-"`
// AvailabilityZone in which to launch the server. // AvailabilityZone in which to launch the server.
@ -190,8 +190,13 @@ func (opts CreateOpts) ToServerCreateMap() (map[string]interface{}, error) {
} }
if opts.UserData != nil { if opts.UserData != nil {
encoded := base64.StdEncoding.EncodeToString(opts.UserData) var userData string
b["user_data"] = &encoded 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 { if len(opts.SecurityGroups) > 0 {

6
vendor/vendor.json vendored
View File

@ -1060,10 +1060,10 @@
"revisionTime": "2016-10-25T18:03:21Z" "revisionTime": "2016-10-25T18:03:21Z"
}, },
{ {
"checksumSHA1": "8QsTL/u0QRMoQE9lJSE55/3YKvg=", "checksumSHA1": "8rOLNDSqwz/DSKL1BoPqjtWSWAE=",
"path": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers", "path": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers",
"revision": "e3d6384a3714b335d075862e6eb0a681180643df", "revision": "21a44e132331d6d46ab4187411c85ced6b1a9963",
"revisionTime": "2016-10-25T18:03:21Z" "revisionTime": "2016-11-08T07:34:31Z"
}, },
{ {
"checksumSHA1": "1sVqsZBZBNhDXLY9XzjMkcOkcbg=", "checksumSHA1": "1sVqsZBZBNhDXLY9XzjMkcOkcbg=",