diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-09-08 13:12:28 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-08 13:12:28 +0000 |
commit | a6ccdb679ed78b174bb9cb507821827235972632 (patch) | |
tree | 15aefcf0000726ece5c7ebcb1310e6bc65d08716 /ms/blueprintsprocessor/modules | |
parent | 6492428439c2da163fc75fef96ff38bec05bd9a9 (diff) | |
parent | ff8df16778818804d31b844b0df7b2f9a16f2cba (diff) |
Merge "Add k8s-upload-profile templating and packaging"
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 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() |