public void deleteTenant(TenantName name) {
        if (name.equals(DEFAULT_TENANT))
            throw new IllegalArgumentException("Deleting 'default' tenant is not allowed");
        if ( ! tenants.containsKey(name))
            throw new IllegalArgumentException("Deleting '" + name + "' failed, tenant does not exist");

        log.log(Level.INFO, "Deleting tenant '" + name + "'");
        // Deletes the tenant tree from ZooKeeper (application and session status for the tenant)
        // and triggers Tenant.close().
        try (Lock lock = tenantLocks.lock(name)) {
            Path path = tenants.get(name).getPath();
            closeTenant(name);
            curator.delete(path);
        }
    }
Removes the given tenant from ZooKeeper and filesystem. Assumes that tenant exists.

@param name name of the tenant
configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java