From 145662ff6a41e0e46a23e8eedf53f30581f8ab64 Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Thu, 16 May 2019 12:37:55 -0400 Subject: Add cli executor options Change-Id: I55abe099997bad1666b762b7f8355b084f691001 Issue-ID: CCSDK-1335 Signed-off-by: Brinda Santh --- ms/blueprintsprocessor/application/pom.xml | 4 ++++ .../functions/cli-executor/pom.xml | 1 + .../executor/NetconfExecutorConfiguration.kt | 28 ++++++++++++++++++++++ .../src/test/resources/application-test.properties | 3 +++ ms/blueprintsprocessor/parent/pom.xml | 5 ++++ .../enhancer/BluePrintEnhancerServiceImplTest.kt | 4 ++++ 6 files changed, 45 insertions(+) create mode 100644 ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorConfiguration.kt diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index a5d45277d..490487687 100755 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -57,6 +57,10 @@ org.onap.ccsdk.cds.blueprintsprocessor.functions restconf-executor + + org.onap.ccsdk.cds.blueprintsprocessor.functions + cli-executor + org.onap.ccsdk.cds.blueprintsprocessor selfservice-api diff --git a/ms/blueprintsprocessor/functions/cli-executor/pom.xml b/ms/blueprintsprocessor/functions/cli-executor/pom.xml index 6f7543f45..0dd2737bf 100644 --- a/ms/blueprintsprocessor/functions/cli-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/cli-executor/pom.xml @@ -21,6 +21,7 @@ 0.5.0-SNAPSHOT 4.0.0 + org.onap.ccsdk.cds.blueprintsprocessor.functions cli-executor Blueprints Processor Function - CLI Executor Blueprints Processor Function - CLI Executor 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 index 000000000..77a2d3ba9 --- /dev/null +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorConfiguration.kt @@ -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 diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/application-test.properties b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/application-test.properties index 6d8b62ff9..527eb8a26 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/application-test.properties +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/application-test.properties @@ -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 diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 8a1f7ac1b..85d57b9fd 100755 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -387,6 +387,11 @@ restconf-executor ${project.version} + + org.onap.ccsdk.cds.blueprintsprocessor.functions + cli-executor + ${project.version} + diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt index d06d5db9a..e1c5c402e 100644 --- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt +++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt @@ -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) } } -- cgit 1.2.3-korg