Commit f5cc7006 authored by Kirk Webb's avatar Kirk Webb

Add PhantomNet to 'genesis' enum in 'users' and 'projects' tables.

Also add sitevar for PhantomNet portal banner message.
parent 532816b2
......@@ -4059,7 +4059,7 @@ CREATE TABLE `projects` (
`nonlocal_id` varchar(128) default NULL,
`nonlocal_type` tinytext,
`manager_urn` varchar(128) default NULL,
`genesis` enum('emulab','aptlab','cloudlab') NOT NULL default 'emulab',
`genesis` enum('emulab','aptlab','cloudlab','phantomnet') NOT NULL default 'emulab',
PRIMARY KEY (`pid_idx`),
UNIQUE KEY `pid` (`pid`),
KEY `unix_gid` (`unix_gid`),
......@@ -4827,7 +4827,7 @@ CREATE TABLE `users` (
`default_project` mediumint(8) unsigned default NULL,
`nocollabtools` tinyint(1) default '0',
`initial_passphrase` varchar(128) default NULL,
`genesis` enum('emulab','aptlab','cloudlab') NOT NULL default 'emulab',
`genesis` enum('emulab','aptlab','cloudlab','phantomnet') NOT NULL default 'emulab',
PRIMARY KEY (`uid_idx`),
KEY `unix_uid` (`unix_uid`),
KEY `status` (`status`),
......
......@@ -161,6 +161,7 @@ INSERT INTO sitevariables VALUES ('node/nfs_transport',NULL,'udp','Transport pro
INSERT INTO sitevariables VALUES ('images/default_typelist',NULL,'','List of types to associate with an imported image when it is not appropriate to associate all existing types.',0);
INSERT INTO sitevariables VALUES ('protogeni/use_imagetracker',NULL,'0','Enable use of the image tracker.',0);
INSERT INTO sitevariables VALUES ('general/no_openflow',NULL,'0','Disallow topologies that specify openflow controllers, there is no local support for it.',0);
INSERT INTO sitevariables VALUES ('phantomnet/message',NULL,'','Message to display at the top of the PhantomNet portal',0);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
......
#
# Add stuff for phantomnet genesis and portal banner message.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
my $type = DBSlotType("projects", "genesis");
if (!$type) {
Fatal("No 'genesis' slot in 'projects' table");
}
if (! ($type =~ /phantomnet/)) {
DBQueryFatal("alter table projects change `genesis` `genesis` ".
" enum('emulab','aptlab','cloudlab','phantomnet') ".
" NOT NULL default 'emulab'");
}
$type = DBSlotType("users", "genesis");
if (!$type) {
Fatal("No 'genesis' slot in 'users' table");
}
if (! ($type =~ /phantomnet/)) {
DBQueryFatal("alter table users change `genesis` `genesis` ".
" enum('emulab','aptlab','cloudlab','phantomnet') ".
" NOT NULL default 'emulab'");
}
my $var = "phantomnet/message";
if (!TBSiteVarExists($var)) {
my $desc = "Message to display at the top of the PhantomNet portal.";
my $defval = "";
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('$var',NULL,'$defval','$desc',0)");
}
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