From ca29a37f22d5c5f4a480f4a7cb2aa1056f2bca2c Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Wed, 7 Feb 2018 20:23:25 +0100 Subject: [PATCH] Create short name for cronjob --- pkg/registry/batch/cronjob/storage/storage.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/registry/batch/cronjob/storage/storage.go b/pkg/registry/batch/cronjob/storage/storage.go index d8ae47f389..7826ea5a1e 100644 --- a/pkg/registry/batch/cronjob/storage/storage.go +++ b/pkg/registry/batch/cronjob/storage/storage.go @@ -60,12 +60,18 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST) { } var _ rest.CategoriesProvider = &REST{} +var _ rest.ShortNamesProvider = &REST{} // Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of. func (r *REST) Categories() []string { return []string{"all"} } +// ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource. +func (r *REST) ShortNames() []string { + return []string{"cj"} +} + // StatusREST implements the REST endpoint for changing the status of a resourcequota. type StatusREST struct { store *genericregistry.Store