use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.imagecatalog.GenerateImageCatalogResponse in project cloudbreak by hortonworks.
the class ImageCatalogGeneratorServiceTest method generate.
@Test
void generate() {
Stack stack = new Stack();
when(stackService.getByEnvironmentCrnAndAccountId(ENVIRONMENT_CRN, ACCOUNT_ID)).thenReturn(stack);
ImageCatalog imageCatalog = new ImageCatalog(null, null);
when(imageService.generateImageCatalogForStack(stack)).thenReturn(imageCatalog);
GenerateImageCatalogResponse result = underTest.generate(ENVIRONMENT_CRN, ACCOUNT_ID);
Assertions.assertThat(result.getImageCatalog()).isEqualTo(imageCatalog);
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.imagecatalog.GenerateImageCatalogResponse in project cloudbreak by hortonworks.
the class ImageCatalogGeneratorService method generate.
public GenerateImageCatalogResponse generate(String environmentCrn, String accountId) {
final Stack stack = stackService.getByEnvironmentCrnAndAccountId(environmentCrn, accountId);
MDCBuilder.buildMdcContext(stack);
LOGGER.info("Generating image catalog for environment {} stack {}", environmentCrn, stack.getId());
final ImageCatalog imageCatalog = imageService.generateImageCatalogForStack(stack);
final GenerateImageCatalogResponse response = new GenerateImageCatalogResponse();
response.setImageCatalog(imageCatalog);
return response;
}
Aggregations