From b87e937fe030014dcc0a36135d4fb8ba55211440 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Fri, 15 Mar 2019 07:59:22 -0400 Subject: Add cli executor module. Change-Id: I56d570204687c51286e8d3631187acea34c1bc1a Issue-ID: CCSDK-1165 Signed-off-by: Muthuramalingam, Brinda Santh --- .../functions/cli-executor/pom.xml | 40 ++++++++++++++++++++++ .../cli/executor/CliExecutorConfiguration.kt | 22 ++++++++++++ .../cli/executor/api/CliExecutorService.kt | 22 ++++++++++++ .../cli/executor/service/CliExecutorServiceImpl.kt | 25 ++++++++++++++ .../executor/service/CliExecutorServiceImplTest.kt | 38 ++++++++++++++++++++ .../src/test/resources/logback-test.xml | 35 +++++++++++++++++++ .../functions/netconf-executor/pom.xml | 4 +-- ms/blueprintsprocessor/functions/pom.xml | 1 + ms/blueprintsprocessor/parent/pom.xml | 15 ++++++++ 9 files changed, 199 insertions(+), 3 deletions(-) create mode 100644 ms/blueprintsprocessor/functions/cli-executor/pom.xml create mode 100644 ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/CliExecutorConfiguration.kt create mode 100644 ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/api/CliExecutorService.kt create mode 100644 ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImpl.kt create mode 100644 ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImplTest.kt create mode 100644 ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml diff --git a/ms/blueprintsprocessor/functions/cli-executor/pom.xml b/ms/blueprintsprocessor/functions/cli-executor/pom.xml new file mode 100644 index 00000000..52a78907 --- /dev/null +++ b/ms/blueprintsprocessor/functions/cli-executor/pom.xml @@ -0,0 +1,40 @@ + + + + + + functions + org.onap.ccsdk.apps.blueprintsprocessor + 0.4.1-SNAPSHOT + + 4.0.0 + cli-executor + Blueprints Processor Function - CLI Executor + Blueprints Processor Function - CLI Executor + + + + org.apache.sshd + sshd-core + + + + + + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/CliExecutorConfiguration.kt b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/CliExecutorConfiguration.kt new file mode 100644 index 00000000..c2652495 --- /dev/null +++ b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/CliExecutorConfiguration.kt @@ -0,0 +1,22 @@ +/* + * 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.apps.blueprintsprocessor.functions.cli.executor + +import org.springframework.context.annotation.Configuration + +@Configuration +open class CliExecutorConfiguration \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/api/CliExecutorService.kt b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/api/CliExecutorService.kt new file mode 100644 index 00000000..3c5c9588 --- /dev/null +++ b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/api/CliExecutorService.kt @@ -0,0 +1,22 @@ +/* + * 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.apps.blueprintsprocessor.functions.cli.executor.api + +interface CliExecutorService { + + +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImpl.kt b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImpl.kt new file mode 100644 index 00000000..02a74fa0 --- /dev/null +++ b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImpl.kt @@ -0,0 +1,25 @@ +/* + * 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.apps.blueprintsprocessor.functions.cli.executor.service + +import org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.api.CliExecutorService +import org.springframework.stereotype.Service + +@Service +open class CliExecutorServiceImpl : CliExecutorService { + +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImplTest.kt b/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImplTest.kt new file mode 100644 index 00000000..347aba79 --- /dev/null +++ b/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/cli/executor/service/CliExecutorServiceImplTest.kt @@ -0,0 +1,38 @@ +/* + * 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.apps.blueprintsprocessor.functions.cli.executor.service + +import org.junit.Test +import org.junit.runner.RunWith +import org.onap.ccsdk.apps.blueprintsprocessor.functions.cli.executor.api.CliExecutorService +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.test.context.ContextConfiguration +import org.springframework.test.context.junit4.SpringRunner +import kotlin.test.assertNotNull + +@RunWith(SpringRunner::class) +@ContextConfiguration(classes = [CliExecutorServiceImpl::class]) +class CliExecutorServiceImplTest { + + @Autowired + lateinit var cliExecutorService: CliExecutorService + + @Test + fun testCliExecutorService() { + assertNotNull(cliExecutorService, "failed to intilise cliExecutorService") + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml new file mode 100644 index 00000000..071c7943 --- /dev/null +++ b/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml @@ -0,0 +1,35 @@ + + + + + + + %d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n + + + + + + + + + + + + + diff --git a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml index e77a6e3b..99c3994e 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml @@ -15,7 +15,7 @@ ~ limitations under the License. --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.onap.ccsdk.apps.blueprintsprocessor functions @@ -41,12 +41,10 @@ org.apache.sshd sshd-core - 1.7.0 com.jcraft jsch - 0.1.54 com.h2database diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml index dc1eda36..4bc0159f 100755 --- a/ms/blueprintsprocessor/functions/pom.xml +++ b/ms/blueprintsprocessor/functions/pom.xml @@ -32,6 +32,7 @@ python-executor netconf-executor restconf-executor + cli-executor diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 210943ae..9d570768 100755 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -38,6 +38,9 @@ 1.3.21 1.1.1 1.18.0 + + 1.7.0 + 0.1.55 3.6.1 1.0.0 0.4.1-SNAPSHOT @@ -218,6 +221,18 @@ ${project.version} + + + org.apache.sshd + sshd-core + ${sshd.version} + + + com.jcraft + jsch + ${jsch.version} + + org.onap.ccsdk.sli.core -- cgit 1.2.3-korg