Commit a9f3a8a8 authored by David Johnson's avatar David Johnson

Add new tables for dynamic blobs and client service control; table regex stuff.

parent 6cc00b41
......@@ -129,6 +129,8 @@ CREATE TABLE `blobs` (
`uuid` varchar(40) NOT NULL,
`filename` tinytext,
`owner_uid` varchar(8) NOT NULL default '',
`vblob_id` varchar(40) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
PRIMARY KEY (`uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......@@ -252,6 +254,59 @@ CREATE TABLE `checkups_temp` (
PRIMARY KEY (`object`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `client_service_ctl`
--
DROP TABLE IF EXISTS `client_service_ctl`;
CREATE TABLE `client_service_ctl` (
`obj_type` enum('node_type','node','osid') NOT NULL default 'node_type',
`obj_name` varchar(64) NOT NULL default '',
`service_idx` int(10) NOT NULL default '0',
`env` enum('load','boot') NOT NULL default 'boot',
`whence` enum('first','every') NOT NULL default 'every',
`alt_blob_id` varchar(40) NOT NULL default '',
`enable` tinyint(1) NOT NULL default '1',
`enable_hooks` tinyint(1) NOT NULL default '1',
`fatal` tinyint(1) NOT NULL default '1',
`user_can_override` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`obj_type`,`obj_name`,`service_idx`,`env`,`whence`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `client_service_hooks`
--
DROP TABLE IF EXISTS `client_service_hooks`;
CREATE TABLE `client_service_hooks` (
`obj_type` enum('node_type','node','osid') NOT NULL default 'node_type',
`obj_name` varchar(64) NOT NULL default '',
`service_idx` int(10) NOT NULL default '0',
`env` enum('load','boot') NOT NULL default 'boot',
`whence` enum('first','every') NOT NULL default 'every',
`hook_blob_id` varchar(40) NOT NULL default '',
`hook_op` enum('boot','shutdown','reconfig','reset') NOT NULL default 'boot',
`hook_point` enum('pre','post') NOT NULL default 'post',
`argv` varchar(255) NOT NULL default '',
`fatal` tinyint(1) NOT NULL default '0',
`user_can_override` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`obj_type`,`obj_name`,`service_idx`,`env`,`whence`,`hook_blob_id`,`hook_op`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `client_services`
--
DROP TABLE IF EXISTS `client_services`;
CREATE TABLE `client_services` (
`idx` int(10) NOT NULL default '0',
`service` varchar(64) NOT NULL default 'isup',
`env` enum('load','boot') NOT NULL default 'boot',
`whence` enum('first','every') NOT NULL default 'every',
`hooks_only` int(1) NOT NULL default '0',
PRIMARY KEY (`idx`,`service`,`env`,`whence`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `comments`
--
......@@ -3936,6 +3991,76 @@ CREATE TABLE `virt_agents` (
UNIQUE KEY `pideid` (`pid`,`eid`,`vname`,`vnode`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_blobs`
--
DROP TABLE IF EXISTS `virt_blobs`;
CREATE TABLE `virt_blobs` (
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`vblob_id` varchar(40) NOT NULL default '',
`filename` tinytext,
PRIMARY KEY (`exptidx`,`vblob_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_client_service_ctl`
--
DROP TABLE IF EXISTS `virt_client_service_ctl`;
CREATE TABLE `virt_client_service_ctl` (
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`vnode` varchar(32) NOT NULL default '',
`service_idx` int(10) NOT NULL default '0',
`env` enum('load','boot') NOT NULL default 'boot',
`whence` enum('first','every') NOT NULL default 'every',
`alt_vblob_id` varchar(40) NOT NULL default '',
`enable` tinyint(1) NOT NULL default '1',
`enable_hooks` tinyint(1) NOT NULL default '1',
`fatal` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`exptidx`,`vnode`,`service_idx`,`env`,`whence`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_client_service_hooks`
--
DROP TABLE IF EXISTS `virt_client_service_hooks`;
CREATE TABLE `virt_client_service_hooks` (
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`vnode` varchar(32) NOT NULL default '',
`service_idx` int(10) NOT NULL default '0',
`env` enum('load','boot') NOT NULL default 'boot',
`whence` enum('first','every') NOT NULL default 'every',
`hook_vblob_id` varchar(40) NOT NULL default '',
`hook_op` enum('boot','shutdown','reconfig','reset') NOT NULL default 'boot',
`hook_point` enum('pre','post') NOT NULL default 'post',
`argv` varchar(255) NOT NULL default '',
`fatal` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`exptidx`,`vnode`,`service_idx`,`env`,`whence`,`hook_vblob_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_client_service_opts`
--
DROP TABLE IF EXISTS `virt_client_service_opts`;
CREATE TABLE `virt_client_service_opts` (
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`vnode` varchar(32) NOT NULL default '',
`opt_name` varchar(32) NOT NULL default '',
`opt_value` varchar(64) NOT NULL default '',
PRIMARY KEY (`exptidx`,`vnode`,`opt_name`,`opt_value`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_firewalls`
--
......
......@@ -1052,6 +1052,33 @@ REPLACE INTO table_regex VALUES ('images','decryption_key','text','regex','^[0-9
REPLACE INTO table_regex VALUES ('experiment_blobs','path','text','redirect','default:text',0,0,NULL);
REPLACE INTO table_regex VALUES ('experiment_blobs','action','text','redirect','default:text',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_blobs','filename','text','redirect','default:tinytext',0,256,NULL);
REPLACE INTO table_regex VALUES ('virt_blobs','vblob_id','text','regex','^[-\\d\\w]+$',0,40,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','alt_vblob_id','text','regex','^[-\\d\\w]+$',0,40,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','enable','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','enable_hooks','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','env','text','regex','^(boot|load)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','fatal','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','pid','text','redirect','projects:pid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','service_idx','int','redirect','default:int',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','vnode','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','whence','text','regex','^(first|every)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','argv','text','regex','^[-ws\\\"]*$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','env','text','regex','^(boot|load)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','fatal','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','hook_op','text','regex','^(boot|shutdown|reconfig|reset)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','hook_point','text','regex','^(pre|post)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','hook_vblob_id','text','regex','^[-\\d\\w]+$',0,40,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','op','text','regex','^(boot|shutdown|reconfig|reset)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','pid','text','redirect','projects:pid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','point','text','regex','^(pre|post)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','service_idx','int','redirect','default:int',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','vnode','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','whence','text','regex','^(first|every)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('default','tinytext_utf8','text','regex','^(?:[\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,256,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
REPLACE INTO table_regex VALUES ('default','text_utf8','text','regex','^(?:[\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,65535,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
REPLACE INTO table_regex VALUES ('default','fulltext_utf8','text','regex','^(?:[\\x09\\x0A\\x0D\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF])*$',0,65535,'adopted from http://www.w3.org/International/questions/qa-forms-utf-8.en.php');
......
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