def CheckIpolicyVsDiskTemplates(ipolicy, enabled_disk_templates):
  assert constants.IPOLICY_DTS in ipolicy
  allowed_disk_templates = ipolicy[constants.IPOLICY_DTS]
  not_enabled = set(allowed_disk_templates) - set(enabled_disk_templates)
  if not_enabled:
    raise errors.OpPrereqError("The following disk templates are allowed"
                               " by the ipolicy, but not enabled on the"
                               " cluster: %s" % utils.CommaJoin(not_enabled),
                               errors.ECODE_INVAL)
Setup Linux to temporarily use reasonably sized frames.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/CheckIpolicyVsDiskTemplates--crossover with--dataset/ETHPy150Open chromium/web-page-replay/platformsettings.py/_LinuxPlatformSettings.setup_temporary_loopback_config