mirror of
https://github.com/rancher/types.git
synced 2025-07-31 04:49:37 +00:00
Question API on ClusterTemplates
This commit is contained in:
parent
a875317c20
commit
0a9f28b48e
@ -45,3 +45,7 @@ type ClusterTemplateRevisionSpec struct {
|
||||
Questions []Question `json:"questions,omitempty"`
|
||||
ClusterConfig *ClusterSpecBase `json:"clusterConfig" norman:"required"`
|
||||
}
|
||||
|
||||
type ClusterTemplateQuestionsOutput struct {
|
||||
Questions []Question `json:"questions,omitempty"`
|
||||
}
|
||||
|
@ -831,8 +831,15 @@ func clusterTemplateTypes(schemas *types.Schemas) *types.Schemas {
|
||||
TypeName("clusterTemplateRevision", v3.ClusterTemplateRevision{}).
|
||||
AddMapperForType(&Version, v3.ClusterTemplate{}, m.Drop{Field: "namespaceId"}, m.DisplayName{}).
|
||||
AddMapperForType(&Version, v3.ClusterTemplateRevision{}, m.Drop{Field: "namespaceId"}).
|
||||
MustImport(&Version, v3.ClusterTemplateQuestionsOutput{}).
|
||||
MustImport(&Version, v3.ClusterTemplate{}).
|
||||
MustImport(&Version, v3.ClusterTemplateRevision{})
|
||||
MustImportAndCustomize(&Version, v3.ClusterTemplateRevision{}, func(schema *types.Schema) {
|
||||
schema.CollectionActions = map[string]types.Action{
|
||||
"listquestions": {
|
||||
Output: "clusterTemplateQuestionsOutput",
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func clusterScanTypes(schemas *types.Schemas) *types.Schemas {
|
||||
|
Loading…
Reference in New Issue
Block a user