Merge pull request #55657 from dims/update-gophercloud-for-1.9

Automatic merge from submit-queue (batch tested with PRs 55657, 54758, 47584, 55758, 55651). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update Gophercloud dependency for reauth problem

**What this PR does / why we need it**:

Fixes picked up from gophercloud:
443743e883...0b6b13c4dd

Including the one for endless loop on reauth:
https://github.com/gophercloud/gophercloud/pull/604

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #55656

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 08659652a2fa3c3f7ecbe91c591a5021f343c355
This commit is contained in:
Kubernetes Publisher 2017-11-15 23:57:19 -08:00
commit 8fa1ff825c
6 changed files with 726 additions and 705 deletions

1400
Godeps/Godeps.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,2 @@
**/*.swp **/*.swp
.idea

12
vendor/github.com/gophercloud/gophercloud/.zuul.yaml generated vendored Normal file
View File

@ -0,0 +1,12 @@
- project:
name: gophercloud/gophercloud
check:
jobs:
- gophercloud-unittest
- gophercloud-acceptance-test
recheck-mitaka:
jobs:
- gophercloud-acceptance-test-mitaka
recheck-pike:
jobs:
- gophercloud-acceptance-test-pike

View File

@ -346,3 +346,11 @@ func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
sc.ResourceBase = sc.Endpoint + "v2/" sc.ResourceBase = sc.Endpoint + "v2/"
return sc, err return sc, err
} }
// NewLoadBalancerV2 creates a ServiceClient that may be used to access the v2
// load balancer service.
func NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
sc, err := initClientOpts(client, eo, "load-balancer")
sc.ResourceBase = sc.Endpoint + "v2.0/"
return sc, err
}

View File

@ -22,7 +22,6 @@ var (
// Depending on the pagination strategy of a particular resource, there may be an additional subinterface that the result type // Depending on the pagination strategy of a particular resource, there may be an additional subinterface that the result type
// will need to implement. // will need to implement.
type Page interface { type Page interface {
// NextPageURL generates the URL for the page of data that follows this collection. // NextPageURL generates the URL for the page of data that follows this collection.
// Return "" if no such page exists. // Return "" if no such page exists.
NextPageURL() (string, error) NextPageURL() (string, error)

View File

@ -145,10 +145,6 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
} }
req.Header.Set("Accept", applicationJSON) req.Header.Set("Accept", applicationJSON)
for k, v := range client.AuthenticatedHeaders() {
req.Header.Add(k, v)
}
// Set the User-Agent header // Set the User-Agent header
req.Header.Set("User-Agent", client.UserAgent.Join()) req.Header.Set("User-Agent", client.UserAgent.Join())
@ -162,6 +158,11 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
} }
} }
// get latest token from client
for k, v := range client.AuthenticatedHeaders() {
req.Header.Set(k, v)
}
// Set connection parameter to close the connection immediately when we've got the response // Set connection parameter to close the connection immediately when we've got the response
req.Close = true req.Close = true