Revision 918eb80b lib/config.py
b/lib/config.py | ||
---|---|---|
426 | 426 |
except errors.ConfigurationError, err: |
427 | 427 |
result.append("%s has invalid nicparams: %s" % (owner, err)) |
428 | 428 |
|
429 |
def _helper_ipolicy(owner, params): |
|
430 |
try: |
|
431 |
objects.InstancePolicy.CheckParameterSyntax(params) |
|
432 |
except errors.ConfigurationError, err: |
|
433 |
result.append("%s has invalid instance policy: %s" % (owner, err)) |
|
434 |
|
|
435 |
def _helper_ispecs(owner, params): |
|
436 |
for key, value in params.iteritems(): |
|
437 |
fullkey = "ipolicy/" + key |
|
438 |
_helper(owner, fullkey, value, constants.ISPECS_PARAMETER_TYPES) |
|
439 |
|
|
429 | 440 |
# check cluster parameters |
430 | 441 |
_helper("cluster", "beparams", cluster.SimpleFillBE({}), |
431 | 442 |
constants.BES_PARAMETER_TYPES) |
... | ... | |
434 | 445 |
_helper_nic("cluster", cluster.SimpleFillNIC({})) |
435 | 446 |
_helper("cluster", "ndparams", cluster.SimpleFillND({}), |
436 | 447 |
constants.NDS_PARAMETER_TYPES) |
448 |
_helper_ipolicy("cluster", cluster.SimpleFillIPolicy({})) |
|
449 |
_helper_ispecs("cluster", cluster.SimpleFillIPolicy({})) |
|
437 | 450 |
|
438 | 451 |
# per-instance checks |
439 | 452 |
for instance_name in data.instances: |
Also available in: Unified diff