Commit 649a0107 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Checkpoint. All the conversion is done, but I need to refactor the xpaths to...

Checkpoint. All the conversion is done, but I need to refactor the xpaths to account for brittleness in the xpath specification.
parent e25f7049
......@@ -17,7 +17,7 @@ LIB_SCRIPTS = GeniDB.pm GeniUser.pm \
GeniComponent.pm GeniCH.pm GeniEmulab.pm \
GeniAuthority.pm GeniCertificate.pm GeniAggregate.pm \
GeniUtil.pm GeniRegistry.pm GeniUsage.pm GeniHRN.pm \
GeniSES.pm GeniResource.pm
GeniSES.pm GeniResource.pm GeniXML.pm
SBIN_SCRIPTS = plabnodewrapper plabslicewrapper
SCRIPTS = addnode.pl genischemacheck.pl
......
......@@ -26,6 +26,7 @@ use GeniRegistry;
use GeniUtil;
use GeniUser;
use GeniHRN;
use GeniXML;
use emutil;
use Lan;
use Data::Dumper;
......@@ -646,29 +647,22 @@ sub GetManifest($$)
}
my ($xml) = $query_result->fetchrow_array();
my $manifest =
eval { XMLin($xml, KeyAttr => [],
ForceArray => ["node", "link", "interface",
"interface_ref", "linkendpoints"]) };
if ($@) {
print STDERR "XMLin error reading manifest: $@\n";
my $manifest = GeniXML::Parse($xml);
if (!defined($manifest)) {
return undef;
}
#
# Update the manifest ticket to reflect the current expiration time.
#
$manifest->{'valid_until'} =
POSIX::strftime("20%y-%m-%dT%H:%M:%S",
gmtime(str2time($slice->expires())));
my $valid_date = POSIX::strftime("20%y-%m-%dT%H:%M:%S",
gmtime(str2time($slice->expires())));
GeniXML::SetText("valid_until", $manifest, $valid_date);
return $manifest
if (!$asxml);
$xml = eval { XMLout($manifest, "NoAttr" => 1, RootName => "manifest") };
if ($@) {
print STDERR "XMLout error on manifest: $@\n";
return undef;
}
$xml = $manifest->toString();
return $xml;
}
......@@ -1235,10 +1229,12 @@ sub Create($$$$$$)
$linkrspec, $node1rspec, $node2rspec) = @_;
my $clearinghouse;
my $linkname = $linkrspec->{"nickname"} || $linkrspec->{"virtual_id"};
my $linkname = GeniXML::GetText("./n:nickname | ".
"./n:virtual_id", $linkrspec);
return undef
if (!defined($linkname));
my @interfaces = @{ $linkrspec->{'interface_ref'} };
my @interfaces = GeniXML::FindNodes("./n:interface_ref",
$linkrspec)->get_nodelist();
my $experiment = Experiment->Lookup($slice->uuid());
if (!defined($experiment)) {
......@@ -1269,8 +1265,8 @@ sub Create($$$$$$)
my $iface2ref = $interfaces[1];
# These are the ips of the tunnel.
my $ip1 = $iface1ref->{'tunnel_ip'};
my $ip2 = $iface2ref->{'tunnel_ip'};
my $ip1 = GeniXML::GetText("./n:tunnel_ip", $iface1ref);
my $ip2 = GeniXML::GetText("./n:tunnel_ip", $iface2ref);
my $ctrlip1;
my $ctrlip2;
my $iface1;
......@@ -1295,7 +1291,8 @@ sub Create($$$$$$)
}
}
else {
my $component = GeniComponent->Lookup($node1rspec->{'component_uuid'});
my $component_name = GeniXML::GetNodeId($node1rspec);
my $component = GeniComponent->Lookup($component_name);
my $blob;
if (!defined($component)) {
......@@ -1304,10 +1301,10 @@ sub Create($$$$$$)
#
$clearinghouse = GeniRegistry::ClearingHouse->Create();
if ($clearinghouse->Resolve($node1rspec->{'component_uuid'},
if ($clearinghouse->Resolve($component_name,
"Component", \$blob) != 0) {
print STDERR "Could not lookup node at clearinghouse\n";
print STDERR Dumper($node1rspec);
print STDERR $node1rspec->toString();
goto bad;
}
my $certificate = GeniCertificate->LoadFromString($blob->{'gid'});
......@@ -1332,13 +1329,13 @@ sub Create($$$$$$)
print STDERR "Could not create a registry client for $component\n";
goto bad;
}
$registry->Resolve($node1rspec->{'component_uuid'}, "Node", \$blob);
$registry->Resolve($component_name, "Node", \$blob);
$ctrlip1 = $blob->{'physctrl'}
if (defined($blob) && exists($blob->{'physctrl'}));
if (!defined($ctrlip1)) {
print STDERR "Could not get control IP for ".
"$node1rspec->{'component_uuid'} at $component\n";
"$component_name at $component\n";
goto bad;
}
}
......@@ -1360,17 +1357,18 @@ sub Create($$$$$$)
}
else {
my $blob;
my $component = GeniComponent->Lookup($node2rspec->{'component_uuid'});
my $component_name = GeniXML::GetNodeId($node2rspec);
my $component = GeniComponent->Lookup($component_name);
if (!defined($component)) {
#
# Need to ask the clearinghouse where this node comes from.
#
$clearinghouse = GeniRegistry::ClearingHouse->Create();
if ($clearinghouse->Resolve($node2rspec->{'component_uuid'},
if ($clearinghouse->Resolve($component_name,
"Component", \$blob) != 0) {
print STDERR "Could not lookup node at clearinghouse\n";
print STDERR Dumper($node2rspec);
print STDERR $node2rspec->toString();
goto bad;
}
my $certificate = GeniCertificate->LoadFromString($blob->{'gid'});
......@@ -1395,13 +1393,13 @@ sub Create($$$$$$)
print STDERR "Could not create a registry client for $component\n";
goto bad;
}
$registry->Resolve($node2rspec->{'component_uuid'}, "Node", \$blob);
$registry->Resolve($component_name, "Node", \$blob);
$ctrlip2 = $blob->{'physctrl'}
if (defined($blob) && exists($blob->{'physctrl'}));
if (!defined($ctrlip2)) {
print STDERR "Could not get control IP for ".
"$node2rspec->{'component_uuid'} at $component\n";
"$component_name at $component\n";
goto bad;
}
}
......
......@@ -33,6 +33,7 @@ use GeniUser;
use GeniRegistry;
use GeniUtil;
use GeniHRN;
use GeniXML;
use GeniUsage;
use libtestbed qw(SENDMAIL);
use emutil;
......@@ -462,14 +463,10 @@ sub GetTicketAuxAux($$$$$$$$)
"rspec is not well formed");
}
my $rspec =
eval { XMLin($rspecstr, KeyAttr => [],
ForceArray => ["node", "link", "interface",
"interface_ref", "linkendpoints"]) };
if ($@) {
print STDERR "XMLin error: $@\n";
my $rspec = GeniXML::Parse($rspecstr);
if (! defined($rspec)) {
return GeniResponse->Create(GENIRESPONSE_BADARGS, undef,
"XML error in rspec");
"Error Parsing rspec XML");
}
#
......@@ -492,8 +489,9 @@ sub GetTicketAuxAux($$$$$$$$)
# slice record expires, which was given by the expiration time of the
# slice credential.
#
if (exists($rspec->{'valid_until'})) {
my $expires = $rspec->{'valid_until'};
my $valid_until = GeniXML::FindFirst("./n:valid_until", $rspec);
if (defined($valid_until)) {
my $expires = $valid_until->textContent();
if (! ($expires =~ /^[-\w:.\/]+/)) {
return GeniResponse->Create(GENIRESPONSE_BADARGS, undef,
......@@ -585,8 +583,9 @@ sub GetTicketAuxAux($$$$$$$$)
#
# Firewall hack; just a flag in the rspec for now.
#
if (exists($rspec->{'needsfirewall'}) && $rspec->{'needsfirewall'}) {
if ($slice->SetFirewallFlag($rspec->{'needsfirewall'}) != 0) {
my $needsfirewall = GeniXML::FindFirst("./n:needsfirewall", $rspec);
if (defined($needsfirewall) && $needsfirewall->textContent()) {
if ($slice->SetFirewallFlag($needsfirewall->textContent()) != 0) {
$response = GeniResponse->Create(GENIRESPONSE_ERROR);
goto bad;
}
......@@ -608,8 +607,9 @@ sub GetTicketAuxAux($$$$$$$$)
# Mark the experiment locally as coming from the cooked interface.
# This changes what tmcd returns to the local nodes.
#
if (exists($rspec->{'generated_by'}) &&
$rspec->{'generated_by'} eq "libvtop") {
my $generated_by = GeniXML::FindFirst("./n:generated_by", $rspec);
if (defined($generated_by) &&
$generated_by->textContent() eq "libvtop") {
$slice_experiment->Update({"geniflags" =>
$Experiment::EXPT_GENIFLAGS_EXPT|
$Experiment::EXPT_GENIFLAGS_COOKED});
......@@ -641,6 +641,7 @@ sub GetTicketAuxAux($$$$$$$$)
my %namemap = ();
my %colomap = ();
my %ifacemap = ();
my %vportmap = ();
my %nodemap = ();
my @nodeids = ();
my %lannodes = ();
......@@ -679,24 +680,21 @@ sub GetTicketAuxAux($$$$$$$$)
$oldrspec = $ticket->rspec();
}
foreach my $ref (@{$oldrspec->{'node'}}) {
my $resource_uuid = $ref->{'component_uuid'} || $ref->{'uuid'};
my $manager_uuid = $ref->{'component_manager_uuid'};
my $node_nickname = $ref->{'virtual_id'} || $ref->{'nickname'};
my $colocate = $ref->{'colocate'} || $ref->{'phys_nickname'};
foreach my $ref (GeniXML::FindNodes("./n:node",
$oldrspec)->get_nodelist()) {
# Let remote nodes pass through.
next
if (defined($manager_uuid) &&
!GeniHRN::Equal( $manager_uuid, $ENV{'MYURN'} ) &&
$manager_uuid ne $ENV{'MYUUID'});
if (!GeniXML::IsLocalNode($ref));
# Skip lan nodes; they are fake.
next
if (exists($ref->{'node_type'}) &&
exists($ref->{'node_type'}->{'type_name'}) &&
$ref->{'node_type'}->{'type_name'} eq "lan");
if (GeniXML::IsLanNode($ref));
my $node_nickname = GeniXML::FindFirst("./n:virtual_id | " .
"./n:nickname", $ref);
my $colocate = GeniXML::FindFirst("./n:colocate | " .
"./n:phys_nickname", $ref);
my $resource_uuid = GeniXML::GetNodeId($ref);
my $node = LookupNode($resource_uuid);
if (!defined($node)) {
$response = GeniResponse->Create(GENIRESPONSE_BADARGS, undef,
......@@ -726,35 +724,37 @@ sub GetTicketAuxAux($$$$$$$$)
}
}
print STDERR Dumper($rspec);
foreach my $ref (@{$rspec->{'node'}}) {
my $resource_uuid = $ref->{'component_uuid'} || $ref->{'uuid'};
my $manager_uuid = $ref->{'component_manager_uuid'};
my $node_nickname = $ref->{'virtual_id'} || $ref->{'nickname'};
my $colocate = $ref->{'colocate'} || $ref->{'phys_nickname'};
my $subnode_of = $ref->{'subnode_of'};
my $virtualization_type = $ref->{'virtualization_type'};
my $virtualization_subtype = $ref->{'virtualization_subtype'};
my $exclusive = $ref->{'exclusive'};
print $rspec->toString();
foreach my $ref (GeniXML::FindNodes("./n:node", $rspec)->get_nodelist()) {
my $resource_uuid = GeniXML::GetNodeId($ref);
my $manager_uuid = GeniXML::GetText("./n:component_manager_uuid",
$ref);
my $node_nickname = GeniXML::GetText("./n:virtual_id | " .
"./n:nickname", $ref);
my $colocate = GeniXML::GetText("./n:colocate | " .
"./n:phys_nickname", $ref);
my $subnode_of = GeniXML::GetText("./n:subnode_of", $ref);
my $virtualization_type
= GeniXML::GetText("./n:virtualization_type", $ref);
my $virtualization_subtype
= GeniXML::GetText("./n:virtualization_subtype",
$ref);
my $exclusive = GeniXML::GetText("./n:exclusive", $ref);
my $pctype;
my $osname;
my $node;
# Let remote nodes pass through.
next
if (defined($manager_uuid) &&
!GeniHRN::Equal( $manager_uuid, $ENV{'MYURN'} ) &&
$manager_uuid ne $ENV{'MYUUID'});
if (! GeniXML::IsLocalNode($ref));
#
# Lan nodes are fake and do not go into the virt topo. Need
# to remember them though, for when we do the links below.
# They are still in the returned ticket though.
#
if (exists($ref->{'node_type'}) &&
exists($ref->{'node_type'}->{'type_name'}) &&
$ref->{'node_type'}->{'type_name'} eq "lan") {
if (GeniXML::IsLanNode($ref)) {
$lannodes{$node_nickname} = $ref;
next;
}
......@@ -774,7 +774,14 @@ sub GetTicketAuxAux($$$$$$$$)
$osname = "SPPVM-FAKE";
$pctype = "sppvm";
# Lets force to shared node.
$ref->{'exclusive'} = $exclusive = 0;
if (! GeniXML::SetText("exclusive", $ref, 0)) {
$response
= GeniResponse->Create(GENIRESPONSE_BADARGS,
undef,
"Malformed rspec: Cannot set exclusive tag to false");
goto bad;
}
$exclusive = 0;
# Kludge for libvtop.
$virtexperiment->multiplex_factor(1);
$virtexperiment->encap_style("vlan");
......@@ -787,8 +794,19 @@ sub GetTicketAuxAux($$$$$$$$)
else {
raw:
# Lets force to exclusive real node.
$ref->{'exclusive'} = $exclusive = 1;
$ref->{'virtualization_type'} = "raw";
if (! GeniXML::SetText("exclusive", $ref, 1)) {
$response = GeniResponse->Create(GENIRESPONSE_BADARGS,
undef,
"Malformed rspec: Cannot set exclusive tag to true");
goto bad;
}
$exclusive = 1;
if (! GeniXML::SetText("virtualization_type", $ref, "raw")) {
$response = GeniResponse->Create(GENIRESPONSE_BADARGS,
undef,
"Malformed rspec: Cannot set virtualization_type to raw");
goto bad;
}
}
}
else {
......@@ -854,9 +872,8 @@ sub GetTicketAuxAux($$$$$$$$)
};
# Tarball and startup command.
if (exists($ref->{'startup_command'})) {
my $startupcmd = $ref->{'startup_command'};
my $startupcmd = GeniXML::GetText("./n:startup_command", $ref);
if (defined($startupcmd)) {
if (! TBcheck_dbslot($startupcmd, "virt_nodes", "startupcmd",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR)) {
$response =
......@@ -866,9 +883,8 @@ sub GetTicketAuxAux($$$$$$$$)
}
$nodeblob->{'startupcmd'} = $startupcmd;
}
if (exists($ref->{'tarfiles'})) {
my $tarfiles = $ref->{'tarfiles'};
my $tarfiles = GeniXML::GetText("./n:tarfiles", $ref);
if (defined($tarfiles)) {
if (! TBcheck_dbslot($tarfiles, "virt_nodes", "tarfiles",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR)) {
$response =
......@@ -901,11 +917,12 @@ sub GetTicketAuxAux($$$$$$$$)
# in the link specifications.
#
next
if (!exists($ref->{'interface'}));
if (!defined(GeniXML::FindFirst("./n:interface", $ref)));
foreach my $linkref (@{$ref->{'interface'}}) {
my $component_id = $linkref->{"component_id"};
my $virtual_id = $linkref->{"virtual_id"};
foreach my $linkref (GeniXML::FindNodes("./n:interface",
$ref)->get_nodelist()) {
my $component_id = GeniXML::GetText("./n:component_id", $linkref);
my $virtual_id = GeniXML::GetText("./n:virtual_id", $linkref);
if (!defined($virtual_id)) {
$response = GeniResponse->Create(GENIRESPONSE_BADARGS, undef,
......@@ -924,12 +941,12 @@ sub GetTicketAuxAux($$$$$$$$)
"vport" => $vport};
# This is used after the mapper runs since it uses vname:vport.
$ifacemap{"$node_nickname:$vport"} = $linkref;
$vportmap{"$node_nickname:$vport"} = $linkref;
}
}
goto skiplinks
if (!exists($rspec->{'link'}));
if (!defined(GeniXML::FindFirst("./n:link", $rspec)));
#
# Now deal with links for wildcarded nodes. We need to fill in the
......@@ -937,12 +954,16 @@ sub GetTicketAuxAux($$$$$$$$)
#
my $linknum = 1;
foreach my $linkref (@{$rspec->{'link'}}) {
my $lanname = $linkref->{"nickname"} || $linkref->{"virtual_id"};
my $istunnel = (exists($linkref->{'link_type'}) &&
$linkref->{'link_type'} eq "tunnel");
my $interfaces = $linkref->{'linkendpoints'} ||
$linkref->{'interface_ref'};
foreach my $linkref (GeniXML::FindNodes("./n:link",
$rspec)->get_nodelist()) {
my $lanname = GeniXML::GetText("./n:nickname | ".
"./n:virtual_id", $linkref);
my $tunnel_type = GeniXML::FindFirst("./n:link_type", $linkref);
my $istunnel = (defined($tunnel_type) &&
$tunnel_type->textContent() eq "tunnel");
my @interfaces = GeniXML::FindNodes("./n:linkendpoints | ".
"./n:interface_ref",
$linkref)->get_nodelist();
my $ifacenum = 1;
my $trivial_ok = 0;
......@@ -960,9 +981,10 @@ sub GetTicketAuxAux($$$$$$$$)
# would result in a bogus topology.
#
if (!$istunnel) {
foreach my $ref (@{ $interfaces }) {
my $node_nickname = $ref->{'virtual_node_id'} ||
$ref->{'node_nickname'};
foreach my $ref (@interfaces) {
my $node_nickname = GeniXML::GetText("./n:virtual_node_id | ".
"./n:node_nickname",
$ref);
if (exists($lannodes{$node_nickname})) {
$lanname = $node_nickname;
......@@ -974,11 +996,11 @@ sub GetTicketAuxAux($$$$$$$$)
}
}
foreach my $ref (@{ $interfaces }) {
my $node_nickname = $ref->{'virtual_node_id'} ||
$ref->{'node_nickname'};
my $iface_id = $ref->{'virtual_interface_id'} ||
$ref->{'iface_name'};
foreach my $ref (@interfaces) {
my $node_nickname = GeniXML::GetText("./n:virtual_node_id | ".
"./n:node_nickname", $ref);
my $iface_id = GeniXML::GetText("./n:virtual_interface_id | ".
"./n:iface_name", $ref);
if (!defined($node_nickname)) {
$response =
......@@ -1029,7 +1051,10 @@ sub GetTicketAuxAux($$$$$$$$)
goto bad;
}
my $iface_ref = $ifacemap{$node_nickname}->{$iface_id}->{"rspec"};
my $iface_name = $iface_ref->{"component_id"} || "";
my $iface_name = GeniXML::GetText("./n:component_id", $iface_ref);
if (!defined($iface_name)) {
$iface_name = "";
}
if( GeniHRN::IsValid( $iface_name ) ) {
my ($urn_authority,$urn_node,$urn_iface) =
GeniHRN::ParseInterface( $iface_name );
......@@ -1044,8 +1069,10 @@ sub GetTicketAuxAux($$$$$$$$)
my $bandwidth = 100000;
# Let user override.
$bandwidth = $linkref->{'bandwidth'}
if (exists($linkref->{'bandwidth'}));
my $user_bandwidth = GeniXML::GetText("./n:bandwidth", $linkref);
if (defined($user_bandwidth)) {
$bandwidth = $user_bandwidth;
}
$virtexperiment->NewTableRow("virt_lans",
{"vname" => $lanname,
......@@ -1131,23 +1158,20 @@ sub GetTicketAuxAux($$$$$$$$)
"Could not map to resources");
goto bad;
}
my $solution =
eval { XMLin($tmpfile, KeyAttr => [],
ForceArray => ["node", "link", "interface",
"interface_ref", "linkendpoints"]) };
my $solution = GeniXML::ParseFile($tmpfile);
if ($@) {
print STDERR "XMLin error: $@\n";
$response = GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"XML error in solution");
goto bad;
}
unlink($tmpfile);
print Dumper($solution);
print $solution->toString();
foreach my $ref (@{$solution->{'node'}}) {
my $virtual_id = $ref->{"virtual_id"};
my $component_uuid = $ref->{"component_uuid"};
foreach my $ref (GeniXML::FindNodes("./n:node",
$solution)->get_nodelist()) {
my $virtual_id = GeniXML::GetText("./n:virtual_id", $ref);
my $component_uuid = GeniXML::GetText("./n:component_uuid", $ref);
if (!exists($nodemap{$virtual_id})) {
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
......@@ -1157,10 +1181,10 @@ sub GetTicketAuxAux($$$$$$$$)
my $rspec = $nodemap{$virtual_id}->{'rspec'};
my $virtnode = $nodemap{$virtual_id}->{'virtnode'};
my $node = LookupNode($component_uuid);
my $colocate = $rspec->{'colocate'} ||
$rspec->{'phys_nickname'};
my $exclusive = $rspec->{'exclusive'};
my $subnode_of = $rspec->{'subnode_of'};
my $colocate = GeniXML::GetText("./n:colocate | ".
"./n:phys_nickname", $rspec);
my $exclusive = GeniXML::GetText("./n:exclusive", $rspec);
my $subnode_of = GeniXML::GetText("./n:subnode_of", $rspec);
$exclusive = 0
if (!defined($exclusive));
......@@ -1193,20 +1217,27 @@ sub GetTicketAuxAux($$$$$$$$)
$colomap{$colocate} = $node
if (defined($colocate));
}
foreach my $ref (@{$solution->{'link'}}) {
my $nickname = $ref->{"virtual_id"};
my $interfaces = $ref->{'interface_ref'};
foreach my $ref (GeniXML::FindNodes("./n:link",
$solution)->get_nodelist()) {
my $nickname = GeniXML::GetText("./n:virtual_id", $ref);
my $interfaces = GeniXML::FindNodes("./n:interface_ref", $ref);
foreach my $iface_ref (@{ $interfaces }) {
my $virtual_node_id = $iface_ref->{"virtual_node_id"};
my $virtual_port_id = $iface_ref->{"virtual_port_id"};
my $component_id = $iface_ref->{"component_id"};
my $linkref = $ifacemap{"$virtual_node_id:$virtual_port_id"};
foreach my $iface_ref ($interfaces) {
my $virtual_node_id = GeniXML::GetText("./n:virtual_node_id",
$iface_ref);
my $virtual_port_id = GeniXML::GetText("./n:virtual_port_id",
$iface_ref);
my $component_id = GeniXML::GetText("./n:component_id",
$iface_ref);
my $linkref = $vportmap{"$virtual_node_id:$virtual_port_id"};
$component_id = "lo0"
if (!defined($component_id));
$linkref->{'component_id'} = $component_id;
if (! GeniXML::SetText("component_id", $linkref, $component_id)) {
$response = GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"Bad XML: Failed to add component_id");
goto bad;
}
}
}
# Store the virt topo again since we changed it above.
......@@ -1216,7 +1247,7 @@ sub GetTicketAuxAux($$$$$$$$)
goto bad;
}
print Dumper($rspec);
print $rspec->toString();
# Nalloc might fail if the node gets picked up by someone else.
if (@nodeids && !$impotent) {
......@@ -1250,7 +1281,7 @@ sub GetTicketAuxAux($$$$$$$$)
#
# Create a new ticket.
#
my $newticket = GeniTicket->Create($authority, $user, $rspec);
my $newticket = GeniTicket->Create($authority, $user, $rspecstr);
if (!defined($newticket)) {
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
......@@ -1535,7 +1566,7 @@ sub SliverWorkAux($$$$$$$)
my @freelinks= ();
my $needplabslice = 0;
print Dumper($rspec);
print $rspec->toString();
#
# Find current slivers and save.
......@@ -1567,9 +1598,8 @@ sub SliverWorkAux($$$$$$$)
# Figure out new expiration time; this is the time at which we can
# idleswap the slice out.
#
if (exists($rspec->{'valid_until'})) {
my $expires = $rspec->{'valid_until'};
my $expires = GeniXML::GetText("./n:valid_until", $rspec);
if (defined($expires)) {
if (! ($expires =~ /^[-\w:.\/]+/)) {
$message = "Illegal valid_until in rspec";
goto bad;
......@@ -1620,27 +1650,25 @@ sub SliverWorkAux($$$$$$$)
#
# Make sure all nodes requested are allocated.
#
foreach my $ref (@{$rspec->{'node'}}) {
my $resource_uuid = $ref->{'component_urn'} ||
$ref->{'component_uuid'} || $ref->{'uuid'};