Commit 056e0e98 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Ignore the fake lan nodes in the rspec. This is going to have to

change pretty soon, but for the moment it allows me to create lans on
remote testbeds.
parent 8d51fbd0
......@@ -736,7 +736,18 @@ sub Release($$)
my @nodes = ();
foreach my $ref (@{$self->rspec()->{'node'}}) {
# 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");
my $resource_uuid = $ref->{'component_uuid'} || $ref->{'uuid'};
if (!defined($resource_uuid)) {
print STDERR "No resource id for node in ticket\n";
print Dumper($ref);
return -1;
}
# Virtual nodes not created until ticket redeemed.
my $node = Node->Lookup($resource_uuid);
......@@ -798,7 +809,18 @@ sub ReleaseHolding($$)
my @nodes = ();
foreach my $ref (@{$self->rspec()->{'node'}}) {
# 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");
my $resource_uuid = $ref->{'component_uuid'} || $ref->{'uuid'};
if (!defined($resource_uuid)) {
print STDERR "No resource id for node in ticket\n";
print Dumper($ref);
return -1;
}
my $node = Node->Lookup($resource_uuid);
next
if (!defined($node));
......
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