1
0
mirror of https://github.com/rancher/types.git synced 2025-09-12 21:13:18 +00:00

Resource quota

This commit is contained in:
Alena Prokharchyk
2018-06-26 16:01:42 -07:00
committed by Craig Jellick
parent 75cb49e5ed
commit 6ec1e0a018
5 changed files with 59 additions and 6 deletions

View File

@@ -31,11 +31,16 @@ func namespaceTypes(schemas *types.Schemas) *types.Schemas {
AddMapperForType(&Version, v1.Namespace{},
&m.AnnotationField{Field: "description"},
&m.AnnotationField{Field: "projectId"},
&m.AnnotationField{Field: "resourceQuotaTemplateId"},
&m.AnnotationField{Field: "resourceQuotaAppliedTemplateId"},
&m.Drop{Field: "status"},
).
MustImport(&Version, v1.Namespace{}, struct {
Description string `json:"description"`
ProjectID string `norman:"type=reference[/v3/schemas/project]"`
Description string `json:"description"`
ProjectID string `norman:"type=reference[/v3/schemas/project]"`
ResourceQuotaTemplateID string `json:"resourceQuotaTemplateId,omitempty" norman:"type=reference[/v3/schemas/resourceQuotaTemplate]"`
ResourceQuotaAppliedTemplateID string `json:"resourceQuotaAppliedTemplateId,omitempty" norman:"type=reference[/v3/schemas/resourceQuotaTemplate],nocreate,noupdate"`
}{})
}