feature: allow delete none-default quota

fix: cannot set a quota to zero
This commit is contained in:
Qiu Jian
2019-12-14 23:34:17 +08:00
parent f220d0c89a
commit dc34a66d00
10 changed files with 160 additions and 80 deletions
+7 -1
View File
@@ -84,14 +84,20 @@ type ProjectQuotaOptions struct {
Secgroup int64 `help:"Secgroup count" json:"secgroup,omitzero"`
}
type ImageQuotaKeys struct {
Type string `help:"image type, either iso or image" choices:"iso|image" json:"type,omitempty"`
}
type ImageQuotaOptions struct {
ImageQuotaKeys
Image int64 `help:"Template count" json:"image,omitzero"`
}
type QuotaSetBaseOptions struct {
Project string `help:"Tenant name or ID to set quota" json:"tenant,omitempty"`
Domain string `help:"Domain name or ID to set quota" json:"domain,omitempty"`
Action string `help:"quota set action" choices:"add|sub|reset|replace"`
Action string `help:"quota set action" choices:"add|sub|reset|replace|delete|update"`
}
func printQuotaList(result jsonutils.JSONObject) {