use of org.opentosca.toscana.plugins.kubernetes.docker.mapper.api.model.ImageTags in project TOSCAna by StuPro-TOSCAna.
the class BaseImageMapper method addImagesForType.
/**
* Internal method used for converting the Data received from docker to the data model described
* in the <code>model</code> package
*/
private void addImagesForType(DockerBaseImages baseImage, List<ImageTags> pages) {
List<DockerImageTag> tagList = new ArrayList<>();
for (ImageTags page : pages) {
for (ImageTag imageTag : page.getImageTags()) {
Set<String> architectures = new HashSet<>();
for (Image image : imageTag.getImages()) {
// is amd64 in that case.
if (image.getArchitecture() == null) {
architectures.add("amd64");
} else {
architectures.add(image.getArchitecture());
}
}
DockerImageTag tag = new DockerImageTag(imageTag.getName(), architectures);
tagList.add(tag);
}
}
tagStorage.put(baseImage.name().toLowerCase(), new DockerImage(baseImage, tagList));
}
Aggregations