def purge_orphaned_loadbalancer(self, tenant_id=None,
                                    loadbalancer_id=None, hostnames=list()):
        for bigip in self.get_all_bigips():
            if bigip.hostname in hostnames:
                try:
                    va_name = self.service_adapter.prefix + loadbalancer_id
                    partition = self.service_adapter.prefix + tenant_id
                    va = resource_helper.BigIPResourceHelper(
                        resource_helper.ResourceType.virtual_address).load(
                            bigip, va_name, partition)
                    # get virtual services (listeners)
                    # referencing this virtual address
                    vses = resource_helper.BigIPResourceHelper(
                        resource_helper.ResourceType.virtual).get_resources(
                            bigip, partition)
                    vs_dest_compare = '/' + partition + '/' + va.name
                    for vs in vses:
                        if str(vs.destination).startswith(vs_dest_compare):
                            if hasattr(vs, 'pool'):
                                pool = resource_helper.BigIPResourceHelper(
                                    resource_helper.ResourceType.pool).load(
                                        bigip, os.path.basename(vs.pool),
                                        partition)
                                vs.delete()
                                pool.delete()
                            else:
                                vs.delete()
                    resource_helper.BigIPResourceHelper(
                        resource_helper.ResourceType.virtual_address).delete(
                            bigip, va_name, partition)
                except HTTPError as err:
                    if err.response.status_code == 404:
                        LOG.debug('loadbalancer %s not on BIG-IP %s.'
                                  % (loadbalancer_id, bigip.hostname))
                except Exception as exc:
                    LOG.exception('Exception purging loadbalancer %s'
                                  % str(exc))