Add cli executor options 27/88027/5
authorBrinda Santh <brindasanth@in.ibm.com>
Thu, 16 May 2019 16:37:55 +0000 (12:37 -0400)
committerSteve Siani <alphonse.steve.siani.djissitchi@ibm.com>
Thu, 23 May 2019 04:15:54 +0000 (00:15 -0400)
Change-Id: I55abe099997bad1666b762b7f8355b084f691001
Issue-ID: CCSDK-1335
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
ms/blueprintsprocessor/application/pom.xml
ms/blueprintsprocessor/functions/cli-executor/pom.xml
ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorConfiguration.kt [new file with mode: 0644]
ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/application-test.properties
ms/blueprintsprocessor/parent/pom.xml
ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt

index a5d4527..4904876 100755 (executable)
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
             <artifactId>restconf-executor</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
+            <artifactId>cli-executor</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
             <artifactId>selfservice-api</artifactId>
index 6f7543f..0dd2737 100644 (file)
@@ -21,6 +21,7 @@
         <version>0.5.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
+    <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
     <artifactId>cli-executor</artifactId>
     <name>Blueprints Processor Function - CLI Executor</name>
     <description>Blueprints Processor Function - CLI Executor</description>
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorConfiguration.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorConfiguration.kt
new file mode 100644 (file)
index 0000000..77a2d3b
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ *  Copyright © 2019 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
+import org.springframework.boot.context.properties.EnableConfigurationProperties
+import org.springframework.context.annotation.ComponentScan
+import org.springframework.context.annotation.Configuration
+
+@Configuration
+@ComponentScan
+@EnableConfigurationProperties
+@ConditionalOnProperty(name = ["blueprintprocessor.netconfExecutor.enabled"], havingValue = "true")
+open class NetconfExecutorConfiguration
\ No newline at end of file
index 6d8b62f..527eb8a 100644 (file)
@@ -30,3 +30,6 @@ blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive
 # Python executor
 blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_blueprints
 blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_blueprints
+
+# Executor Options
+blueprintprocessor.netconfExecutor.enabled=true
\ No newline at end of file
index 8a1f7ac..85d57b9 100755 (executable)
                 <artifactId>restconf-executor</artifactId>
                 <version>${project.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
+                <artifactId>cli-executor</artifactId>
+                <version>${project.version}</version>
+            </dependency>
 
             <!-- Controller Blueprints Application Dependency -->
             <dependency>
index d06d5db..e1c5c40 100644 (file)
@@ -113,6 +113,10 @@ class BluePrintEnhancerServiceImplTest {
             val valid = bluePrintValidatorService.validateBluePrints(targetPath)
             Assert.assertTrue("blueprint($basePath) validation failed ", valid)
 
+            // Enable this to get the enhanced zip file
+//            val compressFile = normalizedFile("target/blueprints/enrichment", "$targetDirName.zip")
+//            normalizedFile(targetPath).compress(compressFile)
+
             deleteDir(targetPath)
         }
     }