Commit 662700ba authored by Leigh Stoller's avatar Leigh Stoller

Addition option to Image->AllVersions(); flag to include deleted

versions of the image, which is certain contexts is needed.
parent 2a3fc590
#!/usr/bin/perl -w
#
# Copyright (c) 2010-2016 University of Utah and the Flux Group.
# Copyright (c) 2010-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -236,6 +236,11 @@ sub DumpImage($)
$xmlfields{'origin_urn'} =
GeniHRN::Generate($OURDOMAIN, "authority", "cm");
}
# Send the architecture if it is set here.
if ($image->architecture()) {
$xmlfields{'architecture'} = $image->architecture();
}
#
# Send along the history so that the caller can get all
# the versions, which is important for delta based images.
......@@ -279,7 +284,7 @@ sub DumpImage($)
my @tmp;
# This returns a reverse ordered list.
if ($image->AllVersions(\@tmp)) {
if ($image->AllVersions(\@tmp, 1)) {
fatal("Could not get image version list");
}
#
......
#!/usr/bin/perl -w
#
# Copyright (c) 2016 University of Utah and the Flux Group.
# Copyright (c) 2016, 2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -207,7 +207,7 @@ sub doimage($)
# Returned list is ordered highest to lowest version.
#
my @iversions;
$image->AllVersions(\@iversions);
$image->AllVersions(\@iversions, 1);
# Get the canonical name, sans version, for reporting.
my $iname = $image->pid() . "/" . $image->imagename();
......
......@@ -128,7 +128,7 @@ sub ConvertImage($)
return 0;
}
my @images = ();
if ($image->AllVersions(\@images)) {
if ($image->AllVersions(\@images, 1)) {
print STDERR "Could not get list of (versions) for $image\n";
return -1;
}
......
......@@ -436,7 +436,7 @@ sub getallversions($)
my $headvers = $image->version();
my @iversions;
$image->AllVersions(\@iversions);
$image->AllVersions(\@iversions, 1);
# Get the canonical name, sans version, for reporting.
my $iname = $image->pid() . "/" . $image->imagename();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment