From a535938be6304c343416ad549c59a74c151c7591 Mon Sep 17 00:00:00 2001 From: Abdelmuhaimen Seaudi Date: Tue, 8 Oct 2019 14:41:50 +0000 Subject: update vLB CDS CBA Issue-ID: CCSDK-1816 Signed-off-by: Abdelmuhaimen Seaudi Change-Id: I1b399aae8abca6a2f5d175560053fa0c7b646896 (cherry picked from commit c4fb5230962566bb8e321d1129cee384f70d84e8) --- .../vLB/Definitions/data_types.json | 20 +- .../vLB/Definitions/node_types.json | 38 +- .../Definitions/resources_definition_types.json | 184 ++---- .../vLB/Definitions/vDNS-CDS.json | 323 ---------- .../service-blueprint/vLB/Definitions/vLB_CDS.json | 323 ++++++++++ .../vLB/Scripts/python/ConfigDeploy.py | 108 ++-- .../vLB/TOSCA-Metadata/TOSCA.meta | 2 +- .../vLB/Templates/base_template-mapping.json | 8 +- .../vLB/Templates/base_template-template.vtl | 10 +- .../vLB/Templates/baseconfig-mapping.json | 226 +++---- .../vLB/Templates/incremental-config-mapping.json | 226 +++---- .../vLB/Templates/nf-params-mapping.json | 130 ++-- .../vLB/Templates/vdns-mapping.json | 17 +- .../vLB/Templates/vdns-template.vtl | 10 +- .../vLB/Templates/vdns-vnf-mapping.json | 670 -------------------- .../vLB/Templates/vdns-vnf-template.vtl | 280 --------- .../vLB/Templates/vlb-mapping.json | 22 +- .../vLB/Templates/vlb-template.vtl | 10 +- .../vLB/Templates/vnf-mapping.json | 690 +++++++++++++++++++++ .../vLB/Templates/vnf-template.vtl | 284 +++++++++ .../vLB/Templates/vpkg-mapping.json | 20 +- .../vLB/Templates/vpkg-template.vtl | 10 +- 22 files changed, 1794 insertions(+), 1817 deletions(-) delete mode 100644 components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vDNS-CDS.json create mode 100644 components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vLB_CDS.json delete mode 100644 components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-mapping.json delete mode 100644 components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-template.vtl create mode 100644 components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-mapping.json create mode 100644 components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-template.vtl diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json index 346bc4b2c..b3d719faa 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json @@ -144,7 +144,6 @@ "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "", "entry_schema" : { "type" : "" } @@ -293,6 +292,16 @@ "type" : "" } }, + "flavor_name" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "entry_schema" : { + "type" : "" + } + }, "dcae_collector_ip" : { "description" : "", "required" : false, @@ -497,7 +506,6 @@ "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "", "entry_schema" : { "type" : "" } @@ -523,13 +531,13 @@ "type" : "" } }, - "vf_module_name" : { + "vf-module-name" : { "description" : "", "required" : false, "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "${vf_module_name}", + "default" : "${vf-module-name}", "entry_schema" : { "type" : "" } @@ -551,7 +559,6 @@ "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "m1.medium", "entry_schema" : { "type" : "" } @@ -593,7 +600,6 @@ "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "m1.medium", "entry_schema" : { "type" : "" } @@ -624,7 +630,6 @@ "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "", "entry_schema" : { "type" : "" } @@ -708,7 +713,6 @@ "type" : "string", "status" : "", "constraints" : [ { } ], - "default" : "", "entry_schema" : { "type" : "" } diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/node_types.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/node_types.json index 7a44860e2..e3f915e33 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/node_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/node_types.json @@ -3,6 +3,12 @@ "component-netconf-executor" : { "description" : "This is Netconf Transaction Configuration Component API", "version" : "1.0.0", + "attributes" : { + "response-data" : { + "required" : false, + "type" : "json" + } + }, "capabilities" : { "component-node" : { "type" : "tosca.capabilities.Node" @@ -90,6 +96,12 @@ "required" : false, "type" : "string" }, + "occurrence" : { + "description" : "Number of time to perform the resolution.", + "required" : false, + "type" : "integer", + "default" : 1 + }, "store-result" : { "description" : "Whether or not to store the output.", "required" : false, @@ -200,18 +212,6 @@ }, "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-db" : { "description" : "This is Database Resource Source Node Type", "version" : "1.0.0", @@ -256,6 +256,18 @@ }, "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-rest" : { "description" : "This is Rest Resource Source Node Type", "version" : "1.0.0", @@ -387,4 +399,4 @@ "derived_from" : "tosca.nodes.Vnf" } } -} +} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json index 09b99fbeb..aa49e1ee9 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json @@ -75,7 +75,7 @@ "key-dependencies" : [ "vf-module-id", "service-instance-id", "vnf-id" ] } }, - "aai-data" : { + "primary-aai-data" : { "type" : "source-rest", "properties" : { "verb" : "PATCH", @@ -197,6 +197,41 @@ } } }, + "flavor_name" : { + "tags" : "flavor_name", + "name" : "flavor_name", + "property" : { + "description" : "flavor_name", + "type" : "string" + }, + "updated-by" : "MALAKOV, YURIY ", + "sources" : { + "input" : { + "type" : "source-input" + }, + "default" : { + "type" : "source-default", + "properties" : { } + }, + "sdnc" : { + "type" : "source-rest", + "properties" : { + "verb" : "GET", + "type" : "JSON", + "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/flavor_name", + "path" : "/param/0/value", + "input-key-mapping" : { + "service-instance-id" : "service-instance-id", + "vnf-id" : "vnf-id" + }, + "output-key-mapping" : { + "flavor_name" : "value" + }, + "key-dependencies" : [ "service-instance-id", "vnf-id" ] + } + } + } + }, "gre_ipaddr" : { "tags" : "gre_ipaddr", "name" : "gre_ipaddr", @@ -1103,41 +1138,6 @@ } } }, - "vdns_flavor_name" : { - "tags" : "vdns_flavor_name", - "name" : "vdns_flavor_name", - "property" : { - "description" : "vdns_flavor_name", - "type" : "string" - }, - "updated-by" : "MALAKOV, YURIY ", - "sources" : { - "input" : { - "type" : "source-input" - }, - "default" : { - "type" : "source-default", - "properties" : { } - }, - "sdnc" : { - "type" : "source-rest", - "properties" : { - "verb" : "GET", - "type" : "JSON", - "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_flavor_name", - "path" : "/param/0/value", - "input-key-mapping" : { - "service-instance-id" : "service-instance-id", - "vnf-id" : "vnf-id" - }, - "output-key-mapping" : { - "vdns_flavor_name" : "value" - }, - "key-dependencies" : [ "service-instance-id", "vnf-id" ] - } - } - } - }, "vdns_int_private_ip_0" : { "tags" : "vdns_int_private_ip_0", "name" : "vdns_int_private_ip_0", @@ -1275,7 +1275,7 @@ "key-dependencies" : [ "service-instance-id", "vnf-id" ] } }, - "aai-data" : { + "primary-aai-data" : { "type" : "source-rest", "properties" : { "verb" : "GET", @@ -1439,11 +1439,11 @@ } } }, - "vf_module_name" : { - "tags" : "vf_module_name", - "name" : "vf_module_name", + "vf-module-name" : { + "tags" : "vf-module-name", + "name" : "vf-module-name", "property" : { - "description" : "vf_module_name", + "description" : "vf-module-name", "type" : "string" }, "updated-by" : "Singal, Kapil ", @@ -1525,41 +1525,6 @@ } } }, - "vlb_flavor_name" : { - "tags" : "vlb_flavor_name", - "name" : "vlb_flavor_name", - "property" : { - "description" : "vlb_flavor_name", - "type" : "string" - }, - "updated-by" : "MALAKOV, YURIY ", - "sources" : { - "input" : { - "type" : "source-input" - }, - "default" : { - "type" : "source-default", - "properties" : { } - }, - "sdnc" : { - "type" : "source-rest", - "properties" : { - "verb" : "GET", - "type" : "JSON", - "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_flavor_name", - "path" : "/param/0/value", - "input-key-mapping" : { - "service-instance-id" : "service-instance-id", - "vnf-id" : "vnf-id" - }, - "output-key-mapping" : { - "vlb_flavor_name" : "value" - }, - "key-dependencies" : [ "service-instance-id", "vnf-id" ] - } - } - } - }, "vlb_int_pktgen_private_ip_0" : { "tags" : "vlb_int_pktgen_private_ip_0", "name" : "vlb_int_pktgen_private_ip_0", @@ -1716,18 +1681,6 @@ "type" : "source-default", "properties" : { } }, - "processor-db" : { - "type" : "source-db", - "properties" : { - "endpoint-selector" : "dynamic-db-source", - "type" : "SQL", - "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private1\"", - "input-key-mapping" : { }, - "output-key-mapping" : { - "vlb_private_net_cidr" : "prefix" - } - } - }, "sdnc" : { "type" : "source-rest", "properties" : { @@ -1744,6 +1697,18 @@ }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } + }, + "processor-db" : { + "type" : "source-db", + "properties" : { + "endpoint-selector" : "dynamic-db-source", + "type" : "SQL", + "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private1\"", + "input-key-mapping" : { }, + "output-key-mapping" : { + "vlb_private_net_cidr" : "prefix" + } + } } } }, @@ -1917,51 +1882,16 @@ "processor-db" : { "type" : "source-db", "properties" : { - "endpoint-selector" : "dynamic-db-source", "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_flavor_name" : { - "tags" : "vpg_flavor_name", - "name" : "vpg_flavor_name", - "property" : { - "description" : "vpg_flavor_name", - "type" : "string" - }, - "updated-by" : "MALAKOV, YURIY ", - "sources" : { - "input" : { - "type" : "source-input" - }, - "default" : { - "type" : "source-default", - "properties" : { } - }, - "sdnc" : { - "type" : "source-rest", - "properties" : { - "verb" : "GET", - "type" : "JSON", - "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_flavor_name", - "path" : "/param/0/value", + "endpoint-selector" : "dynamic-db-source", "input-key-mapping" : { - "service-instance-id" : "service-instance-id", - "vnf-id" : "vnf-id" - }, - "output-key-mapping" : { - "vpg_flavor_name" : "value" + "vfccustomizationuuid" : "vfccustomizationuuid" }, - "key-dependencies" : [ "service-instance-id", "vnf-id" ] + "key-dependencies" : [ "vfccustomizationuuid" ] } } } @@ -2071,4 +2001,4 @@ } } } -} +} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vDNS-CDS.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vDNS-CDS.json deleted file mode 100644 index fa9f69f37..000000000 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vDNS-CDS.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "tosca_definitions_version" : "controller_blueprint_1_0_0", - "metadata" : { - "template_author" : "Abdelmuhaimen Seaudi", - "author-email" : "abdelmuhaimen.seaudi@orange.com", - "user-groups" : "ADMIN, OPERATION", - "template_name" : "test", - "template_version" : "1.0.0", - "template_tags" : "test, vDNS-CDS, SCALE-OUT, MARCO" - }, - "imports" : [ { - "file" : "Definitions/data_types.json" - }, { - "file" : "Definitions/relationship_types.json" - }, { - "file" : "Definitions/artifact_types.json" - }, { - "file" : "Definitions/node_types.json" - }, { - "file" : "Definitions/policy_types.json" - } ], - "dsl_definitions" : { - "ipam-1" : { - "type" : "token-auth", - "url" : "http://netbox-nginx:8080", - "token" : "Token 0123456789abcdef0123456789abcdef01234567" - }, - "config-deploy-properties" : { - "resolution-key" : { - "get_input" : "resolution-key" - } - }, - "dynamic-db-source" : { - "type" : "maria-db", - "url" : "jdbc:mysql://mariadb-galera:3306/sdnctl", - "username" : "root", - "password" : "secretpassword" - } - }, - "topology_template" : { - "workflows" : { - "resource-assignment" : { - "steps" : { - "resource-assignment" : { - "description" : "Resource Assign Workflow", - "target" : "resource-assignment" - } - }, - "inputs" : { - "template-prefix" : { - "required" : true, - "type" : "list", - "entry_schema" : { - "type" : "string" - } - }, - "resource-assignment-properties" : { - "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).", - "required" : true, - "type" : "dt-resource-assignment-properties" - } - }, - "outputs" : { - "meshed-template" : { - "type" : "json", - "value" : { - "get_attribute" : [ "resource-assignment", "assignment-params" ] - } - } - } - }, - "config-assign" : { - "steps" : { - "config-assign" : { - "description" : "Config Assign Workflow", - "target" : "config-assign", - "activities" : [ { - "call_operation" : "" - } ] - } - }, - "inputs" : { - "resolution-key" : { - "required" : true, - "type" : "string" - }, - "config-assign-properties" : { - "description" : "Dynamic PropertyDefinition for workflow(config-assign).", - "required" : true, - "type" : "dt-config-assign-properties" - } - }, - "outputs" : { - "dry-run" : { - "type" : "json", - "value" : { - "get_attribuxte" : [ "config-assign", "assignment-params" ] - } - } - } - }, - "config-deploy" : { - "steps" : { - "config-deploy" : { - "description" : "Resource Assign and Python Netconf Activation Workflow", - "target" : "config-deploy-process", - "activities" : [ { - "call_operation" : "" - } ] - } - }, - "inputs" : { - "resolution-key" : { - "required" : false, - "type" : "string" - }, - "service-instance-id" : { - "required" : false, - "type" : "string" - }, - "config-deploy-properties" : { - "description" : "Dynamic PropertyDefinition for workflow(config-deploy).", - "required" : true, - "type" : "dt-config-deploy-properties" - } - } - } - }, - "node_templates" : { - "resource-assignment" : { - "type" : "component-resource-resolution", - "interfaces" : { - "ResourceResolutionComponent" : { - "operations" : { - "process" : { - "inputs" : { - "artifact-prefix-names" : { - "get_input" : "template-prefix" - } - } - } - } - } - }, - "artifacts" : { - "base_template-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/base_template-template.vtl" - }, - "base_template-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/base_template-mapping.json" - }, - "vpkg-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/vpkg-template.vtl" - }, - "vpkg-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/vpkg-mapping.json" - }, - "vdns-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/vdns-template.vtl" - }, - "vdns-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/vdns-mapping.json" - }, - "vdns-vnf-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/vdns-vnf-template.vtl" - }, - "vdns-vnf-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/vdns-vnf-mapping.json" - }, - "vlb-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/vlb-template.vtl" - }, - "vlb-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/vlb-mapping.json" - } - } - }, - "config-assign" : { - "type" : "component-resource-resolution", - "interfaces" : { - "ResourceResolutionComponent" : { - "operations" : { - "process" : { - "inputs" : { - "resolution-key" : { - "get_input" : "resolution-key" - }, - "store-result" : true, - "artifact-prefix-names" : [ "baseconfig", "incremental-config" ] - } - } - } - } - }, - "artifacts" : { - "baseconfig-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/baseconfig-template.vtl" - }, - "baseconfig-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/baseconfig-mapping.json" - }, - "incremental-config-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/incremental-config-template.vtl" - }, - "incremental-config-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/incremental-config-mapping.json" - } - } - }, - "netconf-device" : { - "type" : "vnf-netconf-device", - "capabilities" : { - "netconf" : { - "properties" : { - "login-key" : "admin", - "login-account" : "admin", - "target-ip-address" : { - "get_attribute" : [ "nf-account-collection", "", "assignment-params", "nf-params" ] - }, - "port-number" : 2831, - "connection-time-out" : 5 - } - } - } - }, - "config-deploy-process" : { - "type" : "dg-generic", - "properties" : { - "content" : { - "get_artifact" : [ "SELF", "dg-config-deploy-process" ] - }, - "dependency-node-templates" : [ "nf-account-collection", "execute" ] - }, - "artifacts" : { - "dg-config-deploy-process" : { - "type" : "artifact-directed-graph", - "file" : "Plans/CONFIG_ConfigDeploy.xml" - } - } - }, - "nf-account-collection" : { - "type" : "component-resource-resolution", - "interfaces" : { - "ResourceResolutionComponent" : { - "operations" : { - "process" : { - "inputs" : { - "artifact-prefix-names" : [ "nf-params" ] - } - } - } - } - }, - "artifacts" : { - "nf-params-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/nf-params-template.vtl" - }, - "nf-params-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/nf-params-mapping.json" - } - } - }, - "execute" : { - "type" : "component-netconf-executor", - "requirements" : { - "netconf-connection" : { - "capability" : "netconf", - "node" : "netconf-device", - "relationship" : "tosca.relationships.ConnectsTo" - } - }, - "interfaces" : { - "ComponentNetconfExecutor" : { - "operations" : { - "process" : { - "inputs" : { - "script-type" : "jython", - "script-class-reference" : "Scripts/python/ConfigDeploy.py", - "instance-dependencies" : [ ], - "dynamic-properties" : "*config-deploy-properties" - } - } - } - } - }, - "artifacts" : { - "baseconfig-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/baseconfig-template.vtl" - }, - "baseconfig-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/baseconfig-mapping.json" - }, - "incremental-config-template" : { - "type" : "artifact-template-velocity", - "file" : "Templates/incremental-config-template.vtl" - }, - "incremental-config-mapping" : { - "type" : "artifact-mapping-resource", - "file" : "Templates/incremental-config-mapping.json" - } - } - } - } - } -} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vLB_CDS.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vLB_CDS.json new file mode 100644 index 000000000..9b03a5ef3 --- /dev/null +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/vLB_CDS.json @@ -0,0 +1,323 @@ +{ + "tosca_definitions_version" : "controller_blueprint_1_0_0", + "metadata" : { + "template_author" : "Abdelmuhaimen Seaudi", + "author-email" : "abdelmuhaimen.seaudi@orange.com", + "user-groups" : "ADMIN, OPERATION", + "template_name" : "vLB_CDS", + "template_version" : "1.0.0", + "template_tags" : "test, vDNS-CDS, SCALE-OUT, MARCO" + }, + "imports" : [ { + "file" : "Definitions/data_types.json" + }, { + "file" : "Definitions/relationship_types.json" + }, { + "file" : "Definitions/artifact_types.json" + }, { + "file" : "Definitions/node_types.json" + }, { + "file" : "Definitions/policy_types.json" + } ], + "dsl_definitions" : { + "ipam-1" : { + "type" : "token-auth", + "url" : "http://netbox-nginx:8080", + "token" : "Token 0123456789abcdef0123456789abcdef01234567" + }, + "config-deploy-properties" : { + "resolution-key" : { + "get_input" : "resolution-key" + } + }, + "dynamic-db-source" : { + "type" : "maria-db", + "url" : "jdbc:mysql://mariadb-galera:3306/sdnctl", + "username" : "root", + "password" : "secretpassword" + } + }, + "topology_template" : { + "workflows" : { + "resource-assignment" : { + "steps" : { + "resource-assignment" : { + "description" : "Resource Assign Workflow", + "target" : "resource-assignment" + } + }, + "inputs" : { + "template-prefix" : { + "required" : true, + "type" : "list", + "entry_schema" : { + "type" : "string" + } + }, + "resource-assignment-properties" : { + "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).", + "required" : true, + "type" : "dt-resource-assignment-properties" + } + }, + "outputs" : { + "meshed-template" : { + "type" : "json", + "value" : { + "get_attribute" : [ "resource-assignment", "assignment-params" ] + } + } + } + }, + "config-assign" : { + "steps" : { + "config-assign" : { + "description" : "Config Assign Workflow", + "target" : "config-assign", + "activities" : [ { + "call_operation" : "" + } ] + } + }, + "inputs" : { + "resolution-key" : { + "required" : true, + "type" : "string" + }, + "config-assign-properties" : { + "description" : "Dynamic PropertyDefinition for workflow(config-assign).", + "required" : true, + "type" : "dt-config-assign-properties" + } + }, + "outputs" : { + "dry-run" : { + "type" : "json", + "value" : { + "get_attribuxte" : [ "config-assign", "assignment-params" ] + } + } + } + }, + "config-deploy" : { + "steps" : { + "config-deploy" : { + "description" : "Resource Assign and Python Netconf Activation Workflow", + "target" : "config-deploy-process", + "activities" : [ { + "call_operation" : "" + } ] + } + }, + "inputs" : { + "resolution-key" : { + "required" : false, + "type" : "string" + }, + "service-instance-id" : { + "required" : false, + "type" : "string" + }, + "config-deploy-properties" : { + "description" : "Dynamic PropertyDefinition for workflow(config-deploy).", + "required" : true, + "type" : "dt-config-deploy-properties" + } + } + } + }, + "node_templates" : { + "resource-assignment" : { + "type" : "component-resource-resolution", + "interfaces" : { + "ResourceResolutionComponent" : { + "operations" : { + "process" : { + "inputs" : { + "artifact-prefix-names" : { + "get_input" : "template-prefix" + } + } + } + } + } + }, + "artifacts" : { + "base_template-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/base_template-template.vtl" + }, + "base_template-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/base_template-mapping.json" + }, + "vpkg-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/vpkg-template.vtl" + }, + "vpkg-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/vpkg-mapping.json" + }, + "vdns-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/vdns-template.vtl" + }, + "vdns-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/vdns-mapping.json" + }, + "vnf-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/vnf-template.vtl" + }, + "vnf-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/vnf-mapping.json" + }, + "vlb-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/vlb-template.vtl" + }, + "vlb-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/vlb-mapping.json" + } + } + }, + "config-assign" : { + "type" : "component-resource-resolution", + "interfaces" : { + "ResourceResolutionComponent" : { + "operations" : { + "process" : { + "inputs" : { + "resolution-key" : { + "get_input" : "resolution-key" + }, + "store-result" : true, + "artifact-prefix-names" : [ "baseconfig", "incremental-config" ] + } + } + } + } + }, + "artifacts" : { + "baseconfig-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/baseconfig-template.vtl" + }, + "baseconfig-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/baseconfig-mapping.json" + }, + "incremental-config-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/incremental-config-template.vtl" + }, + "incremental-config-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/incremental-config-mapping.json" + } + } + }, + "netconf-device" : { + "type" : "vnf-netconf-device", + "capabilities" : { + "netconf" : { + "properties" : { + "login-key" : "admin", + "login-account" : "admin", + "target-ip-address" : { + "get_attribute" : [ "nf-account-collection", "", "assignment-params", "nf-params" ] + }, + "port-number" : 2831, + "connection-time-out" : 5 + } + } + } + }, + "config-deploy-process" : { + "type" : "dg-generic", + "properties" : { + "content" : { + "get_artifact" : [ "SELF", "dg-config-deploy-process" ] + }, + "dependency-node-templates" : [ "nf-account-collection", "execute" ] + }, + "artifacts" : { + "dg-config-deploy-process" : { + "type" : "artifact-directed-graph", + "file" : "Plans/CONFIG_ConfigDeploy.xml" + } + } + }, + "nf-account-collection" : { + "type" : "component-resource-resolution", + "interfaces" : { + "ResourceResolutionComponent" : { + "operations" : { + "process" : { + "inputs" : { + "artifact-prefix-names" : [ "nf-params" ] + } + } + } + } + }, + "artifacts" : { + "nf-params-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/nf-params-template.vtl" + }, + "nf-params-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/nf-params-mapping.json" + } + } + }, + "execute" : { + "type" : "component-netconf-executor", + "requirements" : { + "netconf-connection" : { + "capability" : "netconf", + "node" : "netconf-device", + "relationship" : "tosca.relationships.ConnectsTo" + } + }, + "interfaces" : { + "ComponentNetconfExecutor" : { + "operations" : { + "process" : { + "inputs" : { + "script-type" : "jython", + "script-class-reference" : "Scripts/python/ConfigDeploy.py", + "instance-dependencies" : [ ], + "dynamic-properties" : "*config-deploy-properties" + } + } + } + } + }, + "artifacts" : { + "baseconfig-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/baseconfig-template.vtl" + }, + "baseconfig-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/baseconfig-mapping.json" + }, + "incremental-config-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/incremental-config-template.vtl" + }, + "incremental-config-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/incremental-config-mapping.json" + } + } + } + } + } +} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py index 9e027e24c..59e6594fb 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py @@ -1,54 +1,54 @@ -# Copyright (c) 2019 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. - -import netconf_constant -from common import ResolutionHelper -from time import sleep -from netconfclient import NetconfClient -from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \ - NetconfComponentFunction - - -class ConfigDeploy(NetconfComponentFunction): - - def process(self, execution_request): - log = globals()[netconf_constant.SERVICE_LOG] - print(globals()) - print("Waiting 4 minutes until NETCONF server is UP on vLB ...") - sleep (240) - nc = NetconfClient(log, self, "netconf-connection") - rr = ResolutionHelper(self) - - # Get meshed template from DB - resolution_key = self.getDynamicProperties("resolution-key").asText() - payloadHostname = rr.retrieve_resolved_template_from_database(resolution_key, "baseconfig") - payloadInterface = rr.retrieve_resolved_template_from_database(resolution_key, "incremental-config") - - nc.connect() - nc.lock() - #if not response.isSuccess(): - # og.error(response.errorMessage) - nc.discard_change() - nc.edit_config(message_content=payloadInterface, edit_default_peration="none") - nc.edit_config(message_content=payloadHostname, edit_default_peration="none") - nc.validate() - nc.commit() - #nc.commit(confirmed = True, confirm_timeout=15) - nc.unlock() - nc.disconnect() - - def recover(self, runtime_exception, execution_request): - log.error("Exception in the script {}", runtime_exception) - print self.addError(runtime_exception.cause.message) - return None \ No newline at end of file +# Copyright (c) 2019 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. + +import netconf_constant +from common import ResolutionHelper +from time import sleep +from netconfclient import NetconfClient +from org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor import \ + NetconfComponentFunction + + +class ConfigDeploy(NetconfComponentFunction): + + def process(self, execution_request): + log = globals()[netconf_constant.SERVICE_LOG] + print(globals()) +# print("Waiting 4 minutes until NETCONF server is UP on vLB ...") +# sleep (240) + nc = NetconfClient(log, self, "netconf-connection") + rr = ResolutionHelper(self) + + # Get meshed template from DB + resolution_key = self.getDynamicProperties("resolution-key").asText() + payloadHostname = rr.retrieve_resolved_template_from_database(resolution_key, "baseconfig") + payloadInterface = rr.retrieve_resolved_template_from_database(resolution_key, "incremental-config") + + nc.connect() + nc.lock() + #if not response.isSuccess(): + # og.error(response.errorMessage) + nc.discard_change() + nc.edit_config(message_content=payloadInterface, edit_default_peration="none") + nc.edit_config(message_content=payloadHostname, edit_default_peration="none") + nc.validate() + nc.commit() + #nc.commit(confirmed = True, confirm_timeout=15) + nc.unlock() + nc.disconnect() + + def recover(self, runtime_exception, execution_request): + log.error("Exception in the script {}", runtime_exception) + print self.addError(runtime_exception.cause.message) + return None diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/service-blueprint/vLB/TOSCA-Metadata/TOSCA.meta index ea1a90340..37c59ee56 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/TOSCA-Metadata/TOSCA.meta +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/TOSCA-Metadata/TOSCA.meta @@ -1,6 +1,6 @@ TOSCA-Meta-File-Version: 1.0.0 CSAR-Version: 1.0 Created-By: PLATANIA, MARCO -Entry-Definitions: Definitions/vDNS-CDS.json +Entry-Definitions: Definitions/vLB_CDS.json Template-Tags: vDNS-CDS-test1 Content-Type: application/vnd.oasis.bpmn \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-mapping.json index 62d1b966b..43b0f9dd0 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-mapping.json @@ -20,7 +20,7 @@ "version": 0 }, { - "name": "vf_module_name", + "name": "vf-module-name", "property": { "description": "", "required": false, @@ -32,10 +32,10 @@ "entry_schema": { "type": "" }, - "default": "${vf_module_name}" + "default": "${vf-module-name}" }, "input-param": false, - "dictionary-name": "vf_module_name", + "dictionary-name": "vf-module-name", "dictionary-source": "default", "dependencies": [], "version": 0 @@ -406,4 +406,4 @@ ], "version": 0 } -] +] \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-template.vtl index 8055030c2..58512be2f 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-template.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/base_template-template.vtl @@ -81,15 +81,15 @@ "payload": [ { "param-name": "resource-name", - "param-value": "vf_module_name" + "param-value": "vf-module-name" }, { "param-name": "resource-value", - "param-value": "${vf_module_name}" + "param-value": "${vf-module-name}" }, { "param-name": "external-key", - "param-value": "${vf-module-id}_vf_module_name" + "param-value": "${vf-module-id}_vf-module-name" }, { "param-name": "policy-instance-name", @@ -114,8 +114,8 @@ ], "output-key-mapping": [ { - "resource-name": "vf_module_name", - "resource-value": "${vf_module_name}" + "resource-name": "vf-module-name", + "resource-value": "${vf-module-name}" } ] } diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json index 0ab26be3b..000cbd039 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-mapping.json @@ -1,113 +1,113 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "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": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vdns_vf_module_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_vf_module_id", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - }, - { - "name": "vdns_int_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_int_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - }, - { - "name": "vdns_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - } -] +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "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": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vdns_vf_module_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_vf_module_id", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], + "version": 0 + }, + { + "name": "vdns_int_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_int_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + }, + { + "name": "vdns_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_onap_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + } +] diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json index db29b5aa5..1aece7315 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-mapping.json @@ -1,113 +1,113 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "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": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vdns_vf_module_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_vf_module_id", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - }, - { - "name": "vdns_int_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_int_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - }, - { - "name": "vdns_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vdns_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id", - "vdns_vf_module_id" - ], - "version": 0 - } -] +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "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": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vdns_vf_module_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_vf_module_id", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], + "version": 0 + }, + { + "name": "vdns_int_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_int_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + }, + { + "name": "vdns_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vdns_onap_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id", + "vdns_vf_module_id" + ], + "version": 0 + } +] diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json index f36701d89..30004521b 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/nf-params-mapping.json @@ -1,65 +1,65 @@ -[ - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "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": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "ip", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "vlb_onap_private_ip_0", - "dictionary-source": "sdnc", - "dependencies": [ - "service-instance-id", - "vnf-id" - ], - "version": 0 - } -] +[ + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "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": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "ip", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "vlb_onap_private_ip_0", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], + "version": 0 + } +] diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-mapping.json index cf3099467..2dee19ccb 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-mapping.json @@ -113,7 +113,7 @@ "version": 0 }, { - "name": "vf_module_name", + "name": "vf-module-name", "property": { "description": "", "required": false, @@ -125,10 +125,10 @@ "entry_schema": { "type": "" }, - "default": "${vf_module_name}" + "default": "${vf-module-name}" }, "input-param": false, - "dictionary-name": "vf_module_name", + "dictionary-name": "vf-module-name", "dictionary-source": "default", "dependencies": [], "version": 0 @@ -370,9 +370,12 @@ "default": "m1.medium" }, "input-param": false, - "dictionary-name": "vdns_flavor_name", - "dictionary-source": "default", - "dependencies": [], + "dictionary-name": "flavor_name", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], "version": 0 }, @@ -811,4 +814,4 @@ ], "version": 0 } -] +] \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-template.vtl index 9c493dc45..84fab0d63 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-template.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-template.vtl @@ -182,15 +182,15 @@ "payload": [ { "param-name": "resource-name", - "param-value": "vf_module_name" + "param-value": "vf-module-name" }, { "param-name": "resource-value", - "param-value": "${vf_module_name}" + "param-value": "${vf-module-name}" }, { "param-name": "external-key", - "param-value": "${vf-module-id}_vf_module_name" + "param-value": "${vf-module-id}_vf-module-name" }, { "param-name": "policy-instance-name", @@ -215,8 +215,8 @@ ], "output-key-mapping": [ { - "resource-name": "vf_module_name", - "resource-value": "${vf_module_name}" + "resource-name": "vf-module-name", + "resource-value": "${vf-module-name}" } ] } diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-mapping.json deleted file mode 100644 index 20e2a2720..000000000 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-mapping.json +++ /dev/null @@ -1,670 +0,0 @@ -[ - { - "name": "cloud_env", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "openstack" - }, - "input-param": true, - "dictionary-name": "cloud_env", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "demo_artifacts_version", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "demo_artifacts_version", - "dictionary-source": "input", - "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": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vpg_int_pktgen_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vpg_int_pktgen_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vpg_int_pktgen_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "install_script_version", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "install_script_version", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "pub_key", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs84Cy8+qi/jvucay0BwFtOq3ian0ulTXFGxkZcZCR0N48j88pbHJaEqb9e25MAsrfH+7Etb9Kd5nbBThEL/i0AyHXnDsc80Oq0sqlLcfLo3SGSurkrNoRofHboJ5Hn+N9SlWN5FCQGbTx1w3rjqR4LasAI6XxH9xpXSFyyge6ysVXH0cYaZ8sg98nFZa1fPJR9L8COjZvF+EYudub2RC5HVyV/sx7bliNFo9JwQh6du1abG4G7ZDjTIcYwYp21iq52UzWU28RVcAyY6AQZJu2lHLdsr8fPvyeWZpC5EqGsxI1G609m9G/dURRKwYfez/f2ATzpn5QjEX7LrLWBM8r Generated-by-Nova" - }, - "input-param": false, - "dictionary-name": "pub_key", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "int_private_net_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${int_private_net_id}" - }, - "input-param": false, - "dictionary-name": "int_private_net_id", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "onap_private_net_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "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": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "onap_private_subnet_id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "pktgen_private_net_cidr", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "pktgen_private_net_cidr", - "dictionary-source": "processor-db", - "dependencies": [], - "version": 0 - }, - { - "name": "vdns_int_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vdns_int_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vdns_int_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "vdns_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vdns_onap_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vdns_onap_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "vlb_int_pktgen_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vlb_int_pktgen_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vlb_int_pktgen_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "vlb_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vlb_onap_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vlb_onap_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "vpg_onap_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vpg_onap_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vpg_onap_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "int_pktgen_private_net_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${int_pktgen_private_net_id}" - }, - "input-param": false, - "dictionary-name": "int_pktgen_private_net_id", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "int_pktgen_private_subnet_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${int_pktgen_private_subnet_id}" - }, - "input-param": false, - "dictionary-name": "int_pktgen_private_subnet_id", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "int_private_subnet_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${int_private_subnet_id}" - }, - "input-param": false, - "dictionary-name": "int_private_subnet_id", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "public_net_id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "public_net_id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "onap_private_net_cidr", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "onap_private_net_cidr", - "dictionary-source": "processor-db", - "dependencies": [], - "version": 0 - }, - { - "name": "sec_group", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "input-param": false, - "dictionary-name": "sec_group", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "service-instance-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "service-instance-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vlb_int_private_ip_0", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vlb_int_private_ip_0}" - }, - "input-param": false, - "dictionary-name": "vlb_int_private_ip_0", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "vlb_private_net_cidr", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "vlb_private_net_cidr", - "dictionary-source": "processor-db", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "vnf-id", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf-model-customization-uuid", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "vnf-model-customization-uuid", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "vf-naming-policy", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP" - }, - "input-param": false, - "dictionary-name": "vf-naming-policy", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "vnf_name", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "${vnf_name}" - }, - "input-param": false, - "dictionary-name": "vnf_name", - "dictionary-source": "default", - "dependencies": [], - "version": 0 - }, - { - "name": "aic-cloud-region", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "aic-cloud-region", - "dictionary-source": "input", - "dependencies": [], - "version": 0 - }, - { - "name": "management-prefix-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "management-prefix-id", - "dictionary-source": "processor-db", - "dependencies": [], - "version": 0 - }, - { - "name": "private1-prefix-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "private1-prefix-id", - "dictionary-source": "processor-db", - "dependencies": [], - "version": 0 - }, - { - "name": "private2-prefix-id", - "property": { - "description": "", - "required": false, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - }, - "default": "" - }, - "input-param": false, - "dictionary-name": "private2-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/vLB/Templates/vdns-vnf-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-template.vtl deleted file mode 100644 index ec43a5a4a..000000000 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vdns-vnf-template.vtl +++ /dev/null @@ -1,280 +0,0 @@ -{ - "resource-accumulator-resolved-data": [ - { - "param-name": "service-instance-id", - "param-value": "${service-instance-id}" - }, - { - "param-name": "vnf_id", - "param-value": "${vnf-id}" - }, - { - "param-name": "vf-naming-policy", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "vnf-model-customization-uuid", - "param-value": "${vnf-model-customization-uuid}" - }, - { - "param-name": "aic-cloud-region", - "param-value": "${aic-cloud-region}" - }, - { - "param-name": "onap_private_net_id", - "param-value": "${onap_private_net_id}" - }, - { - "param-name": "image_name", - "param-value": "${image_name}" - }, - { - "param-name": "onap_private_subnet_id", - "param-value": "${onap_private_subnet_id}" - }, - { - "param-name": "vfccustomizationuuid", - "param-value": "${vfccustomizationuuid}" - }, - { - "param-name": "vf-module-model-customization-uuid", - "param-value": "${vf-module-model-customization-uuid}" - }, - { - "param-name": "cloud_env", - "param-value": "${cloud_env}" - }, - { - "param-name": "install_script_version", - "param-value": "${install_script_version}" - }, - { - "param-name": "pub_key", - "param-value": "${pub_key}" - }, - { - "param-name": "sec_group", - "param-value": "${sec_group}" - }, - { - "param-name": "demo_artifacts_version", - "param-value": "${demo_artifacts_version}" - }, - { - "param-name": "public_net_id", - "param-value": "${public_net_id}" - }, - { - "param-name": "onap_private_net_cidr", - "param-value": "${onap_private_net_cidr}" - }, - { - "param-name": "pktgen_private_net_cidr", - "param-value": "${pktgen_private_net_cidr}" - }, - { - "param-name": "vlb_private_net_cidr", - "param-value": "${vlb_private_net_cidr}" - }, - { - "param-name": "key_name", - "param-value": "olc-key" - } - ], - "capability-data": [ - { - "capability-name": "generate-name", - "key-mapping": [ - { - "payload": [ - { - "param-name": "resource-name", - "param-value": "vnf_name" - }, - { - "param-name": "resource-value", - "param-value": "${vnf_name}" - }, - { - "param-name": "external-key", - "param-value": "${vnf-id}_vnf_name" - }, - { - "param-name": "policy-instance-name", - "param-value": "${vf-naming-policy}" - }, - { - "param-name": "naming-type", - "param-value": "VNF" - }, - { - "param-name": "AIC_CLOUD_REGION", - "param-value": "${aic-cloud-region}" - } - ], - "output-key-mapping": [ - { - "resource-name": "vnf_name", - "resource-value": "${vnf_name}" - } - ] - } - ] - }, - { - "capability-name": "netbox-ip-assign", - "key-mapping": [ - - { - "payload": [ - { - "param-name": "service-instance-id", - "param-value": "${service-instance-id}" - }, - { - "param-name": "prefix-id", - "param-value": "${private1-prefix-id}" - }, - { - "param-name": "vnf-id", - "param-value": "${vnf-id}" - }, - { - "param-name": "external_key", - "param-value": "${vnf-id}-vlb_int_private_ip_0" - } - ], - "output-key-mapping": [ - { - "resource-name": "vlb_int_private_ip_0", - "resource-value": "${vlb_int_private_ip_0}" - } - ] - }, - { - "payload": [ - { - "param-name": "service-instance-id", - "param-value": "${service-instance-id}" - }, - { - "param-name": "prefix-id", - "param-value": "${private2-prefix-id}" - }, - { - "param-name": "vnf-id", - "param-value": "${vnf-id}" - }, - { - "param-name": "external_key", - "param-value": "${vnf-id}-vlb_int_pktgen_private_ip_0" - } - ], - "output-key-mapping": [ - { - "resource-name": "vlb_int_pktgen_private_ip_0", - "resource-value": "${vlb_int_pktgen_private_ip_0}" - } - ] - }, - { - "payload": [ - { - "param-name": "service-instance-id", - "param-value": "${service-instance-id}" - }, - { - "param-name": "prefix-id", - "param-value": "${management-prefix-id}" - }, - { - "param-name": "vnf-id", - "param-value": "${vnf-id}" - }, - { - "param-name": "external_key", - "param-value": "${vnf-id}-vpg_onap_private_ip_0" - } - ], - "output-key-mapping": [ - { - "resource-name": "vpg_onap_private_ip_0", - "resource-value": "${vpg_onap_private_ip_0}" - } - ] - }, - { - "payload": [ - { - "param-name": "service-instance-id", - "param-value": "${service-instance-id}" - }, - { - "param-name": "prefix-id", - "param-value": "${management-prefix-id}" - }, - { - "param-name": "vnf-id", - "param-value": "${vnf-id}" - }, - { - "param-name": "external_key", - "param-value": "${vnf-id}-vlb_onap_private_ip_0" - } - ], - "output-key-mapping": [ - { - "resource-name": "vlb_onap_private_ip_0", - "resource-value": "${vlb_onap_private_ip_0}" - } - ] - }, - { - "payload": [ - { - "param-name": "service-instance-id", - "param-value": "${service-instance-id}" - }, - { - "param-name": "prefix-id", - "param-value": "${private2-prefix-id}" - }, - { - "param-name": "vnf-id", - "param-value": "${vnf-id}" - }, - { - "param-name": "external_key", - "param-value": "${vnf-id}-vpg_int_pktgen_private_ip_0" - } - ], - "output-key-mapping": [ - { - "resource-name": "vpg_int_pktgen_private_ip_0", - "resource-value": "${vpg_int_pktgen_private_ip_0}" - } - ] - } - ] - }, - { - "capability-name": "aai-vnf-put", - "key-mapping": [ - { - "payload": [ - { - "param-name": "generic-vnf", - "param-value": "generic-vnf" - } - ], - "output-key-mapping": [ - { - "resource-name": "aai-vnf-put", - "resource-value": "${status}" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-mapping.json index 9e3b693ca..0104579c3 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-mapping.json @@ -21,7 +21,7 @@ "version": 0 }, { - "name": "vf_module_name", + "name": "vf-module-name", "property": { "description": "", "required": false, @@ -33,10 +33,10 @@ "entry_schema": { "type": "" }, - "default": "${vf_module_name}" + "default": "${vf-module-name}" }, "input-param": false, - "dictionary-name": "vf_module_name", + "dictionary-name": "vf-module-name", "dictionary-source": "default", "dependencies": [], "version": 0 @@ -610,13 +610,15 @@ ], "entry_schema": { "type": "" - }, - "default": "m1.medium" - }, + } + }, "input-param": false, - "dictionary-name": "vlb_flavor_name", - "dictionary-source": "default", - "dependencies": [], + "dictionary-name": "flavor_name", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], "version": 0 }, { @@ -924,4 +926,4 @@ "dependencies": [], "version": 0 } -] +] \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-template.vtl index bc495bd2d..458423e6f 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-template.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vlb-template.vtl @@ -209,15 +209,15 @@ "payload": [ { "param-name": "resource-name", - "param-value": "vf_module_name" + "param-value": "vf-module-name" }, { "param-name": "resource-value", - "param-value": "${vf_module_name}" + "param-value": "${vf-module-name}" }, { "param-name": "external-key", - "param-value": "${vf-module-id}_vf_module_name" + "param-value": "${vf-module-id}_vf-module-name" }, { "param-name": "policy-instance-name", @@ -242,8 +242,8 @@ ], "output-key-mapping": [ { - "resource-name": "vf_module_name", - "resource-value": "${vf_module_name}" + "resource-name": "vf-module-name", + "resource-value": "${vf-module-name}" } ] } diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-mapping.json new file mode 100644 index 000000000..82dbe66a2 --- /dev/null +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-mapping.json @@ -0,0 +1,690 @@ +[ + { + "name": "cloud_env", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "openstack" + }, + "input-param": true, + "dictionary-name": "cloud_env", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "demo_artifacts_version", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "demo_artifacts_version", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "flavor_name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "flavor_name", + "dictionary-source": "input", + "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": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vpg_int_pktgen_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vpg_int_pktgen_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vpg_int_pktgen_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "install_script_version", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "install_script_version", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "pub_key", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs84Cy8+qi/jvucay0BwFtOq3ian0ulTXFGxkZcZCR0N48j88pbHJaEqb9e25MAsrfH+7Etb9Kd5nbBThEL/i0AyHXnDsc80Oq0sqlLcfLo3SGSurkrNoRofHboJ5Hn+N9SlWN5FCQGbTx1w3rjqR4LasAI6XxH9xpXSFyyge6ysVXH0cYaZ8sg98nFZa1fPJR9L8COjZvF+EYudub2RC5HVyV/sx7bliNFo9JwQh6du1abG4G7ZDjTIcYwYp21iq52UzWU28RVcAyY6AQZJu2lHLdsr8fPvyeWZpC5EqGsxI1G609m9G/dURRKwYfez/f2ATzpn5QjEX7LrLWBM8r Generated-by-Nova" + }, + "input-param": false, + "dictionary-name": "pub_key", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "int_private_net_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${int_private_net_id}" + }, + "input-param": false, + "dictionary-name": "int_private_net_id", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "onap_private_net_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "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": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "onap_private_subnet_id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "pktgen_private_net_cidr", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "pktgen_private_net_cidr", + "dictionary-source": "processor-db", + "dependencies": [], + "version": 0 + }, + { + "name": "vdns_int_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vdns_int_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vdns_int_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "vdns_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vdns_onap_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vdns_onap_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "vlb_int_pktgen_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vlb_int_pktgen_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vlb_int_pktgen_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "vlb_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vlb_onap_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vlb_onap_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "vpg_onap_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vpg_onap_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vpg_onap_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "int_pktgen_private_net_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${int_pktgen_private_net_id}" + }, + "input-param": false, + "dictionary-name": "int_pktgen_private_net_id", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "int_pktgen_private_subnet_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${int_pktgen_private_subnet_id}" + }, + "input-param": false, + "dictionary-name": "int_pktgen_private_subnet_id", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "int_private_subnet_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${int_private_subnet_id}" + }, + "input-param": false, + "dictionary-name": "int_private_subnet_id", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "public_net_id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "public_net_id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "onap_private_net_cidr", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "onap_private_net_cidr", + "dictionary-source": "processor-db", + "dependencies": [], + "version": 0 + }, + { + "name": "sec_group", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + } + }, + "input-param": false, + "dictionary-name": "sec_group", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "service-instance-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "service-instance-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vlb_int_private_ip_0", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vlb_int_private_ip_0}" + }, + "input-param": false, + "dictionary-name": "vlb_int_private_ip_0", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "vlb_private_net_cidr", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "vlb_private_net_cidr", + "dictionary-source": "processor-db", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "vnf-id", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf-model-customization-uuid", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "vnf-model-customization-uuid", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "vf-naming-policy", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "SDNC_Policy.Config_MS_ONAP_VNF_NAMING_TIMESTAMP" + }, + "input-param": false, + "dictionary-name": "vf-naming-policy", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "vnf_name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "${vnf_name}" + }, + "input-param": false, + "dictionary-name": "vnf_name", + "dictionary-source": "default", + "dependencies": [], + "version": 0 + }, + { + "name": "aic-cloud-region", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "aic-cloud-region", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + }, + { + "name": "management-prefix-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "management-prefix-id", + "dictionary-source": "processor-db", + "dependencies": [], + "version": 0 + }, + { + "name": "private1-prefix-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "private1-prefix-id", + "dictionary-source": "processor-db", + "dependencies": [], + "version": 0 + }, + { + "name": "private2-prefix-id", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "" + }, + "input-param": false, + "dictionary-name": "private2-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/vLB/Templates/vnf-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-template.vtl new file mode 100644 index 000000000..0080e2b2d --- /dev/null +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vnf-template.vtl @@ -0,0 +1,284 @@ +{ + "resource-accumulator-resolved-data": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "vnf_id", + "param-value": "${vnf-id}" + }, + { + "param-name": "vf-naming-policy", + "param-value": "${vf-naming-policy}" + }, + { + "param-name": "vnf-model-customization-uuid", + "param-value": "${vnf-model-customization-uuid}" + }, + { + "param-name": "aic-cloud-region", + "param-value": "${aic-cloud-region}" + }, + { + "param-name": "onap_private_net_id", + "param-value": "${onap_private_net_id}" + }, + { + "param-name": "image_name", + "param-value": "${image_name}" + }, + { + "param-name": "onap_private_subnet_id", + "param-value": "${onap_private_subnet_id}" + }, + { + "param-name": "vfccustomizationuuid", + "param-value": "${vfccustomizationuuid}" + }, + { + "param-name": "vf-module-model-customization-uuid", + "param-value": "${vf-module-model-customization-uuid}" + }, + { + "param-name": "cloud_env", + "param-value": "${cloud_env}" + }, + { + "param-name": "flavor_name", + "param-value": "${flavor_name}" + }, + { + "param-name": "install_script_version", + "param-value": "${install_script_version}" + }, + { + "param-name": "pub_key", + "param-value": "${pub_key}" + }, + { + "param-name": "sec_group", + "param-value": "${sec_group}" + }, + { + "param-name": "demo_artifacts_version", + "param-value": "${demo_artifacts_version}" + }, + { + "param-name": "public_net_id", + "param-value": "${public_net_id}" + }, + { + "param-name": "onap_private_net_cidr", + "param-value": "${onap_private_net_cidr}" + }, + { + "param-name": "pktgen_private_net_cidr", + "param-value": "${pktgen_private_net_cidr}" + }, + { + "param-name": "vlb_private_net_cidr", + "param-value": "${vlb_private_net_cidr}" + }, + { + "param-name": "key_name", + "param-value": "olc-key" + } + ], + "capability-data": [ + { + "capability-name": "generate-name", + "key-mapping": [ + { + "payload": [ + { + "param-name": "resource-name", + "param-value": "vnf_name" + }, + { + "param-name": "resource-value", + "param-value": "${vnf_name}" + }, + { + "param-name": "external-key", + "param-value": "${vnf-id}_vnf_name" + }, + { + "param-name": "policy-instance-name", + "param-value": "${vf-naming-policy}" + }, + { + "param-name": "naming-type", + "param-value": "VNF" + }, + { + "param-name": "AIC_CLOUD_REGION", + "param-value": "${aic-cloud-region}" + } + ], + "output-key-mapping": [ + { + "resource-name": "vnf_name", + "resource-value": "${vnf_name}" + } + ] + } + ] + }, + { + "capability-name": "netbox-ip-assign", + "key-mapping": [ + + { + "payload": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "prefix-id", + "param-value": "${private1-prefix-id}" + }, + { + "param-name": "vnf-id", + "param-value": "${vnf-id}" + }, + { + "param-name": "external_key", + "param-value": "${vnf-id}-vlb_int_private_ip_0" + } + ], + "output-key-mapping": [ + { + "resource-name": "vlb_int_private_ip_0", + "resource-value": "${vlb_int_private_ip_0}" + } + ] + }, + { + "payload": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "prefix-id", + "param-value": "${private2-prefix-id}" + }, + { + "param-name": "vnf-id", + "param-value": "${vnf-id}" + }, + { + "param-name": "external_key", + "param-value": "${vnf-id}-vlb_int_pktgen_private_ip_0" + } + ], + "output-key-mapping": [ + { + "resource-name": "vlb_int_pktgen_private_ip_0", + "resource-value": "${vlb_int_pktgen_private_ip_0}" + } + ] + }, + { + "payload": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "prefix-id", + "param-value": "${management-prefix-id}" + }, + { + "param-name": "vnf-id", + "param-value": "${vnf-id}" + }, + { + "param-name": "external_key", + "param-value": "${vnf-id}-vpg_onap_private_ip_0" + } + ], + "output-key-mapping": [ + { + "resource-name": "vpg_onap_private_ip_0", + "resource-value": "${vpg_onap_private_ip_0}" + } + ] + }, + { + "payload": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "prefix-id", + "param-value": "${management-prefix-id}" + }, + { + "param-name": "vnf-id", + "param-value": "${vnf-id}" + }, + { + "param-name": "external_key", + "param-value": "${vnf-id}-vlb_onap_private_ip_0" + } + ], + "output-key-mapping": [ + { + "resource-name": "vlb_onap_private_ip_0", + "resource-value": "${vlb_onap_private_ip_0}" + } + ] + }, + { + "payload": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "prefix-id", + "param-value": "${private2-prefix-id}" + }, + { + "param-name": "vnf-id", + "param-value": "${vnf-id}" + }, + { + "param-name": "external_key", + "param-value": "${vnf-id}-vpg_int_pktgen_private_ip_0" + } + ], + "output-key-mapping": [ + { + "resource-name": "vpg_int_pktgen_private_ip_0", + "resource-value": "${vpg_int_pktgen_private_ip_0}" + } + ] + } + ] + }, + { + "capability-name": "aai-vnf-put", + "key-mapping": [ + { + "payload": [ + { + "param-name": "generic-vnf", + "param-value": "generic-vnf" + } + ], + "output-key-mapping": [ + { + "resource-name": "aai-vnf-put", + "resource-value": "${status}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-mapping.json index 554d45fc2..25721e299 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-mapping.json +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-mapping.json @@ -21,7 +21,7 @@ "version": 0 }, { - "name": "vf_module_name", + "name": "vf-module-name", "property": { "description": "", "required": false, @@ -33,10 +33,10 @@ "entry_schema": { "type": "" }, - "default": "${vf_module_name}" + "default": "${vf-module-name}" }, "input-param": false, - "dictionary-name": "vf_module_name", + "dictionary-name": "vf-module-name", "dictionary-source": "default", "dependencies": [], "version": 0 @@ -538,13 +538,15 @@ ], "entry_schema": { "type": "" - }, - "default": "m1.medium" + } }, "input-param": false, - "dictionary-name": "vpg_flavor_name", - "dictionary-source": "default", - "dependencies": [], + "dictionary-name": "flavor_name", + "dictionary-source": "sdnc", + "dependencies": [ + "service-instance-id", + "vnf-id" + ], "version": 0 }, { @@ -829,4 +831,4 @@ ], "version": 0 } -] +] \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-template.vtl index 98d541d69..bd745b179 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-template.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/vpkg-template.vtl @@ -175,15 +175,15 @@ "payload": [ { "param-name": "resource-name", - "param-value": "vf_module_name" + "param-value": "vf-module-name" }, { "param-name": "resource-value", - "param-value": "${vf_module_name}" + "param-value": "${vf-module-name}" }, { "param-name": "external-key", - "param-value": "${vf-module-id}_vf_module_name" + "param-value": "${vf-module-id}_vf-module-name" }, { "param-name": "policy-instance-name", @@ -212,8 +212,8 @@ ], "output-key-mapping": [ { - "resource-name": "vf_module_name", - "resource-value": "${vf_module_name}" + "resource-name": "vf-module-name", + "resource-value": "${vf-module-name}" } ] } -- cgit 1.2.3-korg