From 1bf6c769280bae87027836a718357b97587a9fd6 Mon Sep 17 00:00:00 2001 From: Rene Saenz Date: Tue, 24 Jan 2017 18:15:51 -0600 Subject: [PATCH] Rename controller pkg/registry/core/controller to pkg/registry/core/replicationcontroller --- .../BUILD | 0 .../doc.go | 2 +- .../registry.go | 2 +- .../storage/BUILD | 0 .../storage/storage.go | 18 +++++++++--------- .../storage/storage_test.go | 0 .../strategy.go | 2 +- .../strategy_test.go | 2 +- pkg/registry/core/rest/storage_core.go | 2 +- .../extensions/controller/storage/storage.go | 8 ++++---- test/test_owners.csv | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) rename pkg/registry/core/{controller => replicationcontroller}/BUILD (100%) rename pkg/registry/core/{controller => replicationcontroller}/doc.go (87%) rename pkg/registry/core/{controller => replicationcontroller}/registry.go (99%) rename pkg/registry/core/{controller => replicationcontroller}/storage/BUILD (100%) rename pkg/registry/core/{controller => replicationcontroller}/storage/storage.go (91%) rename pkg/registry/core/{controller => replicationcontroller}/storage/storage_test.go (100%) rename pkg/registry/core/{controller => replicationcontroller}/strategy.go (99%) rename pkg/registry/core/{controller => replicationcontroller}/strategy_test.go (99%) diff --git a/pkg/registry/core/controller/BUILD b/pkg/registry/core/replicationcontroller/BUILD similarity index 100% rename from pkg/registry/core/controller/BUILD rename to pkg/registry/core/replicationcontroller/BUILD diff --git a/pkg/registry/core/controller/doc.go b/pkg/registry/core/replicationcontroller/doc.go similarity index 87% rename from pkg/registry/core/controller/doc.go rename to pkg/registry/core/replicationcontroller/doc.go index f7e7bec2624..c1538e4414a 100644 --- a/pkg/registry/core/controller/doc.go +++ b/pkg/registry/core/replicationcontroller/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package controller provides Registry interface and it's RESTStorage // implementation for storing ReplicationController api objects. -package controller // import "k8s.io/kubernetes/pkg/registry/core/controller" +package replicationcontroller // import "k8s.io/kubernetes/pkg/registry/core/replicationcontroller" diff --git a/pkg/registry/core/controller/registry.go b/pkg/registry/core/replicationcontroller/registry.go similarity index 99% rename from pkg/registry/core/controller/registry.go rename to pkg/registry/core/replicationcontroller/registry.go index c3574538f7a..9a64f1afeb9 100644 --- a/pkg/registry/core/controller/registry.go +++ b/pkg/registry/core/replicationcontroller/registry.go @@ -16,7 +16,7 @@ limitations under the License. // If you make changes to this file, you should also make the corresponding change in ReplicaSet. -package controller +package replicationcontroller import ( "fmt" diff --git a/pkg/registry/core/controller/storage/BUILD b/pkg/registry/core/replicationcontroller/storage/BUILD similarity index 100% rename from pkg/registry/core/controller/storage/BUILD rename to pkg/registry/core/replicationcontroller/storage/BUILD diff --git a/pkg/registry/core/controller/storage/storage.go b/pkg/registry/core/replicationcontroller/storage/storage.go similarity index 91% rename from pkg/registry/core/controller/storage/storage.go rename to pkg/registry/core/replicationcontroller/storage/storage.go index 5f36b1d45c3..7a9deb4b410 100644 --- a/pkg/registry/core/controller/storage/storage.go +++ b/pkg/registry/core/replicationcontroller/storage/storage.go @@ -32,7 +32,7 @@ import ( "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" - "k8s.io/kubernetes/pkg/registry/core/controller" + "k8s.io/kubernetes/pkg/registry/core/replicationcontroller" ) // ControllerStorage includes dummy storage for Replication Controllers and for Scale subresource. @@ -44,7 +44,7 @@ type ControllerStorage struct { func NewStorage(optsGetter generic.RESTOptionsGetter) ControllerStorage { controllerREST, statusREST := NewREST(optsGetter) - controllerRegistry := controller.NewRegistry(controllerREST) + controllerRegistry := replicationcontroller.NewRegistry(controllerREST) return ControllerStorage{ Controller: controllerREST, @@ -65,20 +65,20 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST) { ObjectNameFunc: func(obj runtime.Object) (string, error) { return obj.(*api.ReplicationController).Name, nil }, - PredicateFunc: controller.MatchController, + PredicateFunc: replicationcontroller.MatchController, QualifiedResource: api.Resource("replicationcontrollers"), - CreateStrategy: controller.Strategy, - UpdateStrategy: controller.Strategy, - DeleteStrategy: controller.Strategy, + CreateStrategy: replicationcontroller.Strategy, + UpdateStrategy: replicationcontroller.Strategy, + DeleteStrategy: replicationcontroller.Strategy, } - options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: controller.GetAttrs} + options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: replicationcontroller.GetAttrs} if err := store.CompleteWithOptions(options); err != nil { panic(err) // TODO: Propagate error up } statusStore := *store - statusStore.UpdateStrategy = controller.StatusStrategy + statusStore.UpdateStrategy = replicationcontroller.StatusStrategy return &REST{store}, &StatusREST{store: &statusStore} } @@ -103,7 +103,7 @@ func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo } type ScaleREST struct { - registry controller.Registry + registry replicationcontroller.Registry } // ScaleREST implements Patcher diff --git a/pkg/registry/core/controller/storage/storage_test.go b/pkg/registry/core/replicationcontroller/storage/storage_test.go similarity index 100% rename from pkg/registry/core/controller/storage/storage_test.go rename to pkg/registry/core/replicationcontroller/storage/storage_test.go diff --git a/pkg/registry/core/controller/strategy.go b/pkg/registry/core/replicationcontroller/strategy.go similarity index 99% rename from pkg/registry/core/controller/strategy.go rename to pkg/registry/core/replicationcontroller/strategy.go index 2f7b77511a5..22373188b55 100644 --- a/pkg/registry/core/controller/strategy.go +++ b/pkg/registry/core/replicationcontroller/strategy.go @@ -16,7 +16,7 @@ limitations under the License. // If you make changes to this file, you should also make the corresponding change in ReplicaSet. -package controller +package replicationcontroller import ( "fmt" diff --git a/pkg/registry/core/controller/strategy_test.go b/pkg/registry/core/replicationcontroller/strategy_test.go similarity index 99% rename from pkg/registry/core/controller/strategy_test.go rename to pkg/registry/core/replicationcontroller/strategy_test.go index cdad6e9b795..6c9513cc7bf 100644 --- a/pkg/registry/core/controller/strategy_test.go +++ b/pkg/registry/core/replicationcontroller/strategy_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controller +package replicationcontroller import ( "strings" diff --git a/pkg/registry/core/rest/storage_core.go b/pkg/registry/core/rest/storage_core.go index 828e7a4b5f9..bb512547f5b 100644 --- a/pkg/registry/core/rest/storage_core.go +++ b/pkg/registry/core/rest/storage_core.go @@ -39,7 +39,6 @@ import ( "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/registry/core/componentstatus" configmapstore "k8s.io/kubernetes/pkg/registry/core/configmap/storage" - controllerstore "k8s.io/kubernetes/pkg/registry/core/controller/storage" "k8s.io/kubernetes/pkg/registry/core/endpoint" endpointsstore "k8s.io/kubernetes/pkg/registry/core/endpoint/storage" eventstore "k8s.io/kubernetes/pkg/registry/core/event/storage" @@ -51,6 +50,7 @@ import ( podstore "k8s.io/kubernetes/pkg/registry/core/pod/storage" podtemplatestore "k8s.io/kubernetes/pkg/registry/core/podtemplate/storage" "k8s.io/kubernetes/pkg/registry/core/rangeallocation" + controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage" resourcequotastore "k8s.io/kubernetes/pkg/registry/core/resourcequota/storage" secretstore "k8s.io/kubernetes/pkg/registry/core/secret/storage" "k8s.io/kubernetes/pkg/registry/core/service" diff --git a/pkg/registry/extensions/controller/storage/storage.go b/pkg/registry/extensions/controller/storage/storage.go index 6ee77059998..cd985184f37 100644 --- a/pkg/registry/extensions/controller/storage/storage.go +++ b/pkg/registry/extensions/controller/storage/storage.go @@ -28,8 +28,8 @@ import ( extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" - "k8s.io/kubernetes/pkg/registry/core/controller" - controllerstore "k8s.io/kubernetes/pkg/registry/core/controller/storage" + "k8s.io/kubernetes/pkg/registry/core/replicationcontroller" + controllerstore "k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage" ) // Container includes dummy storage for RC pods and experimental storage for Scale. @@ -41,7 +41,7 @@ type ContainerStorage struct { func NewStorage(optsGetter generic.RESTOptionsGetter) ContainerStorage { // scale does not set status, only updates spec so we ignore the status controllerREST, _ := controllerstore.NewREST(optsGetter) - rcRegistry := controller.NewRegistry(controllerREST) + rcRegistry := replicationcontroller.NewRegistry(controllerREST) return ContainerStorage{ ReplicationController: &RcREST{}, @@ -50,7 +50,7 @@ func NewStorage(optsGetter generic.RESTOptionsGetter) ContainerStorage { } type ScaleREST struct { - registry *controller.Registry + registry *replicationcontroller.Registry } // ScaleREST implements Patcher diff --git a/test/test_owners.csv b/test/test_owners.csv index baede512067..81403b97aa1 100644 --- a/test/test_owners.csv +++ b/test/test_owners.csv @@ -756,8 +756,8 @@ k8s.io/kubernetes/pkg/registry/certificates/certificates,smarterclayton,1 k8s.io/kubernetes/pkg/registry/core/componentstatus,krousey,1 k8s.io/kubernetes/pkg/registry/core/configmap,janetkuo,1 k8s.io/kubernetes/pkg/registry/core/configmap/etcd,gmarek,1 -k8s.io/kubernetes/pkg/registry/core/controller,freehan,1 -k8s.io/kubernetes/pkg/registry/core/controller/etcd,fabioy,1 +k8s.io/kubernetes/pkg/registry/core/replicationcontroller,freehan,1 +k8s.io/kubernetes/pkg/registry/core/replicationcontroller/etcd,fabioy,1 k8s.io/kubernetes/pkg/registry/core/endpoint,bprashanth,1 k8s.io/kubernetes/pkg/registry/core/endpoint/etcd,mikedanese,1 k8s.io/kubernetes/pkg/registry/core/event,ixdy,1