Commit 2f6a5619 authored by Leigh Stoller's avatar Leigh Stoller

Switch to iface instead of card. Minor bug fix.

parent 307f2285
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -55,6 +55,7 @@ $| = 1;
use lib "@prefix@/lib";
use libdb;
use libtestbed;
use Interface;
use Lan;
# Parse args.
......@@ -101,11 +102,13 @@ foreach my $vlan (@vlans) {
die("*** $0:\n".
" Missing attributes for $member in $vlan\n");
}
my $query_result =
DBQueryFatal("select card from interfaces ".
"where node_id='$nodeid' and iface='$iface'");
my ($card) = $query_result->fetchrow_array();
push(@list, "$nodeid:$card");
# Make sure we can still find it.
my $interface = Interface->LookupByIface($nodeid, $iface);
if (!defined($interface)) {
print STDERR "*** No interface for $nodeid:$iface in $vlan\n";
next;
}
push(@list, "$nodeid:$iface");
}
$table{$id} = \@list;
debug("In table: $vlan $table{$id}\n");
......
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