From 4dfd13c2b48e5fb33ee048d5c332320bd2502790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Luk=C5=A1a?= Date: Wed, 21 Mar 2018 14:43:49 +0100 Subject: [PATCH] Bump dependency on go-open-service-broker-client to 0.0.6 (#1856) --- Gopkg.lock | 6 +-- Gopkg.toml | 2 +- pkg/controller/controller.go | 6 +-- .../v2/constants.go | 8 ++++ .../v2/errors.go | 2 +- .../v2/get_catalog.go | 2 +- .../go-open-service-broker-client/v2/types.go | 38 +++++++++---------- 7 files changed, 36 insertions(+), 28 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 9f55ca62a5d4..bfbd13e22fb4 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -539,8 +539,8 @@ "v2", "v2/fake" ] - revision = "43fbcdcb3441d0563527208eb75062ae23280bd7" - version = "0.0.4" + revision = "39dbb4e91dfc6aad1f293e73fba18cc5f75eceb3" + version = "0.0.6" [[projects]] name = "github.com/prometheus/client_golang" @@ -1172,6 +1172,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "8c050f37c79f436cbfdb4983ac67f6ef3522a7382b6d9ba3521e4ff419fd3136" + inputs-digest = "3e86272af4e2198fdca9acc394f165222f9318a0792955e99fea713fd1bce1fb" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index f6d1ade97f8e..d73f38942059 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -71,7 +71,7 @@ required = [ [[constraint]] name = "github.com/pmorie/go-open-service-broker-client" - version = "0.0.4" + version = "0.0.6" [prune] non-go = true diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 5db01b2fd993..799078af54d7 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -567,8 +567,8 @@ func convertClusterServicePlans(plans []osb.Plan, serviceClassID string) ([]*v1b servicePlans[i].Spec.ExternalMetadata = &runtime.RawExtension{Raw: metadata} } - if schemas := plan.ParameterSchemas; schemas != nil { - if instanceSchemas := schemas.ServiceInstances; instanceSchemas != nil { + if schemas := plan.Schemas; schemas != nil { + if instanceSchemas := schemas.ServiceInstance; instanceSchemas != nil { if instanceCreateSchema := instanceSchemas.Create; instanceCreateSchema != nil && instanceCreateSchema.Parameters != nil { schema, err := json.Marshal(instanceCreateSchema.Parameters) if err != nil { @@ -588,7 +588,7 @@ func convertClusterServicePlans(plans []osb.Plan, serviceClassID string) ([]*v1b servicePlans[i].Spec.ServiceInstanceUpdateParameterSchema = &runtime.RawExtension{Raw: schema} } } - if bindingSchemas := schemas.ServiceBindings; bindingSchemas != nil { + if bindingSchemas := schemas.ServiceBinding; bindingSchemas != nil { if bindingCreateSchema := bindingSchemas.Create; bindingCreateSchema != nil && bindingCreateSchema.Parameters != nil { schema, err := json.Marshal(bindingCreateSchema.Parameters) if err != nil { diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/constants.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/constants.go index 9f35e4ab3c75..ed249a794e11 100644 --- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/constants.go +++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/constants.go @@ -22,4 +22,12 @@ const ( // VarKeyOperation is the name to use for a mux var representing an // operation. VarKeyOperation = "operation" + + // PlatformKubernetes is the name for Kubernetes in the Platform field of + // OriginatingIdentity. + PlatformKubernetes = "kubernetes" + + // PlatformCloudFoundry is the name for Cloud Foundry in the Platform field + // of OriginatingIdentity. + PlatformCloudFoundry = "cloudfoundry" ) diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/errors.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/errors.go index 32f05c48d61c..bf5944c3f21a 100644 --- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/errors.go +++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/errors.go @@ -179,7 +179,7 @@ func (e AsyncBindingOperationsNotAllowedError) Error() string { return fmt.Sprintf("Asynchronous binding operations are not allowed: %s", e.reason) } -// AsyncBindingOperationsNotAllowedError returns whether the error represents asynchronous +// IsAsyncBindingOperationsNotAllowedError returns whether the error represents asynchronous // binding operations (bind/unbind/poll) not being allowed for this client. func IsAsyncBindingOperationsNotAllowedError(err error) bool { _, ok := err.(AsyncBindingOperationsNotAllowedError) diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go index 8d6782a7a369..4cb9899b4753 100644 --- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go +++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/get_catalog.go @@ -23,7 +23,7 @@ func (c *client) GetCatalog() (*CatalogResponse, error) { if !c.APIVersion.AtLeast(Version2_13()) { for ii := range catalogResponse.Services { for jj := range catalogResponse.Services[ii].Plans { - catalogResponse.Services[ii].Plans[jj].ParameterSchemas = nil + catalogResponse.Services[ii].Plans[jj].Schemas = nil } } } diff --git a/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go b/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go index 7087fe2a8476..9dd632941eb2 100644 --- a/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go +++ b/vendor/github.com/pmorie/go-open-service-broker-client/v2/types.go @@ -85,22 +85,22 @@ type Plan struct { // facing content and display instructions. Metadata may contain // platform-conventional values. Optional. Metadata map[string]interface{} `json:"metadata,omitempty"` - // ParameterSchemas requires a client API version >=2.13. + // Schemas requires a client API version >=2.13. // - // ParameterSchemas is a set of optional JSONSchemas that describe + // Schemas is a set of optional JSONSchemas that describe // the expected parameters for creation and update of instances and // creation of bindings. - ParameterSchemas *ParameterSchemas `json:"schemas,omitempty"` + Schemas *Schemas `json:"schemas,omitempty"` } -// ParameterSchemas requires a client API version >=2.13. +// Schemas requires a client API version >=2.13. // -// ParameterSchemas is a set of optional JSONSchemas that describe +// Schemas is a set of optional JSONSchemas that describe // the expected parameters for creation and update of instances and // creation of bindings. -type ParameterSchemas struct { - ServiceInstances *ServiceInstanceSchema `json:"service_instance,omitempty"` - ServiceBindings *ServiceBindingSchema `json:"service_binding,omitempty"` +type Schemas struct { + ServiceInstance *ServiceInstanceSchema `json:"service_instance,omitempty"` + ServiceBinding *ServiceBindingSchema `json:"service_binding,omitempty"` } // ServiceInstanceSchema requires a client API version >=2.13. @@ -108,8 +108,8 @@ type ParameterSchemas struct { // ServiceInstanceSchema represents a plan's schemas for creation and // update of an API resource. type ServiceInstanceSchema struct { - Create *InputParameters `json:"create,omitempty"` - Update *InputParameters `json:"update,omitempty"` + Create *InputParametersSchema `json:"create,omitempty"` + Update *InputParametersSchema `json:"update,omitempty"` } // ServiceBindingSchema requires a client API version >=2.13. @@ -117,14 +117,14 @@ type ServiceInstanceSchema struct { // ServiceBindingSchema represents a plan's schemas for the parameters // accepted for binding creation. type ServiceBindingSchema struct { - Create *InputParameters `json:"create,omitempty"` + Create *InputParametersSchema `json:"create,omitempty"` } -// InputParameters requires a client API version >=2.13. +// InputParametersSchema requires a client API version >=2.13. // -// InputParameters represents a schema for input parameters for creation or +// InputParametersSchema represents a schema for input parameters for creation or // update of an API resource. -type InputParameters struct { +type InputParametersSchema struct { Parameters interface{} `json:"parameters,omitempty"` } @@ -189,7 +189,7 @@ type ProvisionResponse struct { DashboardURL *string `json:"dashboard_url,omitempty"` // OperationKey is an extra identifier supplied by the broker to identify // asynchronous operations. - OperationKey *OperationKey `json:"operationKey,omitempty"` + OperationKey *OperationKey `json:"operation,omitempty"` } // OperationKey is an extra identifier from the broker in order to provide extra @@ -253,7 +253,7 @@ type UpdateInstanceResponse struct { Async bool `json:"async"` // OperationKey is an extra identifier supplied by the broker to identify // asynchronous operations. - OperationKey *OperationKey `json:"operationKey,omitempty"` + OperationKey *OperationKey `json:"operation,omitempty"` } // DeprovisionRequest represents a request to deprovision an instance of a @@ -282,7 +282,7 @@ type DeprovisionResponse struct { Async bool `json:"async"` // OperationKey is an extra identifier supplied by the broker to identify // asynchronous operations. - OperationKey *OperationKey `json:"operationKey,omitempty"` + OperationKey *OperationKey `json:"operation,omitempty"` } // LastOperationRequest represents a request to a broker to give the state of @@ -424,7 +424,7 @@ type BindResponse struct { // // OperationKey is an extra identifier supplied by the broker to identify // asynchronous operations. - OperationKey *OperationKey `json:"operationKey,omitempty"` + OperationKey *OperationKey `json:"operation,omitempty"` } // UnbindRequest represents a request to unbind a particular binding. @@ -466,7 +466,7 @@ type UnbindResponse struct { // // OperationKey is an extra identifier supplied by the broker to identify // asynchronous operations. - OperationKey *OperationKey `json:"operationKey,omitempty"` + OperationKey *OperationKey `json:"operation,omitempty"` } // GetBindingRequest represents a request to do a GET on a particular binding.