aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
Diffstat (limited to 'ms')
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml9
-rw-r--r--ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml12
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt11
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt11
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt3
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt1
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt3
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml9
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml32
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml28
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicator.kt12
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfRpcServiceImpl.kt8
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImpl.kt18
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtils.kt39
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/api/DeviceInfoTest.kt1
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfDeviceCommunicatorTest.kt25
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfMessageStateTest.kt5
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/core/NetconfSessionImplTest.kt14
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfMessageUtilsTest.kt2
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/RpcMessageUtilsTest.kt3
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml14
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/cancelCommit-response-all-parameters-not-empty.xml3
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-false-and-persistId-empty-and-persist-not-empty.xml3
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/commit-response-confirmed-true-and-persistId-empty-and-persist-empty.xml4
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/netconf-messages/doWrappedRpc-response.xml3
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml9
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt1
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolution.kt12
-rwxr-xr-xms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolution.kt9
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt2
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml13
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml10
-rwxr-xr-xms/command-executor/src/main/docker/distribution.xml4
-rw-r--r--ms/command-executor/src/main/python/utils.py1
34 files changed, 136 insertions, 198 deletions
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 @@
</encoder>
</appender>
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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 @@
</encoder>
</appender>
- <logger name="org.springframework.test" level="warn"/>
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
- <logger name="internal.scripts" level="info"/>
+ <logger name="org.springframework.test" level="warn" />
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
+ <logger name="internal.scripts" level="info" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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 @@
</encoder>
</appender>
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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.
-->
<output xmlns="http://yang.juniper.net/junos-qfx/rpc/interfaces">
- <interface-information xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos" junos:style="normal">
- <ifd-specific-config-flags />
- <if-config-flags />
- <link-type>Full-Duplex</link-type>
- <if-media-flags>
- <ifmf-none />
- </if-media-flags>
- <interface-flapped junos:seconds="2343">34</interface-flapped>
- <traffic-statistics junos:style="brief">
- <input-packets>09098789</input-packets>
- <output-packets>2828828</output-packets>
- </traffic-statistics>
- <physical-interface>
- <interface-name>TEGig400-int01</interface-name>
- </physical-interface>
- </interface-information>
+ <interface-information xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos" junos:style="normal">
+ <ifd-specific-config-flags />
+ <if-config-flags />
+ <link-type>Full-Duplex</link-type>
+ <if-media-flags>
+ <ifmf-none />
+ </if-media-flags>
+ <interface-flapped junos:seconds="2343">34</interface-flapped>
+ <traffic-statistics junos:style="brief">
+ <input-packets>09098789</input-packets>
+ <output-packets>2828828</output-packets>
+ </traffic-statistics>
+ <physical-interface>
+ <interface-name>TEGig400-int01</interface-name>
+ </physical-interface>
+ </interface-information>
</output> \ 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.
-->
<output xmlns="http://yang.juniper.net/junos-qfx/rpc/interfaces">
- <interface-information xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos" junos:style="normal">
- <ifd-specific-config-flags />
- <if-config-flags />
- <link-type>Full-Duplex</link-type>
- <if-media-flags>
- <ifmf-none />
- </if-media-flags>
- <interface-flapped junos:seconds="0">Never</interface-flapped>
- <traffic-statistics junos:style="brief">
- <input-packets>0</input-packets>
- <output-packets>0</output-packets>
- </traffic-statistics>
- <physical-interface/>
- </interface-information>
+ <interface-information xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos" junos:style="normal">
+ <ifd-specific-config-flags />
+ <if-config-flags />
+ <link-type>Full-Duplex</link-type>
+ <if-media-flags>
+ <ifmf-none />
+ </if-media-flags>
+ <interface-flapped junos:seconds="0">Never</interface-flapped>
+ <traffic-statistics junos:style="brief">
+ <input-packets>0</input-packets>
+ <output-packets>0</output-packets>
+ </traffic-statistics>
+ <physical-interface />
+ </interface-information>
</output> \ 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("</get>").append(NEW_LINE)
+ request.append("</get>")
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("</get-config>").append(NEW_LINE)
+ request.append("</get-config>")
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("<edit-config>").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("</edit-config>").append(NEW_LINE)
+ request.append("</edit-config>")
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("</validate>").append(NEW_LINE)
+ request.append("</validate>")
return doWrappedRpc(messageId, request.toString())
}
@@ -145,16 +142,16 @@ class NetconfMessageUtils {
val request = StringBuilder()
request.append("<commit>").append(NEW_LINE)
if (confirmed) {
- request.append("<confirmed/>")
- request.append("<confirm-timeout>$confirmTimeout</confirm-timeout>")
+ request.append("<confirmed/>").append(NEW_LINE)
+ request.append("<confirm-timeout>$confirmTimeout</confirm-timeout>").append(NEW_LINE)
if (!persist.isEmpty()) {
- request.append("<persist>$persist</persist>")
+ request.append("<persist>$persist</persist>").append(NEW_LINE)
}
}
if (!persistId.isEmpty()) {
- request.append("<persist-id>$persistId</persist-id>")
+ request.append("<persist-id>$persistId</persist-id>").append(NEW_LINE)
}
- request.append("</commit>").append(NEW_LINE)
+ request.append("</commit>")
return doWrappedRpc(messageId, request.toString())
}
@@ -163,9 +160,9 @@ class NetconfMessageUtils {
val request = StringBuilder()
request.append("<cancel-commit>").append(NEW_LINE)
if (!persistId.isEmpty()) {
- request.append("<persist-id>$persistId</persist-id>")
+ request.append("<persist-id>$persistId</persist-id>").append(NEW_LINE)
}
- request.append("</cancel-commit>").append(NEW_LINE)
+ request.append("</cancel-commit>")
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("</unlock>").append(NEW_LINE)
+ request.append("</unlock>")
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("</delete-config>").append(NEW_LINE)
+ request.append("</delete-config>")
return doWrappedRpc(messageId, request.toString())
}
fun discardChanges(messageId: String): String {
val request = StringBuilder()
- request.append("<discard-changes/>").append(NEW_LINE)
+ request.append("<discard-changes/>")
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("</lock>").append(NEW_LINE)
+ request.append("</lock>")
return doWrappedRpc(messageId, request.toString())
}
@@ -226,9 +223,9 @@ class NetconfMessageUtils {
val request = StringBuilder()
if (force) {
- request.append("<kill-session/>").append(NEW_LINE)
+ request.append("<kill-session/>")
} else {
- request.append("<close-session/>").append(NEW_LINE)
+ request.append("<close-session/>")
}
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("""
-<rpc message-id="102"
- xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <close-session/>
-</rpc>
+ <rpc message-id="102"
+ xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <close-session/>
+ </rpc>
""".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> = 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 @@
</encoder>
</appender>
- <logger name="org.springframework.test" level="warn"/>
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.apache.sshd" level="warn"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core" level="warn"/>
+ <logger name="org.springframework.test" level="warn" />
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.apache.sshd" level="warn" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.core" level="warn" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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 @@
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="customMessageId" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<cancel-commit>
-<persist-id>customPersistId</persist-id></cancel-commit>
+<persist-id>customPersistId</persist-id>
+</cancel-commit>
</rpc> \ 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 @@
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="customMessageId" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<commit>
-<persist-id>customPersistId</persist-id></commit>
+<persist-id>customPersistId</persist-id>
+</commit>
</rpc> \ 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 @@
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="customMessageId" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<commit>
-<confirmed/><confirm-timeout>1</confirm-timeout></commit>
+<confirmed/>
+<confirm-timeout>1</confirm-timeout>
+</commit>
</rpc> \ 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 @@
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="customMessageId" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-customRequest</rpc> \ No newline at end of file
+customRequest
+</rpc> \ 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 @@
</encoder>
</appender>
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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 @@
</encoder>
</appender>
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.mockserver.mock" level="warn"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints" level="warn"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.mockserver.mock" level="warn" />
+ <logger name="org.onap.ccsdk.cds.controllerblueprints" level="warn" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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 @@
</encoder>
</appender>
- <logger name="org.springframework.test" level="warn"/>
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+ <logger name="org.springframework.test" level="warn" />
+ <logger name="org.springframework" level="warn" />
+ <logger name="org.hibernate" level="info" />
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info" />
<root level="warn">
- <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT" />
</root>
</configuration>
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 @@
-->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
- 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">
+ 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">
<id>${assembly.id}</id>
<formats>
<format>tar.gz</format>
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