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

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents 32dfba3a b5bab452
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -20,7 +20,7 @@ LIB_SCRIPTS = GeniDB.pm GeniUser.pm \
GeniSES.pm GeniResource.pm GeniXML.pm
SBIN_SCRIPTS = plabnodewrapper plabslicewrapper
SCRIPTS = addnode.pl genischemacheck.pl
SCRIPTS = genischemacheck.pl
# These scripts installed setuid, with sudo.
SETUID_SBIN_SCRIPTS = plabnodewrapper plabslicewrapper
......
......@@ -281,10 +281,12 @@ sub Resolve($)
return GeniResponse->Create(GENIRESPONSE_SEARCHFAILED, undef,
"No such component $lookup_token");
}
my $manager = $component->GetManager();
# Return a blob.
my $blob = { "gid" => $component->cert(),
"url" => $component->url(),
my $blob = { "gid" => $component->cert(),
"url" => $component->url(),
"manager_gid" => $manager->cert(),
};
return GeniResponse->Create(GENIRESPONSE_SUCCESS, $blob);
......
......@@ -1025,6 +1025,10 @@ sub GetTicketAuxAux($$$$$$$$)
next;
}
if (!exists($ifacemap{$node_nickname})) {
# Might be the other side. Skip for now; might bite later.
next
if (!exists($namemap{$node_nickname}));
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"$lanname: No such virtual_node_id: ".
......
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -70,15 +70,6 @@ if ($type =~ /^([\w]*)$/) {
else {
fatal("Illegal chars in type: $type");
}
if ($token =~ /^([-\d]*)$/) {
$uuid = $1;
}
elsif ($token =~ /^([-\w\.]*)$/) {
$hrn = $1;
}
else {
fatal("Illegal chars in argument: $token");
}
#
# Load the SA cert to act as caller context.
......
......@@ -109,26 +109,23 @@ my $entry = $_;
#
# Reverse the rest of the entries, saving them up, month by month
#
my $this_month = $STARTDATE;
my $index = 0;
my @month_index = ($STARTDATE);
my %month_data = ($STARTDATE => []);
my @month_index = ();
my %month_data = ();
my $month;
while (<INPUT>) {
if ($_ =~
/^Date:\s*(\d\d\d\d\-\d\d)\-\d\d\s*\d\d:\d\d:\d\d\s*[+-]?\w\w\w\w$/) {
$month = $1;
$this_month = $1;
}
elsif ($_ =~ /^commit\s*[\w]*$/) {
unshift(@{ $month_data{$this_month} }, $entry);
$entry = $_;
if ($month ne $this_month) {
$this_month = $month;
$index++;
$month_index[$index] = $this_month;
if (! exists($month_data{$this_month})) {
$month_data{$this_month} = [];
$month_index[$index++] = $this_month;
}
unshift(@{ $month_data{$this_month} }, $entry);
$entry = $_;
next;
}
$entry .= $_;
......@@ -138,7 +135,7 @@ close(INPUT);
#
# Write out the list in one file (reverse order of course).
#
for (my $i = $index; $i >= 0; $i--) {
for (my $i = $index - 1; $i >= 0; $i--) {
my @entries = @{ $month_data{$month_index[$i]} };
foreach my $entry (@entries) {
......@@ -159,7 +156,7 @@ unlink($tempname)
#
# Now write a bunch of per-month files.
#
for (my $i = 0; $i <= $index; $i++) {
for (my $i = 0; $i < $index; $i++) {
my @entries = @{ $month_data{$month_index[$i]} };
my $month = $month_index[$i];
$month =~ s/\//-/g;
......@@ -189,7 +186,7 @@ if (!open(OUTPUT, "> $tempname")) {
fatal("Could not open $tempname for writing!");
}
for (my $i = $index; $i >= 0; $i--) {
for (my $i = $index - 1; $i >= 0; $i--) {
my $month = $month_index[$i];
$month =~ s/\//-/g;
my $target = "ChangeLog-" . $month . ".txt";
......
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