'Method is used to get the mapping between pool and listener
This method is used to get the pool ids and listener ids
from the pool list.
:param pools: The list of the polls
:returns: The relationship between pool and listener.
It\'s a dictionary type. The key of this dict is
the id of pool and the value of it is the id of the first
listener which the pool belongs to'

def _get_pool_and_listener_ids(self, pools):

    pool_listener_dict = dict()
    for pool in pools:
        key = pool.get('id')
        value = pool.get('listeners')[0].get('id')
        pool_listener_dict[key] = value
    return pool_listener_dict
