public void testValidateTemplate() { for (String region : api.getConfiguredRegions()) { TemplateApi templateApi = api.getTemplateApi(region); Template template = templateApi.validate( "https://raw.githubusercontent.com/openstack/heat-templates/master/contrib/rackspace/RackspaceAutoScale.yaml"); assertThat(template).isNotNull(); } }
public void testGetTemplate() { for (String region : api.getConfiguredRegions()) { StackApi stackApi = api.getStackApi(region); TemplateApi templateApi = api.getTemplateApi(region); List<Stack> stacks = stackApi.list(); assertThat(stacks).isNotNull(); Stack stack = stackApi.get(stacks.get(0).getId()); assertThat(stack).isNotNull(); assertThat(stack.getId()).isEqualTo(stacks.get(0).getId()); Template template = templateApi.get(stack.getName(), stack.getId()); assertThat(template).isNotNull(); } }