Skip to content

Commit 053caca

Browse files
committed
move all of templateservicebroker under a single package
1 parent 93dca0c commit 053caca

36 files changed

+50
-32
lines changed

hack/import-restrictions.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219

220220
{
221221
"checkedPackageRoots": [
222-
"github.com/openshift/origin/pkg/openservicebroker"
222+
"github.com/openshift/origin/pkg/templateservicebroker"
223223
],
224224
"allowedImportPackageRoots": [
225225
"vendor/k8s.io/apimachinery",
@@ -228,16 +228,28 @@
228228
"vendor/github.com/spf13/cobra",
229229
"vendor/golang.org",
230230
"github.com/openshift/origin/pkg/template/generated",
231-
"github.com/openshift/origin/pkg/template/servicebroker"
231+
"github.com/openshift/origin/pkg/template/servicebroker",
232+
"github.com/openshift/origin/pkg/route/generated"
232233
],
233234
"allowedImportPackages": [
234235
"vendor/github.com/golang/glog",
236+
"vendor/k8s.io/kubernetes/pkg/api",
237+
"vendor/k8s.io/kubernetes/pkg/apis/authorization",
238+
"vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset",
239+
"vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset",
235240
"vendor/github.com/emicklei/go-restful",
236241
"vendor/github.com/lestrrat/go-jsschema",
237242
"vendor/k8s.io/kubernetes/pkg/controller",
238243
"vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util",
239244
"github.com/openshift/origin/pkg/api",
240-
"github.com/openshift/origin/pkg/template/apis/template"
245+
"github.com/openshift/origin/pkg/template/apis/template",
246+
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy",
247+
"github.com/openshift/origin/pkg/template/apis/template",
248+
"github.com/openshift/origin/pkg/authorization/util",
249+
"github.com/openshift/origin/pkg/template/apis/template/validation",
250+
"github.com/openshift/origin/pkg/user/apis/user/validation",
251+
"github.com/openshift/origin/pkg/route/apis/route",
252+
"github.com/openshift/origin/pkg/serviceaccounts"
241253
]
242254
}
243255
]

pkg/cmd/server/start/start_allinone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/openshift/origin/pkg/cmd/server/crypto"
2828
"github.com/openshift/origin/pkg/cmd/server/start/kubernetes"
2929
cmdutil "github.com/openshift/origin/pkg/cmd/util"
30-
tsbcmd "github.com/openshift/origin/pkg/openservicebroker/cmd/server"
30+
tsbcmd "github.com/openshift/origin/pkg/templateservicebroker/cmd/server"
3131
"k8s.io/apimachinery/pkg/util/wait"
3232
)
3333

pkg/openservicebroker/cmd/server/start.go renamed to pkg/templateservicebroker/cmd/server/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020

2121
"io/ioutil"
2222

23-
"github.com/openshift/origin/pkg/openservicebroker/server"
2423
"github.com/openshift/origin/pkg/template/servicebroker/apis/config"
2524
configinstall "github.com/openshift/origin/pkg/template/servicebroker/apis/config/install"
25+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/server"
2626
)
2727

2828
type TemplateServiceBrokerServerOptions struct {

pkg/openservicebroker/client/client.go renamed to pkg/templateservicebroker/openservicebroker/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"k8s.io/apimachinery/pkg/util/validation/field"
1414
"k8s.io/apiserver/pkg/authentication/user"
1515

16-
"github.com/openshift/origin/pkg/openservicebroker/api"
16+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1717
)
1818

1919
type Client interface {

pkg/openservicebroker/server/apiserver.go renamed to pkg/templateservicebroker/openservicebroker/server/apiserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
templateapi "github.com/openshift/origin/pkg/template/apis/template"
1919
templateinformer "github.com/openshift/origin/pkg/template/generated/informers/internalversion"
2020
templateinternalclientset "github.com/openshift/origin/pkg/template/generated/internalclientset"
21-
templateservicebroker "github.com/openshift/origin/pkg/template/servicebroker"
21+
templateservicebroker "github.com/openshift/origin/pkg/templateservicebroker/servicebroker"
2222
)
2323

2424
// TODO: this file breaks the layering of pkg/openservicebroker and

pkg/openservicebroker/server/route.go renamed to pkg/templateservicebroker/openservicebroker/server/route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"k8s.io/apimachinery/pkg/util/validation/field"
1515
"k8s.io/apiserver/pkg/authentication/user"
1616

17-
"github.com/openshift/origin/pkg/openservicebroker/api"
1817
templateapi "github.com/openshift/origin/pkg/template/apis/template"
18+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1919
)
2020

2121
// minimum supported client version

