Access access = keystone.getAccessByTenant(ExamplesConfiguration.TENANT_NAME);
String endpointURL = KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "orchestration", null, "public");
Heat heat = new Heat(endpointURL);
heat.setTokenProvider(keystone
.getProviderByTenant(ExamplesConfiguration.TENANT_NAME));
CreateStackParam param = new CreateStackParam();
param.setStackName("helloWorld");
param.setTimeoutMinutes(1);
param.setParameters(Collections.<String, String>emptyMap());
param.setTemplate(TEMPLATE);
System.out.printf("Create: " + heat.getStacks().create(param).execute());
Thread.sleep(3000);
for (Stack s : heat.getStacks().list().execute()) {
System.out.println(s.getDescription());
System.out.println(s.getId());
System.out.println(s.getStackName());
System.out.println(s.getStackStatus());
System.out.println(s.getCreationTime());
System.out.println(s.getUpdatedTime());
System.out.println(s.getLinks());
System.out.println(heat.getStacks().byName(s.getStackName()).execute());
}
}