diff --git a/lib/cmdlib.py b/lib/cmdlib.py index e9a820b41c7490fd545dca0d97f5de73ea9bd378..e3b8927ef0aadfd796aa6e4e94dbc9ca804675b1 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -827,10 +827,10 @@ def _GetUpdatedIPolicy(old_ipolicy, new_ipolicy, group_policy=False): raise errors.OpPrereqError("Invalid key in new ipolicy: %s" % key, errors.ECODE_INVAL) if key in constants.IPOLICY_ISPECS: - utils.ForceDictType(value, constants.ISPECS_PARAMETER_TYPES) ipolicy[key] = _GetUpdatedParams(old_ipolicy.get(key, {}), value, use_none=use_none, use_default=use_default) + utils.ForceDictType(ipolicy[key], constants.ISPECS_PARAMETER_TYPES) else: if (not value or value == [constants.VALUE_DEFAULT] or value == constants.VALUE_DEFAULT): diff --git a/qa/qa_group.py b/qa/qa_group.py index 2e872ba29e58b7df2104f3d46d23c17612aa6c2b..67211b22af8f57075f0a13c665b960e2527a7e82 100644 --- a/qa/qa_group.py +++ b/qa/qa_group.py @@ -98,6 +98,12 @@ def TestGroupModify(): "min=%s,max=%s,std=0" % (min_v, max_v), group1], fail=True) AssertCommand(["gnt-group", "modify", "--specs-mem-size", "min=%s,max=%s" % (min_v, max_v), group1]) + AssertCommand(["gnt-group", "modify", "--specs-mem-size", + "min=default,max=default", group1]) + AssertCommand(["gnt-group", "modify", "--ipolicy-vcpu-ratio", + "3.5", group1]) + AssertCommand(["gnt-group", "modify", "--ipolicy-vcpu-ratio", + "default", group1]) AssertCommand(["gnt-group", "modify", "--node-parameters", "spindle_count=10", group1]) if qa_config.TestEnabled("htools"):