Commit c5aba032 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Print log URN for all calls and all emails. Print URN in header.

parent 1f804b89
......@@ -43,9 +43,7 @@ $EMULAB_PEMFILE = "$ETCDIR/genicm.pem";
# Testbed libraries.
use lib '@prefix@/lib';
use emutil;
use GeniAM;
use GeniHRN;
use GeniResponse;
if (!defined($GENI_VERSION)) {
......@@ -131,7 +129,6 @@ sub ConvertResponseV2($)
# the geni_code to ERROR
$geni_code = GeniResponse::GENIRESPONSE_ERROR();
}
my $errorLog = "";
my $blob = {
"value" => GeniResponse::value($geni_response),
"output" => GeniResponse::output($geni_response),
......@@ -141,11 +138,9 @@ sub ConvertResponseV2($)
"am_type" => "protogeni"
}
};
if (GeniResponse::IsError($geni_response)) {
my $log = TBGetUniqueIndex('next_geni_log', 1);
my $errorLog = GeniHRN::Generate("@OURDOMAIN@", "log", $log);
print STDERR "ERROR_LOG=" . $errorLog . "\n";
$blob->{'code'}->{'protogeni_error_log'} = $errorLog;
if (exists($geni_response->{'protogeni_error_log'})) {
$blob->{'code'}->{'protogeni_error_log'} =
$geni_response->{'protogeni_error_log'};
}
if (defined($version)) {
......
......@@ -82,6 +82,7 @@ use vars qw($EMULAB_PEMFILE $GENI_METHODS $GENI_VERSION
# Testbed libraries.
use lib '@prefix@/lib';
use emutil;
use Genixmlrpc;
use GeniResponse;
use GeniHRN;
......@@ -436,6 +437,11 @@ else {
$message .= "End: " . TBTimeStamp() . "\n";
$message .= "Elapsed: " . sprintf("%f", $elapsed) . "\n";
my $logNumber = TBGetUniqueIndex('next_geni_log', 1);
my $logurn = GeniHRN::Generate("@OURDOMAIN@", "log", $logNumber);
$message .=
"Log URN: " . $logurn . "\n";
if (!ref($result)) {
$message .= "Return: $result\n";
}
......@@ -490,6 +496,8 @@ else {
}
}
$result->{'protogeni_error_log'} = $logurn;
#
# Added this for geni-am ...
#
......
Supports Markdown
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