Commit 2f719a68 authored by Leigh B Stoller's avatar Leigh B Stoller

Add "console" element to the services tag (in the emulab namespace)

when a node has a console.
parent 28bd4826
......@@ -839,9 +839,9 @@ sub AnnotateManifest($)
}
GeniXML::SetText("name", $host, $vhostname);
}
my $services = GeniXML::FindFirst("n:services", $rspec);
if ($experiment->HasNonLocalUsers()) {
my $services = GeniXML::FindFirst("n:services", $rspec);
if (! defined($services)) {
$services = GeniXML::AddElement("services", $rspec);
}
......@@ -861,6 +861,19 @@ sub AnnotateManifest($)
GeniXML::SetText("username", $login, $localuser->{"login"});
}
}
my $tipserver = undef;
if ($node->TipServer(\$tipserver) == 0 && defined($tipserver)) {
if (! defined($services)) {
$services = GeniXML::AddElement("services", $rspec);
}
my $console = GeniXML::FindNodesNS("n:console", $services,
$GeniXML::EMULAB_NS)->pop();
if (defined($console)) {
$services->removeChild($console);
}
$console = GeniXML::AddElement("console",$services,$GeniXML::EMULAB_NS);
GeniXML::SetText("server", $console, $tipserver);
}
if ($self->UpdateRspec($rspec)) {
print STDERR "Could not insert annotated manifest for node $self ".
......
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