Commit 5af4ead9 authored by Leigh B Stoller's avatar Leigh B Stoller

Remove vnode from the bridges table; not needed.

parent 890f99cd
......@@ -4040,9 +4040,8 @@ CREATE TABLE `virt_bridges` (
`exptidx` int(11) NOT NULL default '0',
`vname` varchar(32) NOT NULL default '',
`vlink` varchar(32) NOT NULL default '',
`vnode` varchar(32) NOT NULL default '',
`vport` tinyint(3) NOT NULL default '0',
PRIMARY KEY (`exptidx`,`vname`,`vlink`,`vnode`,`vport`),
PRIMARY KEY (`exptidx`,`vname`,`vlink`,`vport`),
KEY `pideid` (`pid`,`eid`,`vname`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -4231,9 +4230,7 @@ CREATE TABLE `virt_lans` (
`implemented_by_link` tinytext,
`ofenabled` tinyint(1) default '0',
`ofcontroller` tinytext,
`bridged_vname` varchar(32) default NULL,
`bridged_vnode` varchar(32) default NULL,
`bridged_vport` tinyint(3) default NULL,
`bridge_vname` varchar(32) default NULL,
PRIMARY KEY (`exptidx`,`vname`,`vnode`,`vport`),
UNIQUE KEY `vport` (`pid`,`eid`,`vname`,`vnode`,`vport`),
KEY `pid` (`pid`,`eid`,`vname`),
......
......@@ -904,9 +904,7 @@ REPLACE INTO table_regex VALUES ('location_info','phone','text','regex','^[-\\d\
REPLACE INTO table_regex VALUES ('location_info','room','text','redirect','default:tinytext',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','vnode','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','vport','int','redirect','default:tinyint',0,99,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','bridged_vname','text','redirect','virt_lans:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','bridged_vnode','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','bridged_vport','int','redirect','virt_lans:vport',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','bridge_vname','text','redirect','virt_lans:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','ip','text','regex','^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})$',0,15,NULL);
REPLACE INTO table_regex VALUES ('experiments','usemodelnet','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('experiments','modelnet_cores','int','redirect','default:tinyint',0,5,NULL);
......@@ -1086,7 +1084,6 @@ REPLACE INTO table_regex VALUES ('virt_bridges','pid','text','redirect','project
REPLACE INTO table_regex VALUES ('virt_bridges','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_bridges','vname','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_bridges','vlink','text','redirect','virt_lans:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_bridges','vnode','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_bridges','vport','int','redirect','default:tinyint',0,99,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','implemented_by_path','text','redirect','virt_paths:pathname',1,128,NULL);
REPLACE INTO table_regex VALUES ('virt_lans','implemented_by_link','text','redirect','default:tinytext',0,0,NULL);
......
......@@ -17,17 +17,7 @@ sub DoUpdate($$$)
if (!DBSlotExists("virt_lans", "bridge_vname")) {
print " *** Updating virt_lans ... please be patient.\n";
DBQueryFatal("alter table virt_lans add ".
" `bridged_vname` varchar(32) default NULL");
}
if (!DBSlotExists("virt_lans", "bridged_vnode")) {
print " *** Updating virt_lans ... please be patient.\n";
DBQueryFatal("alter table virt_lans add ".
" `bridged_vnode` varchar(32) default NULL");
}
if (!DBSlotExists("virt_lans", "bridged_vport")) {
print " *** Updating virt_lans ... please be patient.\n";
DBQueryFatal("alter table virt_lans add ".
" `bridged_vport` tinyint(3) default NULL");
" `bridge_vname` varchar(32) default NULL");
}
if (!DBTableExists("virt_bridges")) {
DBQueryFatal("CREATE TABLE `virt_bridges` ( ".
......@@ -36,12 +26,18 @@ sub DoUpdate($$$)
" `exptidx` int(11) NOT NULL default '0', ".
" `vname` varchar(32) NOT NULL default '', ".
" `vlink` varchar(32) NOT NULL default '', ".
" `vnode` varchar(32) NOT NULL default '', ".
" `vport` tinyint(3) NOT NULL default '0', ".
" PRIMARY KEY (`exptidx`,`vname`,`vlink`,`vnode`,`vport`),".
" PRIMARY KEY (`exptidx`,`vname`,`vlink`,`vport`),".
" KEY `pideid` (`pid`,`eid`,`vname`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_nodes','role','text','regex', ".
" '^(node|bridge)\$',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_lans','bridge_vname','text','redirect',".
" 'virt_lans:vname',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_bridges','pid','text','redirect',".
" 'projects:pid',0,0,NULL)");
......@@ -54,24 +50,10 @@ sub DoUpdate($$$)
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_bridges','vlink','text','redirect',".
" 'virt_lans:vname',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_bridges','vnode','text','redirect',".
" 'virt_nodes:vname',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_bridges','vport','int','redirect',".
" 'default:tinyint',0,99,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_nodes','role','text','regex', ".
" '^(node|bridge)\$',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_lans','bridged_vname','text','redirect',".
" 'virt_lans:vname',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_lans','bridged_vnode','text','redirect',".
" 'virt_nodes:vname',0,0,NULL)");
DBQueryFatal("replace into table_regex VALUES ".
" ('virt_lans','bridged_vport','int','redirect',".
" 'virt_lans:vport',0,0,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