Merge "Remote Python executor unescapes script parameter values"
[ccsdk/cds.git] / ms / controllerblueprints / modules / blueprint-core / src / main / kotlin / org / onap / ccsdk / cds / controllerblueprints / core / dsl / BluePrintDSLData.kt
1 /*
2  *  Copyright © 2019 IBM.
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  */
16
17 package org.onap.ccsdk.cds.controllerblueprints.core.dsl
18
19 import com.fasterxml.jackson.annotation.JsonIgnore
20 import com.fasterxml.jackson.databind.JsonNode
21 import org.onap.ccsdk.cds.controllerblueprints.core.data.*
22
23 /**
24  * This is simplified version of DSL, which is used for generating the Service template
25  * @author Brinda Santh
26  */
27
28 class DSLBluePrint {
29     var metadata: MutableMap<String, String> = hashMapOf()
30     var properties: MutableMap<String, JsonNode>? = null
31     var dataTypes: MutableMap<String, DataType> = hashMapOf()
32     var artifactTypes: MutableMap<String, ArtifactType> = hashMapOf()
33     var components: MutableMap<String, DSLComponent> = hashMapOf()
34     var registryComponents: MutableMap<String, DSLRegistryComponent> = hashMapOf()
35     var workflows: MutableMap<String, DSLWorkflow> = hashMapOf()
36 }
37
38 class DSLWorkflow {
39     @get:JsonIgnore
40     var id: String? = null
41     lateinit var description: String
42     lateinit var actionName: String
43     lateinit var steps: MutableMap<String, Step>
44     var inputs: MutableMap<String, PropertyDefinition>? = null
45     var outputs: MutableMap<String, PropertyDefinition>? = null
46 }
47
48 class DSLComponent {
49     @get:JsonIgnore
50     lateinit var id: String
51     lateinit var type: String
52     lateinit var version: String
53     lateinit var description: String
54     var implementation: Implementation? = null
55     var attributes: MutableMap<String, AttributeDefinition>? = null
56     var properties: MutableMap<String, PropertyDefinition>? = null
57     var artifacts: MutableMap<String, ArtifactDefinition>? = null
58     var inputs: MutableMap<String, PropertyDefinition>? = null
59     var outputs: MutableMap<String, PropertyDefinition>? = null
60 }
61
62
63 class DSLRegistryComponent {
64     lateinit var id: String
65     lateinit var type: String
66     lateinit var version: String
67     lateinit var interfaceName: String
68     lateinit var description: String
69     var implementation: Implementation? = null
70     var properties: MutableMap<String, JsonNode>? = null
71     var artifacts: MutableMap<String, ArtifactDefinition>? = null
72     var inputs: MutableMap<String, JsonNode>? = null
73     var outputs: MutableMap<String, JsonNode>? = null
74 }