Commit 28375e01 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add iface1,iface2 to wires table, eventually for cross-reference with

interfaces.  Also add a couple of generic interface types (40G and 100G).
parent 57def35b
...@@ -6270,9 +6270,11 @@ CREATE TABLE `wires` ( ...@@ -6270,9 +6270,11 @@ CREATE TABLE `wires` (
`node_id1` char(32) NOT NULL default '', `node_id1` char(32) NOT NULL default '',
`card1` tinyint(3) unsigned NOT NULL default '0', `card1` tinyint(3) unsigned NOT NULL default '0',
`port1` smallint(5) unsigned NOT NULL default '0', `port1` smallint(5) unsigned NOT NULL default '0',
`iface1` tinytext,
`node_id2` char(32) NOT NULL default '', `node_id2` char(32) NOT NULL default '',
`card2` tinyint(3) unsigned NOT NULL default '0', `card2` tinyint(3) unsigned NOT NULL default '0',
`port2` smallint(5) unsigned NOT NULL default '0', `port2` smallint(5) unsigned NOT NULL default '0',
`iface2` tinytext,
`logical` tinyint(1) unsigned NOT NULL default '0', `logical` tinyint(1) unsigned NOT NULL default '0',
`trunkid` mediumint(4) unsigned NOT NULL default '0', `trunkid` mediumint(4) unsigned NOT NULL default '0',
`external_interface` tinytext, `external_interface` tinytext,
......
...@@ -43,6 +43,12 @@ INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_1G','ethernet_defsp ...@@ -43,6 +43,12 @@ INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_1G','ethernet_defsp
INSERT IGNORE INTO `interface_types` VALUES ('generic_10G',10000000,1,'Generic GB','Generic 10GB',1,'RJ45'); INSERT IGNORE INTO `interface_types` VALUES ('generic_10G',10000000,1,'Generic GB','Generic 10GB',1,'RJ45');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_10G','protocols','ethernet'); INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_10G','protocols','ethernet');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_10G','ethernet_defspeed','10000000'); INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_10G','ethernet_defspeed','10000000');
INSERT IGNORE INTO `interface_types` VALUES ('generic_40G',40000000,1,'Generic 40GB','Generic 40GB',1,'RJ45');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_40G','protocols','ethernet');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_40G','ethernet_defspeed','40000000');
INSERT IGNORE INTO `interface_types` VALUES ('generic_40G',100000000,1,'Generic 100GB','Generic 40GB',1,'RJ45');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_100G','protocols','ethernet');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_100G','ethernet_defspeed','100000000');
-- We use these types for the ilo/drac management interfaces. -- We use these types for the ilo/drac management interfaces.
INSERT INTO `interface_types` VALUES ('ilo2',0,1,'HP','HP iLO 2',1,'RJ45'); INSERT INTO `interface_types` VALUES ('ilo2',0,1,'HP','HP iLO 2',1,'RJ45');
......
use strict;
use libdb;
use emdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("wires", "iface1")) {
DBQueryFatal("alter table wires add ".
" `iface1` tinytext after port1");
}
if (!DBSlotExists("wires", "iface2")) {
DBQueryFatal("alter table wires add ".
" `iface2` tinytext after port2");
}
DBQueryFatal("INSERT IGNORE INTO `interface_types` VALUES ".
" ('generic_40G',40000000,1,'Generic 40GB',".
" 'Generic 40GB',1,'RJ45')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_40G','protocols','ethernet')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_40G','ethernet_defspeed','40000000')");
DBQueryFatal("INSERT IGNORE INTO `interface_types` VALUES ".
" ('generic_40G',100000000,1,'Generic 100GB',".
" 'Generic 40GB',1,'RJ45')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_100G','protocols','ethernet')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_100G','ethernet_defspeed','100000000')");
return 0;
}
# Local Variables:
# mode:perl
# End:
Supports Markdown
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