aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/k8s-connection-plugin/src
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2022-05-16 11:03:43 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2022-05-16 11:03:43 -0400
commita07209f3327340cbbd4ddf8051ec7775153e1121 (patch)
tree0053da6c1949d5cfeabae96d84289a48deda56fc /ms/blueprintsprocessor/functions/k8s-connection-plugin/src
parentb0ca47d64671f30d5f5b866cfb78e5177f3a2251 (diff)
Re-enable formatting and fix formatting issues
Issue-ID: CCSDK-3657 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: Idd1871e82a319325b042c339741a66c06499692c
Diffstat (limited to 'ms/blueprintsprocessor/functions/k8s-connection-plugin/src')
-rw-r--r--ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt3
-rw-r--r--ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt1
-rw-r--r--ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt8
-rw-r--r--ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sPluginQueryApi.kt24
-rw-r--r--ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sQueryRestClient.kt2
-rw-r--r--ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sResourceStatus.kt2
6 files changed, 19 insertions, 21 deletions
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt
index 02b255673..ed0b164ef 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt
@@ -24,7 +24,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.profile.K
import com.fasterxml.jackson.module.kotlin.readValue
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.template.K8sTemplate
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sRbInstanceFull
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -156,7 +155,7 @@ class K8sPluginDefinitionApi(
try {
val result: BlueprintWebClientService.WebClientResponse<String> = rbDefinitionService.exchangeResource(
DELETE.name,
- "/profile/${profileName}",
+ "/profile/$profileName",
""
)
log.debug(result.toString())
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
index e7d781d7b..443233b61 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
@@ -29,7 +29,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sRbInstance
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sRbInstanceGvk
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt
index 1be45e892..a99179599 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt
@@ -303,7 +303,7 @@ class K8sPluginInstanceApi(
}
}
- fun editConfigurationValuesByDelete(instanceId: String, configName: String): K8sConfigValueResponse? {
+ fun editConfigurationValuesByDelete(instanceId: String, configName: String): K8sConfigValueResponse? {
val rbInstanceService = K8sRbInstanceRestClient(k8sConfiguration, instanceId)
try {
val result: BlueprintWebClientService.WebClientResponse<String> = rbInstanceService.exchangeResource(
@@ -450,9 +450,9 @@ class K8sPluginInstanceApi(
val rbInstanceService = K8sRbInstanceRestClient(k8sConfiguration, instanceId)
try {
val result: BlueprintWebClientService.WebClientResponse<String> = rbInstanceService.exchangeResource(
- GET.name,
- "/config/$configName/version",
- ""
+ GET.name,
+ "/config/$configName/version",
+ ""
)
log.debug(result.toString())
return if (result.status in 200..299) {
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sPluginQueryApi.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sPluginQueryApi.kt
index 9a5051f8e..36ebe1133 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sPluginQueryApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sPluginQueryApi.kt
@@ -1,4 +1,4 @@
-package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.query;
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.query
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
@@ -8,17 +8,17 @@ import org.slf4j.LoggerFactory
import org.springframework.http.HttpMethod.GET
public class K8sPluginQueryApi(
- private val k8sConfiguration: K8sConnectionPluginConfiguration
+ private val k8sConfiguration: K8sConnectionPluginConfiguration
) {
private val log = LoggerFactory.getLogger(K8sPluginQueryApi::class.java)!!
fun queryK8sResources(
- cloudRegion: String,
- kind: String,
- apiVersion: String,
- name: String? = null,
- namespace: String? = null,
- labels: Map<String, String>? = null
+ cloudRegion: String,
+ kind: String,
+ apiVersion: String,
+ name: String? = null,
+ namespace: String? = null,
+ labels: Map<String, String>? = null
): K8sResourceStatus? {
val rbQueryService = K8sQueryRestClient(k8sConfiguration)
try {
@@ -34,14 +34,14 @@ public class K8sPluginQueryApi(
path = path.trimEnd(',')
}
val result: BlueprintWebClientService.WebClientResponse<String> = rbQueryService.exchangeResource(
- GET.name,
- path,
- ""
+ GET.name,
+ path,
+ ""
)
log.debug(result.toString())
return if (result.status in 200..299) {
val parsedObject: K8sResourceStatus? = JacksonUtils.readValue(
- result.body, K8sResourceStatus::class.java
+ result.body, K8sResourceStatus::class.java
)
parsedObject
} else if (result.status == 500 && result.body.contains("Error finding master table"))
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sQueryRestClient.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sQueryRestClient.kt
index dda5a6eea..672a3667d 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sQueryRestClient.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sQueryRestClient.kt
@@ -22,7 +22,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sAbstractRestClien
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
open class K8sQueryRestClient(
- k8sConfiguration: K8sConnectionPluginConfiguration
+ k8sConfiguration: K8sConnectionPluginConfiguration
) : K8sAbstractRestClientService(k8sConfiguration) {
override fun apiUrl(): String {
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sResourceStatus.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sResourceStatus.kt
index d0e84ae8c..e3aee7814 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sResourceStatus.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/query/K8sResourceStatus.kt
@@ -41,4 +41,4 @@ class K8sResourceStatus {
override fun hashCode(): Int {
return javaClass.hashCode()
}
-} \ No newline at end of file
+}