1
0
mirror of https://github.com/rancher/types.git synced 2025-07-02 16:31:48 +00:00

add noupdate to projectId and move action

This commit is contained in:
Daishan Peng 2018-09-04 15:44:28 -07:00 committed by Craig Jellick
parent 325dce50b6
commit 604a5280b5
2 changed files with 12 additions and 2 deletions

View File

@ -37,9 +37,15 @@ func namespaceTypes(schemas *types.Schemas) *types.Schemas {
MustImport(&Version, NamespaceResourceQuota{}).
MustImport(&Version, v1.Namespace{}, struct {
Description string `json:"description"`
ProjectID string `norman:"type=reference[/v3/schemas/project]"`
ProjectID string `norman:"type=reference[/v3/schemas/project],noupdate"`
ResourceQuota string `json:"resourceQuota,omitempty" norman:"type=namespaceResourceQuota"`
}{})
}{}).
MustImport(&Version, NamespaceMove{}).
MustImportAndCustomize(&Version, v1.Namespace{}, func(schema *types.Schema) {
schema.ResourceActions["move"] = types.Action{
Input: "namespaceMove",
}
})
}
func persistentVolumeTypes(schemas *types.Schemas) *types.Schemas {

View File

@ -45,3 +45,7 @@ type ResourceQuotaLimit struct {
LimitsCPU string `json:"limitsCpu,omitempty"`
LimitsMemory string `json:"limitsMemory,omitempty"`
}
type NamespaceMove struct {
ProjectID string `json:"projectId,omitempty"`
}