aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/k8s-profile-upload
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions/k8s-profile-upload')
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt10
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt30
-rw-r--r--ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt14
3 files changed, 27 insertions, 27 deletions
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt
index d00c47b7f..37e9254ba 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sPluginApi.kt
@@ -22,7 +22,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.profile.upload
import com.fasterxml.jackson.databind.ObjectMapper
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.slf4j.LoggerFactory
import org.springframework.http.HttpMethod
import java.nio.file.Path
@@ -60,7 +60,7 @@ class K8sPluginApi(
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb definition")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
@@ -75,7 +75,7 @@ class K8sPluginApi(
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb profile")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
@@ -93,7 +93,7 @@ class K8sPluginApi(
}
} catch (e: Exception) {
log.error("Caught exception trying to create k8s rb profile ${profile.profileName}")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
@@ -108,7 +108,7 @@ class K8sPluginApi(
}
} catch (e: Exception) {
log.error("Caught exception trying to upload k8s rb profile ${profile.profileName}")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
}
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
index 23d47dca6..39da9c11b 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadComponent.kt
@@ -23,20 +23,20 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.commons.io.FileUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -51,7 +51,7 @@ import java.nio.file.Paths
@Component("component-k8s-profile-upload")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class K8sProfileUploadComponent(
- private var bluePrintPropertiesService: BluePrintPropertiesService,
+ private var bluePrintPropertiesService: BlueprintPropertiesService,
private val resourceResolutionService: ResourceResolutionService
) :
@@ -145,15 +145,15 @@ open class K8sProfileUploadComponent(
val profileNamespace: String? = prefixInputParamsMap[INPUT_K8S_PROFILE_NAMESPACE]?.returnNullIfMissing()?.asText()
var profileSource: String? = prefixInputParamsMap[INPUT_K8S_PROFILE_SOURCE]?.returnNullIfMissing()?.asText()
if (profileNamespace == null)
- throw BluePrintProcessorException("Profile $profileName namespace is missing")
+ throw BlueprintProcessorException("Profile $profileName namespace is missing")
if (profileSource == null) {
profileSource = profileName
log.info("Profile name used instead of profile source")
}
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifact: ArtifactDefinition = bluePrintContext.nodeTemplateArtifact(nodeTemplateName, profileSource)
- if (artifact.type != BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE)
- throw BluePrintProcessorException(
+ if (artifact.type != BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE)
+ throw BlueprintProcessorException(
"Unexpected profile artifact type for profile source " +
"$profileSource. Expecting: $artifact.type"
)
@@ -178,7 +178,7 @@ open class K8sProfileUploadComponent(
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- bluePrintRuntimeService.getBluePrintError().addError(runtimeException.message!!)
+ bluePrintRuntimeService.getBlueprintError().addError(runtimeException.message!!)
}
private fun getTemplatePrefixList(node: JsonNode?): ArrayList<String> {
@@ -238,19 +238,19 @@ open class K8sProfileUploadComponent(
tempProfilePath, manifestFiles
)
} else
- throw BluePrintProcessorException("Manifest file is missing")
+ throw BlueprintProcessorException("Manifest file is missing")
// Preparation of the final profile content
val finalProfileFilePath = Paths.get(
tempMainPath.toString().plus(File.separator).plus(
"$k8sRbProfileName.tar.gz"
)
)
- if (!BluePrintArchiveUtils.compress(
+ if (!BlueprintArchiveUtils.compress(
tempProfilePath, finalProfileFilePath.toFile(),
ArchiveType.TarGz
)
) {
- throw BluePrintProcessorException("Profile compression has failed")
+ throw BlueprintProcessorException("Profile compression has failed")
}
FileUtils.deleteDirectory(tempProfilePath)
@@ -260,7 +260,7 @@ open class K8sProfileUploadComponent(
throw t
}
} else
- throw BluePrintProcessorException("Profile source $ks8ProfileLocation is missing in CBA folder")
+ throw BlueprintProcessorException("Profile source $ks8ProfileLocation is missing in CBA folder")
}
private fun readManifestFiles(profileSource: File, destinationFolder: File): ArrayList<File>? {
@@ -352,7 +352,7 @@ open class K8sProfileUploadComponent(
if (!isFileInTheManifestFiles(finalFile, manifestFiles))
return
val fileContent = templatedFile.bufferedReader().readText()
- val finalFileContent = BluePrintVelocityTemplateService.generateContent(
+ val finalFileContent = BlueprintVelocityTemplateService.generateContent(
fileContent,
params, true
)
diff --git a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt
index 542be8cab..76e8af910 100644
--- a/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/k8s-profile-upload/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/profile/upload/K8sProfileUploadConfiguration.kt
@@ -17,9 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.profile.upload
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -27,12 +27,12 @@ import org.springframework.context.annotation.Import
@Configuration
@Import(
- BluePrintPropertyConfiguration::class,
- BluePrintPropertiesService::class,
- BluePrintCoreConfiguration::class
+ BlueprintPropertyConfiguration::class,
+ BlueprintPropertiesService::class,
+ BlueprintCoreConfiguration::class
)
@EnableConfigurationProperties
-open class K8sProfileUploadConfiguration(private var bluePrintPropertiesService: BluePrintPropertiesService) {
+open class K8sProfileUploadConfiguration(private var bluePrintPropertiesService: BlueprintPropertiesService) {
@Bean("k8s-plugin-properties")
open fun getProperties(): K8sProfileUploadProperties {