Updated Branches:
  refs/heads/gslb-wip 89c33a01e -> 3a310ac83

move DB schema changes from create-schema to schema41-42 file


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

Branch: refs/heads/gslb-wip
Commit: 3a310ac830f3203a3a1633d543d4a7d6b81052b1
Parents: fea98fa
Author: Murali Reddy <murali.re...@citrix.com>
Authored: Tue Mar 12 11:28:46 2013 +0530
Committer: Murali Reddy <murali.re...@citrix.com>
Committed: Tue Mar 12 11:28:46 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java |    6 +-
 setup/db/create-schema.sql                     |   43 -------------------
 setup/db/db/schema-410to420.sql                |   34 +++++++++++++++
 3 files changed, 37 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3a310ac8/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java 
b/server/src/com/cloud/configuration/Config.java
index 07e4c89..505b332 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -377,8 +377,6 @@ public enum Config {
        IntervalToEchoBaremetalSecurityGroupAgent("Advanced", 
ManagementServer.class, Integer.class, 
"interval.baremetal.securitygroup.agent.echo", "10", "Interval to echo 
baremetal security group agent, in seconds", null),
        TimeoutToEchoBaremetalSecurityGroupAgent("Advanced", 
ManagementServer.class, Integer.class, 
"timeout.baremetal.securitygroup.agent.echo", "3600", "Timeout to echo 
baremetal security group agent, in seconds, the provisioning process will be 
treated as a failure", null),
 
-    CloudDnsName("Advanced", ManagementServer.class, String.class, 
"cloud.dns.name", "default", " DNS name of the cloud", null);
-
     ApiLimitEnabled("Advanced", ManagementServer.class, Boolean.class, 
"api.throttling.enabled", "true", "Enable/disable Api rate limit", null),
        ApiLimitInterval("Advanced", ManagementServer.class, Integer.class, 
"api.throttling.interval", "1", "Time interval (in seconds) to reset API 
count", null),
     ApiLimitMax("Advanced", ManagementServer.class, Integer.class, 
"api.throttling.max", "25", "Max allowed number of APIs within fixed interval", 
null),
@@ -389,7 +387,9 @@ public enum Config {
     VMSnapshotMax("Advanced", VMSnapshotManager.class, Integer.class, 
"vmsnapshot.max", "10", "Maximum vm snapshots for a vm", null),
     VMSnapshotCreateWait("Advanced", VMSnapshotManager.class, Integer.class, 
"vmsnapshot.create.wait", "600", "In second, timeout for create vm snapshot", 
null),
     VMSnapshotExpungeInterval("Advanced", VMSnapshotManager.class, 
Integer.class, "vmsnapshot.expunge.interval", "60", "The interval (in seconds) 
to wait before running the expunge thread.", null),
-    VMSnapshotExpungeWorkers("Advanced", VMSnapshotManager.class, 
Integer.class, "vmsnapshot.expunge.workers",  "1", "Number of workers 
performing expunge ", null);
+    VMSnapshotExpungeWorkers("Advanced", VMSnapshotManager.class, 
Integer.class, "vmsnapshot.expunge.workers",  "1", "Number of workers 
performing expunge ", null),
+
+    CloudDnsName("Advanced", ManagementServer.class, String.class, 
"cloud.dns.name", "default", " DNS name of the cloud", null);
     
        
        private final String _category;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3a310ac8/setup/db/create-schema.sql
----------------------------------------------------------------------
diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql
index a4ddb06..ded581e 100755
--- a/setup/db/create-schema.sql
+++ b/setup/db/create-schema.sql
@@ -196,8 +196,6 @@ DROP TABLE IF EXISTS `cloud`.`vm_network_map`;
 DROP TABLE IF EXISTS `cloud`.`netapp_volume`;
 DROP TABLE IF EXISTS `cloud`.`netapp_pool`;
 DROP TABLE IF EXISTS `cloud`.`netapp_lun`;
-DROP TABLE IF EXISTS `cloud`.`global_load_balancing_rules`;
-DROP TABLE IF EXISTS `cloud`.`global_load_balancer_lb_rule_map`;
 
 CREATE TABLE `cloud`.`version` (
   `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT COMMENT 'id',
@@ -2085,9 +2083,6 @@ CREATE TABLE `cloud`.`external_load_balancer_devices` (
   `is_dedicated` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if 
device/appliance is provisioned for dedicated use only',
   `is_inline` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if load balancer 
will be used in in-line configuration with firewall',
   `is_managed` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if load balancer 
appliance is provisioned and its life cycle is managed by by cloudstack',
-  `is_gslb_provider` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if load 
balancer appliance is acting as gslb service provider in the zone',
-  `gslb_site_publicip` varchar(255)  DEFAULT NULL COMMENT 'GSLB service 
Provider site public ip',
-  `gslb_site_privateip` varchar(255) DEFAULT NULL COMMENT 'GSLB service 
Provider site private ip',
   `host_id` bigint unsigned NOT NULL COMMENT 'host id coresponding to the 
external load balancer device',
   `parent_host_id` bigint unsigned COMMENT 'if the load balancer appliance is 
cloudstack managed, then host id on which this appliance is provisioned',
   PRIMARY KEY (`id`),
@@ -2264,16 +2259,6 @@ CREATE TABLE  `cloud`.`netscaler_pod_ref` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 
-CREATE TABLE  `cloud`.`region` (
-  `id` int unsigned NOT NULL UNIQUE,
-  `name` varchar(255) NOT NULL UNIQUE,
-  `end_point` varchar(255) NOT NULL,
-  `api_key` varchar(255),
-  `secret_key` varchar(255),
-  `gslb_service_enabled` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT 'Is 
GSLB service provided in the zone',
-  PRIMARY KEY  (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
 CREATE TABLE `cloud`.`vpc` (
   `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
   `uuid` varchar(40) NOT NULL,
@@ -2435,33 +2420,5 @@ CREATE TABLE `cloud`.`nicira_nvp_nic_map` (
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
-CREATE TABLE `cloud`.`global_load_balancing_rules` (
-  `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
-  `uuid` varchar(40),
-  `account_id` bigint unsigned NOT NULL COMMENT 'account id',
-  `region_id`  int unsigned NOT NULL,
-  `name` varchar(255) NOT NULL,
-  `description` varchar(4096) NULL COMMENT 'description',
-  `state` char(32) NOT NULL COMMENT 'current state of this rule',
-  `algorithm` varchar(255) NOT NULL COMMENT 'load balancing algorithm used to 
distribbute traffic across zones',
-  `persistence` varchar(255) NOT NULL COMMENT 'session persistence used across 
the zone',
-  `gslb_domain_name` varchar(255) NOT NULL COMMENT 'DNS name for the GSLB 
service that is used to provide a FQDN for the GSLB service',
-  `service_type` varchar(255) NOT NULL COMMENT 'type of the GSLB service',
-  PRIMARY KEY  (`id`),
-  CONSTRAINT `fk_global_load_balancing_rules_account_id` FOREIGN KEY 
(`account_id`) REFERENCES `account`(`id`) ON DELETE CASCADE,
-  CONSTRAINT `fk_global_load_balancing_rules_region_id` FOREIGN 
KEY(`region_id`) REFERENCES `region`(`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `cloud`.`global_load_balancer_lb_rule_map` (
-  `id` bigint unsigned NOT NULL auto_increment,
-  `gslb_rule_id` bigint unsigned NOT NULL,
-  `lb_rule_id` bigint unsigned NOT NULL,
-  `revoke` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 is when rule is 
set for Revoke',
-  PRIMARY KEY  (`id`),
-  UNIQUE KEY (`gslb_rule_id`, `lb_rule_id`),
-  CONSTRAINT `fk_gslb_rule_id` FOREIGN KEY(`gslb_rule_id`) REFERENCES 
`global_load_balancing_rules`(`id`) ON DELETE CASCADE,
-  CONSTRAINT `fk_lb_rule_id` FOREIGN KEY(`lb_rule_id`) REFERENCES 
`load_balancing_rules`(`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
 SET foreign_key_checks = 1;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3a310ac8/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index ca15bda..cdef38f 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -185,3 +185,37 @@ CREATE VIEW `cloud`.`event_view` AS
         `cloud`.`projects` ON projects.project_account_id = event.account_id
             left join
         `cloud`.`event` eve ON event.start_id = eve.id;
+
+
+ALTER TABLE `cloud`.`region` ADD COLUMN `gslb_service_enabled` tinyint(1) 
unsigned NOT NULL DEFAULT 1 COMMENT 'Is GSLB service enalbed in the Region';
+
+ALTER TABLE `cloud`.`external_load_balancer_devices` ADD COLUMN 
`is_gslb_provider` int(1) unsigned NOT NULL DEFAULT 0 COMMENT '1 if load 
balancer appliance is acting as gslb service provider in the zone';
+
+ALTER TABLE `cloud`.`external_load_balancer_devices` ADD COLUMN 
`gslb_site_publicip` varchar(255)  DEFAULT NULL COMMENT 'GSLB service Provider 
site public ip';
+
+ALTER TABLE `cloud`.`external_load_balancer_devices` ADD COLUMN 
`gslb_site_privateip` varchar(255) DEFAULT NULL COMMENT 'GSLB service Provider 
site private ip';
+
+CREATE TABLE `cloud`.`global_load_balancing_rules` (
+  `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
+  `uuid` varchar(40),
+  `account_id` bigint unsigned NOT NULL COMMENT 'account id',
+  `region_id`  int unsigned NOT NULL,
+  `name` varchar(255) NOT NULL,
+  `description` varchar(4096) NULL COMMENT 'description',
+  `algorithm` varchar(255) NOT NULL COMMENT 'load balancing algorithm used to 
distribbute traffic across zones',
+  `persistence` varchar(255) NOT NULL COMMENT 'session persistence used across 
the zone',
+  `gslb_domain_name` varchar(255) NOT NULL COMMENT 'DNS name for the GSLB 
service that is used to provide a FQDN for the GSLB service',
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_global_load_balancing_rules_account_id` FOREIGN KEY 
(`account_id`) REFERENCES `account`(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_global_load_balancing_rules_region_id` FOREIGN 
KEY(`region_id`) REFERENCES `region`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`global_load_balancer_lb_rule_map` (
+  `id` bigint unsigned NOT NULL auto_increment,
+  `gslb_rule_id` bigint unsigned NOT NULL,
+  `lb_rule_id` bigint unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY (`gslb_rule_id`, `lb_rule_id`),
+  CONSTRAINT `fk_gslb_rule_id` FOREIGN KEY(`gslb_rule_id`) REFERENCES 
`global_load_balancing_rules`(`id`) ON DELETE CASCADE,
+  CONSTRAINT `fk_lb_rule_id` FOREIGN KEY(`lb_rule_id`) REFERENCES 
`load_balancing_rules`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Reply via email to