A function to connect to a bigip device and list an existing profile.  If no name is provided than all
    profiles of the specified type will be listed.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile(s) to list
    name
        The name of the profile to list

    CLI Example::

        salt '*' bigip.list_profile bigip admin admin http my-http-profile

def list_profile(hostname, username, password, profile_type, name=None, ):
    '''
    A function to connect to a bigip device and list an existing profile.  If no name is provided than all
    profiles of the specified type will be listed.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    profile_type
        The type of profile(s) to list
    name
        The name of the profile to list

    CLI Example::

        salt '*' bigip.list_profile bigip admin admin http my-http-profile

    '''

    #build sessions
    bigip_session = _build_session(username, password)

    #get to REST
    try:
        if name:
            response = bigip_session.get(BIG_IP_URL_BASE.format(host=hostname)+'/ltm/profile/{type}/{name}?expandSubcollections=true'.format(type=profile_type, name=name))
        else:
            response = bigip_session.get(BIG_IP_URL_BASE.format(host=hostname)+'/ltm/profile/{type}'.format(type=profile_type))
    except requests.exceptions.ConnectionError as e:
        return _load_connection_error(hostname, e)

    return _load_response(response)