Commit 357df448 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add uuids to the interfaces table.

parent 55aa2bd0
......@@ -1442,9 +1442,11 @@ CREATE TABLE `interfaces` (
`rtabid` smallint(5) unsigned NOT NULL default '0',
`vnode_id` varchar(32) default NULL,
`whol` tinyint(4) NOT NULL default '0',
`uuid` varchar(40) NOT NULL default '',
PRIMARY KEY (`node_id`,`card`,`port`),
KEY `mac` (`mac`),
KEY `IP` (`IP`)
KEY `IP` (`IP`),
KEY `uuid` (`uuid`)
......@@ -4540,3 +4540,8 @@ last_net_act,last_cpu_act,last_ext_act);
KEY `uid` (`uid`)
4.155: Add uuids to the interfaces table.
alter table interfaces add `uuid` varchar(40) NOT NULL default '';
alter table interfaces add KEY `uuid` (`uuid`);
update interfaces set uuid=UUID();
......@@ -467,7 +467,7 @@ NODE: foreach my $node_id (@node_ids) {
DBQueryFatal("INSERT INTO interfaces SET node_id='$node_id', " .
"card=$card, port=1, mac='$MAC', IP='$iface_IP', " .
"interface_type='$iface_type', iface='$iface', " .
"interface_type='$iface_type', iface='$iface', uuid=UUID(), " .
"current_speed='$max_speed', duplex=$duplex, role='$iface_role'");
if (!$switch_id) {
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