summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/blueprints
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2020-09-04 18:16:45 +0200
committerLukasz Rajewski <lukasz.rajewski@orange.com>2020-09-07 08:27:38 +0000
commitff8df16778818804d31b844b0df7b2f9a16f2cba (patch)
treec2204b548399f9d77fff9b426ecc62cd7733471f /ms/blueprintsprocessor/modules/blueprints
parent836be777835eb05be1a62b98a9e1f5860623d7b2 (diff)
Add k8s-upload-profile templating and packaging
Issue-ID: CCSDK-2631 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Id520338ffc2f43821d114b037467fbcc2f042b66
Diffstat (limited to 'ms/blueprintsprocessor/modules/blueprints')
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt1
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt16
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt1
3 files changed, 18 insertions, 0 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
index 8290167cd..a0ef565cc 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
@@ -228,6 +228,7 @@ object BluePrintConstants {
const val MODEL_TYPE_ARTIFACT_SCRIPT_KOTLIN = "artifact-script-kotlin"
const val MODEL_TYPE_ARTIFACT_DIRECTED_GRAPH = "artifact-directed-graph"
const val MODEL_TYPE_ARTIFACT_COMPONENT_JAR = "artifact-component-jar"
+ const val MODEL_TYPE_ARTIFACT_K8S_PROFILE = "artifact-k8sprofile-content"
const val TOSCA_SPEC = "TOSCA"
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt
index 3c5561994..64553230a 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt
@@ -311,6 +311,22 @@ fun BluePrintTypes.artifactTypeScriptKotlin(): ArtifactType {
}
}
+fun ServiceTemplateBuilder.artifactTypeK8sProfileFolder() {
+ val artifactType = BluePrintTypes.artifactTypeK8sProfileFolder()
+ if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
+ this.artifactTypes!![artifactType.id!!] = artifactType
+}
+
+fun BluePrintTypes.artifactTypeK8sProfileFolder(): ArtifactType {
+ return artifactType(
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ description = "K8s Profile Folder Artifact"
+ ) {
+ }
+}
+
@Deprecated("CDS won't support, use implerative workflow definitions.")
fun BluePrintTypes.artifactTypeDirectedGraph(): ArtifactType {
return artifactType(
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
index bf16ea93a..824d7ddec 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
@@ -110,6 +110,7 @@ class BluePrintDSLTest {
artifactTypeScriptKotlin()
artifactTypeMappingResource()
artifactTypeComponentJar()
+ artifactTypeK8sProfileFolder()
relationshipTypeConnectsTo()
relationshipTypeDependsOn()