def _CheckOSVariant(os_obj, name):
  variant = objects.OS.GetVariant(name)

  if not os_obj.supported_variants:
    if variant:
      _Fail("OS '%s' does not support variants ('%s' passed)" %
            (os_obj.name, variant))
    else:
      return

  if not variant:
    _Fail("OS name '%s' must include a variant" % name)

  if variant not in os_obj.supported_variants:
    _Fail("OS '%s' does not support variant '%s'" % (os_obj.name, variant))
Display help about this program or one of its subcommands.
dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/_CheckOSVariant--crossover with--dataset/ETHPy150Open openstack/python-senlinclient/senlinclient/shell.py/SenlinShell.do_help