Commit 13820101 authored by Jonathon Duerig's avatar Jonathon Duerig

Handle lack of osids or subosids on a node more gracefully.

parent d3943c15
......@@ -2261,20 +2261,22 @@ sub print_raw_osids
sub print_osids
{
my ($osids_arg, $default) = @_;
my @osids = @{ $osids_arg };
foreach my $os (@osids) {
if (defined($osid_name{$os})) {
my $urn = GeniHRN::Generate($OURDOMAIN, "image",
$osid_pid{$os} . "//" . $osid_name{$os});
print "<disk_image ";
print "name=\"" . $urn . "\" ";
print "os=\"" . $osid_os{$os} . "\" ";
print "version=\"" . $osid_version{$os} . "\" ";
print "description=\"" . $osid_description{$os} . "\" ";
if (defined($default) && $os eq $default) {
print "default=\"true\" ";
if (defined ($osids_arg)) {
my @osids = @{ $osids_arg };
foreach my $os (@osids) {
if (defined($osid_name{$os})) {
my $urn = GeniHRN::Generate($OURDOMAIN, "image",
$osid_pid{$os} . "//" . $osid_name{$os});
print "<disk_image ";
print "name=\"" . $urn . "\" ";
print "os=\"" . $osid_os{$os} . "\" ";
print "version=\"" . $osid_version{$os} . "\" ";
print "description=\"" . $osid_description{$os} . "\" ";
if (defined($default) && $os eq $default) {
print "default=\"true\" ";
}
print "/>\n";
}
print "/>\n";
}
}
}
......
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