build(deps): bump github.com/gophercloud/gophercloud

Bumps [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) from 0.20.0 to 0.22.0.
- [Release notes](https://github.com/gophercloud/gophercloud/releases)
- [Changelog](https://github.com/gophercloud/gophercloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gophercloud/gophercloud/compare/v0.20.0...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/gophercloud/gophercloud
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2021-10-08 04:41:23 +00:00 committed by Tom Gundersen
parent 963688eb07
commit a9f36188ee
9 changed files with 74 additions and 11 deletions

2
go.mod
View file

@ -29,7 +29,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.5.6
github.com/google/uuid v1.3.0
github.com/gophercloud/gophercloud v0.20.0
github.com/gophercloud/gophercloud v0.22.0
github.com/jackc/pgtype v1.8.1
github.com/jackc/pgx/v4 v4.13.0
github.com/julienschmidt/httprouter v1.3.0

4
go.sum
View file

@ -305,8 +305,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0 h1:6DWmvNpomjL1+3liNSZbVns3zsYzzCjm6pRBO1tLeso=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/gophercloud/gophercloud v0.20.0 h1:1+4jrsjVhdX5omlAo4jkmFc6ftLbuXLzgFo4i6lH+Gk=
github.com/gophercloud/gophercloud v0.20.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
github.com/gophercloud/gophercloud v0.22.0 h1:9lFISNLafZcecT0xUveIMt3IafexC6DIV9ek1SZdSMw=
github.com/gophercloud/gophercloud v0.22.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=

View file

@ -1,4 +1,44 @@
## 0.21.0 (Unreleased)
## 0.23.0 (Unreleased)
## 0.22.0 (October 7, 2021)
BREAKING CHANGES
* The types of several Object Storage Update fields have been changed to pointers in order to allow the value to be unset via the HTTP headers:
* `objectstorage/v1/accounts.UpdateOpts.ContentType`
* `objectstorage/v1/accounts.UpdateOpts.DetectContentType`
* `objectstorage/v1/containers.UpdateOpts.ContainerRead`
* `objectstorage/v1/containers.UpdateOpts.ContainerSyncTo`
* `objectstorage/v1/containers.UpdateOpts.ContainerSyncKey`
* `objectstorage/v1/containers.UpdateOpts.ContainerWrite`
* `objectstorage/v1/containers.UpdateOpts.ContentType`
* `objectstorage/v1/containers.UpdateOpts.DetectContentType`
* `objectstorage/v1/objects.UpdateOpts.ContentDisposition`
* `objectstorage/v1/objects.UpdateOpts.ContentEncoding`
* `objectstorage/v1/objects.UpdateOpts.ContentType`
* `objectstorage/v1/objects.UpdateOpts.DeleteAfter`
* `objectstorage/v1/objects.UpdateOpts.DeleteAt`
* `objectstorage/v1/objects.UpdateOpts.DetectContentType`
BUG FIXES
* Fixed issue with not being able to unset Object Storage values via HTTP headers [GH-2218](https://github.com/gophercloud/gophercloud/pull/2218)
IMPROVEMENTS
* Added `compute/v2/servers.Server.ServerGroups` [GH-2217](https://github.com/gophercloud/gophercloud/pull/2217)
* Added `imageservice/v2/images.ReplaceImageProtected` to allow the `protected` field to be updated [GH-2221](https://github.com/gophercloud/gophercloud/pull/2221)
* More details added to the 404/Not Found error message [GH-2223](https://github.com/gophercloud/gophercloud/pull/2223)
* Added `openstack/baremetal/v1/nodes.CreateSubscriptionOpts.HttpHeaders` [GH-2224](https://github.com/gophercloud/gophercloud/pull/2224)
## 0.21.0 (September 14, 2021)
IMPROVEMENTS
* Added `blockstorage/extensions/volumehost` [GH-2212](https://github.com/gophercloud/gophercloud/pull/2212)
* Added `loadbalancer/v2/listeners.CreateOpts.Tags` [GH-2214](https://github.com/gophercloud/gophercloud/pull/2214)
* Added `loadbalancer/v2/listeners.UpdateOpts.Tags` [GH-2214](https://github.com/gophercloud/gophercloud/pull/2214)
* Added `loadbalancer/v2/listeners.Listener.Tags` [GH-2214](https://github.com/gophercloud/gophercloud/pull/2214)
## 0.20.0 (August 10, 2021)

View file

@ -179,7 +179,11 @@ func (e ErrDefault403) Error() string {
return e.choseErrString()
}
func (e ErrDefault404) Error() string {
return "Resource not found"
e.DefaultErrString = fmt.Sprintf(
"Resource not found: [%s %s], error message: %s",
e.Method, e.URL, e.Body,
)
return e.choseErrString()
}
func (e ErrDefault405) Error() string {
return "Method not allowed"

View file

@ -221,6 +221,12 @@ type Server struct {
// Tags is a slice/list of string tags in a server.
// The requires microversion 2.26 or later.
Tags *[]string `json:"tags"`
// ServerGroups is a slice of strings containing the UUIDs of the
// server groups to which the server belongs. Currently this can
// contain at most one entry.
// New in microversion 2.71
ServerGroups *[]string `json:"server_groups"`
}
type AttachedVolume struct {

View file

@ -373,6 +373,20 @@ func (r ReplaceImageMinRam) ToImagePatchMap() map[string]interface{} {
}
}
// ReplaceImageProtected represents an updated protected property request.
type ReplaceImageProtected struct {
NewProtected bool
}
// ToImagePatchMap assembles a request body based on ReplaceImageProtected
func (r ReplaceImageProtected) ToImagePatchMap() map[string]interface{} {
return map[string]interface{}{
"op": "replace",
"path": "/protected",
"value": r.NewProtected,
}
}
// UpdateOp represents a valid update operation.
type UpdateOp string

View file

@ -445,6 +445,9 @@ func BuildHeaders(opts interface{}) (map[string]string, error) {
// if the field is set, add it to the slice of query pieces
if !isZero(v) {
if v.Kind() == reflect.Ptr {
v = v.Elem()
}
switch v.Kind() {
case reflect.String:
optsMap[tags[0]] = v.String()

View file

@ -408,11 +408,7 @@ func (client *ProviderClient) doRequest(method, url string, options *RequestOpts
if options.MoreHeaders != nil {
for k, v := range options.MoreHeaders {
if v != "" {
req.Header.Set(k, v)
} else {
req.Header.Del(k)
}
req.Header.Set(k, v)
}
}

2
vendor/modules.txt vendored
View file

@ -195,7 +195,7 @@ github.com/google/uuid
github.com/googleapis/gax-go/v2
github.com/googleapis/gax-go/v2/apierror
github.com/googleapis/gax-go/v2/apierror/internal/proto
# github.com/gophercloud/gophercloud v0.20.0
# github.com/gophercloud/gophercloud v0.22.0
## explicit
github.com/gophercloud/gophercloud
github.com/gophercloud/gophercloud/openstack