diff options
author | 2021-03-24 01:57:45 +0000 | |
---|---|---|
committer | 2021-03-24 01:57:45 +0000 | |
commit | dd0d82fcb599bd3c63cfaacf578fcee6553a9f1b (patch) | |
tree | 2ea12c2b358b26bd6e887fadd90475b77f58534d /ms/blueprintsprocessor/modules | |
parent | f26ea37c4be0deb466a41ea58618fd9f3b015466 (diff) | |
parent | 1e294a59489bf5900135f67cd87dab5d6a67fada (diff) |
Merge "Bug fixes for config template and config value components" into honolulu
Diffstat (limited to 'ms/blueprintsprocessor/modules')
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() |