Skip to content

Commit 8ca3f60

Browse files
Merge pull request #18407 from mfojtik/move-apps-cmd
Automatic merge from submit-queue. apps: move pkg/apps/cmd to pkg/oc/cli/deploymentconfigs Because `pkg/apps/cmd` is not used by `pkg/apps` and it is only used by `oc` (scaler, history, rollback). It really belongs to `oc` package.
2 parents 1bd45ec + 09adc7a commit 8ca3f60

16 files changed

+31
-22
lines changed

hack/import-restrictions.json

-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@
453453
"github.com/openshift/origin/pkg/apps/apis/apps/test",
454454
"github.com/openshift/origin/pkg/apps/client/internalversion",
455455
"github.com/openshift/origin/pkg/apps/client/v1",
456-
"github.com/openshift/origin/pkg/apps/cmd",
457456
"github.com/openshift/origin/pkg/apps/prune",
458457
"github.com/openshift/origin/pkg/apps/registry/deployconfig",
459458
"github.com/openshift/origin/pkg/apps/util",

pkg/apps/cmd/doc.go

-3
This file was deleted.

pkg/apps/strategy/recreate/recreate_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
appsv1 "github.com/openshift/api/apps/v1"
1515
appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
1616
appstest "github.com/openshift/origin/pkg/apps/apis/apps/test"
17-
cmdtest "github.com/openshift/origin/pkg/apps/cmd/test"
1817
"github.com/openshift/origin/pkg/apps/strategy"
1918
appsutil "github.com/openshift/origin/pkg/apps/util"
19+
cmdtest "github.com/openshift/origin/pkg/apps/util/test"
2020

2121
_ "github.com/openshift/origin/pkg/api/install"
2222
)
File renamed without changes.

pkg/cmd/infra/deployer/deployer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
appsv1 "github.com/openshift/api/apps/v1"
1313
appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
1414
appstest "github.com/openshift/origin/pkg/apps/apis/apps/test"
15-
cmdtest "github.com/openshift/origin/pkg/apps/cmd/test"
1615
"github.com/openshift/origin/pkg/apps/strategy"
1716
appsutil "github.com/openshift/origin/pkg/apps/util"
17+
cmdtest "github.com/openshift/origin/pkg/apps/util/test"
1818

1919
// install all APIs
2020
_ "github.com/openshift/origin/pkg/api/install"

pkg/oc/cli/deploymentconfigs/OWNERS

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
reviewers:
2+
- kargakis
3+
- smarterclayton
4+
- mfojtik
5+
- soltysh
6+
- abhgupta
7+
- tnozicka
8+
approvers:
9+
- kargakis
10+
- smarterclayton
11+
- mfojtik
12+
- soltysh
13+
- tnozicka

pkg/apps/cmd/delete.go pkg/oc/cli/deploymentconfigs/delete.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"time"

pkg/apps/cmd/delete_test.go pkg/oc/cli/deploymentconfigs/delete_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"reflect"

pkg/apps/cmd/generate.go pkg/oc/cli/deploymentconfigs/generate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"fmt"

pkg/apps/cmd/history.go pkg/oc/cli/deploymentconfigs/history.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"bytes"

pkg/apps/cmd/rollback.go pkg/oc/cli/deploymentconfigs/rollback.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"bytes"

pkg/apps/cmd/scale.go pkg/oc/cli/deploymentconfigs/scale.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"time"

pkg/apps/cmd/scale_test.go pkg/oc/cli/deploymentconfigs/scale_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"testing"

pkg/apps/cmd/status.go pkg/oc/cli/deploymentconfigs/status.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmd
1+
package deploymentconfigs
22

