Commit 35c4d5aa authored by Leigh Stoller's avatar Leigh Stoller

Small emulab addition to override the default behavior of using

the value of sitevar protogeni/default_osname when no OS is specified.
For Phantomnet, Kirk needs the type specific default OS used instead.
parent 60f2bf87
......@@ -1419,7 +1419,7 @@ sub GetTicketAuxAux($$$$$$$$$$$)
#
# If no osname, check for protogeni default osname
#
if (! defined($osname)) {
if (! defined($osname) && !GeniXML::UseTypeDefaultImage($ref)) {
my $protogeni_os = undef;
if (GetSiteVar('protogeni/default_osname', \$protogeni_os)
&& $protogeni_os ne ""
......
......@@ -881,6 +881,19 @@ sub HasXenSettings($)
return 0;
}
sub UseTypeDefaultImage($)
{
my ($node) = @_;
my $result = 0;
my @foo = FindNodesNS("n:use_type_default_image", $node,
$EMULAB_NS)->get_nodelist();
if (scalar(@foo) > 0) {
my $enabled = GetText("enabled", $foo[0]);
$result = defined($enabled) && $enabled eq "true";
}
return $result;
}
sub XenPtype($)
{
my ($node) = @_;
......
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