def delete_profile(hostname, username, password, profile_type, name):

    ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}

    if __opts__['test']:
        return _test_output(ret, 'delete', params={
            'hostname': hostname,
            'username': username,
            'password': password,
            'profile_type': profile_type,
            'name': name
        })

    #is this profile currently configured?
    existing = __salt__['bigip.list_profile'](hostname, username, password, profile_type, name)

    # if it exists by name
    if existing['code'] == 200:

        deleted = __salt__['bigip.delete_profile'](hostname, username, password, profile_type, name)
        # did we get rid of it?
        if deleted['code'] == 200:
            ret['result'] = True
            ret['comment'] = 'Profile was successfully deleted.'
            ret['changes']['old'] = existing['content']
            ret['changes']['new'] = {}
        # something bad happened
        else:
            ret = _load_result(deleted, ret)

    # not found
    elif existing['code'] == 404:
        ret['result'] = True
        ret['comment'] = 'This Profile already does not exist. No changes made.'
        ret['changes']['old'] = {}
        ret['changes']['new'] = {}
    else:
        ret = _load_result(existing, ret)

    return ret
Modify an existing profile.  If it does exists, only
dataset/ETHPy150Open saltstack/salt/salt/states/bigip.py/delete_profile