- my $links_result = $arv->{links}->{list}->execute(
- filters => [["head_uuid", "=", $locator],
- ["link_class", "=", "docker_image_hash"]],
- limit => 1);
- my $docker_hash;
- foreach my $link (@{$links_result->{items}}) {
- $docker_hash = lc($link->{name});
+ if (my $image = $arv->{collections}->{get}->execute(uuid => $locator)) {
+ my @file_list = @{$image->{files}};
+ if ((scalar(@file_list) == 1) &&
+ ($file_list[0][1] =~ /^([0-9A-Fa-f]{64})\.tar$/)) {
+ return ($file_list[0][0], $1);
+ }