summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/artifact_types.json16
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/data_types.json3
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/node_types.json253
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/policy_types.json3
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/relationship_types.json3
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json1004
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json3663
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta4
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-mapping.json267
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-template.vtl (renamed from components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base_template.vtl)0
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-mapping.json781
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-template.vtl (renamed from components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw.vtl)0
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-mapping.json461
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-template.vtl (renamed from components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl)0
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-mapping.json808
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-template.vtl (renamed from components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg.vtl)0
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-mapping.json808
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-template.vtl (renamed from components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn.vtl)0
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json5
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/nf-role.json9
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json4
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json6
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json5
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json6
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/sec_group.json5
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json6
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json9
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vm-type.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json10
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json4
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json4
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application-dev.properties2
-rw-r--r--ms/blueprintsprocessor/application/src/test/resources/logback-test.xml2
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt14
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt137
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionResultService.kt23
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt19
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml3
-rw-r--r--ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt13
-rw-r--r--ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt2
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml11
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt3
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt25
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt24
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt118
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt141
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLBasicAuthRestClientService.kt72
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLRestClientService.kt125
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt172
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt305
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/resources/keystore.p12bin0 -> 2588 bytes
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt39
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt9
-rw-r--r--ms/controllerblueprints/application/src/test/resources/logback-test.xml (renamed from ms/controllerblueprints/application/src/test/resources/logback.xml)70
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt14
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml31
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ModelTypeLoadService.kt2
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ResourceDictionaryLoadService.kt11
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt17
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml (renamed from ms/controllerblueprints/modules/service/src/test/resources/logback.xml)9
71 files changed, 5627 insertions, 3987 deletions
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/artifact_types.json
new file mode 100644
index 000000000..da498e35e
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/artifact_types.json
@@ -0,0 +1,16 @@
+{
+ "artifact_types" : {
+ "artifact-mapping-resource" : {
+ "description" : "Resource Mapping File used along with Configuration template",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "json" ]
+ },
+ "artifact-template-velocity" : {
+ "description" : " Velocity Template used for Configuration",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "vtl" ]
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/data_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/data_types.json
new file mode 100644
index 000000000..8c304c40b
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/data_types.json
@@ -0,0 +1,3 @@
+{
+ "data_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/node_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/node_types.json
new file mode 100644
index 000000000..f94214ada
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/node_types.json
@@ -0,0 +1,253 @@
+{
+ "node_types" : {
+ "component-resource-resolution" : {
+ "description" : "This is Resource Assignment Component API",
+ "version" : "1.0.0",
+ "attributes" : {
+ "assignment-params" : {
+ "required" : true,
+ "type" : "string"
+ }
+ },
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
+ }
+ },
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "resolution-key" : {
+ "description" : "Key for service instance related correlation.",
+ "required" : false,
+ "type" : "string"
+ },
+ "store-result" : {
+ "description" : "Whether or not to store the output.",
+ "required" : false,
+ "type" : "boolean"
+ },
+ "resource-type" : {
+ "description" : "Request type.",
+ "required" : false,
+ "type" : "string"
+ },
+ "artifact-prefix-names" : {
+ "description" : "Template , Resource Assignment Artifact Prefix names",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "request-id" : {
+ "description" : "Request Id, Unique Id for the request.",
+ "required" : true,
+ "type" : "string"
+ },
+ "resource-id" : {
+ "description" : "Resource Id.",
+ "required" : false,
+ "type" : "string"
+ },
+ "action-name" : {
+ "description" : "Action Name of the process",
+ "required" : false,
+ "type" : "string"
+ },
+ "dynamic-properties" : {
+ "description" : "Dynamic Json Content or DSL Json reference.",
+ "required" : false,
+ "type" : "json"
+ }
+ },
+ "outputs" : {
+ "resource-assignment-params" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "status" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Component"
+ },
+ "source-capability" : {
+ "description" : "This is Component Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "script-type" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "kotlin", "internal", "jython" ]
+ } ],
+ "default" : "kotlin"
+ },
+ "script-class-reference" : {
+ "description" : "Capability reference name for internal and kotlin, for jython script file path",
+ "required" : true,
+ "type" : "string"
+ },
+ "instance-dependencies" : {
+ "description" : "Instance dependency Names to Inject to Kotlin / Jython Script.",
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "key-dependencies" : {
+ "description" : "Resource Resolution dependency dictionary names.",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "source-default" : {
+ "description" : "This is Default Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : { },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "source-input" : {
+ "description" : "This is Input Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : { },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "source-processor-db" : {
+ "description" : "This is Database Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "type" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "SQL", "PLSQL" ]
+ } ]
+ },
+ "endpoint-selector" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "query" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "input-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "output-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "source-rest" : {
+ "description" : "This is Rest Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "type" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "JSON" ]
+ } ],
+ "default" : "JSON"
+ },
+ "verb" : {
+ "required" : true,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "GET", "POST", "DELETE", "PUT" ]
+ } ],
+ "default" : "GET"
+ },
+ "payload" : {
+ "required" : false,
+ "type" : "string",
+ "default" : ""
+ },
+ "endpoint-selector" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "url-path" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "path" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "expression-type" : {
+ "required" : false,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "JSON_PATH", "JSON_POINTER" ]
+ } ],
+ "default" : "JSON_PATH"
+ },
+ "input-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "output-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "tosca.nodes.Component" : {
+ "description" : "This is default Component Node",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
+ "tosca.nodes.ResourceSource" : {
+ "description" : "TOSCA base type for Resource Sources",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/policy_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/policy_types.json
new file mode 100644
index 000000000..1e44cc70a
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/policy_types.json
@@ -0,0 +1,3 @@
+{
+ "policy_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/relationship_types.json
new file mode 100644
index 000000000..4ddd7a57c
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/relationship_types.json
@@ -0,0 +1,3 @@
+{
+ "relationship_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json
new file mode 100644
index 000000000..18d0acb4f
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json
@@ -0,0 +1,1004 @@
+{
+ "aic-cloud-region" : {
+ "tags" : "aic-cloud-region",
+ "name" : "aic-cloud-region",
+ "property" : {
+ "description" : "aic-cloud-region",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "image_name" : {
+ "tags" : "image_name",
+ "name" : "image_name",
+ "property" : {
+ "description" : "image_name",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/image_name",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "image_name" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "key_name" : {
+ "tags" : "key_name",
+ "name" : "key_name",
+ "property" : {
+ "description" : "key_name",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/key_name",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "key_name" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "nexus_artifact_repo" : {
+ "tags" : "nexus_artifact_repo",
+ "name" : "nexus_artifact_repo",
+ "property" : {
+ "description" : "nexus_artifact_repo",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "nf-role" : {
+ "tags" : "nf-role",
+ "name" : "nf-role",
+ "property" : {
+ "description" : "vnf/nf-role",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODEL.nf_role as vf_model_role from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnfmodelcustomizationuuid",
+ "input-key-mapping" : {
+ "vnfmodelcustomizationuuid" : "vnf-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "nf-role" : "vf_model_role"
+ },
+ "key-dependencies" : [ "vnf-model-customization-uuid" ]
+ }
+ }
+ }
+ },
+ "nfc-naming-code" : {
+ "tags" : "nfc-naming-code",
+ "name" : "nfc-naming-code",
+ "property" : {
+ "description" : "nfc-naming-code",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select nfc_naming_code as nfc_naming_code from sdnctl.VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping" : {
+ "vfccustomizationuuid" : "vfccustomizationuuid"
+ },
+ "output-key-mapping" : {
+ "nfc-naming-code" : "nfc_naming_code"
+ },
+ "key-dependencies" : [ "vfccustomizationuuid" ]
+ }
+ }
+ }
+ },
+ "onap_private_net_cidr" : {
+ "tags" : "onap_private_net_cidr",
+ "name" : "onap_private_net_cidr",
+ "property" : {
+ "description" : "onap_private_net_cidr",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private\"",
+ "output-key-mapping" : {
+ "onap_private_net_cidr" : "prefix"
+ }
+ }
+ }
+ }
+ },
+ "onap_private_net_id" : {
+ "tags" : "onap_private_net_id",
+ "name" : "onap_private_net_id",
+ "property" : {
+ "description" : "onap_private_net_id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_net_id",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "onap_private_net_id" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "onap_private_subnet_id" : {
+ "tags" : "onap_private_subnet_id",
+ "name" : "onap_private_subnet_id",
+ "property" : {
+ "description" : "onap_private_subnet_id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_subnet_id",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "onap_private_subnet_id" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "private-prefix-id" : {
+ "tags" : "private-prefix-id",
+ "name" : "private-prefix-id",
+ "property" : {
+ "description" : "private-prefix-id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private\"",
+ "output-key-mapping" : {
+ "private-prefix-id" : "prefix_id"
+ }
+ }
+ }
+ }
+ },
+ "protected-prefix-id" : {
+ "tags" : "protected-prefix-id",
+ "name" : "protected-prefix-id",
+ "property" : {
+ "description" : "protected-prefix-id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"protected\"",
+ "output-key-mapping" : {
+ "protected-prefix-id" : "prefix_id"
+ }
+ }
+ }
+ }
+ },
+ "protected_private_net_cidr" : {
+ "tags" : "protected_private_net_cidr",
+ "name" : "protected_private_net_cidr",
+ "property" : {
+ "description" : "protected_private_net_cidr",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"protected\"",
+ "output-key-mapping" : {
+ "protected_private_net_cidr" : "prefix"
+ }
+ }
+ }
+ }
+ },
+ "pub_key" : {
+ "tags" : "pub_key",
+ "name" : "pub_key",
+ "property" : {
+ "description" : "pub_key",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pub_key",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "pub_key" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "public_net_id" : {
+ "tags" : "public_net_id",
+ "name" : "public_net_id",
+ "property" : {
+ "description" : "public_net_id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "input" : {
+ "type" : "source-input"
+ }
+ }
+ },
+ "sec_group" : {
+ "tags" : "sec_group",
+ "name" : "sec_group",
+ "property" : {
+ "description" : "sec_group",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "service-instance-id" : {
+ "tags" : "service-instance-id, tosca.datatypes.Root, data_type",
+ "name" : "service-instance-id",
+ "property" : {
+ "description" : "To be provided",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "any-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "query" : "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+ "input-key-mapping" : { },
+ "output-key-mapping" : {
+ "service-instance-id" : "artifact_name"
+ }
+ }
+ },
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "query" : "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+ "input-key-mapping" : { },
+ "output-key-mapping" : {
+ "service-instance-id" : "artifact_name"
+ }
+ }
+ },
+ "capability" : {
+ "type" : "source-capability",
+ "properties" : {
+ "script-type" : "jython",
+ "script-class-reference" : "SampleRAProcessor",
+ "instance-dependencies" : [ ]
+ }
+ }
+ }
+ },
+ "unprotected-prefix-id" : {
+ "tags" : "unprotected-prefix-id",
+ "name" : "unprotected-prefix-id",
+ "property" : {
+ "description" : "unprotected-prefix-id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"unprotected\"",
+ "output-key-mapping" : {
+ "unprotected-prefix-id" : "prefix_id"
+ }
+ }
+ }
+ }
+ },
+ "unprotected_private_net_cidr" : {
+ "tags" : "unprotected_private_net_cidr",
+ "name" : "unprotected_private_net_cidr",
+ "property" : {
+ "description" : "unprotected_private_net_cidr",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"unprotected\"",
+ "output-key-mapping" : {
+ "unprotected_private_net_cidr" : "prefix"
+ }
+ }
+ }
+ }
+ },
+ "vf-module-id" : {
+ "tags" : "vf-module-id",
+ "name" : "vf-module-id",
+ "property" : {
+ "description" : "vf-module-id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vf-module-label" : {
+ "tags" : "vf-module-label",
+ "name" : "vf-module-label",
+ "property" : {
+ "description" : "vf-module-label",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping" : {
+ "customizationid" : "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-module-label" : "vf_module_label"
+ },
+ "key-dependencies" : [ "vf-module-model-customization-uuid" ]
+ }
+ }
+ }
+ },
+ "vf-module-model-customization-uuid" : {
+ "tags" : "vf-module-model-customization-uuid",
+ "name" : "vf-module-model-customization-uuid",
+ "property" : {
+ "description" : "vf-module-model-customization-uuid",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vf-module-type" : {
+ "tags" : "vf-module-type",
+ "name" : "vf-module-type",
+ "property" : {
+ "description" : "vf-module-type",
+ "type" : "string"
+ },
+ "updated-by" : "adetalhouet",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.demo.value as value from sdnctl.demo where sdnctl.demo.id=:vfmoduleid",
+ "input-key-mapping" : {
+ "vfmoduleid" : "vf-module-number"
+ },
+ "output-key-mapping" : {
+ "vf-module-type" : "value"
+ },
+ "key-dependencies" : [ "vf-module-number" ]
+ }
+ }
+ }
+ },
+ "vf-naming-policy" : {
+ "tags" : "vf-naming-policy",
+ "name" : "vf-naming-policy",
+ "property" : {
+ "description" : "vf-naming-policy",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid",
+ "input-key-mapping" : {
+ "vnf_model_customization_uuid" : "vnf-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-naming-policy" : "vf_naming_policy"
+ },
+ "key-dependencies" : [ "vnf-model-customization-uuid" ]
+ }
+ }
+ }
+ },
+ "vf-nf-code" : {
+ "tags" : "vf-nf-code",
+ "name" : "vf-nf-code",
+ "property" : {
+ "description" : "vf-nf-code",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODEL.nf_code as vf_nf_code from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping" : {
+ "customizationid" : "vnf-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vf-nf-code" : "vf_nf_code"
+ },
+ "key-dependencies" : [ "vnf-model-customization-uuid" ]
+ }
+ }
+ }
+ },
+ "vf_module_name" : {
+ "tags" : "vf_module_name",
+ "name" : "vf_module_name",
+ "property" : {
+ "description" : "vf_module_name",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vfccustomizationuuid" : {
+ "tags" : "vfccustomizationuuid, tosca.datatypes.Root, data_type",
+ "name" : "vfccustomizationuuid",
+ "property" : {
+ "description" : "vfccustomizationuuid",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select sdnctl.VF_MODULE_TO_VFC_MAPPING.vfc_customization_uuid as vnf_customid from sdnctl.VF_MODULE_TO_VFC_MAPPING where vm_count = 1 and sdnctl.VF_MODULE_TO_VFC_MAPPING.vf_module_customization_uuid=:vfmodulecustomizationuuid",
+ "input-key-mapping" : {
+ "vfmodulecustomizationuuid" : "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping" : {
+ "vfccustomizationuuid" : "vnf_customid"
+ },
+ "key-dependencies" : [ "vf-module-model-customization-uuid" ]
+ }
+ }
+ }
+ },
+ "vfw_name_0" : {
+ "tags" : "vfw_name_0",
+ "name" : "vfw_name_0",
+ "property" : {
+ "description" : "vfw_name_0",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vfw_private_ip_0" : {
+ "tags" : "vfw_private_ip_0",
+ "name" : "vfw_private_ip_0",
+ "property" : {
+ "description" : "vfw_private_ip_0",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_private_ip_0",
+ "path" : "/param/0/value",
+ "expression-type" : "JSON_POINTER",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vfw_private_ip_0" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "vfw_private_ip_1" : {
+ "tags" : "vfw_private_ip_1",
+ "name" : "vfw_private_ip_1",
+ "property" : {
+ "description" : "vfw_private_ip_1",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vfw_private_ip_1",
+ "path" : "/param/0/value",
+ "expression-type" : "JSON_POINTER",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vfw_private_ip_1" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "vfw_private_ip_2" : {
+ "tags" : "vfw_private_ip_2",
+ "name" : "vfw_private_ip_2",
+ "property" : {
+ "description" : "vfw_private_ip_2",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ }
+ }
+ },
+ "vm-type" : {
+ "tags" : "vm-type",
+ "name" : "vm-type",
+ "property" : {
+ "description" : "vm-type",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select VFC_MODEL.vm_type as vm_type from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping" : {
+ "vfccustomizationuuid" : "vfccustomizationuuid"
+ },
+ "output-key-mapping" : {
+ "vm-type" : "vm_type"
+ },
+ "key-dependencies" : [ "vfccustomizationuuid" ]
+ }
+ }
+ }
+ },
+ "vnf-id" : {
+ "tags" : "vnf-id",
+ "name" : "vnf-id",
+ "property" : {
+ "description" : "vnf-id",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vnf-model-customization-uuid" : {
+ "tags" : "vnf-model-customization-uuid",
+ "name" : "vnf-model-customization-uuid",
+ "property" : {
+ "description" : "vnf-model-customization-uuid",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vnf-name" : {
+ "tags" : "vnf-name, tosca.datatypes.Root, data_type",
+ "name" : "vnf-name",
+ "property" : {
+ "description" : "vnf-name",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
+ "path" : "/param/0/value",
+ "expression-type" : "JSON_POINTER",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vnf-name" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "vnf_name" : {
+ "tags" : "vnf_name",
+ "name" : "vnf_name",
+ "property" : {
+ "description" : "vnf_name",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "default" : {
+ "type" : "source-default",
+ "properties" : { }
+ },
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
+ "path" : "/param/0/value",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vnf_name" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "vnfc-model-invariant-uuid" : {
+ "tags" : "vnfc-model-invariant-uuid",
+ "name" : "vnfc-model-invariant-uuid",
+ "property" : {
+ "description" : "vnfc-model-invariant-uuid for SRIOV VPE template",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select VFC_MODEL.invariant_uuid as vfc_invariant_uuid from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping" : {
+ "vfccustomizationuuid" : "vfccustomizationuuid"
+ },
+ "output-key-mapping" : {
+ "vnfc-model-invariant-uuid" : "vfc_invariant_uuid"
+ },
+ "key-dependencies" : [ "vfccustomizationuuid" ]
+ }
+ }
+ }
+ },
+ "vnfc-model-version" : {
+ "tags" : "vnfc-model-version",
+ "name" : "vnfc-model-version",
+ "property" : {
+ "description" : "vnfc-model-version for SRIOV VPE template",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "processor-db" : {
+ "type" : "source-processor-db",
+ "properties" : {
+ "type" : "SQL",
+ "query" : "select VFC_MODEL.version as vnfc_model_version from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping" : {
+ "vfccustomizationuuid" : "vfccustomizationuuid"
+ },
+ "output-key-mapping" : {
+ "vnfc-model-version" : "vnfc_model_version"
+ },
+ "key-dependencies" : [ "vfccustomizationuuid" ]
+ }
+ }
+ }
+ },
+ "vpg_name_0" : {
+ "tags" : "vpg_name_0",
+ "name" : "vpg_name_0",
+ "property" : {
+ "description" : "vpg_name_0",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vpg_private_ip_0" : {
+ "tags" : "vpg_private_ip_0",
+ "name" : "vpg_private_ip_0",
+ "property" : {
+ "description" : "vpg_private_ip_0",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_private_ip_0",
+ "path" : "/param/0/value",
+ "expression-type" : "JSON_POINTER",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vpg_private_ip_0" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "vpg_private_ip_1" : {
+ "tags" : "vpg_private_ip_1",
+ "name" : "vpg_private_ip_1",
+ "property" : {
+ "description" : "vpg_private_ip_1",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vsn_name_0" : {
+ "tags" : "vsn_name_0",
+ "name" : "vsn_name_0",
+ "property" : {
+ "description" : "vsn_name_0",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ }
+ }
+ },
+ "vsn_private_ip_0" : {
+ "tags" : "vsn_private_ip_0",
+ "name" : "vsn_private_ip_0",
+ "property" : {
+ "description" : "vsn_private_ip_0",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input",
+ "properties" : { }
+ },
+ "primary-config-data" : {
+ "type" : "source-rest",
+ "properties" : {
+ "type" : "JSON",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vsn_private_ip_0",
+ "path" : "/param/0/value",
+ "expression-type" : "JSON_POINTER",
+ "input-key-mapping" : {
+ "service-instance-id" : "service-instance-id",
+ "vnf-id" : "vnf-id"
+ },
+ "output-key-mapping" : {
+ "vsn_private_ip_0" : "value"
+ },
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ }
+ }
+ }
+ },
+ "vsn_private_ip_1" : {
+ "tags" : "vsn_private_ip_1",
+ "name" : "vsn_private_ip_1",
+ "property" : {
+ "description" : "vsn_private_ip_1",
+ "type" : "string"
+ },
+ "updated-by" : "Singal, Kapil <ks220y@att.com>",
+ "sources" : {
+ "input" : {
+ "type" : "source-input"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
index e1d9be006..a4d90adfe 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
@@ -1,3613 +1,102 @@
{
"metadata": {
- "template_author": "aa0419",
+ "template_author": "Alexis de Talhouët",
+ "author-email": "adetalhouet89@gmail.com",
+ "user-groups": "ADMIN, OPERATION",
"template_name": "vFW_spinup",
"template_version": "1.0.0",
- "service-type": "vFW",
- "template_tags": "vFW, ONAP",
- "release": "1810",
- "vnf-type": "VFW"
+ "template_tags": "vFW"
},
"topology_template": {
- "inputs": {
- "request-id": {
- "required": true,
- "type": "string"
- },
- "service-instance-id": {
- "required": true,
- "type": "string"
- },
- "scope-type": {
- "required": true,
- "type": "string"
- },
- "action-name": {
- "required": true,
- "type": "string"
- },
- "hostname": {
- "required": true,
- "type": "string"
- },
- "resource-assignment-request": {
- "description": "This is Dynamic Data type for the receipe resource-assignment-action.",
- "required": false,
- "type": "dt-resource-assignment-request"
- }
- },
- "node_templates": {
- "resource-assignment-ra-component": {
- "type": "component-resource-assignment",
- "interfaces": {
- "ResourceAssignmentComponent": {
- "operations": {
- "process": {
- "inputs": {
- "action-name": "{ \"get_input\" : \"action-name\" }",
- "service-template-name": "{ \"get_attribute\" : \"service-template-name\" }",
- "template-names": [
- "vFW_vNF_Artifact",
- "base_template",
- "vfw",
- "vsn",
- "vpg"
- ],
- "service-template-version": "{ \"get_attribute\" : \"service-template-version\" }",
- "resource-type": "vnf-type",
- "request-id": "{ \"get_input\" : \"request-id\" }",
- "resource-id": "{ \"get_input\" : \"hostname\" }"
- },
- "outputs": {
- "resource-assignment-params": "Success",
- "status": "status"
- }
- }
+ "workflows": {
+ "resource-assignment": {
+ "steps": {
+ "resource-assignment": {
+ "description": "Resource Assign Workflow",
+ "target": "resource-assignment"
+ }
+ },
+ "inputs" : {
+ "template-prefix" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "outputs": {
+ "meshed-template": {
+ "type": "json",
+ "value": {
+ "get_attribute": [
+ "resource-assignment",
+ "assignment-params"
+ ]
}
}
- },
- "capabilities": {
- "component-node": {
-
- }
}
- },
- "resource-assignment-action": {
- "type": "dg-resource-assignment",
- "properties": {
- "mode": "sync",
- "version": "LATEST",
- "is-start-flow": false
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignment": {
- "inputs": {
- "params": [
-
- ]
+ }
+ },
+ "node_templates": {
+ "resource-assignment" : {
+ "type" : "component-resource-resolution",
+ "interfaces" : {
+ "ResourceResolutionComponent" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "artifact-prefix-names" : {
+ "get_input" : "artifact-name"
+ }
}
}
}
}
},
- "capabilities": {
- "dg-node": {
-
+ "artifacts": {
+ "base-template": {
+ "type": "artifact-template-velocity",
+ "file": "Templates/base-template.vtl"
},
- "content": {
- "properties": {
- "type": "json"
- }
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "resource-assignment-ra-component",
- "relationship": "tosca.relationships.DependsOn"
- }
- }
- },
- "vFW_vNF_Artifact": {
- "type": "artifact-config-template",
- "properties": {
- "action-names": [
- "resource-assignment-action"
- ]
- },
- "capabilities": {
- "content": {
- "properties": {
- "content": "vFW_vNF_Artifact"
- }
+ "base-mapping": {
+ "type": "artifact-mapping-resource",
+ "file": "Templates/base-mapping.json"
},
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "service-instance-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "service-instance-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "aic-cloud-region",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "aic-cloud-region",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "onap_private_subnet_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "key_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "key_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "image_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "Ubuntu 14.04 LTS Generic"
- },
- "input-param": false,
- "dictionary-name": "image_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "pub_key",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
- },
- "input-param": false,
- "dictionary-name": "pub_key",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-naming-policy",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "SDNC_Policy.Config_MS_ONAP_VFW_NAMING_TIMESTAMP"
- },
- "input-param": false,
- "dictionary-name": "vf-naming-policy",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "nf-role",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "nf-role",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vnf-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "vfw_private_ip_1",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfw_private_ip_1",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfw_private_ip_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfw_private_ip_0",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vpg_private_ip_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vpg_private_ip_0",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vsn_private_ip_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vsn_private_ip_0",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "protected-prefix-id",
- "property": {
- "description": "",
- "required": false,
- "type": "integer",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "protected-prefix-id",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "unprotected-prefix-id",
- "property": {
- "description": "",
- "required": false,
- "type": "integer",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "unprotected-prefix-id",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-nf-code",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-nf-code",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vnf-model-customization-uuid"
- ],
- "version": 0
- }
- ]
- }
- }
- }
- },
- "vfw": {
- "type": "artifact-config-template",
- "capabilities": {
- "content": {
- "properties": {
- "content": "vfw"
- }
+ "vfw-template": {
+ "type": "artifact-template-velocity",
+ "file": "Templates/vfw-template.vtl"
},
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "service-instance-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "service-instance-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-name",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "vnf-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-type",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-type",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "vf-module-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfccustomizationuuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfccustomizationuuid",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "aic-cloud-region",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "aic-cloud-region",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vm-type",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vm-type",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnfc-model-invariant-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnfc-model-invariant-uuid",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "vnfc-model-version",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnfc-model-version",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "nf-role",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "vFW"
- },
- "input-param": false,
- "dictionary-name": "nf-role",
- "dictionary-source": "default",
- "dependencies": [
- "vnf-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "nfc-naming-code",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "nfc-naming-code",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "public_net_id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "public_net_id"
- },
- "input-param": false,
- "dictionary-name": "public_net_id",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "image_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "image_name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "key_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "key_name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "pub_key",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "pub_key",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_id",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "onap_private_subnet_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "unprotected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "unprotected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "protected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "protected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "nexus_artifact_repo",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "nexus_artifact_repo"
- },
- "input-param": false,
- "dictionary-name": "nexus_artifact_repo",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "sec_group",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "onap_sg_PUhf"
- },
- "input-param": false,
- "dictionary-name": "sec_group",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfw_name_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfw_name_0",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-naming-policy",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "SDNC_Policy.Config_MS_ONAP_VFW_NAMING_TIMESTAMP"
- },
- "input-param": false,
- "dictionary-name": "vf-naming-policy",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf_module_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf_module_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-label",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-label",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "private-prefix-id",
- "property": {
- "description": "",
- "required": false,
- "type": "integer",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "private-prefix-id",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfw_private_ip_2",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfw_private_ip_2",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- }
- ]
- }
- }
- }
- },
- "vpg": {
- "type": "artifact-config-template",
- "capabilities": {
- "content": {
- "properties": {
- "content": "vpg"
- }
+ "vfw-mapping": {
+ "type": "artifact-mapping-resource",
+ "file": "Templates/vfw-mapping.json"
},
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "service-instance-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "service-instance-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-name",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "vnf-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-type",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-type",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "vf-module-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfccustomizationuuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfccustomizationuuid",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "aic-cloud-region",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "aic-cloud-region",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vm-type",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vm-type",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnfc-model-invariant-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnfc-model-invariant-uuid",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "vnfc-model-version",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnfc-model-version",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "nf-role",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "vPG"
- },
- "input-param": false,
- "dictionary-name": "nf-role",
- "dictionary-source": "default",
- "dependencies": [
- "vnf-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "nfc-naming-code",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "nfc-naming-code",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "public_net_id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "public_net_id"
- },
- "input-param": false,
- "dictionary-name": "public_net_id",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "image_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "image_name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "key_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "key_name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "pub_key",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "pub_key",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_id",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "onap_private_subnet_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "unprotected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "unprotected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfw_private_ip_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfw_private_ip_0",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "vsn_private_ip_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vsn_private_ip_0",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "nexus_artifact_repo",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "nexus_artifact_repo"
- },
- "input-param": false,
- "dictionary-name": "nexus_artifact_repo",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "sec_group",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "onap_sg_PUhf"
- },
- "input-param": false,
- "dictionary-name": "sec_group",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vpg_private_ip_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vpg_private_ip_0",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "vpg_name_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vpg_name_0",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-naming-policy",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "SDNC_Policy.Config_MS_ONAP_VPG_NAMING_TIMESTAMP"
- },
- "input-param": false,
- "dictionary-name": "vf-naming-policy",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf_module_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf_module_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-label",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-label",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "private-prefix-id",
- "property": {
- "description": "",
- "required": false,
- "type": "integer",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "private-prefix-id",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vpg_private_ip_1",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vpg_private_ip_1",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- }
- ]
- }
- }
- }
- },
- "vsn": {
- "type": "artifact-config-template",
- "capabilities": {
- "content": {
- "properties": {
- "content": "vsn"
- }
+ "vfw-vnf-template": {
+ "type": "artifact-template-velocity",
+ "file": "Templates/vfw-vnf-template.vtl"
},
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "service-instance-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "service-instance-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-name",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "vnf-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-type",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-type",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "vf-module-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfccustomizationuuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfccustomizationuuid",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "aic-cloud-region",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "aic-cloud-region",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vm-type",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vm-type",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnfc-model-invariant-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnfc-model-invariant-uuid",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "vnfc-model-version",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnfc-model-version",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "nf-role",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "vSN"
- },
- "input-param": false,
- "dictionary-name": "nf-role",
- "dictionary-source": "default",
- "dependencies": [
- "vnf-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "nfc-naming-code",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "nfc-naming-code",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vfccustomizationuuid"
- ],
- "version": 0
- },
- {
- "name": "image_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "image_name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "public_net_id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "value": "public_net_id",
- "default": "public_net_id"
- },
- "input-param": false,
- "dictionary-name": "public_net_id",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "key_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "key_name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "pub_key",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "pub_key",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_id",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "onap_private_subnet_id",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "unprotected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "unprotected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "protected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "protected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "onap_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "onap_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "nexus_artifact_repo",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "value": "nexus_artifact_repo",
- "default": "nexus_artifact_repo"
- },
- "input-param": false,
- "dictionary-name": "nexus_artifact_repo",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "sec_group",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "onap_sg_PUhf"
- },
- "input-param": false,
- "dictionary-name": "sec_group",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vfw_private_ip_1",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vfw_private_ip_1",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "vsn_name_0",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vsn_name_0",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-naming-policy",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- },
- "default": "SDNC_Policy.Config_MS_ONAP_VSN_NAMING_TIMESTAMP"
- },
- "input-param": false,
- "dictionary-name": "vf-naming-policy",
- "dictionary-source": "default",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf_module_name",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf_module_name",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-label",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-label",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "private-prefix-id",
- "property": {
- "description": "",
- "required": false,
- "type": "integer",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "private-prefix-id",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vsn_private_ip_1",
- "property": {
- "description": "",
- "required": false,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vsn_private_ip_1",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "protected-prefix-id",
- "property": {
- "description": "",
- "required": false,
- "type": "integer",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "protected-prefix-id",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- }
- ]
- }
- }
- }
- },
- "base_template": {
- "type": "artifact-config-template",
- "capabilities": {
- "content": {
- "properties": {
- "content": "base_template"
- }
+ "vfw-vnf-mapping": {
+ "type": "artifact-mapping-resource",
+ "file": "Templates/vfw-vnf-mapping.json"
},
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "service-instance-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "service-instance-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-type",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-type",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vf-module-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "vf-module-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vf-module-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vf-module-id",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "vnf-model-customization-uuid",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-model-customization-uuid",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "aic-cloud-region",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "aic-cloud-region",
- "dictionary-source": "input",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "nf-role",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "nf-role",
- "dictionary-source": "primary-db",
- "dependencies": [
- "vnf-model-customization-uuid"
- ],
- "version": 0
- },
- {
- "name": "vnf-name",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "vnf-name",
- "dictionary-source": "primary-config-data",
- "dependencies": [
- "service-instance-id",
- "vnf-id"
- ],
- "version": 0
- },
- {
- "name": "unprotected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "unprotected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- },
- {
- "name": "protected_private_net_cidr",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": false,
- "dictionary-name": "protected_private_net_cidr",
- "dictionary-source": "primary-db",
- "dependencies": [
-
- ],
- "version": 0
- }
- ]
- }
+ "vpg-template": {
+ "type": "artifact-template-velocity",
+ "file": "Templates/vpg-template.vtl"
+ },
+ "vpg-mapping": {
+ "type": "artifact-mapping-resource",
+ "file": "Templates/vpg-mapping.json"
+ },
+ "vsn-template": {
+ "type": "artifact-template-velocity",
+ "file": "Templates/vsn-template.vtl"
+ },
+ "vsn-mapping": {
+ "type": "artifact-mapping-resource",
+ "file": "Templates/vsn-mapping.json"
}
}
}
}
- },
- "node_types": {
- "tosca.nodes.Component": {
- "description": "This is default Component Node",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
- },
- "tosca.nodes.Workflow": {
- "description": "This is Directed Graph Node Type",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
- },
- "tosca.nodes.Artifact": {
- "description": "This is Deprecated Artifact Node Type.",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
- },
- "component-resource-assignment": {
- "description": "This is Resource Assignment Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "ResourceAssignmentComponent": {
- "operations": {
- "process": {
- "inputs": {
- "action-name": {
- "description": "Action Name of the process",
- "required": true,
- "type": "string"
- },
- "service-template-name": {
- "description": "Service Template Name.",
- "required": true,
- "type": "string"
- },
- "service-template-version": {
- "description": "Service Template Version.",
- "required": true,
- "type": "string"
- },
- "resource-type": {
- "description": "Request type.",
- "required": true,
- "type": "string"
- },
- "template-names": {
- "description": "Name of the artifact Node Templates, to get the template Content.",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "request-id": {
- "description": "Request Id, Unique Id for the request.",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Resource Id.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "resource-assignment-params": {
- "required": true,
- "type": "string"
- },
- "status": {
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
- },
- "dg-resource-assignment": {
- "description": "This is Resource Assignment Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": "false"
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- },
- "content": {
- "type": "tosca.capabilities.Content",
- "properties": {
- "type": {
- "required": false,
- "type": "string",
- "default": "json"
- },
- "content": {
- "required": false,
- "type": "string"
- }
- }
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-resource-assignment",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignment": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Workflow"
- },
- "artifact-config-template": {
- "description": "This is Configuration Velocity Template",
- "version": "1.0.0",
- "properties": {
- "action-names": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
- "capabilities": {
- "content": {
- "type": "tosca.capabilities.Content",
- "properties": {
- "content": {
- "required": true,
- "type": "string"
- }
- }
- },
- "mapping": {
- "type": "tosca.capabilities.Mapping",
- "properties": {
- "mapping": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-resource-assignment"
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Artifact"
- }
- },
- "data_types": {
- "datatype-property": {
- "version": "1.0.0",
- "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",
- "properties": {
- "type": {
- "required": true,
- "type": "string"
- },
- "description": {
- "required": false,
- "type": "string"
- },
- "required": {
- "required": false,
- "type": "boolean"
- },
- "default": {
- "required": false,
- "type": "string"
- },
- "entry_schema": {
- "required": false,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
- },
- "datatype-resource-assignment": {
- "version": "1.0.0",
- "description": "This is Resource Assignment Data Type",
- "properties": {
- "property": {
- "required": true,
- "type": "datatype-property"
- },
- "input-param": {
- "required": true,
- "type": "boolean"
- },
- "dictionary-name": {
- "required": false,
- "type": "string"
- },
- "dictionary-source": {
- "required": false,
- "type": "string"
- },
- "dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "status": {
- "required": false,
- "type": "string"
- },
- "message": {
- "required": false,
- "type": "string"
- },
- "updated-date": {
- "required": false,
- "type": "string"
- },
- "updated-by": {
- "required": false,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
- },
- "dt-resource-assignment-request": {
- "version": "1.0.0",
- "description": "This is Dynamic Data type definition generated from resource mapping for the config template name activate-template.",
- "properties": {
- "password-user-ftap-nsm": {
- "required": true,
- "type": "string",
- "default": "password-user-ftap"
- },
- "reservation-id": {
- "required": true,
- "type": "string",
- "value": "123"
- },
- "security-manager-resource-key": {
- "required": true,
- "type": "string",
- "value": "sdnc"
- },
- "password-user-ftap": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [
- {
-
- }
- ],
- "entry_schema": {
- "type": ""
- }
- }
- },
- "derived_from": "tosca.datatypes.Dynamic"
- }
}
} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta
index 7918c1159..edbb54e2d 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta
@@ -1,6 +1,6 @@
TOSCA-Meta-File-Version: 1.0.0
CSAR-Version: 1.0
-Created-By: ONAP
+Created-By: Alexis de Talhouët
Entry-Definitions: Definitions/vFW_spinup.json
-Template-Tags: ONAP, vFW
+Template-Tags: test
Content-Type: application/vnd.oasis.bpmn
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-mapping.json
new file mode 100644
index 000000000..258174882
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-mapping.json
@@ -0,0 +1,267 @@
+[
+ {
+ "name": "service-instance-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-type",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "aic-cloud-region",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "aic-cloud-region",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "nf-role",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "nf-role",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-name",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "unprotected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "unprotected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "protected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "protected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ }
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base_template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-template.vtl
index 271c50738..271c50738 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base_template.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base-template.vtl
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-mapping.json
new file mode 100644
index 000000000..c07007cbc
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-mapping.json
@@ -0,0 +1,781 @@
+[
+ {
+ "name": "service-instance-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-name",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-type",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfccustomizationuuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfccustomizationuuid",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "aic-cloud-region",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "aic-cloud-region",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vm-type",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vm-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnfc-model-invariant-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnfc-model-invariant-uuid",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnfc-model-version",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnfc-model-version",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nf-role",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "vFW"
+ },
+ "input-param": false,
+ "dictionary-name": "nf-role",
+ "dictionary-source": "default",
+ "dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nfc-naming-code",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "nfc-naming-code",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "public_net_id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "public_net_id"
+ },
+ "input-param": false,
+ "dictionary-name": "public_net_id",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "image_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "image_name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "key_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "key_name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "pub_key",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "pub_key",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_subnet_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_subnet_id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "unprotected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "unprotected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "protected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "protected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "nexus_artifact_repo",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "nexus_artifact_repo"
+ },
+ "input-param": false,
+ "dictionary-name": "nexus_artifact_repo",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "sec_group",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "onap_sg_PUhf"
+ },
+ "input-param": false,
+ "dictionary-name": "sec_group",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfw_name_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfw_name_0",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-naming-policy",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "SDNC_Policy.Config_MS_ONAP_VFW_NAMING_TIMESTAMP"
+ },
+ "input-param": false,
+ "dictionary-name": "vf-naming-policy",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf_module_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf_module_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-label",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-label",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "private-prefix-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "integer",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "private-prefix-id",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfw_private_ip_2",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfw_private_ip_2",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ }
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-template.vtl
index 6864a36fe..6864a36fe 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-template.vtl
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-mapping.json
new file mode 100644
index 000000000..d764572e4
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-mapping.json
@@ -0,0 +1,461 @@
+[
+ {
+ "name": "service-instance-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "aic-cloud-region",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "aic-cloud-region",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_subnet_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_subnet_id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "key_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "key_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "image_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "Ubuntu 14.04 LTS Generic"
+ },
+ "input-param": false,
+ "dictionary-name": "image_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "pub_key",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
+ },
+ "input-param": false,
+ "dictionary-name": "pub_key",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-naming-policy",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "SDNC_Policy.Config_MS_ONAP_VFW_NAMING_TIMESTAMP"
+ },
+ "input-param": false,
+ "dictionary-name": "vf-naming-policy",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "nf-role",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "nf-role",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfw_private_ip_1",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfw_private_ip_1",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfw_private_ip_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfw_private_ip_0",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vpg_private_ip_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vpg_private_ip_0",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vsn_private_ip_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vsn_private_ip_0",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "protected-prefix-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "integer",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "protected-prefix-id",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "unprotected-prefix-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "integer",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "unprotected-prefix-id",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-nf-code",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-nf-code",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "version": 0
+ }
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-template.vtl
index f7947ef8f..f7947ef8f 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw-vnf-template.vtl
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-mapping.json
new file mode 100644
index 000000000..d3cfdebf8
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-mapping.json
@@ -0,0 +1,808 @@
+[
+ {
+ "name": "service-instance-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-name",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-type",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfccustomizationuuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfccustomizationuuid",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "aic-cloud-region",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "aic-cloud-region",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vm-type",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vm-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnfc-model-invariant-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnfc-model-invariant-uuid",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnfc-model-version",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnfc-model-version",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nf-role",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "vPG"
+ },
+ "input-param": false,
+ "dictionary-name": "nf-role",
+ "dictionary-source": "default",
+ "dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nfc-naming-code",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "nfc-naming-code",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "public_net_id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "public_net_id"
+ },
+ "input-param": false,
+ "dictionary-name": "public_net_id",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "image_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "image_name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "key_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "key_name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "pub_key",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "pub_key",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_subnet_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_subnet_id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "unprotected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "unprotected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfw_private_ip_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfw_private_ip_0",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vsn_private_ip_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vsn_private_ip_0",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nexus_artifact_repo",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "nexus_artifact_repo"
+ },
+ "input-param": false,
+ "dictionary-name": "nexus_artifact_repo",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "sec_group",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "onap_sg_PUhf"
+ },
+ "input-param": false,
+ "dictionary-name": "sec_group",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vpg_private_ip_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vpg_private_ip_0",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vpg_name_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vpg_name_0",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-naming-policy",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "SDNC_Policy.Config_MS_ONAP_VPG_NAMING_TIMESTAMP"
+ },
+ "input-param": false,
+ "dictionary-name": "vf-naming-policy",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf_module_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf_module_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-label",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-label",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "private-prefix-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "integer",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "private-prefix-id",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vpg_private_ip_1",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vpg_private_ip_1",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ }
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-template.vtl
index 2ff6596ee..2ff6596ee 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg-template.vtl
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-mapping.json
new file mode 100644
index 000000000..84bc73185
--- /dev/null
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-mapping.json
@@ -0,0 +1,808 @@
+[
+ {
+ "name": "service-instance-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-name",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnf-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-id",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-type",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-model-customization-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-model-customization-uuid",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfccustomizationuuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfccustomizationuuid",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "aic-cloud-region",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "aic-cloud-region",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vm-type",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vm-type",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnfc-model-invariant-uuid",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnfc-model-invariant-uuid",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vnfc-model-version",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vnfc-model-version",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nf-role",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "vSN"
+ },
+ "input-param": false,
+ "dictionary-name": "nf-role",
+ "dictionary-source": "default",
+ "dependencies": [
+ "vnf-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "nfc-naming-code",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "nfc-naming-code",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vfccustomizationuuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "image_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "image_name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "public_net_id",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "value": "public_net_id",
+ "default": "public_net_id"
+ },
+ "input-param": false,
+ "dictionary-name": "public_net_id",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "key_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "key_name",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "pub_key",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "pub_key",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_subnet_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_subnet_id",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "unprotected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "unprotected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "protected_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "protected_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "onap_private_net_cidr",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "onap_private_net_cidr",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "nexus_artifact_repo",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "value": "nexus_artifact_repo",
+ "default": "nexus_artifact_repo"
+ },
+ "input-param": false,
+ "dictionary-name": "nexus_artifact_repo",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "sec_group",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "onap_sg_PUhf"
+ },
+ "input-param": false,
+ "dictionary-name": "sec_group",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vfw_private_ip_1",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vfw_private_ip_1",
+ "dictionary-source": "primary-config-data",
+ "dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ],
+ "version": 0
+ },
+ {
+ "name": "vsn_name_0",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vsn_name_0",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-naming-policy",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "SDNC_Policy.Config_MS_ONAP_VSN_NAMING_TIMESTAMP"
+ },
+ "input-param": false,
+ "dictionary-name": "vf-naming-policy",
+ "dictionary-source": "default",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf_module_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf_module_name",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vf-module-label",
+ "property": {
+ "description": "",
+ "required": true,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-label",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+ "vf-module-model-customization-uuid"
+ ],
+ "version": 0
+ },
+ {
+ "name": "private-prefix-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "integer",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "private-prefix-id",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "vsn_private_ip_1",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vsn_private_ip_1",
+ "dictionary-source": "input",
+ "dependencies": [
+
+ ],
+ "version": 0
+ },
+ {
+ "name": "protected-prefix-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "integer",
+ "status": "",
+ "constraints": [
+ {
+
+ }
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "protected-prefix-id",
+ "dictionary-source": "processor-db",
+ "dependencies": [
+
+ ],
+ "version": 0
+ }
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-template.vtl
index 11fcea9fd..11fcea9fd 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn-template.vtl
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json b/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json
index 6b0a79e03..8b8884200 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json
@@ -7,6 +7,11 @@
"type" : "string"
},
"sources" : {
+ "default": {
+ "type": "source-default",
+ "properties": {
+ }
+ },
"input" : {
"type" : "source-input",
"properties" : {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json b/components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json
index 6da5ea22f..a26b82ff2 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json
@@ -7,8 +7,13 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "default": {
+ "type": "source-default",
+ "properties": {
+ }
+ },
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.VF_MODEL.nf_role as vf_model_role from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnfmodelcustomizationuuid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json b/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json
index 4e1ba2b0a..710042d5f 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select nfc_naming_code as nfc_naming_code from sdnctl.VFC_MODEL where customization_uuid=:vfccustomizationuuid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json
index 42765ee94..559ec3e81 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private\"",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json
index 26e62e85d..adba4ce3a 100644
--- a/components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json
@@ -1,5 +1,5 @@
{
- "name": "primary-db-source",
+ "name": "processor-db-source",
"property" :{
"description": "name of the ",
"type": "string"
@@ -7,8 +7,8 @@
"updated-by": "brindasanth@onap.com",
"tags": "bundle-id, brindasanth@onap.com",
"sources": {
- "primary-db": {
- "type": "source-primary-db",
+ "processor-db": {
+ "type": "source-processor-db",
"properties": {
"query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",
"input-key-mapping": {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json
index 0685401d3..3365d6685 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private\"",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json
index f6120f3fd..8ddf98737 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"protected\"",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json
index bb477dcb6..ac12ad28f 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"protected\"",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json
index 6cc9c2e38..a4fbc9573 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json
@@ -7,6 +7,11 @@
"description" : "public_net_id"
},
"sources": {
+ "default": {
+ "type": "source-default",
+ "properties": {
+ }
+ },
"input": {
"type": "source-input"
}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json
index 656841f2e..c9544edad 100644
--- a/components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json
@@ -5,10 +5,10 @@
"type": "string"
},
"updated-by": "brindasanth@onap.com",
- "tags": "primary-db-source, brindasanth@onap.com",
+ "tags": "processor-db-source, brindasanth@onap.com",
"sources": {
- "primary-db": {
- "type": "source-primary-db",
+ "processor-db": {
+ "type": "source-processor-db",
"properties": {
"query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",
"input-key-mapping": {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json b/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json
index 017ba984d..38f07e85d 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json
@@ -7,6 +7,11 @@
"type" : "string"
},
"sources" : {
+ "default": {
+ "type": "source-default",
+ "properties": {
+ }
+ },
"input" : {
"type" : "source-input",
"properties" : {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json
index 737c7577b..4aa022379 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json
@@ -12,7 +12,7 @@
"properties" : { }
},
"any-db": {
- "type": "source-primary-db",
+ "type": "source-processor-db",
"properties": {
"query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
"input-key-mapping": {
@@ -22,8 +22,8 @@
}
}
},
- "primary-db": {
- "type": "source-primary-db",
+ "processor-db": {
+ "type": "source-processor-db",
"properties": {
"query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
"input-key-mapping": {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json
index c1fc541bd..7d3475d8c 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"unprotected\"",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json
index 604875500..60b846d7b 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"unprotected\"",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json
index faa7ea49e..e17de2bd9 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json
index dbd51bbd9..abbe8172e 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select vf_module_type as vf_module_type from sdnctl.VF_MODULE_MODEL where customization_uuid=:customizationid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json
index 70792f86f..cae11172c 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json
@@ -7,8 +7,13 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "default": {
+ "type": "source-default",
+ "properties": {
+ }
+ },
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json
index a21982c0c..2f839ac88 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.VF_MODEL.nf_code as vf_nf_code from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:customizationid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json
index 9f3e7cf17..7ed76745d 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select sdnctl.VF_MODULE_TO_VFC_MAPPING.vfc_customization_uuid as vnf_customid from sdnctl.VF_MODULE_TO_VFC_MAPPING where vm_count = 1 and sdnctl.VF_MODULE_TO_VFC_MAPPING.vf_module_customization_uuid=:vfmodulecustomizationuuid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json b/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
index 9744316c0..a0bb60743 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select VFC_MODEL.vm_type as vm_type from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json
index e9d8a3b48..2174914e8 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json
@@ -7,6 +7,16 @@
"type" : "string"
},
"sources" : {
+ "default": {
+ "type": "source-default",
+ "properties": {
+ }
+ },
+ "input": {
+ "type": "source-input",
+ "properties": {
+ }
+ },
"primary-config-data" : {
"type" : "source-rest",
"properties" : {
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json
index 3d89d9dd2..40604ccdd 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select VFC_MODEL.invariant_uuid as vfc_invariant_uuid from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json
index d7fb50169..75bb2e5d2 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json
@@ -7,8 +7,8 @@
"type" : "string"
},
"sources" : {
- "primary-db" : {
- "type" : "source-primary-db",
+ "processor-db" : {
+ "type" : "source-processor-db",
"properties" : {
"type" : "SQL",
"query" : "select VFC_MODEL.version as vnfc_model_version from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
index 7ed4cc942..fc148bf49 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
@@ -20,7 +20,7 @@
# Web server config
server.port=8080
-blueprintsprocessor.grpcEnable=true
+blueprintsprocessor.grpcEnable=false
blueprintsprocessor.httpPort=8080
blueprintsprocessor.grpcPort=9111
diff --git a/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
index 0c8d93bf0..16e7d3d1b 100644
--- a/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
+++ b/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
@@ -19,7 +19,7 @@
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>
+ <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
</encoder>
</appender>
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
index 4b08ce8e2..be7451aa9 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
@@ -1,5 +1,6 @@
/*
* Copyright © 2018-2019 IBM, Bell Canada.
+ * Modifications Copyright © 2019 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import com.fasterxml.jackson.databind.JsonNode
+import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
@@ -38,17 +40,17 @@ abstract class NetconfComponentFunction : AbstractScriptComponentFunction() {
return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
}
- fun resolveFromDatabase(resolutionKey: String, artifactName: String): String {
- return resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
+ fun resolveFromDatabase(resolutionKey: String, artifactName: String): String = runBlocking {
+ resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
}
- fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String {
- return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
+ fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String = runBlocking {
+ resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
artifactMapping, artifactTemplate)
}
- fun resolveAndGenerateMessage(artifactPrefix: String): String {
- return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
+ fun resolveAndGenerateMessage(artifactPrefix: String): String = runBlocking {
+ resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
artifactPrefix, mapOf())
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
index dad804692..8a14ded61 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
@@ -1,6 +1,6 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Modifications Copyright © 2018-2019 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import kotlinx.coroutines.runBlocking
+import kotlinx.coroutines.async
+import kotlinx.coroutines.awaitAll
+import kotlinx.coroutines.coroutineScope
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolutionResultService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
@@ -39,22 +41,22 @@ interface ResourceResolutionService {
fun registeredResourceSources(): List<String>
- fun resolveFromDatabase(bluePrintRuntimeService: BluePrintRuntimeService<*>, artifactTemplate: String,
- resolutionKey: String): String
+ suspend fun resolveFromDatabase(bluePrintRuntimeService: BluePrintRuntimeService<*>, artifactTemplate: String,
+ resolutionKey: String): String
- fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
- artifactNames: List<String>, properties: Map<String, Any>): MutableMap<String, String>
+ suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
+ artifactNames: List<String>, properties: Map<String, Any>): MutableMap<String, String>
- fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
- artifactPrefix: String, properties: Map<String, Any>): String
+ suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
+ artifactPrefix: String, properties: Map<String, Any>): String
- fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
- artifactMapping: String, artifactTemplate: String?): String
+ suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
+ artifactMapping: String, artifactTemplate: String?): String
- fun resolveResourceAssignments(blueprintRuntimeService: BluePrintRuntimeService<*>,
- resourceDictionaries: MutableMap<String, ResourceDefinition>,
- resourceAssignments: MutableList<ResourceAssignment>,
- identifierName: String)
+ suspend fun resolveResourceAssignments(blueprintRuntimeService: BluePrintRuntimeService<*>,
+ resourceDictionaries: MutableMap<String, ResourceDefinition>,
+ resourceAssignments: MutableList<ResourceAssignment>,
+ identifierName: String)
}
@Service(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
@@ -70,9 +72,15 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
.map { it.substringAfter(ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR) }
}
- override fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
- artifactNames: List<String>,
- properties: Map<String, Any>): MutableMap<String, String> {
+ override suspend fun resolveFromDatabase(bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ artifactTemplate: String,
+ resolutionKey: String): String {
+ return resolutionResultService.read(bluePrintRuntimeService, artifactTemplate, resolutionKey)
+ }
+
+ override suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
+ artifactNames: List<String>,
+ properties: Map<String, Any>): MutableMap<String, String> {
val resolvedParams: MutableMap<String, String> = hashMapOf()
artifactNames.forEach { artifactName ->
@@ -82,8 +90,8 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
return resolvedParams
}
- override fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
- artifactPrefix: String, properties: Map<String, Any>): String {
+ override suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
+ artifactPrefix: String, properties: Map<String, Any>): String {
// Velocity Artifact Definition Name
val artifactTemplate = "$artifactPrefix-template"
@@ -95,20 +103,17 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
if (properties.containsKey(ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_STORE_RESULT)
&& properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_STORE_RESULT] as Boolean) {
resolutionResultService.write(properties, result, bluePrintRuntimeService, artifactPrefix)
+ log.info("resolution saved into database successfully : ($properties)")
}
return result
}
- override fun resolveFromDatabase(bluePrintRuntimeService: BluePrintRuntimeService<*>, artifactTemplate: String,
- resolutionKey: String): String {
- return resolutionResultService.read(bluePrintRuntimeService, artifactTemplate, resolutionKey)
- }
- override fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
- artifactMapping: String, artifactTemplate: String?): String {
+ override suspend fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
+ artifactMapping: String, artifactTemplate: String?): String {
- var resolvedContent = ""
+ val resolvedContent: String
log.info("Resolving resource for template artifact($artifactTemplate) with resource assignment artifact($artifactMapping)")
val identifierName = artifactTemplate ?: "no-template"
@@ -128,7 +133,6 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
val resourceDictionaries: MutableMap<String, ResourceDefinition> =
JacksonUtils.getMapFromFile(dictionaryFile, ResourceDefinition::class.java)
- ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
// Resolve resources
resolveResourceAssignments(bluePrintRuntimeService, resourceDictionaries, resourceAssignments, identifierName)
@@ -153,46 +157,51 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
* name, then get the type of the Resource Definition, Get the instance for the Resource Type and process the
* request.
*/
- override fun resolveResourceAssignments(blueprintRuntimeService: BluePrintRuntimeService<*>,
- resourceDictionaries: MutableMap<String, ResourceDefinition>,
- resourceAssignments: MutableList<ResourceAssignment>,
- identifierName: String) {
+ override suspend fun resolveResourceAssignments(blueprintRuntimeService: BluePrintRuntimeService<*>,
+ resourceDictionaries: MutableMap<String, ResourceDefinition>,
+ resourceAssignments: MutableList<ResourceAssignment>,
+ identifierName: String) {
val bulkSequenced = BulkResourceSequencingUtils.process(resourceAssignments)
val resourceAssignmentRuntimeService =
ResourceAssignmentUtils.transformToRARuntimeService(blueprintRuntimeService, identifierName)
- bulkSequenced.map { batchResourceAssignments ->
- batchResourceAssignments.filter { it.name != "*" && it.name != "start" }
- .forEach { resourceAssignment ->
- val dictionaryName = resourceAssignment.dictionaryName
- val dictionarySource = resourceAssignment.dictionarySource
- /**
- * Get the Processor name
- */
- val processorName = processorName(dictionaryName!!, dictionarySource!!, resourceDictionaries)
-
- val resourceAssignmentProcessor =
- applicationContext.getBean(processorName) as? ResourceAssignmentProcessor
- ?: throw BluePrintProcessorException("failed to get resource processor for name($processorName) " +
- "for resource assignment(${resourceAssignment.name})")
- try {
- // Set BluePrint Runtime Service
- resourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
- // Set Resource Dictionaries
- resourceAssignmentProcessor.resourceDictionaries = resourceDictionaries
- // TODO ("Implement suspend function")
- runBlocking {
- // Invoke Apply Method
- resourceAssignmentProcessor.applyNB(resourceAssignment)
+ coroutineScope {
+ bulkSequenced.forEach { batchResourceAssignments ->
+ // Execute Non Dependent Assignments in parallel ( ie asynchronously )
+ val deferred = batchResourceAssignments.filter { it.name != "*" && it.name != "start" }
+ .map { resourceAssignment ->
+ async {
+ val dictionaryName = resourceAssignment.dictionaryName
+ val dictionarySource = resourceAssignment.dictionarySource
+ /**
+ * Get the Processor name
+ */
+ val processorName = processorName(dictionaryName!!, dictionarySource!!, resourceDictionaries)
+
+ val resourceAssignmentProcessor =
+ applicationContext.getBean(processorName) as? ResourceAssignmentProcessor
+ ?: throw BluePrintProcessorException("failed to get resource processor ($processorName) " +
+ "for resource assignment(${resourceAssignment.name})")
+ try {
+ // Set BluePrint Runtime Service
+ resourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
+ // Set Resource Dictionaries
+ resourceAssignmentProcessor.resourceDictionaries = resourceDictionaries
+ // Invoke Apply Method
+ resourceAssignmentProcessor.applyNB(resourceAssignment)
+ // Set errors from RA
+ blueprintRuntimeService.setBluePrintError(resourceAssignmentRuntimeService.getBluePrintError())
+ } catch (e: RuntimeException) {
+ throw BluePrintProcessorException(e)
+ }
}
- // Set errors from RA
- blueprintRuntimeService.setBluePrintError(resourceAssignmentRuntimeService.getBluePrintError())
- } catch (e: RuntimeException) {
- throw BluePrintProcessorException(e)
}
- }
+ log.debug("Resolving (${deferred.size})resources parallel.")
+ deferred.awaitAll()
+ }
}
+
}
@@ -202,13 +211,12 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
*/
private fun processorName(dictionaryName: String, dictionarySource: String,
resourceDictionaries: MutableMap<String, ResourceDefinition>): String {
- var processorName: String? = null
- when (dictionarySource) {
+ val processorName: String = when (dictionarySource) {
"input" -> {
- processorName = "${ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-input"
+ "${ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-input"
}
"default" -> {
- processorName = "${ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-default"
+ "${ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-default"
}
else -> {
val resourceDefinition = resourceDictionaries[dictionaryName]
@@ -217,8 +225,7 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica
val resourceSource = resourceDefinition.sources[dictionarySource]
?: throw BluePrintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
- processorName = ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
- .plus(resourceSource.type)
+ ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR.plus(resourceSource.type)
}
}
checkNotEmptyOrThrow(processorName,
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionResultService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionResultService.kt
index 225251fce..cbc68bbc9 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionResultService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionResultService.kt
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2019 Bell Canada.
+ * Modifications Copyright © 2019 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +16,8 @@
*/
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.withContext
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
@@ -26,8 +29,8 @@ import java.util.*
@Service
class ResourceResolutionResultService(private val resourceResolutionRepository: ResourceResolutionRepository) {
- fun write(properties: Map<String, Any>, result: String, bluePrintRuntimeService: BluePrintRuntimeService<*>,
- artifactPrefix: String) {
+ suspend fun write(properties: Map<String, Any>, result: String, bluePrintRuntimeService: BluePrintRuntimeService<*>,
+ artifactPrefix: String) = withContext(Dispatchers.IO) {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
@@ -37,7 +40,7 @@ class ResourceResolutionResultService(private val resourceResolutionRepository:
resourceResolutionResult.blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]
resourceResolutionResult.blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]
resourceResolutionResult.resolutionKey =
- properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_KEY].toString()
+ properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_KEY].toString()
resourceResolutionResult.result = result
try {
@@ -47,18 +50,18 @@ class ResourceResolutionResultService(private val resourceResolutionRepository:
}
}
- fun read(bluePrintRuntimeService: BluePrintRuntimeService<*>, artifactPrefix: String,
- resolutionKey: String): String {
+ suspend fun read(bluePrintRuntimeService: BluePrintRuntimeService<*>, artifactPrefix: String,
+ resolutionKey: String): String = withContext(Dispatchers.IO) {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]
val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]
- return resourceResolutionRepository.findByResolutionKeyAndBlueprintNameAndBlueprintVersionAndArtifactName(
- resolutionKey,
- blueprintName,
- blueprintVersion,
- artifactPrefix).result!!
+ resourceResolutionRepository.findByResolutionKeyAndBlueprintNameAndBlueprintVersionAndArtifactName(
+ resolutionKey,
+ blueprintName,
+ blueprintVersion,
+ artifactPrefix).result!!
}
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
index d7a78999e..4a82dbd21 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
@@ -20,6 +20,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
+import kotlinx.coroutines.runBlocking
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -75,20 +76,22 @@ class ResourceResolutionServiceTest {
@Test
@Throws(Exception::class)
fun testResolveResource() {
+ runBlocking {
- Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
+ Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
- "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
+ "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
- val executionServiceInput = JacksonUtils.readValueFromClassPathFile("payload/requests/sample-resourceresolution-request.json",
- ExecutionServiceInput::class.java)!!
+ val executionServiceInput = JacksonUtils.readValueFromClassPathFile("payload/requests/sample-resourceresolution-request.json",
+ ExecutionServiceInput::class.java)!!
- // Prepare Inputs
- PayloadUtils.prepareInputsFromWorkflowPayload(bluePrintRuntimeService, executionServiceInput.payload, "resource-assignment")
+ // Prepare Inputs
+ PayloadUtils.prepareInputsFromWorkflowPayload(bluePrintRuntimeService, executionServiceInput.payload, "resource-assignment")
- resourceResolutionService.resolveResources(bluePrintRuntimeService, "resource-assignment", "baseconfig", mapOf())
+ resourceResolutionService.resolveResources(bluePrintRuntimeService, "resource-assignment", "baseconfig", mapOf())
+ }
}
@Test
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml
index 0c8d93bf0..c37e0b5a0 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml
@@ -19,13 +19,14 @@
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>
+ <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.springframework" level="warn"/>
<logger name="org.hibernate" level="info"/>
+ <logger name="org.onap.ccsdk.cds.controllerblueprints" level="warn"/>
<logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
<root level="warn">
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt
index b95879274..3895c39c8 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt
@@ -17,6 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor
+import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
@@ -38,21 +39,21 @@ abstract class RestconfComponentFunction : AbstractScriptComponentFunction() {
return bluePrintRestLibPropertyService().blueprintWebClientService(selector)
}
- fun resolveFromDatabase(resolutionKey: String, artifactName: String): String {
- return resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
+ fun resolveFromDatabase(resolutionKey: String, artifactName: String): String = runBlocking {
+ resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
}
fun generateMessage(artifactName: String): String {
return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
}
- fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String {
- return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
+ fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String = runBlocking {
+ resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
artifactMapping, artifactTemplate)
}
- fun resolveAndGenerateMessage(artifactPrefix: String): String {
- return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
+ fun resolveAndGenerateMessage(artifactPrefix: String): String = runBlocking {
+ resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
artifactPrefix, mapOf())
}
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
index fb6a0832a..badd70065 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
@@ -86,7 +86,7 @@ open class Status {
@get:ApiModelProperty(required = true)
var code: Int = 200
@get:ApiModelProperty(required = true)
- var eventType: String = "EVENT-ACTION-RESPONSE"
+ var eventType: String = ""
@get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
@get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
var timestamp: Date = Date()
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
index 054f2386e..6809e7968 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
@@ -2,6 +2,7 @@
<!--
~ Copyright © 2017-2018 AT&T Intellectual Property.
~ Modifications Copyright © 2018 IBM.
+ ~ Modifications Copyright © 2019 Huawei.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
@@ -41,6 +42,16 @@
<artifactId>httpclient</artifactId>
<version>${apache.httpcomponents.client.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-security</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
index 05143f3d8..fa4ff231d 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
@@ -1,6 +1,7 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
* Modifications Copyright © 2019 IBM.
+ * Modifications Copyright © 2019 Huawei.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +34,8 @@ class RestLibConstants {
const val TYPE_TOKEN_AUTH = "token-auth"
const val TYPE_BASIC_AUTH = "basic-auth"
const val TYPE_SSL_BASIC_AUTH = "ssl-basic-auth"
+ const val TYPE_SSL_TOKEN_AUTH = "ssl-token-auth"
+ const val TYPE_SSL_NO_AUTH = "ssl-no-auth"
const val TYPE_DME2_PROXY = "dme2-proxy"
const val TYPE_POLICY_MANAGER = "policy-manager"
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
index 4e6e62efb..70ec9501a 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
@@ -1,5 +1,6 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2019 Huawei.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +22,22 @@ open class RestClientProperties {
lateinit var url: String
}
+open class SSLRestClientProperties : RestClientProperties() {
+ lateinit var keyStoreInstance: String // JKS, PKCS12
+ lateinit var sslTrust: String
+ lateinit var sslTrustPassword: String
+ var sslKey: String? = null
+ var sslKeyPassword: String? = null
+}
+
+open class SSLBasicAuthRestClientProperties : SSLRestClientProperties() {
+ var basicAuth: BasicAuthRestClientProperties? = null
+}
+
+open class SSLTokenAuthRestClientProperties : SSLRestClientProperties() {
+ var tokenAuth: TokenAuthRestClientProperties? = null
+}
+
open class BasicAuthRestClientProperties : RestClientProperties() {
lateinit var password: String
lateinit var username: String
@@ -30,14 +47,6 @@ open class TokenAuthRestClientProperties : RestClientProperties() {
var token: String? = null
}
-open class SSLBasicAuthRestClientProperties : RestClientProperties() {
- lateinit var keyStoreInstance: String // JKS, PKCS12
- lateinit var sslTrust: String
- lateinit var sslTrustPassword: String
- lateinit var sslKey: String
- lateinit var sslKeyPassword: String
-}
-
open class DME2RestClientProperties : RestClientProperties() {
lateinit var service: String
lateinit var subContext: String
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
index 67dbd0d72..3190cd1c6 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
@@ -23,11 +23,14 @@ import org.springframework.http.MediaType
import java.nio.charset.Charset
import java.util.*
-class BasicAuthRestClientService(private val restClientProperties: BasicAuthRestClientProperties) :
- BlueprintWebClientService {
+class BasicAuthRestClientService(private val restClientProperties:
+ BasicAuthRestClientProperties) :
+ BlueprintWebClientService {
override fun defaultHeaders(): Map<String, String> {
- val encodedCredentials = setBasicAuth(restClientProperties.username, restClientProperties.password)
+
+ val encodedCredentials = setBasicAuth(restClientProperties.username,
+ restClientProperties.password)
return mapOf(
HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,
@@ -38,18 +41,25 @@ class BasicAuthRestClientService(private val restClientProperties: BasicAuthRest
return restClientProperties.url + uri
}
- override fun convertToBasicHeaders(headers: Map<String, String>): Array<BasicHeader> {
+ override fun convertToBasicHeaders(headers: Map<String, String>):
+ Array<BasicHeader> {
+
val customHeaders: MutableMap<String, String> = headers.toMutableMap()
if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
- val encodedCredentials = setBasicAuth(restClientProperties.username, restClientProperties.password)
- customHeaders[HttpHeaders.AUTHORIZATION] = "Basic $encodedCredentials"
+ val encodedCredentials = setBasicAuth(
+ restClientProperties.username,
+ restClientProperties.password)
+ customHeaders[HttpHeaders.AUTHORIZATION] =
+ "Basic $encodedCredentials"
}
return super.convertToBasicHeaders(customHeaders)
}
private fun setBasicAuth(username: String, password: String): String {
+
val credentialsString = "$username:$password"
- return Base64.getEncoder().encodeToString(credentialsString.toByteArray(Charset.defaultCharset()))
+ return Base64.getEncoder().encodeToString(
+ credentialsString.toByteArray(Charset.defaultCharset()))
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
index dc974468b..a6bbc39d8 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
@@ -1,6 +1,7 @@
/*
* Copyright © 2017-2019 AT&T, Bell Canada
* Modifications Copyright © 2019 IBM.
+ * Modifications Copyright © 2019 Huawei.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,15 +26,19 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.PolicyManagerRestClientProper
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-open class BluePrintRestLibPropertyService(private var bluePrintProperties: BluePrintProperties) {
+open class BluePrintRestLibPropertyService(private var bluePrintProperties:
+ BluePrintProperties) {
- fun blueprintWebClientService(jsonNode: JsonNode): BlueprintWebClientService {
+ fun blueprintWebClientService(jsonNode: JsonNode):
+ BlueprintWebClientService {
val restClientProperties = restClientProperties(jsonNode)
return blueprintWebClientService(restClientProperties)
}
@@ -45,7 +50,8 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties: Blue
}
fun restClientProperties(prefix: String): RestClientProperties {
- val type = bluePrintProperties.propertyBeanType("$prefix.type", String::class.java)
+ val type = bluePrintProperties.propertyBeanType(
+ "$prefix.type", String::class.java)
return when (type) {
RestLibConstants.TYPE_BASIC_AUTH -> {
basicAuthRestClientProperties(prefix)
@@ -53,6 +59,12 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties: Blue
RestLibConstants.TYPE_SSL_BASIC_AUTH -> {
sslBasicAuthRestClientProperties(prefix)
}
+ RestLibConstants.TYPE_SSL_TOKEN_AUTH -> {
+ sslTokenAuthRestClientProperties(prefix)
+ }
+ RestLibConstants.TYPE_SSL_NO_AUTH -> {
+ sslNoAuthRestClientProperties(prefix)
+ }
RestLibConstants.TYPE_DME2_PROXY -> {
dme2ProxyClientProperties(prefix)
}
@@ -60,69 +72,123 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties: Blue
policyManagerRestClientProperties(prefix)
}
else -> {
- throw BluePrintProcessorException("Rest adaptor($type) is not supported")
+ throw BluePrintProcessorException("Rest adaptor($type) is" +
+ " not supported")
}
}
}
- private fun restClientProperties(jsonNode: JsonNode): RestClientProperties {
+ fun restClientProperties(jsonNode: JsonNode): RestClientProperties {
+
val type = jsonNode.get("type").textValue()
return when (type) {
RestLibConstants.TYPE_TOKEN_AUTH -> {
- JacksonUtils.readValue(jsonNode, TokenAuthRestClientProperties::class.java)!!
+ JacksonUtils.readValue(jsonNode,
+ TokenAuthRestClientProperties::class.java)!!
}
RestLibConstants.TYPE_BASIC_AUTH -> {
- JacksonUtils.readValue(jsonNode, BasicAuthRestClientProperties::class.java)!!
- }
- RestLibConstants.TYPE_SSL_BASIC_AUTH -> {
- JacksonUtils.readValue(jsonNode, SSLBasicAuthRestClientProperties::class.java)!!
+ JacksonUtils.readValue(jsonNode,
+ BasicAuthRestClientProperties::class.java)!!
}
RestLibConstants.TYPE_DME2_PROXY -> {
- JacksonUtils.readValue(jsonNode, DME2RestClientProperties::class.java)!!
+ JacksonUtils.readValue(jsonNode,
+ DME2RestClientProperties::class.java)!!
}
RestLibConstants.TYPE_POLICY_MANAGER -> {
- JacksonUtils.readValue(jsonNode, PolicyManagerRestClientProperties::class.java)!!
+ JacksonUtils.readValue(jsonNode,
+ PolicyManagerRestClientProperties::class.java)!!
+ }
+ RestLibConstants.TYPE_SSL_BASIC_AUTH -> {
+ JacksonUtils.readValue(jsonNode,
+ SSLBasicAuthRestClientProperties::class.java)!!
+ }
+ RestLibConstants.TYPE_SSL_TOKEN_AUTH -> {
+ JacksonUtils.readValue(jsonNode,
+ SSLTokenAuthRestClientProperties::class.java)!!
+ }
+ RestLibConstants.TYPE_SSL_NO_AUTH -> {
+ JacksonUtils.readValue(
+ jsonNode, SSLRestClientProperties::class.java)!!
}
else -> {
- throw BluePrintProcessorException("Rest adaptor($type) is not supported")
+ throw BluePrintProcessorException("Rest adaptor($type) is" +
+ " not supported")
}
}
}
+
+ private fun blueprintWebClientService(
+ restClientProperties: RestClientProperties):
+ BlueprintWebClientService {
- private fun blueprintWebClientService(restClientProperties: RestClientProperties): BlueprintWebClientService {
when (restClientProperties) {
+ is SSLRestClientProperties -> {
+ return SSLRestClientService(restClientProperties)
+ }
is TokenAuthRestClientProperties -> {
return TokenAuthRestClientService(restClientProperties)
}
is BasicAuthRestClientProperties -> {
return BasicAuthRestClientService(restClientProperties)
}
- is SSLBasicAuthRestClientProperties -> {
- return SSLBasicAuthRestClientService(restClientProperties)
- }
is DME2RestClientProperties -> {
return DME2ProxyRestClientService(restClientProperties)
}
else -> {
- throw BluePrintProcessorException("couldn't get rest service for")
+ throw BluePrintProcessorException("couldn't get rest " +
+ "service for")
}
}
}
- private fun basicAuthRestClientProperties(prefix: String): BasicAuthRestClientProperties {
- return bluePrintProperties.propertyBeanType(prefix, BasicAuthRestClientProperties::class.java)
+ private fun basicAuthRestClientProperties(prefix: String):
+ BasicAuthRestClientProperties {
+ return bluePrintProperties.propertyBeanType(
+ prefix, BasicAuthRestClientProperties::class.java)
+ }
+
+ private fun sslBasicAuthRestClientProperties(prefix: String):
+ SSLRestClientProperties {
+
+ val sslProps: SSLBasicAuthRestClientProperties =
+ bluePrintProperties.propertyBeanType(
+ prefix, SSLBasicAuthRestClientProperties::class.java)
+ val basicProps : BasicAuthRestClientProperties =
+ bluePrintProperties.propertyBeanType(
+ prefix, BasicAuthRestClientProperties::class.java)
+ sslProps.basicAuth = basicProps
+ return sslProps
+ }
+
+ private fun sslTokenAuthRestClientProperties(prefix: String):
+ SSLRestClientProperties {
+
+ val sslProps: SSLTokenAuthRestClientProperties =
+ bluePrintProperties.propertyBeanType(prefix,
+ SSLTokenAuthRestClientProperties::class.java)
+ val basicProps : TokenAuthRestClientProperties =
+ bluePrintProperties.propertyBeanType(prefix,
+ TokenAuthRestClientProperties::class.java)
+ sslProps.tokenAuth = basicProps
+ return sslProps
}
- private fun sslBasicAuthRestClientProperties(prefix: String): SSLBasicAuthRestClientProperties {
- return bluePrintProperties.propertyBeanType(prefix, SSLBasicAuthRestClientProperties::class.java)
+ private fun sslNoAuthRestClientProperties(prefix: String):
+ SSLRestClientProperties {
+ return bluePrintProperties.propertyBeanType(
+ prefix, SSLRestClientProperties::class.java)
}
- private fun dme2ProxyClientProperties(prefix: String): DME2RestClientProperties {
- return bluePrintProperties.propertyBeanType(prefix, DME2RestClientProperties::class.java)
+ private fun dme2ProxyClientProperties(prefix: String):
+ DME2RestClientProperties {
+ return bluePrintProperties.propertyBeanType(
+ prefix, DME2RestClientProperties::class.java)
}
- private fun policyManagerRestClientProperties(prefix: String): PolicyManagerRestClientProperties {
- return bluePrintProperties.propertyBeanType(prefix, PolicyManagerRestClientProperties::class.java)
+ private fun policyManagerRestClientProperties(prefix: String):
+ PolicyManagerRestClientProperties {
+ return bluePrintProperties.propertyBeanType(
+ prefix, PolicyManagerRestClientProperties::class.java)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
index 1c1d510fc..d6d02b330 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
@@ -1,6 +1,7 @@
/*
* Copyright © 2017-2019 AT&T, Bell Canada, Nordix Foundation
* Modifications Copyright © 2018-2019 IBM.
+ * Modifications Copyright © 2019 Huawei.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +22,11 @@ import com.fasterxml.jackson.databind.JsonNode
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.apache.commons.io.IOUtils
-import org.apache.http.client.methods.*
+import org.apache.http.client.methods.HttpDelete
+import org.apache.http.client.methods.HttpGet
+import org.apache.http.client.methods.HttpPatch
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.client.methods.HttpPut
import org.apache.http.entity.StringEntity
import org.apache.http.impl.client.CloseableHttpClient
import org.apache.http.impl.client.HttpClients
@@ -30,6 +35,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.http.HttpMethod
+import java.io.InputStream
import java.nio.charset.Charset
interface BlueprintWebClientService {
@@ -45,19 +51,24 @@ interface BlueprintWebClientService {
.build()
}
- fun exchangeResource(methodType: String, path: String, request: String): String {
- return this.exchangeResource(methodType, path, request, defaultHeaders())
+ fun exchangeResource(methodType: String, path: String, request: String):
+ String {
+ return this.exchangeResource(methodType, path, request,
+ defaultHeaders())
}
- fun exchangeResource(methodType: String, path: String, request: String, headers: Map<String, String>): String {
- val convertedHeaders: Array<BasicHeader> = convertToBasicHeaders(headers)
+ fun exchangeResource(methodType: String, path: String, request: String,
+ headers: Map<String, String>): String {
+ val convertedHeaders: Array<BasicHeader> = convertToBasicHeaders(
+ headers)
return when (HttpMethod.resolve(methodType)) {
HttpMethod.DELETE -> delete(path, convertedHeaders)
HttpMethod.GET -> get(path, convertedHeaders)
HttpMethod.POST -> post(path, request, convertedHeaders)
HttpMethod.PUT -> put(path, request, convertedHeaders)
HttpMethod.PATCH -> patch(path, request, convertedHeaders)
- else -> throw BluePrintProcessorException("Unsupported methodType($methodType)")
+ else -> throw BluePrintProcessorException("Unsupported met" +
+ "hodType($methodType)")
}
}
@@ -81,7 +92,8 @@ interface BlueprintWebClientService {
}
}
- fun post(path: String, request: String, headers: Array<BasicHeader>): String {
+ fun post(path: String, request: String, headers: Array<BasicHeader>):
+ String {
val httpPost = HttpPost(host(path))
val entity = StringEntity(request)
httpPost.entity = entity
@@ -91,7 +103,8 @@ interface BlueprintWebClientService {
}
}
- fun put(path: String, request: String, headers: Array<BasicHeader>): String {
+ fun put(path: String, request: String, headers: Array<BasicHeader>):
+ String {
val httpPut = HttpPut(host(path))
val entity = StringEntity(request)
httpPut.entity = entity
@@ -101,7 +114,8 @@ interface BlueprintWebClientService {
}
}
- fun patch(path: String, request: String, headers: Array<BasicHeader>): String {
+ fun patch(path: String, request: String, headers: Array<BasicHeader>):
+ String {
val httpPatch = HttpPatch(host(path))
val entity = StringEntity(request)
httpPatch.entity = entity
@@ -111,28 +125,23 @@ interface BlueprintWebClientService {
}
}
- // Non Blocking Rest Implementation
- suspend fun httpClientNB(): CloseableHttpClient {
- return HttpClients.custom()
- .addInterceptorFirst(WebClientUtils.logRequest())
- .addInterceptorLast(WebClientUtils.logResponse())
- .build()
- }
suspend fun getNB(path: String): String {
return getNB(path, null, String::class.java)
}
- suspend fun getNB(path: String, additionalHeaders: Map<String, String>?): String {
+ suspend fun getNB(path: String, additionalHeaders: Map<String, String>?):
+ String {
return getNB(path, additionalHeaders, String::class.java)
}
suspend fun <T> getNB(path: String, additionalHeaders: Map<String, String>?,
- responseType: Class<T>): T = withContext(Dispatchers.IO) {
+ responseType: Class<T>): T =
+ withContext(Dispatchers.IO) {
val httpGet = HttpGet(host(path))
httpGet.setHeaders(basicHeaders(additionalHeaders))
httpClientNB().execute(httpGet).entity.content.use {
- JacksonUtils.readValue(it, responseType)!!
+ getResponse(it, responseType)
}
}
@@ -140,18 +149,20 @@ interface BlueprintWebClientService {
return postNB(path, request, null, String::class.java)
}
- suspend fun postNB(path: String, request: Any, additionalHeaders: Map<String, String>?): String {
+ suspend fun postNB(path: String, request: Any,
+ additionalHeaders: Map<String, String>?): String {
return postNB(path, request, additionalHeaders, String::class.java)
}
- suspend fun <T> postNB(path: String, request: Any, additionalHeaders: Map<String, String>?,
+ suspend fun <T> postNB(path: String, request: Any,
+ additionalHeaders: Map<String, String>?,
responseType: Class<T>): T =
withContext(Dispatchers.IO) {
val httpPost = HttpPost(host(path))
httpPost.entity = StringEntity(strRequest(request))
httpPost.setHeaders(basicHeaders(additionalHeaders))
httpClientNB().execute(httpPost).entity.content.use {
- JacksonUtils.readValue(it, responseType)!!
+ getResponse(it, responseType)
}
}
@@ -159,17 +170,20 @@ interface BlueprintWebClientService {
return putNB(path, request, null, String::class.java)
}
- suspend fun putNB(path: String, request: Any, additionalHeaders: Map<String, String>?): String {
+ suspend fun putNB(path: String, request: Any,
+ additionalHeaders: Map<String, String>?): String {
return putNB(path, request, additionalHeaders, String::class.java)
}
- suspend fun <T> putNB(path: String, request: Any, additionalHeaders: Map<String, String>?,
- responseType: Class<T>): T = withContext(Dispatchers.IO) {
+ suspend fun <T> putNB(path: String, request: Any,
+ additionalHeaders: Map<String, String>?,
+ responseType: Class<T>): T =
+ withContext(Dispatchers.IO) {
val httpPut = HttpPut(host(path))
httpPut.entity = StringEntity(strRequest(request))
httpPut.setHeaders(basicHeaders(additionalHeaders))
httpClientNB().execute(httpPut).entity.content.use {
- JacksonUtils.readValue(it, responseType)!!
+ getResponse(it, responseType)
}
}
@@ -177,46 +191,61 @@ interface BlueprintWebClientService {
return deleteNB(path, null, String::class.java)
}
- suspend fun <T> deleteNB(path: String, additionalHeaders: Map<String, String>?): String {
+ suspend fun <T> deleteNB(path: String,
+ additionalHeaders: Map<String, String>?): String {
return deleteNB(path, additionalHeaders, String::class.java)
}
- suspend fun <T> deleteNB(path: String, additionalHeaders: Map<String, String>?, responseType: Class<T>): T =
+ suspend fun <T> deleteNB(path: String,
+ additionalHeaders: Map<String, String>?,
+ responseType: Class<T>): T =
withContext(Dispatchers.IO) {
- val httpDelete = HttpDelete(host(path))
- httpDelete.setHeaders(basicHeaders(additionalHeaders))
- httpClient().execute(httpDelete).entity.content.use {
- JacksonUtils.readValue(it, responseType)!!
- }
- }
+ val httpDelete = HttpDelete(host(path))
+ httpDelete.setHeaders(basicHeaders(additionalHeaders))
+ httpClient().execute(httpDelete).entity.content.use {
+ getResponse(it, responseType)
+ }
+ }
- suspend fun <T> patchNB(path: String, request: Any, additionalHeaders: Map<String, String>?,
- responseType: Class<T>): T = withContext(Dispatchers.IO) {
+ suspend fun <T> patchNB(path: String, request: Any,
+ additionalHeaders: Map<String, String>?,
+ responseType: Class<T>): T =
+ withContext(Dispatchers.IO) {
val httpPatch = HttpPatch(host(path))
httpPatch.entity = StringEntity(strRequest(request))
httpPatch.setHeaders(basicHeaders(additionalHeaders))
httpClient().execute(httpPatch).entity.content.use {
- JacksonUtils.readValue(it, responseType)!!
+ getResponse(it, responseType)
}
}
- suspend fun exchangeNB(methodType: String, path: String, request: Any): String {
- return exchangeNB(methodType, path, request, hashMapOf(), String::class.java)
+ suspend fun exchangeNB(methodType: String, path: String, request: Any):
+ String {
+ return exchangeNB(methodType, path, request, hashMapOf(),
+ String::class.java)
}
- suspend fun exchangeNB(methodType: String, path: String, request: Any, additionalHeaders: Map<String, String>?): String {
- return exchangeNB(methodType, path, request, additionalHeaders, String::class.java)
+ suspend fun exchangeNB(methodType: String, path: String, request: Any,
+ additionalHeaders: Map<String, String>?): String {
+ return exchangeNB(methodType, path, request, additionalHeaders,
+ String::class.java)
}
- suspend fun <T> exchangeNB(methodType: String, path: String, request: Any, additionalHeaders: Map<String, String>?,
+ suspend fun <T> exchangeNB(methodType: String, path: String, request: Any,
+ additionalHeaders: Map<String, String>?,
responseType: Class<T>): T {
+
return when (HttpMethod.resolve(methodType)) {
HttpMethod.GET -> getNB(path, additionalHeaders, responseType)
- HttpMethod.POST -> postNB(path, request, additionalHeaders, responseType)
+ HttpMethod.POST -> postNB(path, request, additionalHeaders,
+ responseType)
HttpMethod.DELETE -> deleteNB(path, additionalHeaders, responseType)
- HttpMethod.PUT -> putNB(path, request, additionalHeaders, responseType)
- HttpMethod.PATCH -> patchNB(path, request, additionalHeaders, responseType)
- else -> throw BluePrintProcessorException("Unsupported methodType($methodType)")
+ HttpMethod.PUT -> putNB(path, request, additionalHeaders,
+ responseType)
+ HttpMethod.PATCH -> patchNB(path, request, additionalHeaders,
+ responseType)
+ else -> throw BluePrintProcessorException("Unsupported method" +
+ "Type($methodType)")
}
}
@@ -228,7 +257,17 @@ interface BlueprintWebClientService {
}
}
- private fun basicHeaders(headers: Map<String, String>?): Array<BasicHeader> {
+ private fun <T> getResponse(it: InputStream, responseType: Class<T>): T {
+ return if (responseType == String::class.java) {
+ IOUtils.toString(it, Charset.defaultCharset()) as T
+ } else {
+ JacksonUtils.readValue(it, responseType)!!
+ }
+ }
+
+ private fun basicHeaders(headers: Map<String, String>?):
+ Array<BasicHeader> {
+
val basicHeaders = mutableListOf<BasicHeader>()
defaultHeaders().forEach { name, value ->
basicHeaders.add(BasicHeader(name, value))
@@ -238,4 +277,12 @@ interface BlueprintWebClientService {
}
return basicHeaders.toTypedArray()
}
+
+ // Non Blocking Rest Implementation
+ suspend fun httpClientNB(): CloseableHttpClient {
+ return HttpClients.custom()
+ .addInterceptorFirst(WebClientUtils.logRequest())
+ .addInterceptorLast(WebClientUtils.logResponse())
+ .build()
+ }
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLBasicAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLBasicAuthRestClientService.kt
deleted file mode 100644
index 3d3b0a57e..000000000
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLBasicAuthRestClientService.kt
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright © 2017-2019 AT&T, Bell Canada
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
-
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory
-import org.apache.http.impl.client.CloseableHttpClient
-import org.apache.http.impl.client.HttpClients
-import org.apache.http.ssl.SSLContextBuilder
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
-import org.springframework.http.HttpHeaders
-import org.springframework.http.MediaType
-import java.io.File
-import java.io.FileInputStream
-import java.security.KeyStore
-import java.security.cert.X509Certificate
-
-class SSLBasicAuthRestClientService(private val restClientProperties: SSLBasicAuthRestClientProperties) :
- BlueprintWebClientService {
-
- override fun defaultHeaders(): Map<String, String> {
- return mapOf(
- HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE)
- }
-
- override fun host(uri: String): String {
- return restClientProperties.url + uri
- }
-
- override fun httpClient(): CloseableHttpClient {
-
- val keystoreInstance = restClientProperties.keyStoreInstance
- val sslKey = restClientProperties.sslKey
- val sslKeyPwd = restClientProperties.sslKeyPassword
- val sslTrust = restClientProperties.sslTrust
- val sslTrustPwd = restClientProperties.sslTrustPassword
-
- val acceptingTrustStrategy = { chain: Array<X509Certificate>, authType: String -> true }
-
- FileInputStream(sslKey).use { keyInput ->
- val keyStore = KeyStore.getInstance(keystoreInstance)
- keyStore.load(keyInput, sslKeyPwd.toCharArray())
-
- val sslContext =
- SSLContextBuilder.create()
- .loadKeyMaterial(keyStore, sslKeyPwd.toCharArray())
- .loadTrustMaterial(File(sslTrust), sslTrustPwd.toCharArray(), acceptingTrustStrategy).build()
-
- val csf = SSLConnectionSocketFactory(sslContext!!)
-
- return HttpClients.custom()
- .addInterceptorFirst(WebClientUtils.logRequest())
- .addInterceptorLast(WebClientUtils.logResponse())
- .setSSLSocketFactory(csf).build()
- }
- }
-} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLRestClientService.kt
new file mode 100644
index 000000000..30dd49018
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/SSLRestClientService.kt
@@ -0,0 +1,125 @@
+/*
+ * Copyright © 2017-2019 AT&T, Bell Canada
+ * Modifications Copyright © 2019 Huawei.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
+
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory
+import org.apache.http.impl.client.CloseableHttpClient
+import org.apache.http.impl.client.HttpClients
+import org.apache.http.message.BasicHeader
+import org.apache.http.ssl.SSLContextBuilder
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
+import org.springframework.http.HttpHeaders
+import org.springframework.http.MediaType
+import java.io.File
+import java.io.FileInputStream
+import java.security.KeyStore
+import java.security.cert.X509Certificate
+
+class SSLRestClientService(private val restClientProperties:
+ SSLRestClientProperties) :
+ BlueprintWebClientService {
+
+ var auth: BlueprintWebClientService? = null
+
+ init {
+ auth = getAuthService()
+ }
+
+ private fun getAuthService() : BlueprintWebClientService? {
+
+ return when(restClientProperties) {
+ is SSLBasicAuthRestClientProperties -> {
+ val basic = restClientProperties.basicAuth!!
+ BasicAuthRestClientService(basic)
+ }
+ is SSLTokenAuthRestClientProperties -> {
+ val token = restClientProperties.tokenAuth!!
+ TokenAuthRestClientService(token)
+ }
+ else -> {
+ //Returns null for No auth
+ null
+ }
+ }
+ }
+
+
+ override fun defaultHeaders(): Map<String, String> {
+
+ if (auth != null) {
+ return auth!!.defaultHeaders()
+ }
+ return mapOf(
+ HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
+ HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE)
+ }
+
+ override fun host(uri: String): String {
+
+ return restClientProperties.url + uri
+ }
+
+ override fun httpClient(): CloseableHttpClient {
+
+ val keystoreInstance = restClientProperties.keyStoreInstance
+ val sslKey = restClientProperties.sslKey
+ val sslKeyPwd = restClientProperties.sslKeyPassword
+ val sslTrust = restClientProperties.sslTrust
+ val sslTrustPwd = restClientProperties.sslTrustPassword
+
+ val acceptingTrustStrategy = { chain: Array<X509Certificate>,
+ authType: String -> true }
+ val sslContext = SSLContextBuilder.create()
+
+ if (sslKey != null && sslKeyPwd != null) {
+ FileInputStream(sslKey).use { keyInput ->
+ val keyStore = KeyStore.getInstance(keystoreInstance)
+ keyStore.load(keyInput, sslKeyPwd.toCharArray())
+ sslContext.loadKeyMaterial(keyStore, sslKeyPwd.toCharArray())
+ }
+ }
+
+ sslContext.loadTrustMaterial(File(sslTrust), sslTrustPwd.toCharArray(),
+ acceptingTrustStrategy)
+ val csf = SSLConnectionSocketFactory(sslContext.build())
+ return HttpClients.custom()
+ .addInterceptorFirst(WebClientUtils.logRequest())
+ .addInterceptorLast(WebClientUtils.logResponse())
+ .setSSLSocketFactory(csf).build()
+
+ }
+
+ // Non Blocking Rest Implementation
+ override suspend fun httpClientNB(): CloseableHttpClient {
+ return httpClient()
+ }
+
+ override fun convertToBasicHeaders(headers: Map<String, String>): Array<BasicHeader> {
+ var head1: Map<String, String> = defaultHeaders()
+ var head2: MutableMap<String, String> = head1.toMutableMap()
+ head2.putAll(headers)
+ if (auth != null) {
+ return auth!!.convertToBasicHeaders(head2)
+ }
+ return super.convertToBasicHeaders(head2)
+ }
+
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
index 6f81ee1a8..82446994c 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/TokenAuthRestClientService.kt
@@ -21,17 +21,21 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
-class TokenAuthRestClientService(private val restClientProperties: TokenAuthRestClientProperties) :
- BlueprintWebClientService {
+class TokenAuthRestClientService(private val restClientProperties:
+ TokenAuthRestClientProperties) :
+ BlueprintWebClientService {
override fun defaultHeaders(): Map<String, String> {
+
return mapOf(
HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE,
HttpHeaders.AUTHORIZATION to restClientProperties.token!!)
}
- override fun convertToBasicHeaders(headers: Map<String, String>): Array<BasicHeader> {
+ override fun convertToBasicHeaders(headers: Map<String, String>):
+ Array<BasicHeader> {
+
val customHeaders: MutableMap<String, String> = headers.toMutableMap()
if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
customHeaders[HttpHeaders.AUTHORIZATION] = restClientProperties.token!!
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
index c57745713..280dd0d40 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
@@ -1,6 +1,7 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
* Modifications Copyright © 2018 IBM.
+ * Modifications Copyright © 2019 Huawei.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,24 +18,50 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
+import com.fasterxml.jackson.databind.JsonNode
+import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
+import kotlin.test.assertEquals
import kotlin.test.assertNotNull
-
@RunWith(SpringRunner::class)
@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, BlueprintPropertyConfiguration::class, BluePrintProperties::class])
@TestPropertySource(properties =
["blueprintsprocessor.restclient.sample.type=basic-auth",
"blueprintsprocessor.restclient.sample.url=http://localhost:8080",
- "blueprintsprocessor.restclient.sample.userId=sampleuser"])
+ "blueprintsprocessor.restclient.sample.userId=sampleuser",
+ "blueprintsprocessor.restclient.sslbasic.type=ssl-basic-auth",
+ "blueprintsprocessor.restclient.sslbasic.url=https://localhost:8443",
+ "blueprintsprocessor.restclient.sslbasic.username=admin",
+ "blueprintsprocessor.restclient.sslbasic.password=cds",
+ "blueprintsprocessor.restclient.sslbasic.keyStoreInstance=PKCS12",
+ "blueprintsprocessor.restclient.sslbasic.sslTrust=src/test/resources/keystore.p12",
+ "blueprintsprocessor.restclient.sslbasic.sslTrustPassword=changeit",
+ "blueprintsprocessor.restclient.ssltoken.type=ssl-token-auth",
+ "blueprintsprocessor.restclient.ssltoken.url=https://localhost:8443",
+ "blueprintsprocessor.restclient.ssltoken.token=72178473kjshdkjgvbsdkjv903274908",
+ "blueprintsprocessor.restclient.ssltoken.keyStoreInstance=PKCS12",
+ "blueprintsprocessor.restclient.ssltoken.sslTrust=src/test/resources/keystore.p12",
+ "blueprintsprocessor.restclient.ssltoken.sslTrustPassword=changeit",
+ "blueprintsprocessor.restclient.ssl.type=ssl-no-auth",
+ "blueprintsprocessor.restclient.ssl.url=https://localhost:8443",
+ "blueprintsprocessor.restclient.ssl.keyStoreInstance=PKCS12",
+ "blueprintsprocessor.restclient.ssl.sslTrust=src/test/resources/keystore.p12",
+ "blueprintsprocessor.restclient.ssl.sslTrustPassword=changeit",
+ "blueprintsprocessor.restclient.ssl.sslKey=src/test/resources/keystore.p12",
+ "blueprintsprocessor.restclient.ssl.sslKeyPassword=changeit"
+])
class BluePrintRestLibPropertyServiceTest {
@@ -43,15 +70,148 @@ class BluePrintRestLibPropertyServiceTest {
@Test
fun testRestClientProperties() {
- val properties = bluePrintRestLibPropertyService.restClientProperties("blueprintsprocessor.restclient.sample")
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ "blueprintsprocessor.restclient.sample")
+ assertNotNull(properties, "failed to create property bean")
+ assertNotNull(properties.url, "failed to get url property in" +
+ " property bean")
+ }
+
+ @Test
+ fun testSSLBasicProperties() {
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ "blueprintsprocessor.restclient.sslbasic")
+ assertNotNull(properties, "failed to create property bean")
+ val p: SSLBasicAuthRestClientProperties =
+ properties as SSLBasicAuthRestClientProperties
+
+ assertEquals(p.basicAuth!!.username, "admin")
+ assertEquals(p.basicAuth!!.password, "cds")
+ assertEquals(p.sslTrust, "src/test/resources/keystore.p12")
+ assertEquals(p.sslTrustPassword, "changeit")
+ assertEquals(p.keyStoreInstance, "PKCS12")
+ }
+
+ @Test
+ fun testSSLTokenProperties() {
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ "blueprintsprocessor.restclient.ssltoken")
+ assertNotNull(properties, "failed to create property bean")
+
+ val p: SSLTokenAuthRestClientProperties =
+ properties as SSLTokenAuthRestClientProperties
+
+ assertEquals(p.tokenAuth!!.token!!, "72178473kjshdkjgvbsdkjv903274908")
+ assertEquals(p.sslTrust, "src/test/resources/keystore.p12")
+ assertEquals(p.sslTrustPassword, "changeit")
+ assertEquals(p.keyStoreInstance, "PKCS12")
+ }
+
+ @Test
+ fun testSSLNoAuthProperties() {
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ "blueprintsprocessor.restclient.ssl")
+ assertNotNull(properties, "failed to create property bean")
+
+ val p: SSLRestClientProperties =
+ properties as SSLRestClientProperties
+
+ assertEquals(p.sslTrust, "src/test/resources/keystore.p12")
+ assertEquals(p.sslTrustPassword, "changeit")
+ assertEquals(p.keyStoreInstance, "PKCS12")
+ assertEquals(p.sslKey, "src/test/resources/keystore.p12")
+ assertEquals(p.sslKeyPassword, "changeit")
+ }
+
+
+ @Test
+ fun testSSLBasicPropertiesAsJson() {
+ val json: String = "{\n" +
+ " \"type\" : \"ssl-basic-auth\",\n" +
+ " \"url\" : \"https://localhost:8443\",\n" +
+ " \"keyStoreInstance\" : \"PKCS12\",\n" +
+ " \"sslTrust\" : \"src/test/resources/keystore.p12\",\n" +
+ " \"sslTrustPassword\" : \"changeit\",\n" +
+ " \"basicAuth\" : {\n" +
+ " \"username\" : \"admin\",\n" +
+ " \"password\" : \"cds\"\n" +
+ " }\n" +
+ "}"
+ val mapper = ObjectMapper()
+ val actualObj: JsonNode = mapper.readTree(json)
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ actualObj)
+ assertNotNull(properties, "failed to create property bean")
+ val p: SSLBasicAuthRestClientProperties =
+ properties as SSLBasicAuthRestClientProperties
+
+ assertEquals(p.basicAuth!!.username, "admin")
+ assertEquals(p.basicAuth!!.password, "cds")
+ assertEquals(p.sslTrust, "src/test/resources/keystore.p12")
+ assertEquals(p.sslTrustPassword, "changeit")
+ assertEquals(p.keyStoreInstance, "PKCS12")
+ }
+
+ @Test
+ fun testSSLTokenPropertiesAsJson() {
+ val json: String = "{\n" +
+ " \"type\" : \"ssl-token-auth\",\n" +
+ " \"url\" : \"https://localhost:8443\",\n" +
+ " \"keyStoreInstance\" : \"PKCS12\",\n" +
+ " \"sslTrust\" : \"src/test/resources/keystore.p12\",\n" +
+ " \"sslTrustPassword\" : \"changeit\",\n" +
+ " \"tokenAuth\" : {\n" +
+ " \"token\" : \"72178473kjshdkjgvbsdkjv903274908\"\n" +
+ " }\n" +
+ "}"
+ val mapper = ObjectMapper()
+ val actualObj: JsonNode = mapper.readTree(json)
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ actualObj)
assertNotNull(properties, "failed to create property bean")
- assertNotNull(properties.url, "failed to get url property in property bean")
+
+ val p: SSLTokenAuthRestClientProperties =
+ properties as SSLTokenAuthRestClientProperties
+
+ assertEquals(p.tokenAuth!!.token!!, "72178473kjshdkjgvbsdkjv903274908")
+ assertEquals(p.sslTrust, "src/test/resources/keystore.p12")
+ assertEquals(p.sslTrustPassword, "changeit")
+ assertEquals(p.keyStoreInstance, "PKCS12")
+ }
+
+ @Test
+ fun testSSLNoAuthPropertiesAsJson() {
+ val json: String = "{\n" +
+ " \"type\" : \"ssl-basic-auth\",\n" +
+ " \"url\" : \"https://localhost:8443\",\n" +
+ " \"keyStoreInstance\" : \"PKCS12\",\n" +
+ " \"sslTrust\" : \"src/test/resources/keystore.p12\",\n" +
+ " \"sslTrustPassword\" : \"changeit\",\n" +
+ " \"sslKey\" : \"src/test/resources/keystore.p12\",\n" +
+ " \"sslKeyPassword\" : \"changeit\"\n" +
+ "}"
+ val mapper = ObjectMapper()
+ val actualObj: JsonNode = mapper.readTree(json)
+ val properties = bluePrintRestLibPropertyService.restClientProperties(
+ actualObj)
+ assertNotNull(properties, "failed to create property bean")
+
+ val p: SSLRestClientProperties =
+ properties as SSLRestClientProperties
+
+ assertEquals(p.sslTrust, "src/test/resources/keystore.p12")
+ assertEquals(p.sslTrustPassword, "changeit")
+ assertEquals(p.keyStoreInstance, "PKCS12")
+ assertEquals(p.sslKey, "src/test/resources/keystore.p12")
+ assertEquals(p.sslKeyPassword, "changeit")
}
@Test
fun testBlueprintWebClientService() {
- val blueprintWebClientService = bluePrintRestLibPropertyService.blueprintWebClientService("sample")
- assertNotNull(blueprintWebClientService, "failed to create blueprintWebClientService")
+ val blueprintWebClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("sample")
+ assertNotNull(blueprintWebClientService, "failed to create blu" +
+ "eprintWebClientService")
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
index a02a8083b..98cdfc0f2 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
@@ -1,6 +1,7 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
* Copyright (C) 2019 Nordix Foundation
+ * Modifications Copyright © 2019 Huawei.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,13 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
+import com.fasterxml.jackson.databind.JsonNode
+import com.fasterxml.jackson.databind.ObjectMapper
+import kotlinx.coroutines.CoroutineStart
+import kotlinx.coroutines.async
+import kotlinx.coroutines.runBlocking
+import org.apache.catalina.connector.Connector
+import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
@@ -25,57 +33,330 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
+import org.springframework.boot.web.servlet.server.ServletWebServerFactory
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpMethod
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
+import org.springframework.security.config.annotation.web.builders.HttpSecurity
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
+import org.springframework.security.crypto.password.PasswordEncoder
+import org.springframework.stereotype.Component
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
+import org.springframework.web.bind.annotation.DeleteMapping
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PatchMapping
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.PutMapping
+import org.springframework.web.bind.annotation.RequestHeader
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
-import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class])
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
-@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, BlueprintPropertyConfiguration::class,
- SampleController::class, BluePrintProperties::class, BluePrintProperties::class])
+@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class,
+ BlueprintPropertyConfiguration::class,
+ SampleController::class, BluePrintProperties::class,
+ BluePrintProperties::class])
@TestPropertySource(properties =
-["blueprintsprocessor.restclient.sample.type=basic-auth",
+[
+ "server.port=8443",
+ "server.ssl.enabled=true",
+ "server.ssl.key-store=classpath:keystore.p12",
+ "server.ssl.key-store-password=changeit",
+ "server.ssl.keyStoreType=PKCS12",
+ "server.ssl.keyAlias=tomcat",
+ "blueprintsprocessor.restclient.sample.type=basic-auth",
"blueprintsprocessor.restclient.sample.url=http://127.0.0.1:8080",
- "blueprintsprocessor.restclient.sample.username=sampleuser",
- "blueprintsprocessor.restclient.sample.password=sampletoken"])
+ "blueprintsprocessor.restclient.sample.username=admin",
+ "blueprintsprocessor.restclient.sample.password=jans",
+ "blueprintsprocessor.restclient.test.type=ssl-basic-auth",
+ "blueprintsprocessor.restclient.test.url=https://localhost:8443",
+ "blueprintsprocessor.restclient.test.username=admin",
+ "blueprintsprocessor.restclient.test.password=jans",
+ "blueprintsprocessor.restclient.test.keyStoreInstance=PKCS12",
+ "blueprintsprocessor.restclient.test.sslTrust=src/test/resources/keystore.p12",
+ "blueprintsprocessor.restclient.test.sslTrustPassword=changeit"
+])
class RestClientServiceTest {
@Autowired
lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Test
+ fun testPatch() {
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("sample")
+ val response = restClientService.exchangeResource(
+ HttpMethod.PATCH.name, "/sample/name", "")
+ assertEquals("Patch request successful", response,
+ "failed to get patch response")
+ }
+
+ @Test
fun testBaseAuth() {
- val restClientService = bluePrintRestLibPropertyService.blueprintWebClientService("sample")
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("sample")
val headers = mutableMapOf<String, String>()
headers["X-Transaction-Id"] = "1234"
- val response = restClientService.exchangeResource(HttpMethod.GET.name, "/sample/name", "")
+ val response = restClientService.exchangeResource(HttpMethod.GET.name,
+ "/sample/name", "")
assertNotNull(response, "failed to get response")
}
@Test
- fun testPatch() {
- val restClientService = bluePrintRestLibPropertyService.blueprintWebClientService("sample")
- val response = restClientService.exchangeResource(HttpMethod.PATCH.name, "/sample/name", "")
- assertEquals("Patch request successful", response, "failed to get patch response")
+ fun testSimpleBasicAuth() {
+ val json: String = "{\n" +
+ " \"type\" : \"basic-auth\",\n" +
+ " \"url\" : \"http://localhost:8080\",\n" +
+ " \"username\" : \"admin\",\n" +
+ " \"password\" : \"jans\"\n" +
+ "}"
+ val mapper = ObjectMapper()
+ val actualObj: JsonNode = mapper.readTree(json)
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService(actualObj)
+ lateinit var res:String
+ runBlocking {
+ val get = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.GET.name,
+ "/sample/basic", "")}
+ get.start()
+ res = get.await()
+ }
+ assertNotNull(res, "failed to get response")
+ assertEquals(res, "Basic request arrived successfully")
}
+ @Test
+ fun testSampleAaiReq() {
+ val restClientService = bluePrintRestLibPropertyService
+ .blueprintWebClientService("test")
+ val headers = mutableMapOf<String, String>()
+ headers["X-TransactionId"] = "9999"
+ headers["X-FromAppId"] = "AAI"
+ val post1 = "{\n" +
+ " \"customer\": {\n" +
+ " \"global-customer-id\": \"ONSDEMOBJHKCustomer\",\n" +
+ " \"subscriber-name\": \"ONSDEMOBJHKCustomer\",\n" +
+ " \"subscriber-type\": \"CUST\",\n" +
+ " \"resource-version\": \"1552985011163\"\n" +
+ " }\n" +
+ "}"
+ lateinit var res1: Customer
+ lateinit var res2: Customer
+ lateinit var res3: String
+ lateinit var res4: String
+ lateinit var res5: String
+ lateinit var res6: String
+ runBlocking {
+ val get1 = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.GET.name,
+ "/sample/aai/v14/business/customers", "", headers,
+ Customer::class.java)}
+
+ val get2 = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.GET.name,
+ "/sample/aai/v14/business/customers", "", headers,
+ Customer::class.java)}
+
+ val post = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.POST.name,
+ "/sample/aai/v14/business/customers", post1, headers,
+ String::class.java)}
+
+ val put = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.PUT.name,
+ "/sample/aai/v14/business/customers", post1, headers,
+ String::class.java)}
+
+ val patch = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.PATCH.name,
+ "/sample/aai/v14/business/customers", post1, headers,
+ String::class.java)}
+
+ val delete = async(start = CoroutineStart.LAZY) {
+ restClientService.exchangeNB(HttpMethod.DELETE.name,
+ "/sample/aai/v14/business/customers", "", headers,
+ String::class.java)}
+
+ get1.start()
+ get2.start()
+ post.start()
+ put.start()
+ patch.start()
+ delete.start()
+ res1 = get1.await()
+ res2 = get2.await()
+ res3 = post.await()
+ res4 = put.await()
+ res5 = patch.await()
+ res6 = delete.await()
+ }
+ assertNotNull(res1, "failed to get response")
+ assertNotNull(res2, "failed to get response")
+ assertEquals(res1.id, "ONSDEMOBJHKCustomer")
+ assertEquals(res1.name, "ONSDEMOBJHKCustomer")
+ assertEquals(res1.type, "CUST")
+ assertEquals(res1.resource, "1552985011163")
+ assertEquals(res2.id, "ONSDEMOBJHKCustomer")
+ assertEquals(res2.name, "ONSDEMOBJHKCustomer")
+ assertEquals(res2.type, "CUST")
+ assertEquals(res2.resource, "1552985011163")
+ assertEquals(res3, "The message is successfully posted")
+ assertEquals(res4, "The put request is success")
+ assertEquals(res5, "The patch request is success")
+ assertEquals(res6, "The message is successfully deleted")
+ }
}
+/**
+ * Sample controller code for testing both http and https requests.
+ */
@RestController
@RequestMapping("/sample")
open class SampleController {
+
@GetMapping("/name")
fun getName(): String = "Sample Controller"
+
@PatchMapping("/name")
fun patchName(): String = "Patch request successful"
+
+ @GetMapping("/basic")
+ fun getBasic(): String = "Basic request arrived successfully"
+
+
+ @GetMapping("/aai/v14/business/customers")
+ fun getAaiCustomers(
+ @RequestHeader(name = "X-TransactionId", required = true)
+ transId: String,
+ @RequestHeader(name = "X-FromAppId", required = true)
+ appId: String) : String {
+ if (transId != "9999" || appId != "AAI") {
+ return ""
+ }
+ return "{\n" +
+ " \"id\": \"ONSDEMOBJHKCustomer\",\n" +
+ " \"name\": \"ONSDEMOBJHKCustomer\",\n" +
+ " \"type\": \"CUST\",\n" +
+ " \"resource\": \"1552985011163\"\n" +
+ "}"
+ }
+
+ @PostMapping("/aai/v14/business/customers")
+ fun postAaiCustomers(
+ @RequestHeader(name = "X-TransactionId", required = true)
+ transId: String,
+ @RequestHeader(name = "X-FromAppId", required = true)
+ appId: String) : String {
+ if (transId != "9999" || appId != "AAI") {
+ return ""
+ }
+ return "The message is successfully posted"
+ }
+
+
+ @PutMapping("/aai/v14/business/customers")
+ fun putAaiCustomers(
+ @RequestHeader(name = "X-TransactionId", required = true)
+ transId: String,
+ @RequestHeader(name = "X-FromAppId", required = true)
+ appId: String) : String {
+ if (transId != "9999" || appId != "AAI") {
+ return ""
+ }
+ return "The put request is success"
+ }
+
+ @PatchMapping("/aai/v14/business/customers")
+ fun patchAaiCustomers(
+ @RequestHeader(name = "X-TransactionId", required = true)
+ transId: String,
+ @RequestHeader(name = "X-FromAppId", required = true)
+ appId: String) : String {
+ if (transId != "9999" || appId != "AAI") {
+ return ""
+ }
+ return "The patch request is success"
+ }
+
+ @DeleteMapping("/aai/v14/business/customers")
+ fun deleteAaiCustomers(
+ @RequestHeader(name = "X-TransactionId", required = true)
+ transId: String,
+ @RequestHeader(name = "X-FromAppId", required = true)
+ appId: String) : String {
+ if (transId != "9999" || appId != "AAI") {
+ return ""
+ }
+ return "The message is successfully deleted"
+ }
}
+/**
+ * Security configuration required for basic authentication with username and
+ * password for any request in the server.
+ */
+@Configuration
+@EnableWebSecurity
+open class SecurityConfig : WebSecurityConfigurerAdapter() {
+
+ @Throws(Exception::class)
+ override fun configure(http: HttpSecurity) {
+ http
+ .csrf().disable()
+ .authorizeRequests().anyRequest().authenticated()
+ .and()
+ .httpBasic()
+ }
+
+ @Autowired
+ @Throws(Exception::class)
+ open fun configureGlobal(auth: AuthenticationManagerBuilder) {
+ auth.inMemoryAuthentication()
+ .withUser("admin")
+ .password(passwordEncoder().encode("jans"))
+ .roles("USER")
+ }
+
+ @Bean
+ open fun passwordEncoder(): PasswordEncoder {
+ return BCryptPasswordEncoder()
+ }
+}
+
+/**
+ * Http server required for http request to be processed along with the https
+ * server.
+ */
+@Component
+class HttpServer {
+ @Bean
+ fun servletContainer(): ServletWebServerFactory {
+
+ val connector = Connector(TomcatServletWebServerFactory.DEFAULT_PROTOCOL)
+ connector.setPort(8080)
+
+ val tomcat = TomcatServletWebServerFactory()
+ tomcat.addAdditionalTomcatConnectors(connector)
+ return tomcat
+ }
+}
+
+/**
+ * Data class required for response
+ */
+data class Customer(
+ val id: String,
+ val name: String,
+ val type: String,
+ val resource: String) \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/resources/keystore.p12 b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/resources/keystore.p12
new file mode 100644
index 000000000..96b0d3ac3
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/resources/keystore.p12
Binary files differ
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
index 274346917..1e09bee8d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
@@ -62,7 +62,7 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
return bluePrintCatalogService.saveToDatabase(saveId, compressedFile, true)
} catch (e: IOException) {
throw BluePrintException(ErrorCode.IO_FILE_INTERRUPT.value,
- "Error in Upload CBA: ${e.message}", e)
+ "Error in Upload CBA: ${e.message}", e)
} finally {
deleteNBDir(blueprintArchive)
deleteNBDir(blueprintWorking)
@@ -90,41 +90,42 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
responseObserver.onCompleted()
}
else -> responseObserver.onNext(response(executionServiceInput,
- "Failed to process request, 'actionIdentifiers.mode' not specified. Valid value are: 'sync' or 'async'.",
- true).toProto());
+ "Failed to process request, 'actionIdentifiers.mode' not specified. Valid value are: 'sync' or 'async'.",
+ true).toProto());
}
}
suspend fun doProcess(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
val requestId = executionServiceInput.commonHeader.requestId
log.info("processing request id $requestId")
-
val actionIdentifiers = executionServiceInput.actionIdentifiers
-
val blueprintName = actionIdentifiers.blueprintName
val blueprintVersion = actionIdentifiers.blueprintVersion
+ try {
+ val basePath = bluePrintCatalogService.getFromDatabase(blueprintName, blueprintVersion)
+ log.info("blueprint base path $basePath")
- val basePath = bluePrintCatalogService.getFromDatabase(blueprintName, blueprintVersion)
- log.info("blueprint base path $basePath")
-
- val blueprintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(requestId, basePath.toString())
+ val blueprintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(requestId, basePath.toString())
- val output = bluePrintWorkflowExecutionService.executeBluePrintWorkflow(blueprintRuntimeService,
+ val output = bluePrintWorkflowExecutionService.executeBluePrintWorkflow(blueprintRuntimeService,
executionServiceInput, hashMapOf())
- val errors = blueprintRuntimeService.getBluePrintError().errors
- if (errors.isNotEmpty()) {
- val errorMessage = errors.stream().map { it.toString() }.collect(Collectors.joining(", "))
- setErrorStatus(errorMessage, output.status)
+ val errors = blueprintRuntimeService.getBluePrintError().errors
+ if (errors.isNotEmpty()) {
+ val errorMessage = errors.stream().map { it.toString() }.collect(Collectors.joining(", "))
+ setErrorStatus(errorMessage, output.status)
+ }
+ return output
+ } catch (e: Exception) {
+ log.error("fail processing request id $requestId", e)
+ return response(executionServiceInput, e.localizedMessage, true)
}
-
- return output
}
private suspend fun copyFromFilePart(filePart: FilePart, targetFile: File): File {
return filePart.transferTo(targetFile)
- .thenReturn(targetFile)
- .awaitSingle()
+ .thenReturn(targetFile)
+ .awaitSingle()
}
private fun setErrorStatus(errorMessage: String, status: Status) {
@@ -139,10 +140,10 @@ class ExecutionServiceHandler(private val bluePrintPathConfiguration: BluePrintP
val executionServiceOutput = ExecutionServiceOutput()
executionServiceOutput.commonHeader = executionServiceInput.commonHeader
executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers
- executionServiceOutput.payload = JsonNodeFactory.instance.objectNode()
val status = Status()
if (failure) {
+ executionServiceOutput.payload = JsonNodeFactory.instance.objectNode()
setErrorStatus(errorMessage, status)
} else {
status.eventType = EventType.EVENT_COMPONENT_PROCESSING.name
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
index e78e87523..14feb28bf 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
@@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
+import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asObjectNode
@@ -97,7 +98,7 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
log.info("Preparing Response...")
executionServiceOutput.commonHeader = executionServiceInput.commonHeader
executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers
- var status: Status?
+ var status = Status()
try {
// Resolve the Output Expression
val stepOutputs = bluePrintRuntimeService
@@ -105,12 +106,12 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
bluePrintRuntimeService.put("$stepName-step-outputs", stepOutputs.asObjectNode())
// Set the Default Step Status
- status = Status()
+ status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
} catch (e: Exception) {
- status = Status()
status.message = BluePrintConstants.STATUS_FAILURE
+ status.eventType = EventType.EVENT_COMPONENT_FAILURE.name
}
- executionServiceOutput.status = status!!
+ executionServiceOutput.status = status
return this.executionServiceOutput
}
diff --git a/ms/controllerblueprints/application/src/test/resources/logback.xml b/ms/controllerblueprints/application/src/test/resources/logback-test.xml
index 55b008d11..2252939e7 100644
--- a/ms/controllerblueprints/application/src/test/resources/logback.xml
+++ b/ms/controllerblueprints/application/src/test/resources/logback-test.xml
@@ -1,35 +1,35 @@
-<!--
- ~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<configuration>
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are assigned the type
- ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>
- </encoder>
- </appender>
-
-
- <logger name="org.springframework" level="warn"/>
- <logger name="org.hibernate" level="info"/>
- <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
-
- <root level="warn">
- <appender-ref ref="STDOUT"/>
- </root>
-
-</configuration>
+<!--
+ ~ Copyright © 2017-2018 AT&T Intellectual Property.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="org.springframework" level="warn"/>
+ <logger name="org.hibernate" level="info"/>
+ <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
+
+ <root level="warn">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+</configuration>
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
index 08b77bd4e..5da43484c 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
@@ -17,20 +17,22 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.junit.Test
+import org.slf4j.LoggerFactory
class TopologicalSortingUtilsTest {
-
+
+ private val log = LoggerFactory.getLogger(TopologicalSortingUtilsTest::class.java)
@Test
- fun testSorting(): Unit {
+ fun testSorting() {
val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils()
graph.add("bundle-id", "bundle-mac")
graph.add("bundle-id", "bundle-ip")
graph.add("bundle-mac", "bundle-ip")
graph.add("bundle-ip", "bundle-mac")
- println("The current graph: " + graph)
- println("In-degrees: " + graph.inDegree())
- println("Out-degrees: " + graph.outDegree())
- println("A topological sort of the vertices: " + graph.topSort())
+ log.debug("The current graph: $graph")
+ log.debug("In-degrees: " + graph.inDegree())
+ log.debug("Out-degrees: " + graph.outDegree())
+ log.debug("A topological sort of the vertices: " + graph.topSort())
}
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml
new file mode 100644
index 000000000..83e0bc674
--- /dev/null
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/logback-test.xml
@@ -0,0 +1,31 @@
+<!--
+ ~ Copyright © 2019 IBM.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
+ <root level="info">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+</configuration>
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ModelTypeLoadService.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ModelTypeLoadService.kt
index f7875efde..0fd30f206 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ModelTypeLoadService.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ModelTypeLoadService.kt
@@ -50,7 +50,7 @@ open class ModelTypeLoadService(private val modelTypeHandler: ModelTypeHandler)
* Load the Model Type file content from the defined path, Load of sequencing should be maintained.
*/
open suspend fun loadPathModelType(modelTypePath: String) {
- log.info(" *************************** loadModelType **********************")
+ log.info(" ****** loadModelType($modelTypePath) ********")
try {
val errorBuilder = StrBuilder()
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ResourceDictionaryLoadService.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ResourceDictionaryLoadService.kt
index ce979f60e..25db333a0 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ResourceDictionaryLoadService.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/load/ResourceDictionaryLoadService.kt
@@ -39,13 +39,18 @@ open class ResourceDictionaryLoadService(private val resourceDictionaryHandler:
private val log = LoggerFactory.getLogger(ResourceDictionaryLoadService::class.java)
open suspend fun loadPathsResourceDictionary(paths: List<String>) {
- paths.forEach {
- loadPathResourceDictionary(it)
+ coroutineScope {
+ val deferred = paths.map {
+ async {
+ loadPathResourceDictionary(it)
+ }
+ }
+ deferred.awaitAll()
}
}
open suspend fun loadPathResourceDictionary(path: String) {
- log.info(" *************************** loadResourceDictionary **********************")
+ log.info(" ******* loadResourceDictionary($path) ********")
val files = normalizedFile(path).listFiles()
val errorBuilder = StrBuilder()
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
index 23c541d76..e82ffc458 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -55,21 +55,30 @@ class BluePrintEnhancerServiceImplTest {
fun init() {
runBlocking {
modelTypeLoadService.loadPathModelType("./../../../../components/model-catalog/definition-type/starter-type")
- resourceDictionaryLoadService.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/starter-dictionary")
- resourceDictionaryLoadService.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/test-dictionary")
+
+ val dictPaths: MutableList<String> = arrayListOf()
+ dictPaths.add("./../../../../components/model-catalog/resource-dictionary/starter-dictionary")
+ dictPaths.add("./../../../../components/model-catalog/resource-dictionary/test-dictionary")
+ resourceDictionaryLoadService.loadPathsResourceDictionary(dictPaths)
}
}
@Test
@Throws(Exception::class)
fun testEnhancementAndValidation() {
-
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
testComponentInvokeEnhancementAndValidation(basePath, "base-enhance")
}
@Test
@Throws(Exception::class)
+ fun testVFWEnhancementAndValidation() {
+ val basePath = "./../../../../components/model-catalog/blueprint-model/service-blueprint/vFW"
+ testComponentInvokeEnhancementAndValidation(basePath, "vFW-enhance")
+ }
+
+ @Test
+ @Throws(Exception::class)
fun testGoldenEnhancementAndValidation() {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/golden"
testComponentInvokeEnhancementAndValidation(basePath, "golden-enhance")
@@ -96,7 +105,7 @@ class BluePrintEnhancerServiceImplTest {
val valid = bluePrintValidatorService.validateBluePrints(targetPath)
Assert.assertTrue("blueprint($basePath) validation failed ", valid)
- deleteDir(targetPath)
+// deleteDir(targetPath)
}
}
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml b/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml
index e66127977..feb4514d6 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
+++ b/ms/controllerblueprints/modules/service/src/test/resources/logback-test.xml
@@ -17,13 +17,11 @@
<configuration>
- <property name="localPattern" value="[%-8thread] %d{HH:mm:ss.SSS} %-5level %logger{50} - %msg%n" />
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
- <pattern>${localPattern}</pattern>
+ <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{50} - %msg%n</pattern>
</encoder>
</appender>
@@ -31,7 +29,8 @@
<logger name="org.springframework" level="warn"/>
<logger name="org.springframework.web" level="warn"/>
<logger name="org.hibernate" level="error"/>
- <logger name="org.onap.ccsdk.cds" level="info"/>
+ <logger name="org.onap.ccsdk.cds.controllerblueprints.core" level="warn"/>
+ <logger name="org.onap.ccsdk.cds.controllerblueprints" level="info"/>
<root level="warn">
<appender-ref ref="STDOUT"/>