33
import (
44
"errors"

pkg/oc/cli/util/clientcmd/factory_client_access.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import (
3838

3939
appsapiv1 "github.com/openshift/api/apps/v1"
4040
appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
41-
appscmd "github.com/openshift/origin/pkg/apps/cmd"
4241
imageclient "github.com/openshift/origin/pkg/image/generated/internalclientset"
42+
deploymentcmd "github.com/openshift/origin/pkg/oc/cli/deploymentconfigs"
4343
"github.com/openshift/origin/pkg/oc/cli/describe"
4444
routegen "github.com/openshift/origin/pkg/route/generator"
4545
)
@@ -362,7 +362,7 @@ func (f *ring0Factory) DefaultNamespace() (string, bool, error) {
362362
func DefaultGenerators(cmdName string) map[string]kubectl.Generator {
363363
generators := map[string]map[string]kubectl.Generator{}
364364
generators["run"] = map[string]kubectl.Generator{
365-
"deploymentconfig/v1": appscmd.BasicDeploymentConfigController{},
365+
"deploymentconfig/v1": deploymentcmd.BasicDeploymentConfigController{},
366366
"run-controller/v1": kubectl.BasicReplicationController{}, // legacy alias for run/v1
367367
}
368368
generators["expose"] = map[string]kubectl.Generator{

pkg/oc/cli/util/clientcmd/factory_object_mapping.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"github.com/openshift/origin/pkg/api/latest"
2828
appsapi "github.com/openshift/origin/pkg/apps/apis/apps"
2929
appsmanualclient "github.com/openshift/origin/pkg/apps/client/internalversion"
30-
appscmd "github.com/openshift/origin/pkg/apps/cmd"
3130
appsclient "github.com/openshift/origin/pkg/apps/generated/internalclientset"
3231
appsutil "github.com/openshift/origin/pkg/apps/util"
3332
authorizationapi "github.com/openshift/origin/pkg/authorization/apis/authorization"
@@ -39,6 +38,7 @@ import (
3938
buildutil "github.com/openshift/origin/pkg/build/util"
4039
configcmd "github.com/openshift/origin/pkg/bulk"
4140
imageapi "github.com/openshift/origin/pkg/image/apis/image"
41+
deploymentcmd "github.com/openshift/origin/pkg/oc/cli/deploymentconfigs"
4242
"github.com/openshift/origin/pkg/oc/cli/describe"
4343
userapi "github.com/openshift/origin/pkg/user/apis/user"
4444
authenticationreaper "github.com/openshift/origin/pkg/user/reaper"
@@ -203,7 +203,7 @@ func (f *ring1Factory) Scaler(mapping *meta.RESTMapping) (kubectl.Scaler, error)
203203
if err != nil {
204204
return nil, err
205205
}
206-
return appscmd.NewDeploymentConfigScaler(appsclient.NewForConfigOrDie(config), kc), nil
206+
return deploymentcmd.NewDeploymentConfigScaler(appsclient.NewForConfigOrDie(config), kc), nil
207207
}
208208
return f.kubeObjectMappingFactory.Scaler(mapping)
209209
}
@@ -220,7 +220,7 @@ func (f *ring1Factory) Reaper(mapping *meta.RESTMapping) (kubectl.Reaper, error)
220220
if err != nil {
221221
return nil, err
222222
}
223-
return appscmd.NewDeploymentConfigReaper(appsclient.NewForConfigOrDie(config), kc), nil
223+
return deploymentcmd.NewDeploymentConfigReaper(appsclient.NewForConfigOrDie(config), kc), nil
224224
case authorizationapi.IsKindOrLegacy("Role", gk):
225225
authClient, err := f.clientAccessFactory.OpenshiftInternalAuthorizationClient()
226226
if err != nil {
@@ -293,7 +293,7 @@ func (f *ring1Factory) HistoryViewer(mapping *meta.RESTMapping) (kubectl.History
293293
if err != nil {
294294
return nil, err
295295
}
296-
return appscmd.NewDeploymentConfigHistoryViewer(kc), nil
296+
return deploymentcmd.NewDeploymentConfigHistoryViewer(kc), nil
297297
}
298298
return f.kubeObjectMappingFactory.HistoryViewer(mapping)
299299
}
@@ -304,7 +304,7 @@ func (f *ring1Factory) Rollbacker(mapping *meta.RESTMapping) (kubectl.Rollbacker
304304
if err != nil {
305305
return nil, err
306306
}
307-
return appscmd.NewDeploymentConfigRollbacker(appsclient.NewForConfigOrDie(config)), nil
307+
return deploymentcmd.NewDeploymentConfigRollbacker(appsclient.NewForConfigOrDie(config)), nil
308308
}
309309
return f.kubeObjectMappingFactory.Rollbacker(mapping)
310310
}
@@ -315,7 +315,7 @@ func (f *ring1Factory) StatusViewer(mapping *meta.RESTMapping) (kubectl.StatusVi
315315
return nil, err
316316
}
317317
if appsapi.IsKindOrLegacy("DeploymentConfig", mapping.GroupVersionKind.GroupKind()) {
318-
return appscmd.NewDeploymentConfigStatusViewer(appsclient.NewForConfigOrDie(config)), nil
318+
return deploymentcmd.NewDeploymentConfigStatusViewer(appsclient.NewForConfigOrDie(config)), nil
319319
}
320320
return f.kubeObjectMappingFactory.StatusViewer(mapping)
321321
}

0 commit comments

Comments
 (0)