summaryrefslogtreecommitdiff
path: root/sql/schema
diff options
context:
space:
mode:
Diffstat (limited to 'sql/schema')
-rw-r--r--sql/schema/create-database.sql5
-rw-r--r--sql/schema/faredge.sql.example27
-rw-r--r--sql/schema/orchestration.testdata4
-rw-r--r--sql/schema/orchestration_test.sql27
4 files changed, 36 insertions, 27 deletions
diff --git a/sql/schema/create-database.sql b/sql/schema/create-database.sql
new file mode 100644
index 0000000..088893f
--- /dev/null
+++ b/sql/schema/create-database.sql
@@ -0,0 +1,5 @@
+CREATE DATABASE IF NOT EXISTS `faredge` /*!40100 DEFAULT CHARACTER SET utf8 */;
+
+GRANT ALL PRIVILEGES ON faredge.* TO faredge@'%' IDENTIFIED BY 'password_changeme';
+GRANT ALL PRIVILEGES ON faredge.* TO faredge@localhost IDENTIFIED BY 'password_changeme';
+FLUSH PRIVILEGES;
diff --git a/sql/schema/faredge.sql.example b/sql/schema/faredge.sql.example
index e324d8a..e31606b 100644
--- a/sql/schema/faredge.sql.example
+++ b/sql/schema/faredge.sql.example
@@ -17,30 +17,3 @@ GRANT ALL PRIVILEGES ON faredge.* TO faredge@'%' IDENTIFIED BY 'password_changem
GRANT ALL PRIVILEGES ON faredge.* TO faredge@localhost IDENTIFIED BY 'password_changeme';
FLUSH PRIVILEGES;
-USE `faredge`;
-
-DROP TABLE IF EXISTS orch_image_sync;
-CREATE TABLE orch_image_sync (
- id int(10) unsigned NOT NULL AUTO_INCREMENT,
- remote_region_name varchar(64) not null,
- docker_image text not null,
- upload_start_time datetime not null,
- upload_end_time datetime,
- upload_status enum('STARTED', 'UPLOADING', 'COMPLETE', 'FAILED'),
- upload_message varchar(255),
- PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-DROP TABLE IF EXISTS orch_remote_region_setup;
-CREATE TABLE orch_remote_region_setup (
- id int(10) unsigned NOT NULL AUTO_INCREMENT,
- caas_vendor_version varchar(20) not null,
- kubernetes_version varchar(20) not null,
- central_region_name varchar(64) not null,
- remote_region_name varchar(64) not null,
- kubernetes_namespace varchar(64) not null,
- serviceaccount varchar(64) not null,
- kubeconfig mediumtext,
- PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
diff --git a/sql/schema/orchestration.testdata b/sql/schema/orchestration.testdata
new file mode 100644
index 0000000..74ade22
--- /dev/null
+++ b/sql/schema/orchestration.testdata
@@ -0,0 +1,4 @@
+use faredge;
+insert into orchestration_centraltoremotemap(central_region_name, remote_region_name) values ("fd00:4888:2000:07f7::290", "fd00:4888:2000:120c::290");
+insert into orchestration_centraltoremotemap(central_region_name, remote_region_name) values ("fd00:4888:2000:07f7::290", "fd00:4888:2000:120e::290");
+insert into orchestration_centraltoremotemap(central_region_name, remote_region_name) values ("fd00:4888:2000:07fd::290", "fd00:4888:2000:120a::a"); \ No newline at end of file
diff --git a/sql/schema/orchestration_test.sql b/sql/schema/orchestration_test.sql
new file mode 100644
index 0000000..62bc981
--- /dev/null
+++ b/sql/schema/orchestration_test.sql
@@ -0,0 +1,27 @@
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'wsbomagj-d654321-001', 'cmp:1.0.0', '2020-05-26 00:00:00', 'STARTED','Uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'wsbomagj-d654321-001', 'dmp:1.0.0', '2020-05-26 00:00:00', 'UPLOADING','Uploading');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'wsbomagj-d654321-001', 'pmp:1.0.0', '2020-05-26 00:00:00', 'COMPLETE','Uploading successful');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'wsbomagj-d654321-001', 'rmp:1.0.0', '2020-05-26 00:00:00', 'FAILED','Can not find image');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'wsbomagj-d654321-001', 'dip:1.0.0', '2020-05-26 00:00:00', 'STARTED','Uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'wsbomagj-d654321-001', 'dpp:1.0.0', '2020-05-26 00:00:00', 'STARTED','Uploading started');
+
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'bbtpnj33-d123456-001', 'cmp:1.0.0', '2020-05-26 00:00:00', 'STARTED','Uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'bbtpnj33-d123456-001', 'dmp:1.0.0', '2020-05-26 00:00:00', 'UPLOADING','Uploading');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'bbtpnj33-d123456-001', 'pmp:1.0.0', '2020-05-26 00:00:00', 'COMPLETE','Uploading successful');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'bbtpnj33-d123456-001', 'rmp:1.0.0', '2020-05-26 00:00:00', 'FAILED','Can not find image');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'bbtpnj33-d123456-001', 'dip:1.0.0', '2020-05-26 00:00:00', 'STARTED','Uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('dd99eaa604db4b46b33196dac06b9685', 'bbtpnj33-d123456-001', 'dpp:1.0.0', '2020-05-26 00:00:00', 'STARTED','Uploading started');
+
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'wsbomagj-d654321-002', 'cmp:1.0.0', '2020-05-25 14:29:36', 'STARTED','uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'wsbomagj-d654321-002', 'dmp:1.0.0', '2020-05-25 14:29:36', 'UPLOADING','uploading');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'wsbomagj-d654321-002', 'pmp:1.0.0', '2020-05-25 14:29:36', 'COMPLETE','uploading successful');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'wsbomagj-d654321-002', 'rmp:1.0.0', '2020-05-25 14:29:36', 'FAILED','can not find image');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'wsbomagj-d654321-002', 'dip:1.0.0', '2020-05-25 14:29:36', 'STARTED','uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'wsbomagj-d654321-002', 'dpp:1.0.0', '2020-05-25 14:29:36', 'STARTED','uploading started');
+
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'bbtpnj33-d123456-002', 'cmp:1.0.0', '2020-05-25 14:29:36', 'STARTED','uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'bbtpnj33-d123456-002', 'dmp:1.0.0', '2020-05-25 14:29:36', 'UPLOADING','uploading');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'bbtpnj33-d123456-002', 'pmp:1.0.0', '2020-05-25 14:29:36', 'COMPLETE','uploading successful');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'bbtpnj33-d123456-002', 'rmp:1.0.0', '2020-05-25 14:29:36', 'FAILED','can not find image');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'bbtpnj33-d123456-002', 'dip:1.0.0', '2020-05-25 14:29:36', 'STARTED','uploading started');
+INSERT INTO orch_image_sync(transaction_id, remote_region_name, docker_image, upload_start_time, upload_status, upload_message) values('940483182efe40e4ab8dd066ee0c9444', 'bbtpnj33-d123456-002', 'dpp:1.0.0', '2020-05-25 14:29:36', 'STARTED','uploading started');