Commit 4e5d2b02 authored by Leigh B Stoller's avatar Leigh B Stoller

Add "users" (ssh keys and login names) to the AM version of

sliverstatus. Change CM name from keys to users.
parent e78872ba
#!/usr/bin/perl -wT
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# Copyright (c) 2008-2012 University of Utah and the Flux Group.
# All rights reserved.
#
package GeniAM;
......@@ -555,6 +555,21 @@ sub SliverStatus()
my $expires_str = POSIX::strftime("%Y-%m-%dT%H:%M:%S", @expires);
$status->{'pg_expires'} = $expires_str;
# Grab the keys (logins) for inclusion.
my $slice_experiment = $slice->GetExperiment();
if (!defined($slice_experiment)) {
print STDERR "*** No Experiment for $slice\n";
}
else {
my $bindings;
if ($slice_experiment->NonLocalUsers(\$bindings)) {
print STDERR "*** No bindings for $slice_experiment\n";
}
elsif (@{ $bindings }) {
$status->{'users'} = $bindings;
}
}
my $details = $pgstatus->{'details'};
my @children = ();
while ( my ($pgurn, $pgrstat) = each(%$details) ) {
......
......@@ -232,7 +232,7 @@ sub Resolve($)
print STDERR "*** No bindings for $slice_experiment\n";
}
elsif (@{ $bindings }) {
$blob->{'keys'} = $bindings;
$blob->{'users'} = $bindings;
}
}
}
......@@ -280,7 +280,7 @@ sub Resolve($)
print STDERR "*** No bindings for $slice_experiment\n";
}
elsif (@{ $bindings }) {
$blob->{'keys'} = $bindings;
$blob->{'users'} = $bindings;
}
}
return GeniResponse->Create(GENIRESPONSE_SUCCESS, $blob);
......
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