aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap')
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt30
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt)18
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt (renamed from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt)2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt6
9 files changed, 36 insertions, 36 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt
index a585c972b..a585c972b 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
index c83906c3f..a47dd8918 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
@@ -16,23 +16,23 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
-open class BlueprintNatsLibConfiguration
+open class BluePrintNatsLibConfiguration
/**
* Exposed Dependency Service by this NATS Lib Module
*/
-fun BlueprintDependencyService.natsLibPropertyService(): BlueprintNatsLibPropertyService =
+fun BluePrintDependencyService.natsLibPropertyService(): BluePrintNatsLibPropertyService =
instance(NatsLibConstants.SERVICE_BLUEPRINT_NATS_LIB_PROPERTY)
-fun BlueprintDependencyService.controllerNatsService(): BlueprintNatsService {
+fun BluePrintDependencyService.controllerNatsService(): BluePrintNatsService {
return natsLibPropertyService().bluePrintNatsService(NatsLibConstants.DEFULT_NATS_SELECTOR)
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt
index a989dcf1e..a989dcf1e 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
index 9e771a6e5..4c5471796 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for NATS Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToNats() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToNats()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToNats()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToNats(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToNats(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through NATS Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,25 +66,25 @@ fun TopologyTemplateBuilder.relationshipTemplateNats(
class NatsRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS, description
) {
fun tokenAuth(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthNatsProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthNatsProperties(block))
}
fun tlsAuth(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthNatsProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthNatsProperties(block))
}
}
-fun BlueprintTypes.tokenAuthNatsProperties(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthNatsProperties(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = NatsTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[NatsConnectionProperties::type.name] = NatsLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthNatsProperties(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthNatsProperties(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = NatsTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[NatsConnectionProperties::type.name] = NatsLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
index 457bf8703..1ac44bc94 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
@@ -17,24 +17,24 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsConnectionProperties
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.nats.TLSAuthNatsConnectionProperties
import org.onap.ccsdk.cds.blueprintsprocessor.nats.TokenAuthNatsConnectionProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(NatsLibConstants.SERVICE_BLUEPRINT_NATS_LIB_PROPERTY)
-open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintNatsLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun bluePrintNatsService(jsonNode: JsonNode): BlueprintNatsService {
+ fun bluePrintNatsService(jsonNode: JsonNode): BluePrintNatsService {
val natsConnectionProperties = natsConnectionProperties(jsonNode)
return bluePrintNatsService(natsConnectionProperties)
}
- fun bluePrintNatsService(selector: String): BlueprintNatsService {
+ fun bluePrintNatsService(selector: String): BluePrintNatsService {
val prefix = "${NatsLibConstants.PROPERTY_NATS_PREFIX}$selector"
val natsConnectionProperties = natsConnectionProperties(prefix)
return bluePrintNatsService(natsConnectionProperties)
@@ -50,7 +50,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
JacksonUtils.readValue(jsonNode, TLSAuthNatsConnectionProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("NATS type($type) not supported")
+ throw BluePrintProcessorException("NATS type($type) not supported")
}
}
}
@@ -65,7 +65,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
tlsAuthNatsConnectionProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("NATS type($type) not supported")
+ throw BluePrintProcessorException("NATS type($type) not supported")
}
}
}
@@ -79,7 +79,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
}
fun bluePrintNatsService(natsConnectionProperties: NatsConnectionProperties):
- BlueprintNatsService {
+ BluePrintNatsService {
return when (natsConnectionProperties) {
is TokenAuthNatsConnectionProperties -> {
TokenAuthNatsService(natsConnectionProperties)
@@ -88,7 +88,7 @@ open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesServic
TLSAuthNatsService(natsConnectionProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
+ throw BluePrintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
index 67de95133..9548fe78d 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
@@ -25,7 +25,7 @@ import io.nats.streaming.Subscription
import io.nats.streaming.SubscriptionOptions
import java.time.Duration
-interface BlueprintNatsService {
+interface BluePrintNatsService {
/** Create and Return the NATS streaming connection */
suspend fun connection(): StreamingConnection
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
index 1bde8e534..00a972eff 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
@@ -25,7 +25,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
import javax.net.ssl.SSLContext
open class TLSAuthNatsService(private val natsConnectionProperties: TLSAuthNatsConnectionProperties) :
- BlueprintNatsService {
+ BluePrintNatsService {
lateinit var streamingConnection: StreamingConnection
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
index 9d4aacfbd..7c24b70d0 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
@@ -25,7 +25,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
open class TokenAuthNatsService(private val natsConnectionProperties: TokenAuthNatsConnectionProperties) :
- BlueprintNatsService {
+ BluePrintNatsService {
private val log = logger(TokenAuthNatsService::class)
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
index a155a076d..a7726a14b 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats.utils
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
object NatsClusterUtils {
@@ -32,7 +32,7 @@ object NatsClusterUtils {
}
fun currentApplicationSubject(subject: String): String {
- return "${BlueprintConstants.APP_NAME}.$subject"
+ return "${BluePrintConstants.APP_NAME}.$subject"
}
fun currentNodeDurable(subject: String): String {
@@ -40,6 +40,6 @@ object NatsClusterUtils {
}
fun applicationLoadBalanceGroup(): String {
- return "${BlueprintConstants.APP_NAME}"
+ return "${BluePrintConstants.APP_NAME}"
}
}