diff --git a/apiserver/rest/reststorage.go b/apiserver/rest/reststorage.go index 695c9e44..c87a5aed 100644 --- a/apiserver/rest/reststorage.go +++ b/apiserver/rest/reststorage.go @@ -22,13 +22,13 @@ import ( "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/registry/generic" - etcdgeneric "k8s.io/kubernetes/pkg/registry/generic/etcd" + "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/storage" ) type REST struct { - *etcdgeneric.Etcd + *registry.Store } // NewREST returns a RESTStorage object that will work with testtype. @@ -39,19 +39,19 @@ func NewREST(s storage.Interface, storageDecorator generic.StorageDecorator) *RE strategy := &NotNamespaceScoped{} storageInterface := storageDecorator( s, 100, &testgroup.TestType{}, prefix, strategy, newListFunc) - store := &etcdgeneric.Etcd{ + store := ®istry.Store{ NewFunc: func() runtime.Object { return &testgroup.TestType{} }, // NewListFunc returns an object capable of storing results of an etcd list. NewListFunc: newListFunc, // Produces a path that etcd understands, to the root of the resource // by combining the namespace in the context with the given prefix. KeyRootFunc: func(ctx api.Context) string { - return etcdgeneric.NamespaceKeyRootFunc(ctx, prefix) + return registry.NamespaceKeyRootFunc(ctx, prefix) }, // Produces a path that etcd understands, to the resource by combining // the namespace in the context with the given prefix. KeyFunc: func(ctx api.Context, name string) (string, error) { - return etcdgeneric.NamespaceKeyFunc(ctx, prefix, name) + return registry.NamespaceKeyFunc(ctx, prefix, name) }, // Retrieve the name field of the resource. ObjectNameFunc: func(obj runtime.Object) (string, error) {