Adding ovs_tunnel_interface to schema;

adding new tables to update script (3.0.2 to 3.0.3)
This commit is contained in:
Salvatore Orlando 2012-04-23 11:37:34 +01:00
parent f66dd8927e
commit f5952ef685
3 changed files with 35 additions and 2 deletions

View File

@ -114,7 +114,8 @@ DROP TABLE IF EXISTS `cloud`.`op_nwgrp_work`;
DROP TABLE IF EXISTS `cloud`.`op_vm_ruleset_log`;
DROP TABLE IF EXISTS `cloud`.`ovs_host_vlan_alloc`;
DROP TABLE IF EXISTS `cloud`.`ovs_tunnel`;
DROP TABLE IF EXISTS `cloud`.`ovs_tunnel_account`;
DROP TABLE IF EXISTS `cloud`.`ovs_tunnel_network`;
DROP TABLE IF EXISTS `cloud`.`ovs_tunnel_interface`;
DROP TABLE IF EXISTS `cloud`.`ovs_tunnel_alloc`;
DROP TABLE IF EXISTS `cloud`.`ovs_vlan_mapping_dirty`;
DROP TABLE IF EXISTS `cloud`.`ovs_vm_flow_log`;
@ -1751,6 +1752,18 @@ CREATE TABLE `cloud`.`ovs_tunnel`(
PRIMARY KEY(`from`, `to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`ovs_tunnel_interface` (
`id` bigint NOT NULL AUTO_INCREMENT,
`ip` varchar(16) DEFAULT NULL,
`netmask` varchar(16) DEFAULT NULL,
`mac` varchar(18) DEFAULT NULL,
`host_id` bigint DEFAULT NULL,
`label` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `cloud`.`ovs_tunnel_interface` (`ip`, `netmask`, `mac`, `host_id`, `label`) VALUES ('0', '0', '0', 0, 'lock');
CREATE TABLE `cloud`.`ovs_tunnel_network`(
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
`from` bigint unsigned COMMENT 'from host id',

View File

@ -742,4 +742,3 @@ UPDATE `cloud`.`networks` n SET n.display_text=(CONCAT('guestNetworkForBasicZon
UPDATE `cloud`.`configuration` SET description='Bypass internal dns, use exetrnal dns1 and dns2' WHERE name='use.external.dns';
UPDATE `cloud`.`configuration` SET category='Alert' WHERE name='capacity.check.period';

View File

@ -53,4 +53,25 @@ CREATE TABLE `cloud`.`volume_host_ref` (
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
INSERT IGNORE INTO `cloud`.`disk_offering` (name, display_text, customized, unique_name, disk_size, system_use) VALUES ( "Custom", "Custom Disk", 1, "Cloud.com-Custom", 0, 1);
# Changes for OVS tunnel manager
CREATE TABLE `cloud`.`ovs_tunnel_interface` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` varchar(16) DEFAULT NULL,
`netmask` varchar(16) DEFAULT NULL,
`mac` varchar(18) DEFAULT NULL,
`host_id` bigint(20) DEFAULT NULL,
`label` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`ovs_tunnel_network`(
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
`from` bigint unsigned COMMENT 'from host id',
`to` bigint unsigned COMMENT 'to host id',
`network_id` bigint unsigned COMMENT 'network identifier',
`key` int unsigned COMMENT 'gre key',
`port_name` varchar(32) COMMENT 'in port on open vswitch',
`state` varchar(16) default 'FAILED' COMMENT 'result of tunnel creatation',
PRIMARY KEY(`from`, `to`, `network_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;