Commit 9db0b351 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Disk templates are "allowed" and not "enabled" in ipolicies



The way disk templates were displayed in instance policies became confusing
since the introduction of the enabled_disk_templates cluster parameter.

Fix issue 440.
Signed-off-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent f73f3567
......@@ -3765,7 +3765,7 @@ def FormatPolicyInfo(custom_ipolicy, eff_ipolicy, iscluster):
)
ret.append(
("enabled disk templates",
("allowed disk templates",
_FormatListInfoDefault(custom_ipolicy.get(constants.IPOLICY_DTS),
eff_ipolicy[constants.IPOLICY_DTS]))
)
......
......@@ -578,7 +578,7 @@ def TestClusterModifyIPolicy():
# Disk templates are treated slightly differently
par = "disk-templates"
disp_str = "enabled disk templates"
disp_str = "allowed disk templates"
curr_val = old_policy[disp_str]
test_values = [
(True, constants.DT_PLAIN),
......
......@@ -201,7 +201,7 @@ def _TestGroupModifyIPolicy(groupname):
("vcpu-ratio", 1.5, None, 1.5),
("spindle-ratio", 1.5, None, 1.5),
("disk-templates", constants.DT_PLAIN,
"enabled disk templates", constants.DT_PLAIN)
"allowed disk templates", constants.DT_PLAIN)
]:
if not iname:
iname = par
......
......@@ -1220,7 +1220,7 @@ class TestFormatPolicyInfo(unittest.TestCase):
def _TranslateParsedNames(self, parsed):
for (pretty, raw) in [
("bounds specs", constants.ISPECS_MINMAX),
("enabled disk templates", constants.IPOLICY_DTS)
("allowed disk templates", constants.IPOLICY_DTS)
]:
self._RenameDictItem(parsed, pretty, raw)
for minmax in parsed[constants.ISPECS_MINMAX]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment