cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/master to b157104
Date Mon, 04 Aug 2014 20:50:01 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 0c77b2007 -> b15710456


devcloud: user insert on duplicate update in devcloud.sql

This commit modifies insert statements to use the insert on duplicate update
syntax to update configuration table name, values in case primary key already
exists

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: b157104563d2d30ede7bfabe2df8cf42d3dadb1d
Parents: 0c77b20
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Mon Aug 4 22:47:25 2014 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Aug 4 22:47:25 2014 +0200

----------------------------------------------------------------------
 tools/devcloud/devcloud.sql | 45 ++++++++++++++++++++++++++--------------
 1 file changed, 30 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1571045/tools/devcloud/devcloud.sql
----------------------------------------------------------------------
diff --git a/tools/devcloud/devcloud.sql b/tools/devcloud/devcloud.sql
index 88a9942..0f49b54 100644
--- a/tools/devcloud/devcloud.sql
+++ b/tools/devcloud/devcloud.sql
@@ -19,21 +19,36 @@
 INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, use_local_storage,
type, disk_size, provisioning_type) VALUES (17, 'tinyOffering', UUID(), 'tinyOffering', NOW(),
1, 'Service', 0, 'thin');
 INSERT INTO `cloud`.`service_offering` (id, cpu, speed, ram_size) VALUES (17, 1, 100, 100);
 INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, type, disk_size,provisioning_type)
VALUES (18, 'tinyDiskOffering', UUID(), 'tinyDiskOffering', NOW(), 'Disk', 1073741824,'thin');
-INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','router.ram.size',
'100');
-INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','router.cpu.mhz','100');
-INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','console.ram.size','100');
-INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','console.cpu.mhz',
'100');
-INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','ssvm.ram.size','100');
-INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','ssvm.cpu.mhz','100');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'system.vm.use.local.storage',
'true');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'expunge.workers',
'3');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'expunge.delay',
'60');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'expunge.interval',
'60');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'enable.ec2.api',
'true');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'enable.s3.api',
'true');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'host', '192.168.56.1');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'management.network.cidr',
'192.168.56.0/24');
-INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'secstorage.allowed.internal.sites',
'192.168.56.0/8');
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT','router.ram.size',
'100')
+    ON DUPLICATE KEY UPDATE value = '100';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT','router.cpu.mhz','100')
+    ON DUPLICATE KEY UPDATE value = '100';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT','console.ram.size','100')
+    ON DUPLICATE KEY UPDATE value = '100';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT','console.cpu.mhz',
'100')
+    ON DUPLICATE KEY UPDATE value = '100';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT','ssvm.ram.size','100')
+    ON DUPLICATE KEY UPDATE value = '100';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT','ssvm.cpu.mhz','100')
+    ON DUPLICATE KEY UPDATE value = '100';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'expunge.workers',
'3')
+    ON DUPLICATE KEY UPDATE value = '3';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'expunge.delay',
'60')
+    ON DUPLICATE KEY UPDATE value = '60';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'expunge.interval',
'60')
+    ON DUPLICATE KEY UPDATE value = '60';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'enable.ec2.api',
'true')
+    ON DUPLICATE KEY UPDATE value = 'true';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'enable.s3.api',
'true')
+    ON DUPLICATE KEY UPDATE value = 'true';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'host', '192.168.56.1')
+    ON DUPLICATE KEY UPDATE value = '192.168.56.1';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'management.network.cidr',
'192.168.56.0/24')
+    ON DUPLICATE KEY UPDATE value = '192.168.56.0/24';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'secstorage.allowed.internal.sites',
'192.168.56.0/8')
+    ON DUPLICATE KEY UPDATE value = '192.168.56.0/8';
+INSERT INTO `cloud`.`configuration` (instance, name, value) VALUE('DEFAULT', 'system.vm.use.local.storage',
'true')
+    ON DUPLICATE KEY UPDATE value = 'true';
 UPDATE `cloud`.`configuration` SET value='10' where name = 'storage.overprovisioning.factor';
 UPDATE `cloud`.`configuration` SET value='10' where name = 'cpu.overprovisioning.factor';
 UPDATE `cloud`.`configuration` SET value='10' where name = 'mem.overprovisioning.factor';


Mime
View raw message