Commit 2c2c262a authored by Robert Ricci's avatar Robert Ricci

Add the ability to attach features to the physical nodes.

parent 4d526664
......@@ -46,14 +46,30 @@ my $NODESPEED = "1000";
# 100 gbit interface or 10 trunked 10gbit interfaces)
my $TRUNKSPEED = $NODESPEED * 100;
#
# Generate a list of (0-weight) features
#
sub featurelist($) {
my ($howmany) = @_;
my @features;
foreach my $i (0 .. $howmany -1) {
push @features, "FD$i:0";
}
return @features;
}
if (@ARGV == 1) {
($nodes) = @ARGV;
} elsif (@ARGV == 2) {
my $featurecount;
($nodes,$featurecount) = @ARGV;
@NODEFEATURES = featurelist($featurecount);
} elsif (@ARGV == 3) {
my $trunkmult;
($nodes, $PPS, $trunkmult) = @ARGV;
$TRUNKSPEED = $NODESPEED * $trunkmult;
} else {
die "Usage: $0 <nodes> [pps trunkmult]\n";
die "Usage: $0 <nodes> [pps trunkmult] | [ featurecount ]\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