aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.5.1__Correct_Default_NeutronNetwork.sql32
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.4__Add_Vnf_Operational_Env_Id_column.sql3
-rw-r--r--adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql12
3 files changed, 41 insertions, 6 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.5.1__Correct_Default_NeutronNetwork.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.5.1__Correct_Default_NeutronNetwork.sql
new file mode 100644
index 0000000000..3d8f68408d
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.5.1__Correct_Default_NeutronNetwork.sql
@@ -0,0 +1,32 @@
+USE catalogdb;
+DELETE FROM temp_network_heat_template_lookup WHERE HEAT_TEMPLATE_ARTIFACT_UUID = 'efee1d84-b8ec-11e7-abc4-cec278b6b50a';
+DELETE FROM heat_template WHERE ARTIFACT_UUID = 'efee1d84-b8ec-11e7-abc4-cec278b6b50a';
+INSERT INTO `heat_template` (`ARTIFACT_UUID`,`NAME`,`VERSION`,`BODY`,`TIMEOUT_MINUTES`,`DESCRIPTION`,`CREATION_TIMESTAMP`,`ARTIFACT_CHECKSUM`) VALUES
+('efee1d84-b8ec-11e7-abc4-cec278b6b50a','Generic NeutronNet','1','
+heat_template_version: 2013-05-23
+description: A simple Neutron network
+parameters:
+ network_name:
+ type: string
+ description: Name of the Neutron Network
+ default: ONAP-NW1
+ shared:
+ type: boolean
+ description: Shared amongst tenants
+ default: False
+outputs:
+ network_id:
+ description: Openstack network identifier
+ value: { get_resource: network }
+resources:
+ network:
+ type: OS::Neutron::Net
+ properties:
+ name: { get_param: network_name }
+ shared: { get_param: shared }',10,'Generic Neutron Template','2017-10-26 14:44:00', 'MANUAL RECORD');
+
+
+
+INSERT INTO `temp_network_heat_template_lookup` (`NETWORK_RESOURCE_MODEL_NAME`, `HEAT_TEMPLATE_ARTIFACT_UUID`,`AIC_VERSION_MIN` , `AIC_VERSION_MAX` )
+VALUES ('Generic NeutronNet','efee1d84-b8ec-11e7-abc4-cec278b6b50a','2.0','3.0');
+
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.4__Add_Vnf_Operational_Env_Id_column.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.4__Add_Vnf_Operational_Env_Id_column.sql
new file mode 100644
index 0000000000..11be8ec8ab
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V5.4__Add_Vnf_Operational_Env_Id_column.sql
@@ -0,0 +1,3 @@
+use requestdb;
+
+ALTER TABLE activate_operational_env_service_model_distribution_status ADD VNF_OPERATIONAL_ENV_ID varchar(45) NOT NULL;
diff --git a/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql b/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql
index 48d589592f..9c2ea6d3bf 100644
--- a/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql
+++ b/adapters/mso-requests-db-adapter/src/test/resources/db/migration/afterMigrate.sql
@@ -37,15 +37,15 @@ VALUES
(2, '00032ab7-na18-42e5-965d-8ea592502018', '7d2e8c07-4d10-456d-bddc-37abf38ca715', 'configurationId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfigRequest'),
(3, '5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'configId', '52234bc0-d6a6-41d4-a901-79015e4877e2', 'pincFabricConfig');
-INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME)
+INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME, VNF_OPERATIONAL_ENV_ID)
VALUES
-('1234', 'TEST1234', '00032ab7-3fb3-42e5-965d-8ea592502017', "Test", "Test", 1, 'DEFAULT', '2018-08-14 16:50:59', '2018-08-14 16:50:59');
-INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME)
+('1234', 'TEST1234', '00032ab7-3fb3-42e5-965d-8ea592502017', "Test", "Test", 1, 'DEFAULT', '2018-08-14 16:50:59', '2018-08-14 16:50:59', 'vnf_1234');
+INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME, VNF_OPERATIONAL_ENV_ID)
VALUES
-('1234', 'TEST1235', '00032ab7-3fb3-42e5-965d-8ea592502017', "Test", "Test", 2, 'DEFAULT', '2018-08-14 16:50:59', '2018-08-14 16:50:59');
-INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME)
+('1234', 'TEST1235', '00032ab7-3fb3-42e5-965d-8ea592502017', "Test", "Test", 2, 'DEFAULT', '2018-08-14 16:50:59', '2018-08-14 16:50:59', 'vnf_1234');
+INSERT INTO activate_operational_env_service_model_distribution_status (OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID,SERVICE_MOD_VER_FINAL_DISTR_STATUS,RECOVERY_ACTION,RETRY_COUNT_LEFT,WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME, VNF_OPERATIONAL_ENV_ID)
VALUES
-('1234', 'TEST1235', '00032ab7-3fb3-42e5-965d-8ea592502018', "Test", "Test", 2, 'DEFAULT', '2018-08-14 16:50:59', '2018-08-14 16:50:59');
+('1234', 'TEST1235', '00032ab7-3fb3-42e5-965d-8ea592502018', "Test", "Test", 2, 'DEFAULT', '2018-08-14 16:50:59', '2018-08-14 16:50:59', 'vnf_1234');
INSERT INTO `activate_operational_env_per_distributionid_status` (`DISTRIBUTION_ID`, `DISTRIBUTION_ID_STATUS`, `DISTRIBUTION_ID_ERROR_REASON`, `CREATE_TIME`, `MODIFY_TIME`, `OPERATIONAL_ENV_ID`, `SERVICE_MODEL_VERSION_ID`, `REQUEST_ID`)
VALUES