Commit a9d268d2 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add 25G and 56G generic interface types. Add temp debugging slot to

interfaces table for auto creating interfaces, in case I need to back
them out in a hurry.
parent 4934fa31
......@@ -2688,6 +2688,7 @@ CREATE TABLE `interfaces` (
`trunk_mode` enum('equal','dual') NOT NULL default 'equal',
`uuid` varchar(40) NOT NULL default '',
`logical` tinyint(1) unsigned NOT NULL default '0',
`autocreated` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`node_id`,`card`,`port`),
KEY `mac` (`mac`),
KEY `IP` (`IP`),
......
......@@ -46,9 +46,15 @@ INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_10G','ethernet_defs
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_25G',25000000,1,'Generic 25GB','Generic 25GB',1,'RJ45');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_25G','protocols','ethernet');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_25G','ethernet_defspeed','25000000');
INSERT IGNORE INTO `interface_types` VALUES ('generic_100G',100000000,1,'Generic 100GB','Generic 100GB',1,'RJ45');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_100G','protocols','ethernet');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_100G','ethernet_defspeed','100000000');
INSERT IGNORE INTO `interface_types` VALUES ('generic_56G',56000000,1,'Generic 56GB','Generic 56GB',1,'RJ45');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_56G','protocols','ethernet');
INSERT IGNORE INTO `interface_capabilities` VALUES ('generic_56G','ethernet_defspeed','56000000');
-- We use these types for the ilo/drac management interfaces.
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("interfaces", "autocreated")) {
DBQueryFatal("alter table interfaces add ".
" `autocreated` tinyint(1) unsigned NOT NULL default '0'");
}
DBQueryFatal("INSERT IGNORE INTO `interface_types` VALUES ".
" ('generic_25G',25000000,1,'Generic 25GB',".
" 'Generic 25GB',1,'RJ45')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_25G','protocols','ethernet')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_25G','ethernet_defspeed','25000000')");
DBQueryFatal("INSERT IGNORE INTO `interface_types` VALUES ".
" ('generic_56G',56000000,1,'Generic 56GB',".
" 'Generic 56GB',1,'RJ45')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_56G','protocols','ethernet')");
DBQueryFatal("INSERT IGNORE INTO `interface_capabilities` VALUES ".
" ('generic_56G','ethernet_defspeed','56000000')");
return 0;
}
# Local Variables:
# mode:perl
# End:
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