Commit 00aead27 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

DB Update adding public address pools to be allocated to experiments

parent 35ccf1d5
......@@ -5097,9 +5097,28 @@ CREATE TABLE `virt_node_public_addr` (
`node_id` varchar(32) default NULL,
`card` tinyint(3) unsigned default '0',
`port` tinyint(3) unsigned default '0',
`pool_id` varchar(32) default NULL,
`pid` varchar(48) default NULL,
`eid` varchar(32) default NULL,
PRIMARY KEY (`IP`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_address_pool`
--
DROP TABLE IF EXISTS `virt_address_allocation`;
CREATE TABLE `virt_address_allocation` (
`idx` int(10) unsigned NOT NULL default `0`,
`pool_id` varchar(32) NOT NULL default '0',
`pid` varchar(48) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`count` int(10) NOT NULL default 0,
`restriction` enum('continguous', 'cidr', 'any') NOT NULL default 'any',
`version` enum('ipv4', 'ipv6') NOT NULL default 'ipv4',
PRIMARY KEY (`idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_node_startloc`
--
......
#
# Dataset stuff
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("virt_node_public_addr", "pool_id")) {
DBQueryFatal("alter table virt_node_public_addr add ".
" `pool_id` varchar(32) default NULL, ".
" `pid` varchar(48) default NULL, ".
" `eid` varchar(32) default NULL, ".
" after port");
DBQueryFatal("create table `virt_address_allocation` ( ".
" `idx` int(10) unsigned NOT NULL default `0`, ".
" `pool_id` varchar(32) NOT NULL default '0', ".
" `pid` varchar(48) NOT NULL default '', ".
" `eid` varchar(32) NOT NULL default '', ".
" `count` int(10) NOT NULL default 0, ".
" `restriction` enum('continguous', 'cidr', 'any') NOT NULL default 'any', ".
" `version` enum('ipv4', 'ipv6') NOT NULL default 'ipv4', ".
" PRIMARY KEY (`idx`) ".
" ) ENGINE=MyISAM DEFAULT CHARSET=latin1")
}
return 0;
}
1;
# 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