1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 04:02:03 +00:00

ClusterTemplateRevision name needs to be required and non-unique

This commit is contained in:
Prachi Damle 2019-08-16 16:58:40 -07:00 committed by Alena Prokharchyk
parent 96e6d6f302
commit 917ccad7c0
2 changed files with 2 additions and 1 deletions

View File

@ -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"`

View File

@ -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) {