pkg/openservicebroker/server/route_test.go renamed to pkg/templateservicebroker/openservicebroker/server/route_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import (
1111
"testing"
1212

1313
restful "github.com/emicklei/go-restful"
14-
"github.com/openshift/origin/pkg/openservicebroker/api"
15-
"github.com/openshift/origin/pkg/openservicebroker/client"
14+
1615
"k8s.io/apiserver/pkg/authentication/user"
16+
17+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
18+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/client"
1719
)
1820

1921
const validUUID = "decd59a9-1dd2-453e-942e-2deba96bfa96"

pkg/template/servicebroker/bind.go renamed to pkg/templateservicebroker/servicebroker/bind.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package servicebroker
33
import (
44
"bytes"
55
"encoding/base64"
6-
76
"errors"
87
"fmt"
98
"net/http"
109
"reflect"
1110
"strings"
1211

12+
"github.com/golang/glog"
13+
1314
kerrors "k8s.io/apimachinery/pkg/api/errors"
1415
"k8s.io/apimachinery/pkg/api/meta"
1516
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -21,11 +22,10 @@ import (
2122
kapi "k8s.io/kubernetes/pkg/api"
2223
"k8s.io/kubernetes/pkg/apis/authorization"
2324

24-
"github.com/golang/glog"
2525
"github.com/openshift/origin/pkg/authorization/util"
26-
"github.com/openshift/origin/pkg/openservicebroker/api"
2726
routeapi "github.com/openshift/origin/pkg/route/apis/route"
2827
templateapi "github.com/openshift/origin/pkg/template/apis/template"
28+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
2929
uservalidation "github.com/openshift/origin/pkg/user/apis/user/validation"
3030
)
3131

pkg/template/servicebroker/catalog.go renamed to pkg/templateservicebroker/servicebroker/catalog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
jsschema "github.com/lestrrat/go-jsschema"
1111

1212
oapi "github.com/openshift/origin/pkg/api"
13-
"github.com/openshift/origin/pkg/openservicebroker/api"
1413
templateapi "github.com/openshift/origin/pkg/template/apis/template"
14+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1515
)
1616

1717
const (

pkg/template/servicebroker/catalog_test.go renamed to pkg/templateservicebroker/servicebroker/catalog_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88

99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010

11-
"github.com/openshift/origin/pkg/openservicebroker/api"
1211
templateapi "github.com/openshift/origin/pkg/template/apis/template"
12+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1313
)
1414

