def purge_orphaned_pool(self, tenant_id=None, pool_id=None,
                            hostnames=list()):
        node_helper = resource_helper.BigIPResourceHelper(
            resource_helper.ResourceType.node)
        for bigip in self.get_all_bigips():
            if bigip.hostname in hostnames:
                try:
                    pool_name = self.service_adapter.prefix + pool_id
                    partition = self.service_adapter.prefix + tenant_id
                    pool = resource_helper.BigIPResourceHelper(
                        resource_helper.ResourceType.pool).load(
                            bigip, pool_name, partition)
                    members = pool.members_s.get_collection()
                    pool.delete()
                    for member in members:
                        node_name = member.address
                        try:
                            node_helper.delete(bigip,
                                               name=urllib.quote(node_name),
                                               partition=partition)
                        except HTTPError as e:
                            if e.response.status_code == 404:
                                pass
                            if e.response.status_code == 400:
                                LOG.warn("Failed to delete node -- in use")
                            else:
                                LOG.exception("Failed to delete node")
                except HTTPError as err:
                    if err.response.status_code == 404:
                        LOG.debug('pool %s not on BIG-IP %s.'
                                  % (pool_id, bigip.hostname))
                except Exception as exc:
                    LOG.exception('Exception purging pool %s' % str(exc))