summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/blueprints
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2021-03-22 22:43:23 +0100
committerLukasz Rajewski <lukasz.rajewski@orange.com>2021-03-22 22:43:23 +0100
commit91c1deec281ece8aa72b2afd9cc68b2d63c38189 (patch)
tree6868e89343aac804314a299ddef648b1dbac3983 /ms/blueprintsprocessor/modules/blueprints
parent8ee06cef9a605d8220a6c5ebafc5da8eb7491f8d (diff)
Bug fixes for config template and config value components
Issue-ID: CCSDK-3232 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I817d83001a76ba480472c7aa2da15eba65b39c20
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 cfe436023..256339c62 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
@@ -232,6 +232,7 @@ object BlueprintConstants {
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 MODEL_TYPE_ARTIFACT_K8S_CONFIG = "artifact-k8sconfig-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 503e07048..81593c935 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
@@ -327,6 +327,22 @@ fun BlueprintTypes.artifactTypeK8sProfileFolder(): ArtifactType {
}
}
+fun ServiceTemplateBuilder.artifactTypeK8sConfigFolder() {
+ val artifactType = BlueprintTypes.artifactTypeK8sConfigFolder()
+ if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
+ this.artifactTypes!![artifactType.id!!] = artifactType
+}
+
+fun BlueprintTypes.artifactTypeK8sConfigFolder(): ArtifactType {
+ return artifactType(
+ id = BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG,
+ version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ description = "K8s Config 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 5143c9dc7..57f671dc4 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
@@ -111,6 +111,7 @@ class BlueprintDSLTest {
artifactTypeMappingResource()
artifactTypeComponentJar()
artifactTypeK8sProfileFolder()
+ artifactTypeK8sConfigFolder()
relationshipTypeConnectsTo()
relationshipTypeDependsOn()