def canonicalize(name):

    if name is None:
        return None

    newname = name.lower()

    if newname == "xapi":
        newname = XEN

    if not is_valid(newname):
        raise exception.InvalidHypervisorVirtType(hv_type=name)

    return newname
Canonicalize the hypervisor type name
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/compute/hv_type.py/canonicalize