Skip to content

Commit

Permalink
Bumps brokerapi from v10 to v11
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwittrup committed Apr 12, 2024
1 parent 0f8a609 commit b8df53a
Show file tree
Hide file tree
Showing 119 changed files with 3,629 additions and 286 deletions.
16 changes: 9 additions & 7 deletions apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"fmt"
"io/ioutil"
"log"
"log/slog"
"net/http"
"os"
"os/signal"
Expand All @@ -25,14 +26,15 @@ import (
"code.cloudfoundry.org/lager/v3"
"github.com/gorilla/mux"

"github.com/pivotal-cf/brokerapi/v10"
apiauth "github.com/pivotal-cf/brokerapi/v10/auth"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11"
apiauth "github.com/pivotal-cf/brokerapi/v11/auth"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pkg/errors"
"github.com/urfave/negroni"

"github.com/pivotal-cf/on-demand-service-broker/config"
"github.com/pivotal-cf/on-demand-service-broker/loggerfactory"
"github.com/pivotal-cf/on-demand-service-broker/mgmtapi"
"github.com/pkg/errors"
"github.com/urfave/negroni"
)

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
Expand Down Expand Up @@ -188,8 +190,8 @@ func createNegroniLogger(serverLogger *log.Logger) *negroni.Logger {
return negroniLogger
}

func createBrokerAPILogger(componentName string, serverLogger *log.Logger) lager.Logger {
func createBrokerAPILogger(componentName string, serverLogger *log.Logger) *slog.Logger {
brokerAPILogger := lager.NewLogger(componentName)
brokerAPILogger.RegisterSink(lager.NewWriterSink(serverLogger.Writer(), lager.INFO))
return brokerAPILogger
return slog.New(lager.NewHandler(brokerAPILogger))
}
2 changes: 1 addition & 1 deletion apiserver/fakes/combined_broker.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions broker/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"net/http"

"github.com/pborman/uuid"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"

"github.com/pivotal-cf/on-demand-service-broker/brokercontext"
"github.com/pivotal-cf/on-demand-service-broker/serviceadapter"
Expand Down
4 changes: 2 additions & 2 deletions broker/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pborman/uuid"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/broker"
brokerfakes "github.com/pivotal-cf/on-demand-service-broker/broker/fakes"
Expand Down
2 changes: 1 addition & 1 deletion broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/pivotal-cf/on-demand-service-broker/broker/decider"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/cf"
"github.com/pivotal-cf/on-demand-service-broker/config"
Expand Down
4 changes: 2 additions & 2 deletions broker/broker_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"fmt"
"log"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-services-sdk/bosh"
)

Expand Down
2 changes: 1 addition & 1 deletion broker/broker_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/broker/fakes"
"github.com/pivotal-cf/on-demand-service-broker/cf"
Expand Down
2 changes: 1 addition & 1 deletion broker/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"fmt"
"log"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/config"
"github.com/pivotal-cf/on-demand-service-broker/serviceadapter"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion broker/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/config"
"github.com/pivotal-cf/on-demand-service-broker/noopservicescontroller"
Expand Down
4 changes: 2 additions & 2 deletions broker/decider/decider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log"
"net/http"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

var errInstanceMustBeUpgradedFirst = apiresponses.NewFailureResponseBuilder(
Expand Down
4 changes: 2 additions & 2 deletions broker/decider/decider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/broker/decider"
"github.com/pivotal-cf/on-demand-service-broker/loggerfactory"
)
Expand Down
4 changes: 2 additions & 2 deletions broker/deprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"log"

"github.com/pborman/uuid"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/brokercontext"
"github.com/pivotal-cf/on-demand-service-broker/config"
Expand Down
4 changes: 2 additions & 2 deletions broker/deprovision_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/config"
Expand Down
2 changes: 1 addition & 1 deletion broker/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"errors"
"fmt"

"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/brokercontext"
"github.com/pivotal-cf/on-demand-service-broker/serviceadapter"
)
Expand Down
2 changes: 1 addition & 1 deletion broker/fakes/fake_decider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion broker/fakes/fake_service_adapter_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions broker/get_binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"errors"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

