Skip to content

Commit 6e9d7aa

Browse files
author
Prasanna Santhanam
committed
property files and build file fixes for simulator db changes
1 parent efc58cd commit 6e9d7aa

6 files changed

Lines changed: 58 additions & 158 deletions

File tree

client/tomcatconf/db.properties.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,15 @@ db.usage.autoReconnect=true
6969

7070
# awsapi database settings
7171
db.awsapi.name=cloudbridge
72+
73+
# Simulator database settings
74+
db.simulator.username=@DBUSER@
75+
db.simulator.password=@DBPW@
76+
db.simulator.host=@DBHOST@
77+
db.simulator.port=3306
78+
db.simulator.name=simulator
79+
db.simulator.maxActive=250
80+
db.simulator.maxIdle=30
81+
db.simulator.maxWait=10000
82+
db.simulator.autoReconnect=true
83+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
19+
DROP DATABASE IF EXISTS `simulator`;
20+
21+
CREATE DATABASE `simulator`;
22+
23+
GRANT ALL ON simulator.* to cloud@`localhost` identified by 'cloud';
24+
GRANT ALL ON simulator.* to cloud@`%` identified by 'cloud';
25+
26+
GRANT process ON *.* TO cloud@`localhost`;
27+
GRANT process ON *.* TO cloud@`%`;
28+
29+
commit;

setup/db/create-schema-simulator.sql

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
-- specific language governing permissions and limitations
1616
-- under the License.
1717

18-
DROP TABLE IF EXISTS `cloud`.`mockhost`;
19-
DROP TABLE IF EXISTS `cloud`.`mocksecstorage`;
20-
DROP TABLE IF EXISTS `cloud`.`mockstoragepool`;
21-
DROP TABLE IF EXISTS `cloud`.`mockvm`;
22-
DROP TABLE IF EXISTS `cloud`.`mockvolume`;
23-
DROP TABLE IF EXISTS `cloud`.`mocksecurityrules`;
18+
DROP TABLE IF EXISTS `simulator`.`mockhost`;
19+
DROP TABLE IF EXISTS `simulator`.`mocksecstorage`;
20+
DROP TABLE IF EXISTS `simulator`.`mockstoragepool`;
21+
DROP TABLE IF EXISTS `simulator`.`mockvm`;
22+
DROP TABLE IF EXISTS `simulator`.`mockvolume`;
23+
DROP TABLE IF EXISTS `simulator`.`mocksecurityrules`;
2424

25-
CREATE TABLE `cloud`.`mockhost` (
25+
CREATE TABLE `simulator`.`mockhost` (
2626
`id` bigint unsigned NOT NULL auto_increment,
2727
`name` varchar(255) NOT NULL,
2828
`private_ip_address` char(40),
@@ -48,15 +48,15 @@ CREATE TABLE `cloud`.`mockhost` (
4848
PRIMARY KEY (`id`)
4949
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
5050

51-
CREATE TABLE `cloud`.`mocksecstorage` (
51+
CREATE TABLE `simulator`.`mocksecstorage` (
5252
`id` bigint unsigned NOT NULL auto_increment,
5353
`url` varchar(255),
5454
`capacity` bigint unsigned,
5555
`mount_point` varchar(255),
5656
PRIMARY KEY (`id`)
5757
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
5858

59-
CREATE TABLE `cloud`.`mockstoragepool` (
59+
CREATE TABLE `simulator`.`mockstoragepool` (
6060
`id` bigint unsigned NOT NULL auto_increment,
6161
`guid` varchar(255),
6262
`mount_point` varchar(255),
@@ -67,7 +67,7 @@ CREATE TABLE `cloud`.`mockstoragepool` (
6767
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
6868

6969

70-
CREATE TABLE `cloud`.`mockvm` (
70+
CREATE TABLE `simulator`.`mockvm` (
7171
`id` bigint unsigned NOT NULL auto_increment,
7272
`name` varchar(255),
7373
`host_id` bigint unsigned,
@@ -83,7 +83,7 @@ CREATE TABLE `cloud`.`mockvm` (
8383
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
8484

8585

86-
CREATE TABLE `cloud`.`mockvolume` (
86+
CREATE TABLE `simulator`.`mockvolume` (
8787
`id` bigint unsigned NOT NULL auto_increment,
8888
`name` varchar(255),
8989
`size` bigint unsigned,
@@ -97,7 +97,7 @@ CREATE TABLE `cloud`.`mockvolume` (
9797
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
9898

9999

100-
CREATE TABLE `cloud`.`mockconfiguration` (
100+
CREATE TABLE `simulator`.`mockconfiguration` (
101101
`id` bigint unsigned NOT NULL auto_increment,
102102
`data_center_id` bigint unsigned,
103103
`pod_id` bigint unsigned,
@@ -108,7 +108,7 @@ CREATE TABLE `cloud`.`mockconfiguration` (
108108
PRIMARY KEY (`id`)
109109
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
110110

111-
CREATE TABLE `cloud`.`mocksecurityrules` (
111+
CREATE TABLE `simulator`.`mocksecurityrules` (
112112
`id` bigint unsigned NOT NULL auto_increment,
113113
`vmid` bigint unsigned,
114114
`signature` varchar(255),

setup/db/deploy-db-simulator.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ echo "Recreating Database cloud_usage."
8787
mysql --user=root --password=$3 < create-database-premium.sql > /dev/null 2>/dev/null
8888
handle_error create-database-premium.sql
8989

90+
echo "Recreating Database simulator."
91+
mysql --user=root --password=$3 < create-database-simulator.sql > /dev/null 2>/dev/null
92+
handle_error create-database-simulator.sql
93+
9094
mysql --user=cloud --password=cloud cloud < create-schema.sql
9195
if [ $? -ne 0 ]; then
9296
printf "Error: Cannot execute create-schema.sql\n"

tools/marvin/marvin/sandbox/advanced/tests/test_scenarios.py

Lines changed: 0 additions & 145 deletions
This file was deleted.

tools/marvin/marvin/sandbox/run-marvin.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)