Commit d89cde03 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

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

parents 49028d95 2fd785d3
......@@ -1734,9 +1734,7 @@ sub ReserveVlanTags($)
}
push(@delete, $vlan);
}
else {
print STDERR "$vlan already existed.\n";
}
#
# If there is already a reservation, it better be one of the
# tags we got.
......@@ -1746,7 +1744,13 @@ sub ReserveVlanTags($)
print STDERR "$vlan already had tag $tag.\n";
if (! (grep {$_ == $tag} @{ $taglist })) {
print STDERR " but the tag is not in the list we got.\n";
$response = GeniResponse->Create(GENIRESPONSE_ERROR);
#
# Tell the caller about the tag; it is the only choice.
#
my @okaytags = ($tag);
$response = GeniResponse->Create(GENIRESPONSE_SEARCHFAILED,
\@okaytags,
"Could not find a suitable tag");
goto done;
}
$actualtag = $tag;
......
......@@ -2514,7 +2514,13 @@ sub doDeleteVlan($@) {
#
if (defined($experiment)) {
foreach my $vlan_name (@vlan_names) {
my $vlan = VLan->Lookup($vlan_name);
my $vlan;
if ($vlan_name =~ /^\d*$/) {
$vlan = VLan->Lookup($vlan_name);
}
else {
$vlan = VLan->Lookup($experiment, $vlan_name);
}
if (defined($vlan) &&
!$experiment->SameExperiment($vlan->GetExperiment())) {
die("$vlan is not in the correct experiment\n");
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006-2010 University of Utah and the Flux Group.
# Copyright (c) 2006-2011 University of Utah and the Flux Group.
# All rights reserved.
#
#
......@@ -251,6 +251,19 @@ class GeniUser
}
$this->dblink = $dblink;
$this->user = mysql_fetch_array($query_result);
#
# And get the urn.
#
$uuid = $this->user['uuid'];
$query_result =
DBQueryWarn("select urn from geni_certificates where uuid='$uuid'",
$dblink);
if ($query_result && mysql_num_rows($query_result)) {
$foo = mysql_fetch_array($query_result);
$this->user['urn'] = $foo['urn'];
return;
}
}
# Hmm, how does one cause an error in a php constructor?
......@@ -273,6 +286,7 @@ class GeniUser
}
function idx() { return $this->field('idx'); }
function hrn() { return $this->field('hrn'); }
function urn() { return $this->field('urn'); }
function uuid() { return $this->field('uuid'); }
function exptidx() { return $this->field('exptidx'); }
function created() { return $this->field('created'); }
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -81,7 +81,7 @@ if ($experiment) {
$geniuser = GeniUser::Lookup($showtype, $slice->creator_uuid());
if ($geniuser) {
$rows[] = array("Creator" => $geniuser->hrn());
$rows[] = array("Creator" => $geniuser->urn());
}
else {
$user = User::LookupByUUID($slice->creator_uuid());
......
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