summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/rest-lib
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2021-01-22 11:49:51 -0500
committerSingal, Kapil (ks220y) <ks220y@att.com>2021-01-22 12:08:19 -0500
commitadcd4f2bc695840e9ecbc05003bc52c675f22fec (patch)
tree5db58ce9b6b3e86977ca3c697ce3e8998523eb61 /ms/blueprintsprocessor/modules/commons/rest-lib
parentdc8252f3cfa1ddd0c1c8c70513c16c738d840822 (diff)
Renaming Files having BluePrint to have Blueprint
Replacing BluePrint with Blueprint throughout Issue-ID: CCSDK-3098 Signed-off-by: KAPIL SINGAL <ks220y@att.com> Change-Id: Ibee8bad07ae7d9287073db2d4f2f2cd730fa8b96
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/rest-lib')
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt)0
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt34
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt)12
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt18
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt16
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt)36
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt12
9 files changed, 75 insertions, 75 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt
index 6e9e4b554..701fd172f 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt
@@ -19,9 +19,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -29,19 +29,19 @@ import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BluePrintRestLibConfiguration
+open class BlueprintRestLibConfiguration
/**
* Exposed Dependency Service by this Rest Lib Module
*/
-fun BluePrintDependencyService.restLibPropertyService(): BluePrintRestLibPropertyService =
+fun BlueprintDependencyService.restLibPropertyService(): BlueprintRestLibPropertyService =
instance(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-fun BluePrintDependencyService.restClientService(selector: String): BlueprintWebClientService {
+fun BlueprintDependencyService.restClientService(selector: String): BlueprintWebClientService {
return restLibPropertyService().blueprintWebClientService(selector)
}
-fun BluePrintDependencyService.restClientService(jsonNode: JsonNode): BlueprintWebClientService {
+fun BlueprintDependencyService.restClientService(jsonNode: JsonNode): BlueprintWebClientService {
return restLibPropertyService().blueprintWebClientService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt
index a227cf24e..a227cf24e 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
index ca1046dde..45b9e3827 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest
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.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Type DSL for Rest */
fun ServiceTemplateBuilder.relationshipTypeConnectsToRestClient() {
- val relationshipType = BluePrintTypes.relationshipTypeConnectsToRestClient()
+ val relationshipType = BlueprintTypes.relationshipTypeConnectsToRestClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BluePrintTypes.relationshipTypeConnectsToRestClient(): RelationshipType {
+fun BlueprintTypes.relationshipTypeConnectsToRestClient(): RelationshipType {
return relationshipType(
- id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT,
- version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT,
+ version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through"
) {
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,35 +66,35 @@ fun TopologyTemplateBuilder.relationshipTemplateRestClient(
open class RestClientRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT, description
+ BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT, description
) {
fun basicAuth(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthRestClientProperties(block))
+ property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthRestClientProperties(block))
}
fun tokenAuth(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthRestClientProperties(block))
+ property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthRestClientProperties(block))
}
fun sslAuth(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.sslRestClientProperties(block))
+ property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.sslRestClientProperties(block))
}
}
-fun BluePrintTypes.basicAuthRestClientProperties(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BlueprintTypes.basicAuthRestClientProperties(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = BasicAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BluePrintTypes.tokenAuthRestClientProperties(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BlueprintTypes.tokenAuthRestClientProperties(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = TokenAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BluePrintTypes.sslRestClientProperties(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BlueprintTypes.sslRestClientProperties(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = SslAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_SSL_NO_AUTH.asJsonPrimitive()
return assignments.asJsonType()
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt
index a2c68ec68..d28bd77db 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt
@@ -19,7 +19,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest.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.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.PolicyManagerRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
@@ -28,12 +28,12 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientPropert
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
-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(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-open class BluePrintRestLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
+open class BlueprintRestLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
private var preInterceptor: PreInterceptor? = null
private var postInterceptor: PostInterceptor? = null
@@ -88,7 +88,7 @@ open class BluePrintRestLibPropertyService(private var bluePrintPropertiesServic
policyManagerRestClientProperties(prefix)
}
else -> {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Rest adaptor($type) is" +
" not supported"
)
@@ -120,7 +120,7 @@ open class BluePrintRestLibPropertyService(private var bluePrintPropertiesServic
JacksonUtils.readValue(jsonNode, SSLRestClientProperties::class.java)!!
}
else -> {
- throw BluePrintProcessorException(
+ throw BlueprintProcessorException(
"Rest adaptor($type) is not supported"
)
}
@@ -141,7 +141,7 @@ open class BluePrintRestLibPropertyService(private var bluePrintPropertiesServic
return BasicAuthRestClientService(restClientProperties)
}
else -> {
- throw BluePrintProcessorException("couldn't get rest service for type:${restClientProperties.type} uri: ${restClientProperties.url}")
+ throw BlueprintProcessorException("couldn't get rest service for type:${restClientProperties.type} uri: ${restClientProperties.url}")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
index 945d29850..43dbcbeb2 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
@@ -36,9 +36,9 @@ import org.apache.http.message.BasicHeader
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintIOUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintIOUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpMethod
@@ -59,7 +59,7 @@ interface BlueprintWebClientService {
.build()
}
- /** High performance non blocking Retry function, If execution block [block] throws BluePrintRetryException
+ /** High performance non blocking Retry function, If execution block [block] throws BlueprintRetryException
* exception then this will perform wait and retrigger accoring to times [times] with delay [delay]
*/
suspend fun <T> retry(
@@ -69,11 +69,11 @@ interface BlueprintWebClientService {
block: suspend (Int) -> T
): T {
val exceptionBlock = { e: Exception ->
- if (e !is BluePrintRetryException) {
+ if (e !is BlueprintRetryException) {
throw e
}
}
- return BluePrintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
+ return BlueprintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
}
fun exchangeResource(methodType: String, path: String, request: String): WebClientResponse<String> {
@@ -98,7 +98,7 @@ interface BlueprintWebClientService {
HttpMethod.POST -> post(path, request, convertedHeaders, String::class.java)
HttpMethod.PUT -> put(path, request, convertedHeaders, String::class.java)
HttpMethod.PATCH -> patch(path, request, convertedHeaders, String::class.java)
- else -> throw BluePrintProcessorException(
+ else -> throw BlueprintProcessorException(
"Unsupported methodType($methodType) attempted on path($path)"
)
}
@@ -270,7 +270,7 @@ interface BlueprintWebClientService {
HttpMethod.DELETE -> deleteNB(path, convertedHeaders, responseType)
HttpMethod.PUT -> putNB(path, request, convertedHeaders, responseType)
HttpMethod.PATCH -> patchNB(path, request, convertedHeaders, responseType)
- else -> throw BluePrintProcessorException("Unsupported methodType($methodType)")
+ else -> throw BlueprintProcessorException("Unsupported methodType($methodType)")
}
}
@@ -323,7 +323,7 @@ interface BlueprintWebClientService {
" User-supplied \"additionalHeaders\" cannot contain AUTHORIZATION header with" +
" auth-type \"${RestLibConstants.TYPE_BASIC_AUTH}\""
WebClientUtils.log.error(errMsg)
- throw BluePrintProcessorException(errMsg)
+ throw BlueprintProcessorException(errMsg)
} else {
customHeaders.putAll(it)
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
index 611c0855d..8c7ba6573 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
@@ -29,12 +29,12 @@ import kotlinx.coroutines.reactor.ReactorContext
import kotlinx.coroutines.reactor.asCoroutineContext
import kotlinx.coroutines.withContext
import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_INVOCATION_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_ORIGINATOR_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_PARTNER_NAME
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_REQUEST_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_SUBREQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_INVOCATION_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_ORIGINATOR_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_PARTNER_NAME
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_REQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_SUBREQUEST_ID
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
@@ -65,7 +65,7 @@ class RestLoggerService {
fun httpInvoking(headers: Array<BasicHeader>) {
headers.plusElement(BasicHeader(ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID()))
headers.plusElement(BasicHeader(ONAP_INVOCATION_ID, UUID.randomUUID().toString()))
- headers.plusElement(BasicHeader(ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME))
+ headers.plusElement(BasicHeader(ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME))
}
}
@@ -98,7 +98,7 @@ class RestLoggerService {
resHeaders[ONAP_SUBREQUEST_ID] = MDC.get("SubRequestID")
resHeaders[ONAP_ORIGINATOR_ID] = MDC.get("OriginatorID")
resHeaders[ONAP_INVOCATION_ID] = MDC.get("InvocationID")
- resHeaders[ONAP_PARTNER_NAME] = BluePrintConstants.APP_NAME
+ resHeaders[ONAP_PARTNER_NAME] = BlueprintConstants.APP_NAME
} catch (e: Exception) {
log.warn("couldn't set response headers", e)
} finally {
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt
index f45d1cd69..117fbbd25 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt
@@ -23,13 +23,13 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
@@ -43,8 +43,8 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BluePrintRestLibConfiguration::class, BluePrintPropertyConfiguration::class,
- BluePrintPropertiesService::class
+ BlueprintRestLibConfiguration::class, BlueprintPropertyConfiguration::class,
+ BlueprintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,10 +75,10 @@ import kotlin.test.assertNotNull
"blueprintsprocessor.restclient.ssl.sslKeyPassword=changeit"
]
)
-class BluePrintRestLibPropertyServiceTest {
+class BlueprintRestLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
@Test
fun testRestClientProperties() {
@@ -287,7 +287,7 @@ class BluePrintRestLibPropertyServiceTest {
additionalHeadersChangedContentTypeToAPPLICATION_XML(endPointWithHeadersJson)
}
- // called from within "assertFailsWith(exceptionClass = BluePrintProcessorException::class) {"
+ // called from within "assertFailsWith(exceptionClass = BlueprintProcessorException::class) {"
private fun attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson: String) {
val parsedObj: JsonNode = defaultMapper.readTree(endPointWithHeadersJson)
val bpWebClientService =
@@ -297,12 +297,12 @@ class BluePrintRestLibPropertyServiceTest {
@Test
fun `BasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -336,12 +336,12 @@ class BluePrintRestLibPropertyServiceTest {
@Test
fun `TokenAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -376,12 +376,12 @@ class BluePrintRestLibPropertyServiceTest {
@Test
fun `SSLBasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -416,18 +416,18 @@ class BluePrintRestLibPropertyServiceTest {
@Test
fun `SSLNoAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
+ assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
}
- companion object BluePrintRestLibPropertyServiceTest {
+ companion object BlueprintRestLibPropertyServiceTest {
val defaultMapper = ObjectMapper()
val expectedTokenAuthDefaultHeaders = mapOf<String, String>(
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
index f06f827ad..6b083aaad 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
@@ -19,7 +19,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTemplateRestClient
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTypeConnectsToRestClient
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -73,12 +73,12 @@ class RestClientPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
- "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
+ relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
+ "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
index 030996685..e14e035a9 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
@@ -27,9 +27,9 @@ import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
@@ -66,9 +66,9 @@ import kotlin.test.assertNotNull
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ContextConfiguration(
classes = [
- BluePrintRestLibConfiguration::class, SampleController::class,
+ BlueprintRestLibConfiguration::class, SampleController::class,
SecurityConfiguration::class,
- BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
+ BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
]
)
@TestPropertySource(
@@ -96,7 +96,7 @@ import kotlin.test.assertNotNull
class RestClientServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
@Autowired
lateinit var httpHandler: HttpHandler