func (b *Broker) GetBinding(ctx context.Context, instanceID, bindingID string, bindingsDetails domain.FetchBindingDetails) (domain.GetBindingSpec, error) {
Expand Down
7 changes: 4 additions & 3 deletions broker/get_binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package broker_test

import (
"context"
"log/slog"

"code.cloudfoundry.org/lager/v3"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

var _ = Describe("GetBinding", func() {
Expand All @@ -17,6 +18,6 @@ var _ = Describe("GetBinding", func() {
fresp, ok := err.(*apiresponses.FailureResponse)
Expect(ok).To(BeTrue(), "err wasn't a FailureResponse")
logger := lager.NewLogger("test")
Expect(fresp.ValidatedStatusCode(logger)).To(Equal(404))
Expect(fresp.ValidatedStatusCode(slog.New(lager.NewHandler(logger)))).To(Equal(404))
})
})
4 changes: 2 additions & 2 deletions broker/get_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"errors"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

func (b *Broker) GetInstance(ctx context.Context, instanceID string, instanceDetails domain.FetchInstanceDetails) (domain.GetInstanceDetailsSpec, error) {
Expand Down
7 changes: 4 additions & 3 deletions broker/get_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package broker_test

import (
"context"
"log/slog"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"

"code.cloudfoundry.org/lager/v3"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

var _ = Describe("GetInstance", func() {
Expand All @@ -17,6 +18,6 @@ var _ = Describe("GetInstance", func() {
fresp, ok := err.(*apiresponses.FailureResponse)
Expect(ok).To(BeTrue(), "err wasn't a FailureResponse")
logger := lager.NewLogger("test")
Expect(fresp.ValidatedStatusCode(logger)).To(Equal(404))
Expect(fresp.ValidatedStatusCode(slog.New(lager.NewHandler(logger)))).To(Equal(404))
})
})
4 changes: 2 additions & 2 deletions broker/last_binding_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"errors"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

func (b *Broker) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error) {
Expand Down
7 changes: 4 additions & 3 deletions broker/last_binding_operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package broker_test

import (
"context"
"log/slog"

"code.cloudfoundry.org/lager/v3"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
)

var _ = Describe("LastBindingOperation", func() {
Expand All @@ -16,6 +17,6 @@ var _ = Describe("LastBindingOperation", func() {
fresp, ok := err.(*apiresponses.FailureResponse)
Expect(ok).To(BeTrue(), "err wasn't a FailureResponse")
logger := lager.NewLogger("test")
Expect(fresp.ValidatedStatusCode(logger)).To(Equal(404))
Expect(fresp.ValidatedStatusCode(slog.New(lager.NewHandler(logger)))).To(Equal(404))
})
})
2 changes: 1 addition & 1 deletion broker/last_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"log"

"github.com/pborman/uuid"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/brokercontext"
)
Expand Down
2 changes: 1 addition & 1 deletion broker/last_operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/broker"
)
Expand Down
4 changes: 2 additions & 2 deletions broker/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"net/http"

"github.com/pborman/uuid"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/boshdirector"
"github.com/pivotal-cf/on-demand-service-broker/brokercontext"
"github.com/pivotal-cf/on-demand-service-broker/config"
Expand Down
4 changes: 2 additions & 2 deletions broker/provision_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"fmt"
"net/http"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/cf"

. "github.com/onsi/ginkgo/v2"
Expand Down
2 changes: 1 addition & 1 deletion broker/recreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"log"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/serviceadapter"

"github.com/pborman/uuid"
Expand Down
2 changes: 1 addition & 1 deletion broker/recreate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"fmt"
"log"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/config"
"github.com/pivotal-cf/on-demand-service-broker/serviceadapter"

Expand Down
4 changes: 2 additions & 2 deletions broker/services/response_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"io/ioutil"
"net/http"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/mgmtapi"
)
Expand Down
4 changes: 2 additions & 2 deletions broker/services/response_converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v10/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/brokerapi/v11/domain/apiresponses"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/broker/services"
"github.com/pivotal-cf/on-demand-service-broker/mgmtapi"
Expand Down
2 changes: 1 addition & 1 deletion broker/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"net/url"
"strings"

"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/authorizationheader"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/mgmtapi"
Expand Down
2 changes: 1 addition & 1 deletion broker/services/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v10/domain"
"github.com/pivotal-cf/brokerapi/v11/domain"
"github.com/pivotal-cf/on-demand-service-broker/authorizationheader/fakes"
"github.com/pivotal-cf/on-demand-service-broker/broker"
"github.com/pivotal-cf/on-demand-service-broker/broker/services"
Expand Down
Loading

0 comments on commit b8df53a

Please sign in to comment.