'This method is used to get the list of the listeners.'

@logged
def list_listener(self):

    resources = []
    if (self.lb_version == 'v2'):
        resp = self.client.list_listeners()
        resources = resp.get('listeners')
        for listener in resources:
            loadbalancer_id = listener.get('loadbalancers')[0].get('id')
            status = self._get_listener_status(loadbalancer_id)
            listener['operating_status'] = status[listener.get('id')]
    return resources
