def _volume_type_and_iops_for_profile_name(profile_name, size):
    """
    Determines and returns the volume_type and iops for a boto create_volume
    call for a given profile_name.

    :param profile_name: The name of the profile.

    :param size: The size of the volume to create in GiB.

    :returns: A tuple of (volume_type, iops) to be passed to a create_volume
        call.
    """
    volume_type = None
    iops = None
    try:
        A = EBSMandatoryProfileAttributes.lookupByName(
            MandatoryProfiles.lookupByValue(profile_name).name).value
    except __HOLE__:
        pass
    else:
        volume_type = A.volume_type.value
        iops = A.requested_iops(size)
    return volume_type, iops
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/ebs.py/_volume_type_and_iops_for_profile_name