All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 9ab73ede authored by Leigh B Stoller's avatar Leigh B Stoller

Add GetProgramAgents(), which are in the emulab namespace, in the

services section. We do not support timed start, they can only be
started at time=0 via the "onexpstart=true" flag.
parent 4fd479f1
......@@ -625,6 +625,37 @@ sub GetServices($)
return @result;
}
#
# Program agents are also in the services element, but they are in the
# Emulab name space.
#
sub GetProgramAgents($)
{
my ($node) = @_;
my @result = ();
my @services = FindNodes("n:services", $node)->get_nodelist();
foreach my $service (@services) {
my @agents = FindNodesNS("n:program-agent",
$service, $EMULAB_NS)->get_nodelist();
foreach my $agent (@agents) {
my $name = GetText("name", $agent);
my $command = GetText("command", $agent);
my $directory = GetText("directory", $agent);
my $start = GetText("onexpstart", $agent);
my $item = {"name" => $name,
"command" => $command,
"dir" => $directory,
"onexpstart" => (defined($start) &&
lc("$start") eq "true" ? 1 : 0),
};
push(@result, $item);
}
}
return @result;
}
sub GetNodeAttributes($)
{
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