From 7f48f7ffe672a307a931465b33a964482593d345 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Wed, 18 Sep 2019 11:19:15 -0400 Subject: Refactoring Netconf NetconfMessageUtils Appending New Line before and after request body within doWrapRpc and removing new line is child API's which forms the request body Issue-ID: CCSDK-1743 Signed-off-by: Singal, Kapil (ks220y) Change-Id: Ic58566e24a21c71d545c45fb95a667c17de2fe66 --- .../src/test/resources/logback-test.xml | 9 +++-- .../src/test/resources/logback-test.xml | 12 +++---- .../snapshots/ComponentConfigSnapshotsExecutor.kt | 11 +++--- .../config/snapshots/db/ResourceConfigSnapshot.kt | 11 ++---- .../snapshots/db/ResourceConfigSnapshotService.kt | 3 +- .../ComponentConfigSnapshotsExecutorTest.kt | 1 - .../db/ResourceConfigSnapshotServiceTest.kt | 3 +- .../src/test/resources/logback-test.xml | 9 +++-- .../payload/requests/interface-candidate.xml | 32 +++++++++--------- .../payload/requests/interface-running.xml | 28 ++++++++-------- .../executor/core/NetconfDeviceCommunicator.kt | 12 ++----- .../netconf/executor/core/NetconfRpcServiceImpl.kt | 8 ++--- .../netconf/executor/core/NetconfSessionImpl.kt | 18 +++------- .../netconf/executor/utils/NetconfMessageUtils.kt | 39 ++++++++++------------ .../netconf/executor/api/DeviceInfoTest.kt | 1 - .../executor/core/NetconfDeviceCommunicatorTest.kt | 25 +++++--------- .../executor/core/NetconfMessageStateTest.kt | 5 +-- .../executor/core/NetconfSessionImplTest.kt | 14 ++------ .../executor/utils/NetconfMessageUtilsTest.kt | 2 +- .../netconf/executor/utils/RpcMessageUtilsTest.kt | 3 +- .../src/test/resources/logback-test.xml | 14 ++++---- ...celCommit-response-all-parameters-not-empty.xml | 3 +- ...e-and-persistId-empty-and-persist-not-empty.xml | 3 +- ...-true-and-persistId-empty-and-persist-empty.xml | 4 ++- .../netconf-messages/doWrappedRpc-response.xml | 3 +- .../src/test/resources/logback-test.xml | 9 +++-- .../resolution/ResourceResolutionService.kt | 1 - .../resource/resolution/db/ResourceResolution.kt | 12 ++----- .../resource/resolution/db/TemplateResolution.kt | 9 +---- .../RestResourceResolutionProcessorTest.kt | 2 -- .../src/test/resources/logback-test.xml | 13 ++++---- .../src/test/resources/logback-test.xml | 10 +++--- .../src/main/docker/distribution.xml | 4 +-- ms/command-executor/src/main/python/utils.py | 1 + 34 files changed, 136 insertions(+), 198 deletions(-) (limited to 'ms') diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml index 4313fa509..1f9076125 100644 --- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml @@ -23,13 +23,12 @@ - - - - + + + - + 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 index 688a533be..3fe7da807 100644 --- a/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml @@ -23,14 +23,14 @@ - - - - - + + + + + - + diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt index 180ad7b48..82eaf394d 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt @@ -21,11 +21,13 @@ import com.github.fge.jsonpatch.diff.JsonDiff import org.apache.logging.log4j.util.Strings import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot -import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot.Status.RUNNING import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot.Status.CANDIDATE +import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot.Status.RUNNING import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshotService import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction -import org.onap.ccsdk.cds.controllerblueprints.core.* +import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive +import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType +import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing import org.slf4j.LoggerFactory import org.springframework.beans.factory.config.ConfigurableBeanFactory import org.springframework.context.annotation.Scope @@ -33,7 +35,8 @@ import org.springframework.stereotype.Component import org.w3c.dom.Node import org.xmlunit.builder.DiffBuilder import org.xmlunit.builder.Input -import org.xmlunit.diff.* +import org.xmlunit.diff.ComparisonType +import org.xmlunit.diff.Diff /** @@ -262,4 +265,4 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso return output.toString() } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt index 36a547032..ef34e6ff9 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt @@ -23,14 +23,7 @@ import org.springframework.data.annotation.LastModifiedDate import org.springframework.data.jpa.domain.support.AuditingEntityListener import java.io.Serializable import java.util.* -import javax.persistence.Column -import javax.persistence.Entity -import javax.persistence.EntityListeners -import javax.persistence.Id -import javax.persistence.Lob -import javax.persistence.Table -import javax.persistence.Temporal -import javax.persistence.TemporalType +import javax.persistence.* /** * ResourceConfigSnapshot model @@ -82,4 +75,4 @@ class ResourceConfigSnapshot : Serializable { RUNNING("RUNNING"), CANDIDATE("CANDIDATE") } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt index 5fcba5b0c..73d517553 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt @@ -24,7 +24,6 @@ import org.slf4j.LoggerFactory import org.springframework.dao.DataIntegrityViolationException import org.springframework.stereotype.Service import java.util.* -import kotlin.NoSuchElementException /** * ResourceConfigSnapshot managing service. @@ -75,4 +74,4 @@ class ResourceConfigSnapshotService(private val repository: ResourceConfigSnapsh } storedSnapshot } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt index c212908b9..baff96a07 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt @@ -27,7 +27,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration -import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor.Companion.DIFF_JSON import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor.Companion.DIFF_XML import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor.Companion.OPERATION_DIFF diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt index 3c989c154..18ee8c9dc 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt @@ -22,7 +22,6 @@ import io.mockk.verify import kotlinx.coroutines.runBlocking import org.junit.Test import kotlin.test.assertEquals -import kotlin.test.assertTrue class ResourceConfigSnapshotServiceTest { @@ -79,4 +78,4 @@ class ResourceConfigSnapshotServiceTest { assertEquals(tr, res) } } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml index f33adcdb8..1c729f6f7 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml @@ -23,13 +23,12 @@ - - - - + + + - + diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml index d0673aa4e..3ab0bca09 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml @@ -15,20 +15,20 @@ ~ limitations under the License. --> - - - - Full-Duplex - - - - 34 - - 09098789 - 2828828 - - - TEGig400-int01 - - + + + + Full-Duplex + + + + 34 + + 09098789 + 2828828 + + + TEGig400-int01 + + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml index 3d875c8fb..cd2cab847 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml @@ -15,18 +15,18 @@ ~ limitations under the License. --> - - - - Full-Duplex - - - - Never - - 0 - 0 - - - + + + + Full-Duplex + + + + Never + + 0 + 0 + + + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt index aa156e2a8..bc91b7d92 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt @@ -22,15 +22,9 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.Net import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcMessageUtils import org.slf4j.LoggerFactory -import java.io.BufferedReader -import java.io.IOException -import java.io.InputStream -import java.io.InputStreamReader -import java.io.OutputStream -import java.io.OutputStreamWriter -import java.nio.charset.StandardCharsets -import java.util.concurrent.CompletableFuture -import java.util.concurrent.TimeUnit +import java.io.* +import java.nio.charset.* +import java.util.concurrent.* class NetconfDeviceCommunicator(private var inputStream: InputStream, private var out: OutputStream, diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfRpcServiceImpl.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfRpcServiceImpl.kt index 6fa167a95..6a045e365 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfRpcServiceImpl.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfRpcServiceImpl.kt @@ -17,11 +17,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceResponse -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfRpcService -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSession +import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.* import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus import org.slf4j.LoggerFactory @@ -232,4 +228,4 @@ class NetconfRpcServiceImpl(private var deviceInfo: DeviceInfo) : NetconfRpcServ response.errorMessage = null return response } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt index 4daaceeff..a0f653591 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt @@ -22,24 +22,14 @@ import org.apache.sshd.client.SshClient import org.apache.sshd.client.channel.ClientChannel import org.apache.sshd.client.session.ClientSession import org.apache.sshd.common.FactoryManager -import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfReceivedEvent -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfRpcService -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSession -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfSessionListener +import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.* import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.NetconfMessageUtils import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcMessageUtils import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.RpcStatus import org.slf4j.LoggerFactory import java.io.IOException -import java.util.Collections -import java.util.concurrent.CompletableFuture -import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.ExecutionException -import java.util.concurrent.TimeUnit -import java.util.concurrent.TimeoutException +import java.util.* +import java.util.concurrent.* class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcService: NetconfRpcService) : NetconfSession { @@ -306,4 +296,4 @@ class NetconfSessionImpl(private val deviceInfo: DeviceInfo, private val rpcServ internal fun setClient(client: SshClient) { this.client = client } internal fun setSession(session: ClientSession) { this.session = session } internal fun setChannel(channel: ClientChannel) { this.channel = channel } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtils.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtils.kt index 37ff67433..4d65d36bb 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtils.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtils.kt @@ -54,7 +54,7 @@ class NetconfMessageUtils { request.append(filterContent).append(NEW_LINE) request.append(RpcMessageUtils.SUBTREE_FILTER_CLOSE).append(NEW_LINE) } - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -73,7 +73,7 @@ class NetconfMessageUtils { request.append(filterContent).append(NEW_LINE) request.append(RpcMessageUtils.SUBTREE_FILTER_CLOSE).append(NEW_LINE) } - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -84,8 +84,7 @@ class NetconfMessageUtils { rpc.append(RpcMessageUtils.MESSAGE_ID_STRING).append(RpcMessageUtils.EQUAL) rpc.append(RpcMessageUtils.QUOTE).append(messageId).append(RpcMessageUtils.QUOTE_SPACE) rpc.append(RpcMessageUtils.NETCONF_BASE_NAMESPACE).append(RpcMessageUtils.CLOSE) - .append(NEW_LINE) - rpc.append(request) + rpc.append(NEW_LINE).append(request).append(NEW_LINE) rpc.append(RpcMessageUtils.RPC_CLOSE) // rpc.append(NEW_LINE).append(END_PATTERN); @@ -94,9 +93,7 @@ class NetconfMessageUtils { fun editConfig(messageId: String, configType: String, defaultOperation: String?, newConfiguration: String): String { - val request = StringBuilder() - request.append("").append(NEW_LINE) request.append(RpcMessageUtils.TARGET_OPEN).append(NEW_LINE) request.append(RpcMessageUtils.OPEN).append(configType).append(RpcMessageUtils.TAG_CLOSE) @@ -112,7 +109,7 @@ class NetconfMessageUtils { request.append(RpcMessageUtils.CONFIG_OPEN).append(NEW_LINE) request.append(newConfiguration.trim { it <= ' ' }).append(NEW_LINE) request.append(RpcMessageUtils.CONFIG_CLOSE).append(NEW_LINE) - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -125,7 +122,7 @@ class NetconfMessageUtils { request.append(RpcMessageUtils.OPEN).append(configType).append(RpcMessageUtils.TAG_CLOSE) .append(NEW_LINE) request.append(RpcMessageUtils.SOURCE_CLOSE).append(NEW_LINE) - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -145,16 +142,16 @@ class NetconfMessageUtils { val request = StringBuilder() request.append("").append(NEW_LINE) if (confirmed) { - request.append("") - request.append("$confirmTimeout") + request.append("").append(NEW_LINE) + request.append("$confirmTimeout").append(NEW_LINE) if (!persist.isEmpty()) { - request.append("$persist") + request.append("$persist").append(NEW_LINE) } } if (!persistId.isEmpty()) { - request.append("$persistId") + request.append("$persistId").append(NEW_LINE) } - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -163,9 +160,9 @@ class NetconfMessageUtils { val request = StringBuilder() request.append("").append(NEW_LINE) if (!persistId.isEmpty()) { - request.append("$persistId") + request.append("$persistId").append(NEW_LINE) } - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -178,7 +175,7 @@ class NetconfMessageUtils { request.append(RpcMessageUtils.OPEN).append(configType).append(RpcMessageUtils.TAG_CLOSE) .append(NEW_LINE) request.append(RpcMessageUtils.TARGET_CLOSE).append(NEW_LINE) - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -198,14 +195,14 @@ class NetconfMessageUtils { .append(RpcMessageUtils.TAG_CLOSE) .append(NEW_LINE) request.append(RpcMessageUtils.TARGET_CLOSE).append(NEW_LINE) - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } fun discardChanges(messageId: String): String { val request = StringBuilder() - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -217,7 +214,7 @@ class NetconfMessageUtils { request.append(RpcMessageUtils.OPEN).append(configType).append(RpcMessageUtils.TAG_CLOSE) .append(NEW_LINE) request.append(RpcMessageUtils.TARGET_CLOSE).append(NEW_LINE) - request.append("").append(NEW_LINE) + request.append("") return doWrappedRpc(messageId, request.toString()) } @@ -226,9 +223,9 @@ class NetconfMessageUtils { val request = StringBuilder() if (force) { - request.append("").append(NEW_LINE) + request.append("") } else { - request.append("").append(NEW_LINE) + request.append("") } return doWrappedRpc(messageId, request.toString()) diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/api/DeviceInfoTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/api/DeviceInfoTest.kt index d46ee78dd..4e1ff655d 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/api/DeviceInfoTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/api/DeviceInfoTest.kt @@ -17,7 +17,6 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api -import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo import org.junit.Test import kotlin.test.assertEquals diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicatorTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicatorTest.kt index 47c729187..2240f48c2 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicatorTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicatorTest.kt @@ -16,13 +16,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core -import io.mockk.CapturingSlot -import io.mockk.Runs -import io.mockk.every -import io.mockk.just -import io.mockk.mockk -import io.mockk.spyk -import io.mockk.verify +import io.mockk.* import org.junit.Before import org.junit.Test import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo @@ -33,10 +27,9 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils.R import java.io.IOException import java.io.InputStream import java.io.OutputStream -import java.nio.charset.StandardCharsets -import java.util.concurrent.CompletableFuture -import java.util.concurrent.ConcurrentHashMap -import java.util.regex.Pattern +import java.nio.charset.* +import java.util.concurrent.* +import java.util.regex.* import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertTrue @@ -185,10 +178,10 @@ class NetconfDeviceCommunicatorTest { //eventually, sessionListener is called with message type DEVICE_REPLY assertEquals(NetconfReceivedEvent.Type.DEVICE_REPLY, eventSlot.captured.type) assertEquals(""" - - - + + + """.trimIndent(), eventSlot.captured.messagePayload) } @@ -256,4 +249,4 @@ class NetconfDeviceCommunicatorTest { } } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfMessageStateTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfMessageStateTest.kt index 95148dd11..ce7594c4a 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfMessageStateTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfMessageStateTest.kt @@ -17,8 +17,9 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core import org.junit.Test -import kotlin.test.assertEquals import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core.NetconfDeviceCommunicator.NetconfMessageState +import kotlin.test.assertEquals + class NetconfMessageStateTest { private val charList: List = Char.MIN_VALUE.toInt().rangeTo(Char.MAX_VALUE.toInt()) @@ -143,4 +144,4 @@ class NetconfMessageStateTest { } } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt index 7f6c8d390..e3cda5a49 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt @@ -16,13 +16,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core -import io.mockk.CapturingSlot -import io.mockk.Runs -import io.mockk.every -import io.mockk.just -import io.mockk.mockk -import io.mockk.spyk -import io.mockk.verify +import io.mockk.* import org.apache.sshd.client.SshClient import org.apache.sshd.client.channel.ChannelSubsystem import org.apache.sshd.client.channel.ClientChannel @@ -43,10 +37,8 @@ import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.io.IOException import java.io.InputStream -import java.nio.charset.StandardCharsets -import java.util.concurrent.CompletableFuture -import java.util.concurrent.ExecutionException -import java.util.concurrent.TimeoutException +import java.nio.charset.* +import java.util.concurrent.* import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertTrue diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtilsTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtilsTest.kt index 33135e30f..fcfa12570 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtilsTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtilsTest.kt @@ -16,7 +16,7 @@ */ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import kotlin.test.Test diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/RpcMessageUtilsTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/RpcMessageUtilsTest.kt index ffbf7306c..b80dc2d88 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/RpcMessageUtilsTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/RpcMessageUtilsTest.kt @@ -17,7 +17,6 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.utils import org.junit.Assert import org.junit.Assert.assertTrue -import org.junit.Ignore import org.junit.Test import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.NetconfException import kotlin.test.assertFailsWith @@ -331,4 +330,4 @@ class RpcMessageUtilsTest { assertFalse { NetconfMessageUtils.validateRPCXML("really bad XML ~~~input") } } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml index da4cf9a1b..2aaaead3e 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml @@ -23,15 +23,15 @@ - - - - - - + + + + + + - + diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/cancelCommit-response-all-parameters-not-empty.xml b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/cancelCommit-response-all-parameters-not-empty.xml index 7f5a44cc5..177a97a92 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/cancelCommit-response-all-parameters-not-empty.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/cancelCommit-response-all-parameters-not-empty.xml @@ -1,5 +1,6 @@ -customPersistId +customPersistId + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-false-and-persistId-empty-and-persist-not-empty.xml b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-false-and-persistId-empty-and-persist-not-empty.xml index d19e5b41e..26a122815 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-false-and-persistId-empty-and-persist-not-empty.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-false-and-persistId-empty-and-persist-not-empty.xml @@ -1,5 +1,6 @@ -customPersistId +customPersistId + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-true-and-persistId-empty-and-persist-empty.xml b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-true-and-persistId-empty-and-persist-empty.xml index ad0fef80f..9cb86d51c 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-true-and-persistId-empty-and-persist-empty.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-true-and-persistId-empty-and-persist-empty.xml @@ -1,5 +1,7 @@ -1 + +1 + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/doWrappedRpc-response.xml b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/doWrappedRpc-response.xml index 0f6c3e76b..c689fbaf6 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/doWrappedRpc-response.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/doWrappedRpc-response.xml @@ -1,3 +1,4 @@ -customRequest \ No newline at end of file +customRequest + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml index e04e741c9..8d0e8ee04 100644 --- a/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml @@ -23,13 +23,12 @@ - - - - + + + - + diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt index 51170a9b2..a23036aaf 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt @@ -28,7 +28,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.proc import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceDefinitionUtils.createResourceAssignments import org.onap.ccsdk.cds.controllerblueprints.core.* -import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintTemplateService import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt index baabfd913..781cafd97 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt @@ -23,15 +23,7 @@ import org.springframework.data.annotation.LastModifiedDate import org.springframework.data.jpa.domain.support.AuditingEntityListener import java.io.Serializable import java.util.* -import javax.persistence.Column -import javax.persistence.ElementCollection -import javax.persistence.Entity -import javax.persistence.EntityListeners -import javax.persistence.Id -import javax.persistence.Lob -import javax.persistence.Table -import javax.persistence.Temporal -import javax.persistence.TemporalType +import javax.persistence.* @EntityListeners(AuditingEntityListener::class) @Entity @@ -109,4 +101,4 @@ class ResourceResolution : Serializable { companion object { private const val serialVersionUID = 1L } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt index e3f876365..9d5a3f5d5 100755 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt @@ -23,14 +23,7 @@ import org.springframework.data.annotation.LastModifiedDate import org.springframework.data.jpa.domain.support.AuditingEntityListener import java.io.Serializable import java.util.* -import javax.persistence.Column -import javax.persistence.Entity -import javax.persistence.EntityListeners -import javax.persistence.Id -import javax.persistence.Lob -import javax.persistence.Table -import javax.persistence.Temporal -import javax.persistence.TemporalType +import javax.persistence.* @EntityListeners(AuditingEntityListener::class) @Entity diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt index 6a37f5914..2879342f6 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt @@ -25,7 +25,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockRestResourceResolutionProcessor import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties -import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment @@ -33,7 +32,6 @@ import org.springframework.beans.factory.annotation.Autowired import org.springframework.test.context.ContextConfiguration import org.springframework.test.context.TestPropertySource import org.springframework.test.context.junit4.SpringRunner -import kotlin.test.AfterTest import kotlin.test.BeforeTest import kotlin.test.assertNotNull diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml index f379f37ed..0c44875a6 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml @@ -23,15 +23,14 @@ - - - - - - + + + + + - + diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml index daab7eaf8..9d6ab2018 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml @@ -23,13 +23,13 @@ - - - - + + + + - + diff --git a/ms/command-executor/src/main/docker/distribution.xml b/ms/command-executor/src/main/docker/distribution.xml index 7b8c27021..1a714b8a7 100755 --- a/ms/command-executor/src/main/docker/distribution.xml +++ b/ms/command-executor/src/main/docker/distribution.xml @@ -16,8 +16,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd"> ${assembly.id} tar.gz diff --git a/ms/command-executor/src/main/python/utils.py b/ms/command-executor/src/main/python/utils.py index dc5d0089f..4314b287d 100644 --- a/ms/command-executor/src/main/python/utils.py +++ b/ms/command-executor/src/main/python/utils.py @@ -17,6 +17,7 @@ from google.protobuf.timestamp_pb2 import Timestamp import proto.CommandExecutor_pb2 as CommandExecutor_pb2 + def get_blueprint_id(request): blueprint_name = request.identifiers.blueprintName blueprint_version = request.identifiers.blueprintVersion -- cgit 1.2.3-korg