def manage_pool_members(hostname, username, password, name, members):

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

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

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

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

        #what are the current members?
        current_members = existing['content']['membersReference']['items']

        modified = __salt__['bigip.replace_pool_members'](hostname, username, password, name, members)

        #was the modification successful?
        if modified['code'] == 200:

            #re-list the pool with new membership
            new_listing = __salt__['bigip.list_pool'](hostname, username, password, name)

            #just in case something happened...
            if new_listing['code'] != 200:
                ret = _load_result(new_listing, ret)
                ret['comment'] = 'modification of the pool was successful but an error occurred upon retrieving new' \
                                 ' listing.'
                return ret

            new_members = new_listing['content']['membersReference']['items']

            #remove generation keys and create new lists indexed by integers
            for current_member in current_members:
                del current_member['generation']

            for new_member in new_members:
                del new_member['generation']

            #anything changed?
            ret = _check_for_changes('Pool Membership', ret, current_members, new_members)

        else:
            ret = _load_result(modified, ret)

    #pool does not exists
    elif existing['code'] == 404:
        ret['comment'] = 'A pool with this name was not found.'

    else:
        ret = _load_result(existing, ret)

    return ret
Setup the dock layout validator.
dataset/ETHPy150Open saltstack/salt/salt/states/bigip.py/manage_pool_members--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/layout/dock_layout.py/DockLayoutValidator.setup