1515
func TestServiceFromTemplate(t *testing.T) {

pkg/template/servicebroker/deprovision.go renamed to pkg/templateservicebroker/servicebroker/deprovision.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ package servicebroker
33
import (
44
"net/http"
55

6+
"github.com/golang/glog"
7+
68
kerrors "k8s.io/apimachinery/pkg/api/errors"
79
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
810
"k8s.io/apiserver/pkg/authentication/user"
911
kapi "k8s.io/kubernetes/pkg/api"
1012
"k8s.io/kubernetes/pkg/apis/authorization"
1113

12-
"github.com/golang/glog"
1314
"github.com/openshift/origin/pkg/authorization/util"
14-
"github.com/openshift/origin/pkg/openservicebroker/api"
1515
templateapi "github.com/openshift/origin/pkg/template/apis/template"
16+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1617
)
1718

1819
// Deprovision is the reverse of Provision. We clean up the TemplateInstance,

pkg/template/servicebroker/lastoperation.go renamed to pkg/templateservicebroker/servicebroker/lastoperation.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ import (
55
"net/http"
66

77
"github.com/golang/glog"
8-
"github.com/openshift/origin/pkg/authorization/util"
9-
"github.com/openshift/origin/pkg/openservicebroker/api"
10-
templateapi "github.com/openshift/origin/pkg/template/apis/template"
118

129
kerrors "k8s.io/apimachinery/pkg/api/errors"
1310
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1411
"k8s.io/apiserver/pkg/authentication/user"
1512
kapi "k8s.io/kubernetes/pkg/api"
1613
"k8s.io/kubernetes/pkg/apis/authorization"
14+
15+
"github.com/openshift/origin/pkg/authorization/util"
16+
templateapi "github.com/openshift/origin/pkg/template/apis/template"
17+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1718
)
1819

1920
// LastOperation returns the status of an asynchronous operation. Currently

pkg/template/servicebroker/provision.go renamed to pkg/templateservicebroker/servicebroker/provision.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ import (
44
"net/http"
55
"reflect"
66

7+
"github.com/golang/glog"
8+
79
kerrors "k8s.io/apimachinery/pkg/api/errors"
810
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
911
"k8s.io/apimachinery/pkg/labels"
1012
"k8s.io/apiserver/pkg/authentication/user"
1113
kapi "k8s.io/kubernetes/pkg/api"
1214
"k8s.io/kubernetes/pkg/apis/authorization"
1315

14-
"github.com/golang/glog"
1516
"github.com/openshift/origin/pkg/authorization/util"
16-
"github.com/openshift/origin/pkg/openservicebroker/api"
1717
templateapi "github.com/openshift/origin/pkg/template/apis/template"
18+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1819
uservalidation "github.com/openshift/origin/pkg/user/apis/user/validation"
1920
)
2021

pkg/template/servicebroker/servicebroker.go renamed to pkg/templateservicebroker/servicebroker/servicebroker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import (
1313
kclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
1414

1515
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy"
16-
"github.com/openshift/origin/pkg/openservicebroker/api"
1716
extrouteclientset "github.com/openshift/origin/pkg/route/generated/clientset/typed/route/v1"
1817
"github.com/openshift/origin/pkg/serviceaccounts"
1918
templateinformer "github.com/openshift/origin/pkg/template/generated/informers/internalversion/template/internalversion"
2019
templateclientset "github.com/openshift/origin/pkg/template/generated/internalclientset"
2120
internalversiontemplate "github.com/openshift/origin/pkg/template/generated/internalclientset/typed/template/internalversion"
2221
templatelister "github.com/openshift/origin/pkg/template/generated/listers/template/internalversion"
22+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
2323
)
2424

2525
// Broker represents the template service broker. It implements

pkg/template/servicebroker/unbind.go renamed to pkg/templateservicebroker/servicebroker/unbind.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ package servicebroker
33
import (
44
"net/http"
55

6+
"github.com/golang/glog"
7+
68
kerrors "k8s.io/apimachinery/pkg/api/errors"
79
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
810
"k8s.io/apiserver/pkg/authentication/user"
911
"k8s.io/kubernetes/pkg/apis/authorization"
1012

11-
"github.com/golang/glog"
1213
"github.com/openshift/origin/pkg/authorization/util"
13-
"github.com/openshift/origin/pkg/openservicebroker/api"
1414
templateapi "github.com/openshift/origin/pkg/template/apis/template"
15+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1516
)
1617

1718
// Unbind is the reverse of Bind. Currently it simply removes the binding ID

pkg/template/servicebroker/validation.go renamed to pkg/templateservicebroker/servicebroker/validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55

66
"k8s.io/apimachinery/pkg/util/validation/field"
77

8-
"github.com/openshift/origin/pkg/openservicebroker/api"
98
templateapi "github.com/openshift/origin/pkg/template/apis/template"
109
templatevalidation "github.com/openshift/origin/pkg/template/apis/template/validation"
10+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
1111
)
1212

1313
// ValidateProvisionRequest ensures that a ProvisionRequest is valid, beyond

pkg/template/servicebroker/validation_test.go renamed to pkg/templateservicebroker/servicebroker/validation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package servicebroker
33
import (
44
"testing"
55

6-
"github.com/openshift/origin/pkg/openservicebroker/api"
6+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
77
)
88

99
const validUUID = "4f8a47f7-900f-48b4-aad1-865760feaa04"

test/extended/templates/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
e2e "k8s.io/kubernetes/test/e2e/framework"
2222

2323
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
24-
osbclient "github.com/openshift/origin/pkg/openservicebroker/client"
2524
templateapi "github.com/openshift/origin/pkg/template/apis/template"
25+
osbclient "github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/client"
2626
userapi "github.com/openshift/origin/pkg/user/apis/user"
2727
exutil "github.com/openshift/origin/test/extended/util"
2828
)

test/extended/templates/templateservicebroker_e2e.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import (
1717

1818
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
1919
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy"
20-
"github.com/openshift/origin/pkg/openservicebroker/api"
21-
"github.com/openshift/origin/pkg/openservicebroker/client"
2220
routeapi "github.com/openshift/origin/pkg/route/apis/route"
2321
templateapi "github.com/openshift/origin/pkg/template/apis/template"
2422
templateapiv1 "github.com/openshift/origin/pkg/template/apis/template/v1"
23+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
24+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/client"
2525
exutil "github.com/openshift/origin/test/extended/util"
2626
)
2727

test/extended/templates/templateservicebroker_security.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616

1717
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
1818
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy"
19-
"github.com/openshift/origin/pkg/openservicebroker/api"
20-
"github.com/openshift/origin/pkg/openservicebroker/client"
2119
templateapi "github.com/openshift/origin/pkg/template/apis/template"
20+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
21+
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/client"
2222
userapi "github.com/openshift/origin/pkg/user/apis/user"
2323
exutil "github.com/openshift/origin/test/extended/util"
2424
)

0 commit comments

Comments
 (0)