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:
parent
325dce50b6
commit
604a5280b5
@ -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 {
|
||||
|
@ -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"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user