def get_all_deployed_l7_policys(self):
        """Retrieve a dict of all l7policies deployed

        The dict returned will have the following format:
            {policy_bigip_id_0: {'id': policy_id_0,
                                 'tenant_id': tenant_id,
                                 'hostnames': [hostnames_0]}
             ...
            }
        Where hostnames is the list of BIG-IP hostnames impacted, and the
        policy_id is the policy_bigip_id without 'wrapper_policy_'
        """
        LOG.debug('getting all deployed l7_policys on BIG-IP\'s')
        deployed_l7_policys_dict = {}
        for bigip in self.get_all_bigips():
            folders = self.system_helper.get_folders(bigip)
            for folder in folders:
                tenant_id = folder[len(self.service_adapter.prefix):]
                if str(folder).startswith(self.service_adapter.prefix):
                    resource = resource_helper.BigIPResourceHelper(
                        resource_helper.ResourceType.l7policy)
                    deployed_l7_policys = resource.get_resources(
                        bigip, folder)
                    if deployed_l7_policys:
                        for l7_policy in deployed_l7_policys:
                            l7_policy_id = l7_policy.name
                            if l7_policy_id in deployed_l7_policys_dict:
                                my_dict = \
                                    deployed_l7_policys_dict[l7_policy_id]
                                my_dict['hostnames'].append(bigip.hostname)
                            else:
                                po_id = l7_policy_id.replace(
                                    'wrapper_policy_', '')
                                deployed_l7_policys_dict[l7_policy_id] = {
                                    'id': po_id,
                                    'tenant_id': tenant_id,
                                    'hostnames': [bigip.hostname]
                                }
        return deployed_l7_policys_dict