def IsValidDiskAccessModeCombination(hv, disk_template, mode):
  if mode == constants.DISK_KERNELSPACE:
    return True

  if (hv == constants.HT_KVM and
      disk_template in constants.DTS_HAVE_ACCESS and
      mode == constants.DISK_USERSPACE):
    return True

  # Everything else:
  return False
Associate a LUN with a guest IQN
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/IsValidDiskAccessModeCombination--crossover with--dataset/ETHPy150Open jasonhancock/cloudstack-python-client/CloudStack/Client.py/Client.associateLun