def _ComputeMinMaxSpec(name, qualifier, ispecs, value):
  if value in [None, constants.VALUE_AUTO]:
    return None
  max_v = ispecs[constants.ISPECS_MAX].get(name, value)
  min_v = ispecs[constants.ISPECS_MIN].get(name, value)
  if value > max_v or min_v > value:
    if qualifier:
      fqn = "%s/%s" % (name, qualifier)
    else:
      fqn = name
    return ("%s value %s is not in range [%s, %s]" %
            (fqn, value, min_v, max_v))
  return None
Computes if value is in the desired range.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/_ComputeMinMaxSpec