incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: S2S VPN: Add db upgrade
Date Tue, 14 Aug 2012 00:48:09 GMT
Updated Branches:
  refs/heads/4.0 7c47f3cb9 -> 926ae265b


S2S VPN: Add db upgrade


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/926ae265
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/926ae265
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/926ae265

Branch: refs/heads/4.0
Commit: 926ae265b4e34cba536c89c6944710c884e2d0b8
Parents: 7c47f3c
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Mon Aug 13 17:37:51 2012 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Mon Aug 13 17:47:52 2012 -0700

----------------------------------------------------------------------
 setup/db/db/schema-302to40.sql |   55 +++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/926ae265/setup/db/db/schema-302to40.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-302to40.sql b/setup/db/db/schema-302to40.sql
index 79ae83f..b6ef131 100644
--- a/setup/db/db/schema-302to40.sql
+++ b/setup/db/db/schema-302to40.sql
@@ -397,3 +397,58 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT',
'manag
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Account Defaults', 'DEFAULT', 'management-server',
'max.account.vpcs', '20', 'The default maximum number of vpcs that can be created for an account');
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Project Defaults', 'DEFAULT', 'management-server',
'max.project.vpcs', '20', 'The default maximum number of vpcs that can be created for a project');
 
+CREATE TABLE `cloud`.`s2s_vpn_gateway` (
+  `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
+  `uuid` varchar(40),
+  `addr_id` bigint unsigned NOT NULL,
+  `vpc_id` bigint unsigned NOT NULL,
+  `domain_id` bigint unsigned NOT NULL,
+  `account_id` bigint unsigned NOT NULL,
+  `removed` datetime COMMENT 'date removed if not null',
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_s2s_vpn_gateway__addr_id` FOREIGN KEY (`addr_id`) REFERENCES `user_ip_address`
(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_vpn_gateway__vpc_id` FOREIGN KEY (`vpc_id`) REFERENCES `vpc` (`id`)
ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_vpn_gateway__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)
ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_vpn_gateway__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain`(`id`)
ON DELETE CASCADE,
+  CONSTRAINT `uc_s2s_vpn_gateway__uuid` UNIQUE (`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`s2s_customer_gateway` (
+  `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
+  `uuid` varchar(40),
+  `name` varchar(255) NOT NULL,
+  `gateway_ip` char(40) NOT NULL,
+  `guest_cidr_list` varchar(200) NOT NULL,
+  `ipsec_psk` varchar(256),
+  `ike_policy` varchar(30) NOT NULL,
+  `esp_policy` varchar(30) NOT NULL,
+  `ike_lifetime` int NOT NULL DEFAULT 86400,
+  `esp_lifetime` int NOT NULL DEFAULT 3600,
+  `dpd` int(1) NOT NULL DEFAULT 0,
+  `domain_id` bigint unsigned NOT NULL,
+  `account_id` bigint unsigned NOT NULL,
+  `removed` datetime COMMENT 'date removed if not null',
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_s2s_customer_gateway__account_id` FOREIGN KEY (`account_id`) REFERENCES
`account`(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_customer_gateway__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain`(`id`)
ON DELETE CASCADE,
+  CONSTRAINT `uc_s2s_customer_gateway__uuid` UNIQUE (`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`s2s_vpn_connection` (
+  `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
+  `uuid` varchar(40),
+  `vpn_gateway_id` bigint unsigned NULL,
+  `customer_gateway_id` bigint unsigned NULL,
+  `state` varchar(32) NOT NULL,
+  `domain_id` bigint unsigned NOT NULL,
+  `account_id` bigint unsigned NOT NULL,
+  `created` datetime NOT NULL COMMENT 'date created',
+  `removed` datetime COMMENT 'date removed if not null',
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_s2s_vpn_connection__vpn_gateway_id` FOREIGN KEY (`vpn_gateway_id`) REFERENCES
`s2s_vpn_gateway` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_vpn_connection__customer_gateway_id` FOREIGN KEY (`customer_gateway_id`)
REFERENCES `s2s_customer_gateway` (`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_vpn_connection__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)
ON DELETE CASCADE,
+  CONSTRAINT `fk_s2s_vpn_connection__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain`(`id`)
ON DELETE CASCADE,
+  CONSTRAINT `uc_s2s_vpn_connection__uuid` UNIQUE (`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+


Mime
View raw message