Revision 57dc299a lib/objects.py
b/lib/objects.py | ||
---|---|---|
224 | 224 |
if ispecs_disk_templates is not None: |
225 | 225 |
ipolicy_out[constants.ISPECS_DTS] = list(ispecs_disk_templates) |
226 | 226 |
|
227 |
assert not (frozenset(ipolicy_out.keys()) - constants.IPOLICY_ALL_KEYS) |
|
228 |
|
|
227 | 229 |
return ipolicy_out |
228 | 230 |
|
229 | 231 |
|
... | ... | |
884 | 886 |
InstancePolicy.CheckISpecSyntax(ipolicy, param) |
885 | 887 |
if constants.ISPECS_DTS in ipolicy: |
886 | 888 |
InstancePolicy.CheckDiskTemplates(ipolicy[constants.ISPECS_DTS]) |
889 |
wrong_keys = frozenset(ipolicy.keys()) - constants.IPOLICY_ALL_KEYS |
|
890 |
if wrong_keys: |
|
891 |
raise errors.ConfigurationError("Invalid keys in ipolicy: %s" % |
|
892 |
utils.CommaJoin(wrong_keys)) |
|
887 | 893 |
|
888 | 894 |
@classmethod |
889 | 895 |
def CheckISpecSyntax(cls, ipolicy, name): |
Also available in: Unified diff