Before this patch, any resource quotas, say, with a dot (like
limits.cpu), would not be stored properly in the database and thus
unusable and ignored by DCM logical cloud apply operation.
Issue-ID: MULTICLOUD-1143
Change-Id: I178e66756bc9bb2798427233d15196d0e2559a99
Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
type Specs struct {
Request string `yaml:"request,omitempty"`
Usages []string `yaml:"usages,omitempty"`
- //Hard logicalcloud.QSpec `yaml:"hard,omitempty"`
- Hard QSpec `yaml:"hard,omitempty"`
+ // TODO: validate quota keys
+ // //Hard logicalcloud.QSpec `yaml:"hard,omitempty"`
+ // Hard QSpec `yaml:"hard,omitempty"`
+ Hard map[string]string `yaml:"hard,omitempty"`
}
type RoleRules struct {
// Quota contains the parameters needed for a Quota
type Quota struct {
- MetaData QMetaDataList `json:"metadata"`
- Specification QSpec `json:"spec"`
+ MetaData QMetaDataList `json:"metadata"`
+ // Specification QSpec `json:"spec"`
+ Specification map[string]string `json:"spec"`
}
// MetaData contains the parameters needed for metadata
Description string `json:"description"`
}
+// TODO: use QSpec fields to validate quota keys
// Spec contains the parameters needed for spec
type QSpec struct {
LimitsCPU string `json:"limits.cpu"`