Commit f7e4a29c authored by Leigh Stoller's avatar Leigh Stoller

Add per-device min/max vlan numbers; The Utah experimental stack

mostly supports vlans > 1024, but a couple do not so we have to be
careful about te tags we pick.

Still need to deal with modification of a vlan.
parent 76a05ba4
......@@ -3474,6 +3474,8 @@ CREATE TABLE `switch_stacks` (
`stack_id` varchar(32) NOT NULL default '',
`is_primary` tinyint(1) NOT NULL default '1',
`snmp_community` varchar(32) default NULL,
`min_vlan` int(11) default NULL,
`max_vlan` int(11) default NULL,
KEY `node_id` (`node_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......
#
# Add min/max vlan to switch_stacks table, so we can specify
# per-device limits to override values in the switch_stack_types
# table. This is needed, for example in Utah, where we have some
# switches that can do vlans > 1024, but not all of them.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("switch_stacks", "min_vlan")) {
DBQueryFatal("alter table switch_stacks add ".
"`min_vlan` int(11) default NULL");
}
if (!DBSlotExists("switch_stacks", "max_vlan")) {
DBQueryFatal("alter table switch_stacks add ".
"`max_vlan` int(11) default NULL");
}
return 0;
}
1;
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