From 917ccad7c01d89adf0501599f3caa6500a014027 Mon Sep 17 00:00:00 2001 From: Prachi Damle Date: Fri, 16 Aug 2019 16:58:40 -0700 Subject: [PATCH] ClusterTemplateRevision name needs to be required and non-unique --- apis/management.cattle.io/v3/cluster_template_types.go | 1 + apis/management.cattle.io/v3/schema/schema.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apis/management.cattle.io/v3/cluster_template_types.go b/apis/management.cattle.io/v3/cluster_template_types.go index 8181cc54..e4aeef36 100644 --- a/apis/management.cattle.io/v3/cluster_template_types.go +++ b/apis/management.cattle.io/v3/cluster_template_types.go @@ -37,6 +37,7 @@ type ClusterTemplateRevision struct { } type ClusterTemplateRevisionSpec struct { + DisplayName string `json:"displayName" norman:"required"` Enabled *bool `json:"enabled,omitempty" norman:"default=true"` ClusterTemplateName string `json:"clusterTemplateName,omitempty" norman:"type=reference[clusterTemplate],required,noupdate"` diff --git a/apis/management.cattle.io/v3/schema/schema.go b/apis/management.cattle.io/v3/schema/schema.go index 537ece33..5128383e 100644 --- a/apis/management.cattle.io/v3/schema/schema.go +++ b/apis/management.cattle.io/v3/schema/schema.go @@ -867,7 +867,7 @@ func clusterTemplateTypes(schemas *types.Schemas) *types.Schemas { TypeName("clusterTemplate", v3.ClusterTemplate{}). TypeName("clusterTemplateRevision", v3.ClusterTemplateRevision{}). AddMapperForType(&Version, v3.ClusterTemplate{}, m.Drop{Field: "namespaceId"}, m.DisplayName{}). - AddMapperForType(&Version, v3.ClusterTemplateRevision{}, m.Drop{Field: "namespaceId"}). + AddMapperForType(&Version, v3.ClusterTemplateRevision{}, m.Drop{Field: "namespaceId"}, m.DisplayName{}). MustImport(&Version, v3.ClusterTemplateQuestionsOutput{}). MustImport(&Version, v3.ClusterTemplate{}). MustImportAndCustomize(&Version, v3.ClusterTemplateRevision{}, func(schema *types.Schema) {