mirror of
https://github.com/rancher/types.git
synced 2025-08-15 19:23:00 +00:00
Add output for catalog refresh
This commit is contained in:
parent
5500a37724
commit
2deb66b6fb
@ -236,3 +236,7 @@ type ClusterCatalog struct {
|
||||
Catalog `json:",inline" mapstructure:",squash"`
|
||||
ClusterName string `json:"clusterName,omitempty" norman:"required,type=reference[cluster]"`
|
||||
}
|
||||
|
||||
type CatalogRefresh struct {
|
||||
Catalogs []string `json:"catalogs"`
|
||||
}
|
||||
|
@ -109,12 +109,13 @@ func catalogTypes(schemas *types.Schemas) *types.Schemas {
|
||||
&m.Embed{Field: "status"},
|
||||
&m.Drop{Field: "helmVersionCommits"},
|
||||
).
|
||||
MustImport(&Version, v3.CatalogRefresh{}).
|
||||
MustImportAndCustomize(&Version, v3.Catalog{}, func(schema *types.Schema) {
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"refresh": {},
|
||||
"refresh": {Output: "catalogRefresh"},
|
||||
}
|
||||
schema.CollectionActions = map[string]types.Action{
|
||||
"refresh": {},
|
||||
"refresh": {Output: "catalogRefresh"},
|
||||
}
|
||||
}).
|
||||
AddMapperForType(&Version, v3.Template{},
|
||||
@ -726,10 +727,10 @@ func projectCatalogTypes(schemas *types.Schemas) *types.Schemas {
|
||||
&mapper.NamespaceIDMapper{}).
|
||||
MustImportAndCustomize(&Version, v3.ProjectCatalog{}, func(schema *types.Schema) {
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"refresh": {},
|
||||
"refresh": {Output: "catalogRefresh"},
|
||||
}
|
||||
schema.CollectionActions = map[string]types.Action{
|
||||
"refresh": {},
|
||||
"refresh": {Output: "catalogRefresh"},
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -743,10 +744,10 @@ func clusterCatalogTypes(schemas *types.Schemas) *types.Schemas {
|
||||
&mapper.NamespaceIDMapper{}).
|
||||
MustImportAndCustomize(&Version, v3.ClusterCatalog{}, func(schema *types.Schema) {
|
||||
schema.ResourceActions = map[string]types.Action{
|
||||
"refresh": {},
|
||||
"refresh": {Output: "catalogRefresh"},
|
||||
}
|
||||
schema.CollectionActions = map[string]types.Action{
|
||||
"refresh": {},
|
||||
"refresh": {Output: "catalogRefresh"},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user