Skip to content
Permalink
Browse files

docker_node_images: inventory uses digest to determine repo if no tags

are set

Change-Id: I652f16af96c9424306203705b2c573f79ebb8948
  • Loading branch information...
mo-ki committed Sep 6, 2019
1 parent 5957293 commit f85be577ac623f6c5935c72c65ee4735d5cd4611
Showing with 4 additions and 2 deletions.
  1. +4 −2 inventory/docker_node_images
@@ -68,9 +68,11 @@ def inv_docker_node_images(info, inventory_tree, status_data_tree):
status_node = status_data_tree.get_list(path)

for image_id, image in sorted(images.iteritems()):
repodigests = ", ".join(image.get("RepoDigests", []))
fallback_repotag = repodigests.split('@', 1)[:1] if '@' in repodigests else []
inv_node.append({
"repotags": ", ".join(image.get("RepoTags", [])),
"repodigests": ", ".join(image.get("RepoDigests", [])),
"repotags": ", ".join(image.get("RepoTags", fallback_repotag)),
"repodigests": repodigests,
"id": docker_get_short_id(image_id), # pylint: disable=undefined-variable
"creation": image["Created"],
"size": image["VirtualSize"],

0 comments on commit f85be57

Please sign in to comment.
You can’t perform that action at this time.