import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
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.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB
import org.slf4j.LoggerFactory
// Check if definition exists
if (!api.hasDefinition()) {
- throw BluePrintProcessorException("K8s Config Template ($vfModuleInvariantID/$vfModuleUUID) - $k8sConfigTemplateName not found ")
+ throw BlueprintProcessorException("K8s Config Template ($vfModuleInvariantID/$vfModuleUUID) - $k8sConfigTemplateName not found ")
}
log.info("Config Template name: $k8sConfigTemplateName")
if (k8sRbProfileName.equals("")) {
- throw BluePrintProcessorException("K8s rb profile name is empty! Either define profile name to use or choose default")
+ throw BlueprintProcessorException("K8s rb profile name is empty! Either define profile name to use or choose default")
}
var configTemplate = K8sConfigTemplate()
}
catch (e: Exception) {
log.info("Caught exception trying to get the vnf Details!!")
- // throw BluePrintProcessorException("${e.message}")
+ // throw BlueprintProcessorException("${e.message}")
}
}
val profileFile = profileFilePath.toFile()
if (!profileFile.exists())
- throw BluePrintProcessorException("K8s Profile template file $profileFilePath does not exists")
+ throw BlueprintProcessorException("K8s Profile template file $profileFilePath does not exists")
return profileFilePath
}
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
log.info("Executing Recovery")
- bluePrintRuntimeService.getBluePrintError().addError("${runtimeException.message}")
+ bluePrintRuntimeService.getBlueprintError().addError("${runtimeException.message}")
}
fun modifyTemplate(configmapName: String, typOfVfmodule: String): String {
val templateFile = templateFilePath.toFile()
if (!templateFile.exists())
- throw BluePrintProcessorException("K8s Profile template file ${templateFilePath} does not exists")
+ throw BlueprintProcessorException("K8s Profile template file ${templateFilePath} does not exists")
log.info("Decompressing config template to ${destPath}")
- val decompressedProfile: File = BluePrintArchiveUtils.deCompress(templateFilePath.toFile(),
+ val decompressedProfile: File = BlueprintArchiveUtils.deCompress(templateFilePath.toFile(),
"${destPath}", ArchiveType.TarGz)
log.info("${templateFilePath.toString()} decompression completed")
log.info("Reading config template file: ${templateFilePath}")
if (!templateFile.exists())
- throw BluePrintProcessorException("config template file ${templateFilePath} does not exists")
+ throw BlueprintProcessorException("config template file ${templateFilePath} does not exists")
val tempMainPath: File = createTempDir("config-template-", "")
val tempConfigTemplatePath: File = createTempDir("conftemplate-", "", tempMainPath)
log.info("Decompressing profile to ${tempConfigTemplatePath.toString()}")
- val decompressedProfile2: File = BluePrintArchiveUtils.deCompress(templateFilePath.toFile(),
+ val decompressedProfile2: File = BlueprintArchiveUtils.deCompress(templateFilePath.toFile(),
"${tempConfigTemplatePath.toString()}", ArchiveType.TarGz)
log.info("${templateFilePath.toString()} decompression completed")
File(manifestFileName2).copyTo(File(destOverrideFile), true)
- if (!BluePrintArchiveUtils.compress(decompressedProfile2, templateFilePath.toFile(),
+ if (!BlueprintArchiveUtils.compress(decompressedProfile2, templateFilePath.toFile(),
ArchiveType.TarGz)) {
- throw BluePrintProcessorException("Profile compression has failed")
+ throw BlueprintProcessorException("Profile compression has failed")
}
log.info("${templateFilePath.toString()} compression completed")
return ""
} catch (e: Exception) {
log.info("Caught exception trying to get k8s instance details")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
return false
} catch (e: Exception) {
log.info("Caught exception trying to get k8s config trmplate definition")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
return false
} catch (e: Exception) {
log.info("Caught exception trying to get k8s config trmplate definition")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
}
} catch (e: Exception) {
log.info("Caught exception trying to create k8s config template ${profile.templateName} - updated")
- // throw BluePrintProcessorException("${e.message}")
+ // throw BlueprintProcessorException("${e.message}")
}
}
}
} catch (e: Exception) {
log.info("Caught exception trying to upload k8s config template ${profile.templateName}")
- throw BluePrintProcessorException("${e.message}")
+ throw BlueprintProcessorException("${e.message}")
}
}
}