Validate snapshot name and convert to snapshot ID

    :param str name:
        Name/ID of VM whose snapshot name is being validated

    :param str snap_name:
        Name/ID of snapshot

    :param bool strict:
        Raise an exception if multiple snapshot IDs are found

    :param str runas:
        The user that the prlctl command will be run as

def _validate_snap_name(name, snap_name, strict=True, runas=None):
    '''
    Validate snapshot name and convert to snapshot ID

    :param str name:
        Name/ID of VM whose snapshot name is being validated

    :param str snap_name:
        Name/ID of snapshot

    :param bool strict:
        Raise an exception if multiple snapshot IDs are found

    :param str runas:
        The user that the prlctl command will be run as
    '''
    snap_name = salt.utils.data.decode(snap_name)

    # Try to convert snapshot name to an ID without {}
    if re.match(GUID_REGEX, snap_name):
        return snap_name.strip('{}')
    else:
        return snapshot_name_to_id(name, snap_name, strict=strict, runas=runas)