From adaade6a22571745432ff7aaa32b6f71b68a3ae2 Mon Sep 17 00:00:00 2001 From: "stuart.warren" Date: Tue, 9 May 2017 15:29:58 +0100 Subject: [PATCH 1/2] update gophercloud/gophercloud dependency Why: * fixes #44461 --- Godeps/Godeps.json | 66 +++++++++---------- .../emicklei/go-restful-swagger12/BUILD | 5 +- .../go-restful-swagger12/test_package/BUILD | 16 ----- .../gophercloud/gophercloud/README.md | 2 +- .../gophercloud/gophercloud/auth_options.go | 20 +++--- .../github.com/gophercloud/gophercloud/doc.go | 8 ++- .../blockstorage/v1/apiversions/urls.go | 2 +- .../gophercloud/openstack/client.go | 13 ++++ .../openstack/compute/v2/flavors/requests.go | 41 ++++++++++++ .../openstack/compute/v2/flavors/results.go | 47 +++++++------ .../openstack/compute/v2/flavors/urls.go | 4 ++ .../openstack/compute/v2/images/results.go | 4 +- .../openstack/compute/v2/servers/requests.go | 3 +- .../openstack/compute/v2/servers/results.go | 22 ++++--- .../extensions/layer3/floatingips/requests.go | 1 + .../extensions/layer3/floatingips/results.go | 3 + .../v2/extensions/security/rules/requests.go | 32 +++++++-- .../gophercloud/pagination/pager.go | 21 +++--- vendor/github.com/heketi/heketi/AUTHORS | 1 + 19 files changed, 185 insertions(+), 126 deletions(-) delete mode 100644 vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 46b0569dc3e..29905390a6b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1454,123 +1454,123 @@ }, { "ImportPath": "github.com/gophercloud/gophercloud", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/common/extensions", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/flavors", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/images", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/compute/v2/servers", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/members", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/monitors", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/pools", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas/vips", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/networking/v2/ports", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/pagination", - "Rev": "b06120d13e262ceaf890ef38ee30898813696af0" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gorilla/context", @@ -1655,17 +1655,17 @@ }, { "ImportPath": "github.com/heketi/heketi/client/api/go-client", - "Comment": "2017-03-08T23:29:50Z", + "Comment": "v4.0.0-22-g7a54b6f", "Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2" }, { "ImportPath": "github.com/heketi/heketi/pkg/glusterfs/api", - "Comment": "2017-03-08T23:29:50Z", + "Comment": "v4.0.0-22-g7a54b6f", "Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2" }, { "ImportPath": "github.com/heketi/heketi/pkg/utils", - "Comment": "2017-03-08T23:29:50Z", + "Comment": "v4.0.0-22-g7a54b6f", "Rev": "7a54b6fc903feab1e7cb6573177ca09b544eb1e2" }, { diff --git a/vendor/github.com/emicklei/go-restful-swagger12/BUILD b/vendor/github.com/emicklei/go-restful-swagger12/BUILD index bb3f2209a7e..5e7abc48671 100644 --- a/vendor/github.com/emicklei/go-restful-swagger12/BUILD +++ b/vendor/github.com/emicklei/go-restful-swagger12/BUILD @@ -37,9 +37,6 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//vendor/github.com/emicklei/go-restful-swagger12/test_package:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], ) diff --git a/vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD b/vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD deleted file mode 100644 index 6cc62052baf..00000000000 --- a/vendor/github.com/emicklei/go-restful-swagger12/test_package/BUILD +++ /dev/null @@ -1,16 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/github.com/gophercloud/gophercloud/README.md b/vendor/github.com/gophercloud/gophercloud/README.md index 8d8d0a5c64e..60ca479de89 100644 --- a/vendor/github.com/gophercloud/gophercloud/README.md +++ b/vendor/github.com/gophercloud/gophercloud/README.md @@ -74,7 +74,7 @@ import ( // Option 1: Pass in the values yourself opts := gophercloud.AuthOptions{ - IdentityEndpoint: "https://my-openstack.com:5000/v2.0", + IdentityEndpoint: "https://openstack.example.com:5000/v2.0", Username: "{username}", Password: "{password}", } diff --git a/vendor/github.com/gophercloud/gophercloud/auth_options.go b/vendor/github.com/gophercloud/gophercloud/auth_options.go index 3ee97dfb323..eabf1820751 100644 --- a/vendor/github.com/gophercloud/gophercloud/auth_options.go +++ b/vendor/github.com/gophercloud/gophercloud/auth_options.go @@ -1,7 +1,7 @@ package gophercloud /* -AuthOptions stores information needed to authenticate to an OpenStack cluster. +AuthOptions stores information needed to authenticate to an OpenStack Cloud. You can populate one manually, or use a provider's AuthOptionsFromEnv() function to read relevant information from the standard environment variables. Pass one to a provider's AuthenticatedClient function to authenticate and obtain a @@ -31,9 +31,16 @@ type AuthOptions struct { DomainName string `json:"name,omitempty"` // The TenantID and TenantName fields are optional for the Identity V2 API. + // The same fields are known as project_id and project_name in the Identity + // V3 API, but are collected as TenantID and TenantName here in both cases. // Some providers allow you to specify a TenantName instead of the TenantId. // Some require both. Your provider's authentication policies will determine // how these fields influence authentication. + // If DomainID or DomainName are provided, they will also apply to TenantName. + // It is not currently possible to authenticate with Username and a Domain + // and scope to a Project in a different Domain by using TenantName. To + // accomplish that, the ProjectID will need to be provided to the TenantID + // option. TenantID string `json:"tenantId,omitempty"` TenantName string `json:"tenantName,omitempty"` @@ -132,14 +139,6 @@ func (opts *AuthOptions) ToTokenV3CreateMap(scope map[string]interface{}) (map[s // if insufficient or incompatible information is present. var req request - // Test first for unrecognized arguments. - if opts.TenantID != "" { - return nil, ErrTenantIDProvided{} - } - if opts.TenantName != "" { - return nil, ErrTenantNameProvided{} - } - if opts.Password == "" { if opts.TokenID != "" { // Because we aren't using password authentication, it's an error to also provide any of the user-based authentication @@ -252,15 +251,12 @@ func (opts *AuthOptions) ToTokenV3ScopeMap() (map[string]interface{}, error) { if opts.TenantID != "" { scope.ProjectID = opts.TenantID - opts.TenantID = "" - opts.TenantName = "" } else { if opts.TenantName != "" { scope.ProjectName = opts.TenantName scope.DomainID = opts.DomainID scope.DomainName = opts.DomainName } - opts.TenantName = "" } if scope.ProjectName != "" { diff --git a/vendor/github.com/gophercloud/gophercloud/doc.go b/vendor/github.com/gophercloud/gophercloud/doc.go index fb81a9d8f17..b559516f91a 100644 --- a/vendor/github.com/gophercloud/gophercloud/doc.go +++ b/vendor/github.com/gophercloud/gophercloud/doc.go @@ -4,11 +4,13 @@ clouds. The library has a three-level hierarchy: providers, services, and resources. Provider structs represent the service providers that offer and manage a -collection of services. Examples of providers include: OpenStack, Rackspace, -HP. These are defined like so: +collection of services. The IdentityEndpoint is typically refered to as +"auth_url" in information provided by the cloud operator. Additionally, +the cloud may refer to TenantID or TenantName as project_id and project_name. +These are defined like so: opts := gophercloud.AuthOptions{ - IdentityEndpoint: "https://my-openstack.com:5000/v2.0", + IdentityEndpoint: "https://openstack.example.com:5000/v2.0", Username: "{username}", Password: "{password}", TenantID: "{tenant_id}", diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions/urls.go index c9cf895b133..d1861ac196d 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions/urls.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v1/apiversions/urls.go @@ -1,8 +1,8 @@ package apiversions import ( - "strings" "net/url" + "strings" "github.com/gophercloud/gophercloud" ) diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/client.go b/vendor/github.com/gophercloud/gophercloud/openstack/client.go index 6e61944a128..2d30cc60ad9 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/client.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/client.go @@ -310,6 +310,19 @@ func NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (* return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil } +// NewDNSV2 creates a ServiceClient that may be used to access the v2 DNS service. +func NewDNSV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { + eo.ApplyDefaults("dns") + url, err := client.EndpointLocator(eo) + if err != nil { + return nil, err + } + return &gophercloud.ServiceClient{ + ProviderClient: client, + Endpoint: url, + ResourceBase: url + "v2/"}, nil +} + // NewImageServiceV2 creates a ServiceClient that may be used to access the v2 image service. func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { eo.ApplyDefaults("image") diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go index ef133ff8094..d5d571c3d6f 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/requests.go @@ -54,6 +54,47 @@ func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) paginat }) } +type CreateOptsBuilder interface { + ToFlavorCreateMap() (map[string]interface{}, error) +} + +// CreateOpts is passed to Create to create a flavor +// Source: +// https://github.com/openstack/nova/blob/stable/newton/nova/api/openstack/compute/schemas/flavor_manage.py#L20 +type CreateOpts struct { + Name string `json:"name" required:"true"` + // memory size, in MBs + RAM int `json:"ram" required:"true"` + VCPUs int `json:"vcpus" required:"true"` + // disk size, in GBs + Disk *int `json:"disk" required:"true"` + ID string `json:"id,omitempty"` + // non-zero, positive + Swap *int `json:"swap,omitempty"` + RxTxFactor float64 `json:"rxtx_factor,omitempty"` + IsPublic *bool `json:"os-flavor-access:is_public,omitempty"` + // ephemeral disk size, in GBs, non-zero, positive + Ephemeral *int `json:"OS-FLV-EXT-DATA:ephemeral,omitempty"` +} + +// ToFlavorCreateMap satisfies the CreateOptsBuilder interface +func (opts *CreateOpts) ToFlavorCreateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "flavor") +} + +// Create a flavor +func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToFlavorCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Post(createURL(client), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 201}, + }) + return +} + // Get instructs OpenStack to provide details on a single flavor, identified by its ID. // Use ExtractFlavor to convert its result into a Flavor. func Get(client *gophercloud.ServiceClient, id string) (r GetResult) { diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go index a49de0da7cd..18b84340555 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/results.go @@ -8,13 +8,21 @@ import ( "github.com/gophercloud/gophercloud/pagination" ) -// GetResult temporarily holds the response from a Get call. -type GetResult struct { +type commonResult struct { gophercloud.Result } -// Extract provides access to the individual Flavor returned by the Get function. -func (r GetResult) Extract() (*Flavor, error) { +type CreateResult struct { + commonResult +} + +// GetResult temporarily holds the response from a Get call. +type GetResult struct { + commonResult +} + +// Extract provides access to the individual Flavor returned by the Get and Create functions. +func (r commonResult) Extract() (*Flavor, error) { var s struct { Flavor *Flavor `json:"flavor"` } @@ -40,41 +48,32 @@ type Flavor struct { VCPUs int `json:"vcpus"` } -func (f *Flavor) UnmarshalJSON(b []byte) error { - var flavor struct { - ID string `json:"id"` - Disk int `json:"disk"` - RAM int `json:"ram"` - Name string `json:"name"` - RxTxFactor float64 `json:"rxtx_factor"` - Swap interface{} `json:"swap"` - VCPUs int `json:"vcpus"` +func (r *Flavor) UnmarshalJSON(b []byte) error { + type tmp Flavor + var s struct { + tmp + Swap interface{} `json:"swap"` } - err := json.Unmarshal(b, &flavor) + err := json.Unmarshal(b, &s) if err != nil { return err } - f.ID = flavor.ID - f.Disk = flavor.Disk - f.RAM = flavor.RAM - f.Name = flavor.Name - f.RxTxFactor = flavor.RxTxFactor - f.VCPUs = flavor.VCPUs + *r = Flavor(s.tmp) - switch t := flavor.Swap.(type) { + switch t := s.Swap.(type) { case float64: - f.Swap = int(t) + r.Swap = int(t) case string: switch t { case "": - f.Swap = 0 + r.Swap = 0 default: swap, err := strconv.ParseFloat(t, 64) if err != nil { return err } - f.Swap = int(swap) + r.Swap = int(swap) } } diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go index ee0dfdbe39d..2fc21796f74 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors/urls.go @@ -11,3 +11,7 @@ func getURL(client *gophercloud.ServiceClient, id string) string { func listURL(client *gophercloud.ServiceClient) string { return client.ServiceURL("flavors", "detail") } + +func createURL(client *gophercloud.ServiceClient) string { + return client.ServiceURL("flavors") +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images/results.go index a55b8f160a4..f9ebc69e98d 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images/results.go @@ -45,8 +45,8 @@ type Image struct { Status string Updated string - - Metadata map[string]string + + Metadata map[string]interface{} } // ImagePage contains a single page of results from a List operation. diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go index c79a6e6f6b8..96186373176 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go @@ -401,11 +401,10 @@ type RebuildOptsBuilder interface { // operation type RebuildOpts struct { // The server's admin password - AdminPass string `json:"adminPass" required:"true"` + AdminPass string `json:"adminPass,omitempty"` // The ID of the image you want your server to be provisioned on ImageID string `json:"imageRef"` ImageName string `json:"-"` - //ImageName string `json:"-"` // Name to set the server to Name string `json:"name,omitempty"` // AccessIPv4 [optional] provides a new IPv4 address for the instance. diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go index c121a6be7d6..1ae1e91c784 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go @@ -19,11 +19,17 @@ type serverResult struct { // Extract interprets any serverResult as a Server, if possible. func (r serverResult) Extract() (*Server, error) { - var s struct { - Server *Server `json:"server"` - } + var s Server err := r.ExtractInto(&s) - return s.Server, err + return &s, err +} + +func (r serverResult) ExtractInto(v interface{}) error { + return r.Result.ExtractIntoStructPtr(v, "server") +} + +func ExtractServersInto(r pagination.Page, v interface{}) error { + return r.(ServerPage).Result.ExtractIntoSlicePtr(v, "servers") } // CreateResult temporarily contains the response from a Create call. @@ -221,11 +227,9 @@ func (r ServerPage) NextPageURL() (string, error) { // ExtractServers interprets the results of a single page from a List() call, producing a slice of Server entities. func ExtractServers(r pagination.Page) ([]Server, error) { - var s struct { - Servers []Server `json:"servers"` - } - err := (r.(ServerPage)).ExtractInto(&s) - return s.Servers, err + var s []Server + err := ExtractServersInto(r, &s) + return s, err } // MetadataResult contains the result of a call for (potentially) multiple key-value pairs. diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/requests.go index 21a3b266c2f..83930874c5d 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/requests.go @@ -21,6 +21,7 @@ type ListOpts struct { Marker string `q:"marker"` SortKey string `q:"sort_key"` SortDir string `q:"sort_dir"` + RouterID string `q:"router_id"` } // List returns a Pager which allows you to iterate over a collection of diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/results.go index 838ca2ca649..29d5b5662b0 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/results.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/results.go @@ -34,6 +34,9 @@ type FloatingIP struct { // The condition of the API resource. Status string `json:"status"` + + //The ID of the router used for this Floating-IP + RouterID string `json:"router_id"` } type commonResult struct { diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules/requests.go index 77f7e37a484..59ba721d6f1 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules/requests.go +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules/requests.go @@ -47,13 +47,31 @@ type RuleEtherType string // Constants useful for CreateOpts const ( - DirIngress RuleDirection = "ingress" - DirEgress RuleDirection = "egress" - ProtocolTCP RuleProtocol = "tcp" - ProtocolUDP RuleProtocol = "udp" - ProtocolICMP RuleProtocol = "icmp" - EtherType4 RuleEtherType = "IPv4" - EtherType6 RuleEtherType = "IPv6" + DirIngress RuleDirection = "ingress" + DirEgress RuleDirection = "egress" + EtherType4 RuleEtherType = "IPv4" + EtherType6 RuleEtherType = "IPv6" + ProtocolAH RuleProtocol = "ah" + ProtocolDCCP RuleProtocol = "dccp" + ProtocolEGP RuleProtocol = "egp" + ProtocolESP RuleProtocol = "esp" + ProtocolGRE RuleProtocol = "gre" + ProtocolICMP RuleProtocol = "icmp" + ProtocolIGMP RuleProtocol = "igmp" + ProtocolIPv6Encap RuleProtocol = "ipv6-encap" + ProtocolIPv6Frag RuleProtocol = "ipv6-frag" + ProtocolIPv6ICMP RuleProtocol = "ipv6-icmp" + ProtocolIPv6NoNxt RuleProtocol = "ipv6-nonxt" + ProtocolIPv6Opts RuleProtocol = "ipv6-opts" + ProtocolIPv6Route RuleProtocol = "ipv6-route" + ProtocolOSPF RuleProtocol = "ospf" + ProtocolPGM RuleProtocol = "pgm" + ProtocolRSVP RuleProtocol = "rsvp" + ProtocolSCTP RuleProtocol = "sctp" + ProtocolTCP RuleProtocol = "tcp" + ProtocolUDP RuleProtocol = "udp" + ProtocolUDPLite RuleProtocol = "udplite" + ProtocolVRRP RuleProtocol = "vrrp" ) // CreateOptsBuilder is what types must satisfy to be used as Create diff --git a/vendor/github.com/gophercloud/gophercloud/pagination/pager.go b/vendor/github.com/gophercloud/gophercloud/pagination/pager.go index 1b5192ad611..6f1609ef2e3 100644 --- a/vendor/github.com/gophercloud/gophercloud/pagination/pager.go +++ b/vendor/github.com/gophercloud/gophercloud/pagination/pager.go @@ -145,27 +145,24 @@ func (p Pager) AllPages() (Page, error) { // Switch on the page body type. Recognized types are `map[string]interface{}`, // `[]byte`, and `[]interface{}`. - switch testPage.GetBody().(type) { + switch pb := testPage.GetBody().(type) { case map[string]interface{}: // key is the map key for the page body if the body type is `map[string]interface{}`. var key string // Iterate over the pages to concatenate the bodies. err = p.EachPage(func(page Page) (bool, error) { b := page.GetBody().(map[string]interface{}) - for k := range b { + for k, v := range b { // If it's a linked page, we don't want the `links`, we want the other one. if !strings.HasSuffix(k, "links") { - key = k + // check the field's type. we only want []interface{} (which is really []map[string]interface{}) + switch vt := v.(type) { + case []interface{}: + key = k + pagesSlice = append(pagesSlice, vt...) + } } } - switch keyType := b[key].(type) { - case map[string]interface{}: - pagesSlice = append(pagesSlice, keyType) - case []interface{}: - pagesSlice = append(pagesSlice, b[key].([]interface{})...) - default: - return false, fmt.Errorf("Unsupported page body type: %+v", keyType) - } return true, nil }) if err != nil { @@ -216,7 +213,7 @@ func (p Pager) AllPages() (Page, error) { default: err := gophercloud.ErrUnexpectedType{} err.Expected = "map[string]interface{}/[]byte/[]interface{}" - err.Actual = fmt.Sprintf("%v", reflect.TypeOf(testPage.GetBody())) + err.Actual = fmt.Sprintf("%T", pb) return nil, err } diff --git a/vendor/github.com/heketi/heketi/AUTHORS b/vendor/github.com/heketi/heketi/AUTHORS index a5c918160a5..c4c8f5d819e 100644 --- a/vendor/github.com/heketi/heketi/AUTHORS +++ b/vendor/github.com/heketi/heketi/AUTHORS @@ -6,3 +6,4 @@ mliyazud@redhat.com nerawat@redhat.com obnox@redhat.com obnox@samba.org +lpabon@gmail.com From af28a43a65ffb617bc1d59a32c3da51145e8c56d Mon Sep 17 00:00:00 2001 From: "stuart.warren" Date: Tue, 6 Jun 2017 15:01:56 +0100 Subject: [PATCH 2/2] commit staging godeps --- staging/src/k8s.io/apiserver/Godeps/Godeps.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index 9fdd1e89468..f83a8ade3dc 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -416,31 +416,31 @@ }, { "ImportPath": "github.com/gophercloud/gophercloud", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/gophercloud/gophercloud/pagination", - "Rev": "9a5595b8ffe429439c63781cdc312c254e4ad990" + "Rev": "ce1e02c3ccfdb7fab257340dc4d603ec3035fa11" }, { "ImportPath": "github.com/grpc-ecosystem/go-grpc-prometheus",