Revision 2cc673a3 lib/config.py

b/lib/config.py
433 433
        result.append("%s has invalid instance policy: %s" % (owner, err))
434 434

  
435 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)
436
      for key, value in params.items():
437
        if key in constants.IPOLICY_PARAMETERS:
438
          fullkey = "ipolicy/" + key
439
          _helper(owner, fullkey, value, constants.ISPECS_PARAMETER_TYPES)
440
        else:
441
          # FIXME: assuming list type
442
          if not isinstance(value, list):
443
            result.append("%s has invalid instance policy: for %s,"
444
                          " expecting list, got %s" %
445
                          (owner, key, type(value)))
439 446

  
440 447
    # check cluster parameters
441 448
    _helper("cluster", "beparams", cluster.SimpleFillBE({}),

Also available in: Unified diff