Merge pull request #52910 from FengyunPan/volume-v3

Automatic merge from submit-queue (batch tested with PRs 56094, 52910, 55953, 56405, 56415). 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>.

Support VolumeV3 for OpenStack cloud Provider

Currently OpenStack supports Cinder v3 API, let Kubernetes support
it too.

Fix #52877

**Release note**:
```release-note
OpenStack cloud provider supports Cinder v3 API.
```

Kubernetes-commit: ba4b07a431a71f93d43cd7d58bcf9938a76fcb62
This commit is contained in:
Kubernetes Publisher 2017-11-27 16:04:22 -08:00
commit b59eb049cd
3 changed files with 716 additions and 710 deletions

120
Godeps/Godeps.json generated
View File

@ -172,31 +172,31 @@
},
{
"ImportPath": "github.com/gophercloud/gophercloud",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
"Rev": "54086d6c81b90e91e1d52b866ee726baf5cbe2b1"
"Rev": "db5f840b1d1a595280d643defc09ce277996959e"
},
{
"ImportPath": "github.com/gregjones/httpcache",
@ -488,215 +488,215 @@
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "65ea0794289ccbf04d9145bb1d7b57dc8127ebb6"
"Rev": "a04e753f5223cf882db01ac64212682ea28767b4"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/common",

View File

@ -308,8 +308,12 @@ func NewBlockStorageV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
return initClientOpts(client, eo, "volumev2")
}
// NewSharedFileSystemV2 creates a ServiceClient that may be used to access the
// v2 shared file system service.
// NewBlockStorageV3 creates a ServiceClient that may be used to access the v3 block storage service.
func NewBlockStorageV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "volumev3")
}
// NewSharedFileSystemV2 creates a ServiceClient that may be used to access the v2 shared file system service.
func NewSharedFileSystemV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "sharev2")
}

View File

@ -114,6 +114,8 @@ func (client *ServiceClient) setMicroversionHeader(opts *RequestOpts) {
opts.MoreHeaders["X-OpenStack-Nova-API-Version"] = client.Microversion
case "sharev2":
opts.MoreHeaders["X-OpenStack-Manila-API-Version"] = client.Microversion
case "volume":
opts.MoreHeaders["X-OpenStack-Volume-API-Version"] = client.Microversion
}
if client.Type != "" {