diff options
Diffstat (limited to 'adapters/mso-catalog-db-adapter')
-rw-r--r-- | adapters/mso-catalog-db-adapter/pom.xml | 391 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql | 175 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10.1__AlterTblActivitySpecToUserParameters.sql | 3 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7.1__WorkFlowDesignerTables.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__WorkFlowDesignerTables.sql) | 0 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__Use_ID_Configuration_Customization.sql | 75 |
5 files changed, 440 insertions, 204 deletions
diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml index 1f6ea413ec..9ec98cf96c 100644 --- a/adapters/mso-catalog-db-adapter/pom.xml +++ b/adapters/mso-catalog-db-adapter/pom.xml @@ -1,206 +1,207 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>adapters</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>adapters</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> - <groupId>org.onap.so.adapters</groupId> - <artifactId>mso-catalog-db-adapter</artifactId> - <packaging>jar</packaging> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <java.version>1.8</java.version> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <version>${springboot.version}</version> - <configuration> - <mainClass>org.onap.so.adapters.catalogdb.CatalogDBApplication</mainClass> - </configuration> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>extract-docker-file</id> - </execution> - </executions> - </plugin> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>fabric8-maven-plugin</artifactId> - <executions> - <execution> - <id>start</id> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.3</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - <fork>true</fork> - <compilerArgs> - <arg>-parameters</arg> - </compilerArgs> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>default-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTestsTestSuite.java</include> - </includes> - <parallel>suites</parallel> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings + <groupId>org.onap.so.adapters</groupId> + <artifactId>mso-catalog-db-adapter</artifactId> + <packaging>jar</packaging> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <java.version>1.8</java.version> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${springboot.version}</version> + <configuration> + <mainClass>org.onap.so.adapters.catalogdb.CatalogDBApplication</mainClass> + </configuration> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>extract-docker-file</id> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>fabric8-maven-plugin</artifactId> + <executions> + <execution> + <id>start</id> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + <fork>true</fork> + <compilerArgs> + <arg>-parameters</arg> + </compilerArgs> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTestsTestSuite.java</include> + </includes> + <parallel>suites</parallel> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> org.jvnet.jax-ws-commons </groupId> - <artifactId> + <artifactId> jaxws-maven-plugin </artifactId> - <versionRange> + <versionRange> [2.3,) </versionRange> - <goals> - <goal>wsgen</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> + <goals> + <goal>wsgen</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore> + </ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - </plugin> - </plugins> - </pluginManagement> - <finalName>${project.artifactId}-${project.version}</finalName> - </build> - <dependencyManagement> - <dependencies> - <dependency> - <!-- Import dependency management from Spring Boot --> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-dependencies</artifactId> - <version>${springboot.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-jersey2-jaxrs</artifactId> - <version>1.5.16</version> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-actuator</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-jersey</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-jpa</artifactId> - <exclusions> - <exclusion> - <groupId>org.apache.tomcat</groupId> - <artifactId>tomcat-jdbc</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>mso-catalog-db</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>uk.co.blackpepper.bowman</groupId> - <artifactId>bowman-client</artifactId> - <version>0.3.0</version> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.flywaydb</groupId> - <artifactId>flyway-core</artifactId> - </dependency> - <dependency> - <groupId>io.micrometer</groupId> - <artifactId>micrometer-core</artifactId> - </dependency> - <dependency> - <groupId>io.micrometer</groupId> - <artifactId>micrometer-registry-prometheus</artifactId> - </dependency> - </dependencies> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + </plugin> + </plugins> + </pluginManagement> + <finalName>${project.artifactId}-${project.version}</finalName> + </build> + <dependencyManagement> + <dependencies> + <dependency> + <!-- Import dependency management from Spring Boot --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${springboot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>io.swagger</groupId> + <artifactId>swagger-jersey2-jaxrs</artifactId> + <version>1.5.16</version> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-actuator</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jersey</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jdbc</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>mso-catalog-db</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>uk.co.blackpepper.bowman</groupId> + <artifactId>bowman-client</artifactId> + <version>0.3.0</version> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.flywaydb</groupId> + <artifactId>flyway-core</artifactId> + </dependency> + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-core</artifactId> + </dependency> + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-registry-prometheus</artifactId> + </dependency> + </dependencies> </project> diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql index c74ce6940c..054fb1af57 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql @@ -2,26 +2,183 @@ use catalogdb; DELETE FROM activity_spec_to_activity_spec_parameters; DELETE FROM activity_spec_to_activity_spec_categories; +DELETE FROM activity_spec_to_user_parameters; DELETE FROM activity_spec; DELETE FROM activity_spec_categories; DELETE FROM activity_spec_parameters; +DELETE FROM user_parameters; INSERT INTO activity_spec (NAME, DESCRIPTION, VERSION) -VALUES ('VNFSetInMaintFlagActivity','Activity to Set InMaint Flag in A&AI',1.0); +VALUES +('VNFSetInMaintFlagActivity','Activity to Set InMaint Flag in A&AI',1.0), +('VNFCheckPserversLockedFlagActivity','Activity Check Pservers Locked Flag VNF',1.0), +('VNFCheckInMaintFlagActivity','Activity CheckIn Maint Flag on VNF',1.0), +('VNFCheckClosedLoopDisabledFlagActivity','Activity Check Closed Loop Disabled Flag on VNF',1.0), +('VNFSetClosedLoopDisabledFlagActivity','Activity Set Closed Loop Disabled Flag on VNF',1.0), +('VNFUnsetClosedLoopDisabledFlagActivity','Activity Unset Closed Loop Disabled Flag on VNF',1.0), +('VNFLockActivity','Activity Lock on VNF',1.0), +('VNFUnlockActivity','Activity UnLock on VNF',1.0), +('VNFStopActivity','Activity Stop on VNF',1.0), +('VNFStartActivity','Activity Start on VNF',1.0), +('VNFSnapShotActivity','Activity Snap Shot on VNF',1.0), +('FlowCompleteActivity','Activity Complete on VNF',1.0), +('PauseForManualTaskActivity','Activity Pause For Manual Task on VNF',1.0), +('DistributeTrafficActivity','Activity Distribute Traffic on VNF',1.0), +('DistributeTrafficCheckActivity','Activity Distribute Traffic Check on VNF',1.0), +('VNFHealthCheckActivity','Activity Health Check on VNF',1.0), +('VNFQuiesceTrafficActivity','Activity Quiesce Traffic on VNF',1.0), +('VNFResumeTrafficActivity','Activity Resume Traffic on VNF',1.0), +('VNFUnsetInMaintFlagActivity','Activity Unset InMaint Flag on VNF',1.0), +('VNFUpgradeBackupActivity','Activity Upgrade Backup on VNF',1.0), +('VNFUpgradePostCheckActivity','Activity Upgrade Post Check on VNF',1.0), +('VNFUpgradePreCheckActivity','Activity Upgrade PreCheck on VNF',1.0), +('VNFUpgradeSoftwareActivity','Activity UpgradeS oftware on VNF',1.0), +('VnfInPlaceSoftwareUpdate','Activity InPlace Software Update on VNF',1.0); INSERT INTO activity_spec_categories (NAME) VALUES ('VNF'); -INSERT INTO activity_spec_parameters (NAME, TYPE, DIRECTION, DESCRIPTION) -VALUES('WorkflowException','WorkflowException','outputParameters','Description'); - INSERT INTO activity_spec_to_activity_spec_categories(ACTIVITY_SPEC_ID, ACTIVITY_SPEC_CATEGORIES_ID) VALUES -( -(select ID from ACTIVITY_SPEC where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0), +((select ID from activity_spec where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFCheckPserversLockedFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFCheckInMaintFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFCheckClosedLoopDisabledFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFSetClosedLoopDisabledFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUnsetClosedLoopDisabledFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFLockActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUnlockActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='FlowCompleteActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='PauseForManualTaskActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='DistributeTrafficActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='DistributeTrafficCheckActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFHealthCheckActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFResumeTrafficActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUnsetInMaintFlagActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0), +(select ID from activity_spec_categories where NAME='VNF')), +((select ID from activity_spec where NAME='VnfInPlaceSoftwareUpdate' and VERSION=1.0), (select ID from activity_spec_categories where NAME='VNF')); +INSERT INTO activity_spec_parameters (NAME, TYPE, DIRECTION, DESCRIPTION) +VALUES('WorkflowException','WorkflowException','output','Description'); + INSERT INTO activity_spec_to_activity_spec_parameters( ACTIVITY_SPEC_ID, ACTIVITY_SPEC_PARAMETERS_ID) -VALUES( -(select ID from ACTIVITY_SPEC where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0), -(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='outputParameters'));
\ No newline at end of file +VALUES +((select ID from activity_spec where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFCheckPserversLockedFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFCheckInMaintFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFCheckClosedLoopDisabledFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFSetClosedLoopDisabledFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUnsetClosedLoopDisabledFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFLockActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUnlockActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='FlowCompleteActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='PauseForManualTaskActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='DistributeTrafficActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='DistributeTrafficCheckActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFHealthCheckActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFResumeTrafficActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUnsetInMaintFlagActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')), +((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0), +(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='output')); + +INSERT INTO `user_parameters`(`NAME`,`PAYLOAD_LOCATION`,`LABEL`,`TYPE`,`DESCRIPTION`,`IS_REQUIRED`,`MAX_LENGTH`,`ALLOWABLE_CHARS`) +VALUES +('cloudOwner','cloudConfiguration','Cloud Owner','text','',1,7,''), +('operations_timeout','userParams','Operations Timeout','text','',1,50,''), +('existing_software_version','userParams','Existing Software Version','text','',1,50,''), +('tenantId','cloudConfiguration','Tenant/Project ID','text','',1,36,''), +('new_software_version','userParams','New Software Version','text','',1,50,''), +('lcpCloudRegionId','cloudConfiguration','Cloud Region ID','text','',1,7,''); + +INSERT INTO `activity_spec_to_user_parameters`(`ACTIVITY_SPEC_ID`,`USER_PARAMETERS_ID`) +VALUES +((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='lcpCloudRegionId')), +((select ID from activity_spec where NAME='VNFStopActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='tenantId')), +((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='lcpCloudRegionId')), +((select ID from activity_spec where NAME='VNFStartActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='tenantId')), +((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='lcpCloudRegionId')), +((select ID from activity_spec where NAME='VNFSnapShotActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='tenantId')), +((select ID from activity_spec where NAME='VNFQuiesceTrafficActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='operations_timeout')), +((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='existing_software_version')), +((select ID from activity_spec where NAME='VNFUpgradeBackupActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='new_software_version')), +((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='existing_software_version')), +((select ID from activity_spec where NAME='VNFUpgradePostCheckActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='new_software_version')), +((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='existing_software_version')), +((select ID from activity_spec where NAME='VNFUpgradePreCheckActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='new_software_version')), +((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='existing_software_version')), +((select ID from activity_spec where NAME='VNFUpgradeSoftwareActivity' and VERSION=1.0), +(select ID from user_parameters where NAME='new_software_version'));
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10.1__AlterTblActivitySpecToUserParameters.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10.1__AlterTblActivitySpecToUserParameters.sql new file mode 100644 index 0000000000..d8bfa64033 --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10.1__AlterTblActivitySpecToUserParameters.sql @@ -0,0 +1,3 @@ +use catalogdb; + +ALTER TABLE activity_spec_to_user_parameters modify id INT(11) not null auto_increment;
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__WorkFlowDesignerTables.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7.1__WorkFlowDesignerTables.sql index e44a6b97ba..e44a6b97ba 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__WorkFlowDesignerTables.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7.1__WorkFlowDesignerTables.sql diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__Use_ID_Configuration_Customization.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__Use_ID_Configuration_Customization.sql new file mode 100644 index 0000000000..b39331234d --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.7__Use_ID_Configuration_Customization.sql @@ -0,0 +1,75 @@ +USE catalogdb; + +/* Drop existing foreign key */ +ALTER TABLE `catalogdb`.`configuration_customization` +DROP FOREIGN KEY IF EXISTS `fk_configuration_customization__configuration_customization1`; + +ALTER TABLE `catalogdb`.`configuration_customization` +DROP FOREIGN KEY IF EXISTS `fk_configuration_resource_customization__configuration_resour1`; +/* Drop existing index */ +ALTER TABLE `catalogdb`.`configuration_customization` +DROP INDEX IF EXISTS `fk_configuration_customization__configuration_customization_idx` ; + +/* Create a new table */ +CREATE TABLE `tmp_configuration_customization` ( + `ID` INT(11) NOT NULL AUTO_INCREMENT, + `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, + `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL, + `CONFIGURATION_TYPE` VARCHAR(200) DEFAULT NULL, + `CONFIGURATION_ROLE` VARCHAR(200) DEFAULT NULL, + `CONFIGURATION_FUNCTION` VARCHAR(200) DEFAULT NULL, + `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL, + `SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) DEFAULT NULL, + `CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_ID` int(11) DEFAULT NULL, + `SERVICE_MODEL_UUID` VARCHAR(200) NOT NULL, + PRIMARY KEY (`ID`) , + KEY `fk_configuration_customization__configuration_idx` (`CONFIGURATION_MODEL_UUID`), + KEY `fk_configuration_customization__service_idx` (`SERVICE_MODEL_UUID`), + UNIQUE KEY `uk_configuration_customization` (`MODEL_CUSTOMIZATION_UUID` ASC, `SERVICE_MODEL_UUID` ASC), + CONSTRAINT `fk_configuration_customization__configuration1` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`) + REFERENCES `configuration` (`MODEL_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_configuration_customization__service1` FOREIGN KEY (`SERVICE_MODEL_UUID`) + REFERENCES `service` (`MODEL_UUID`) + ON DELETE CASCADE ON UPDATE CASCADE + +) ENGINE=INNODB DEFAULT CHARSET=LATIN1; + +/* Migrate the existing data */ +INSERT INTO tmp_configuration_customization +(`model_customization_uuid` , + `model_instance_name`, + `configuration_type` , + `configuration_role` , + `configuration_function` , + `creation_timestamp` , + `configuration_model_uuid` , + `service_proxy_customization_model_customization_uuid` , + `service_model_uuid`) +SELECT `config`.`model_customization_uuid`, + `config`.`model_instance_name`, + `config`.`configuration_type`, + `config`.`configuration_role`, + `config`.`configuration_function`, + `config`.`creation_timestamp`, + `config`.`configuration_model_uuid`, + `config`.`service_proxy_customization_model_customization_uuid`, + `svc`.`model_uuid` service_model_uuid FROM + configuration_customization config, + service svc, + configuration_customization_to_service config_svc +WHERE + config_svc.service_model_uuid = svc.model_uuid + AND config_svc.resource_model_customization_uuid = config.model_customization_uuid; + +/* Drop the old tables */ + +DROP TABLE `catalogdb`.`configuration_customization`; + +DROP TABLE `catalogdb`.`configuration_customization_to_service`; + +/* Rename the table */ +RENAME TABLE tmp_configuration_customization TO configuration_customization; + +
\ No newline at end of file |