Access access = keystone.tokens().authenticate(new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD))
.withTenantName("demo")
.execute();
//use the token in the following requests
keystone.token(access.getToken().getId());
//NovaClient novaClient = new NovaClient(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "compute", null, "public"), access.getToken().getId());
Nova novaClient = new Nova(ExamplesConfiguration.NOVA_ENDPOINT.concat("/").concat(access.getToken().getTenant().getId()));
novaClient.token(access.getToken().getId());
//novaClient.enableLogging(Logger.getLogger("nova"), 100 * 1024);