diff options
author | Rene_Robert <rene.robert@orange.com> | 2019-11-28 11:26:39 +0100 |
---|---|---|
committer | Eric Debeau <eric.debeau@orange.com> | 2019-11-29 15:08:18 +0000 |
commit | 0551898080e85a2af6bb9442459ee548e58bd21b (patch) | |
tree | 0bde2d833c576e968bf990f65b198f33e0bf1bf6 /docs/guides/onap-user/design/parameter_resolution/ubuntu_example | |
parent | 4de8b081b1d461e5435fea66705789d141d93ad4 (diff) |
major update for simplest and working example
Issue-ID: DOC-569
with Andreas remarks
modify parameter mapping image
rst correction
Signed-off-by: Rene_Robert <rene.robert@orange.com>
Change-Id: I852c75c6dd4619bb1c2e96ea9e257a5319917dad
Diffstat (limited to 'docs/guides/onap-user/design/parameter_resolution/ubuntu_example')
24 files changed, 1761 insertions, 0 deletions
diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/artifact_types.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/artifact_types.json new file mode 100755 index 000000000..da498e35e --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/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/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/data_types.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/data_types.json new file mode 100755 index 000000000..413a5e5b8 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/data_types.json @@ -0,0 +1,116 @@ +{ + "data_types" : { + "dt-resource-assignment-properties" : { + "description" : "Dynamic DataType definition for workflow(resource-assignment).", + "version" : "1.0.0", + "properties" : { + "vnf-id" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "default" : "", + "entry_schema" : { + "type" : "" + } + }, + "vf-module-id" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "default" : "", + "entry_schema" : { + "type" : "" + } + }, + "ubuntuCDS_pub_key" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "entry_schema" : { + "type" : "" + } + }, + "vnf_id" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "default" : "", + "entry_schema" : { + "type" : "" + } + }, + "service-instance-id" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "default" : "", + "entry_schema" : { + "type" : "" + } + }, + "vnf_name" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "default" : "ubuntuCDS-VNF-name", + "entry_schema" : { + "type" : "" + } + }, + "ubuntuCDS_flavor_name" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "entry_schema" : { + "type" : "" + } + }, + "ubuntuCDS_name_0" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "entry_schema" : { + "type" : "" + } + }, + "admin_plane_net_name" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "entry_schema" : { + "type" : "" + } + }, + "ubuntuCDS_image_name" : { + "description" : "", + "required" : false, + "type" : "string", + "status" : "", + "constraints" : [ { } ], + "entry_schema" : { + "type" : "" + } + } + }, + "derived_from" : "tosca.datatypes.Dynamic" + } + } +}
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/node_types.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/node_types.json new file mode 100755 index 000000000..e812db1cf --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/node_types.json @@ -0,0 +1,260 @@ +{ + "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" + }, + "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, + "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-db" : { + "description" : "This is Database Resource Source Node Type", + "version" : "1.0.0", + "properties" : { + "type" : { + "required" : true, + "type" : "string", + "constraints" : [ { + "valid_values" : [ "SQL", "PLSQL" ] + } ], + "default" : "SQL" + }, + "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-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", + "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/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/policy_types.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/policy_types.json new file mode 100755 index 000000000..1e44cc70a --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/policy_types.json @@ -0,0 +1,3 @@ +{ + "policy_types" : { } +}
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/relationship_types.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/relationship_types.json new file mode 100755 index 000000000..4ddd7a57c --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/relationship_types.json @@ -0,0 +1,3 @@ +{ + "relationship_types" : { } +}
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/resources_definition_types.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/resources_definition_types.json new file mode 100755 index 000000000..96e9269ce --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/resources_definition_types.json @@ -0,0 +1,283 @@ +{ + "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" + }, + "sdnc" : { + "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" ] + } + } + } + }, + "pub_key" : { + "tags" : "pub_key", + "name" : "pub_key", + "property" : { + "description" : "pub_key", + "type" : "string" + }, + "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>", + "sources" : { + "input" : { + "type" : "source-input" + }, + "default" : { + "type" : "source-default", + "properties" : { } + }, + "sdnc" : { + "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" : "MALAKOV, YURIY <yuriy.malakov@att.com>", + "sources" : { + "input" : { + "type" : "source-input" + }, + "default" : { + "type" : "source-default", + "properties" : { } + }, + "sdnc" : { + "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/public_net_id", + "path" : "/param/0/value", + "input-key-mapping" : { + "service-instance-id" : "service-instance-id", + "vnf-id" : "vnf-id" + }, + "output-key-mapping" : { + "public_net_id" : "value" + }, + "key-dependencies" : [ "service-instance-id", "vnf-id" ] + } + } + } + }, + "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-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-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" : [ ] + } + } + } + }, + "vlb_flavor_name" : { + "tags" : "vlb_flavor_name", + "name" : "vlb_flavor_name", + "property" : { + "description" : "vlb_flavor_name", + "type" : "string" + }, + "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>", + "sources" : { + "input" : { + "type" : "source-input" + }, + "default" : { + "type" : "source-default", + "properties" : { } + }, + "sdnc" : { + "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/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" ] + } + } + } + }, + "vnf-id" : { + "tags" : "vnf-id", + "name" : "vnf-id", + "property" : { + "description" : "vnf-id", + "type" : "string" + }, + "updated-by" : "MALAKOV, YURIY <yuriy.malakov@att.com>", + "sources" : { + "input" : { + "type" : "source-input" + }, + "default" : { + "type" : "source-default", + "properties" : { } + }, + "sdnc" : { + "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-id", + "path" : "/param/0/value", + "input-key-mapping" : { + "service-instance-id" : "service-instance-id", + "vnf-id" : "vnf-id" + }, + "output-key-mapping" : { + "vnf-id" : "value" + }, + "key-dependencies" : [ "service-instance-id", "vnf-id" ] + } + } + } + }, + "vf-module-id" : { + "name" : "vf-module-id", + "tags" : "vf-module-id", + "updated-by" : "Singal, Kapil <ks220y@att.com>", + "property" : { + "description" : "vf-module-id", + "type" : "string" + }, + "sources" : { + "input" : { + "type" : "source-input", + "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/vf-modules/vf-module/$vf-module-id", + "path": "/vf-module/0/vf-module-id", + "input-key-mapping": { + "service-instance-id": "service-instance-id", + "vnf-id": "vnf-id", + "vf-module-id": "vf-module.vf-module-id" + }, + "output-key-mapping": { + "vf-module-id": "vf-module-id" + }, + "key-dependencies": [ + "service-instance-id", + "vnf-id", + "vf-module.vf-module-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" : { } + }, + "sdnc" : { + "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" ] + } + } + } + } +}
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/ubuntuCDS.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/ubuntuCDS.json new file mode 100755 index 000000000..8933ce14b --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Definitions/ubuntuCDS.json @@ -0,0 +1,96 @@ +{ + "tosca_definitions_version": "ubuntuCDS_1_0_0", + "metadata": { + "template_author": "ONES", + "author-email": "rene.robert@orange.com", + "user-groups": "ADMIN, OPERATION", + "template_name": "ubuntuCDS", + "template_version": "1.0.0", + "template_tags": "ubuntuCDS" + }, + "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": {}, + "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" + ] + } + } + } + } + }, + "node_templates": { + "resource-assignment": { + "type": "component-resource-resolution", + "interfaces": { + "ResourceResolutionComponent": { + "operations": { + "process": { + "inputs": { + "artifact-prefix-names": { + "get_input": "template-prefix" + } + } + } + } + } + }, + "artifacts": { + "ubuntuCDS-template": { + "type": "artifact-template-velocity", + "file": "Templates/ubuntuCDS-template.vtl" + }, + "ubuntuCDS-mapping": { + "type": "artifact-mapping-resource", + "file": "Templates/ubuntuCDS-mapping.json" + }, + "base_ubuntuCDS-template": { + "type": "artifact-template-velocity", + "file": "Templates/base_ubuntuCDS-template.vtl" + }, + "base_ubuntuCDS-mapping": { + "type": "artifact-mapping-resource", + "file": "Templates/base_ubuntuCDS-mapping.json" + } + } + } + } + } + } diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/TOSCA-Metadata/TOSCA.meta b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/TOSCA-Metadata/TOSCA.meta new file mode 100755 index 000000000..ed91e91cf --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,6 @@ +TOSCA-Meta-File-Version: 1.0.0 +CSAR-Version: 1.0 +Created-By: RG, ONES <romain.garel@orange.com> +Entry-Definitions: Definitions/ubuntuCDS.json +Template-Tags: ubuntuCDS +Content-Type: application/vnd.oasis.bpmn
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/base_ubuntuCDS-mapping.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/base_ubuntuCDS-mapping.json new file mode 100755 index 000000000..825f05add --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/base_ubuntuCDS-mapping.json @@ -0,0 +1,185 @@ +[
+ {
+ "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": "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": "vf-module-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-id",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "vnf_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "ubuntuCDS_VNF"
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "sdnc",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "ubuntuCDS_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": "ubuntuCDS_flavor_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vlb_flavor_name",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "ubuntuCDS_pub_key",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "pub_key",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "ubuntuCDS_name_0",
+ "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": "admin_plane_net_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "public_net_id",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ }
+]
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/base_ubuntuCDS-template.vtl b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/base_ubuntuCDS-template.vtl new file mode 100755 index 000000000..bfbe352d6 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/base_ubuntuCDS-template.vtl @@ -0,0 +1,69 @@ +{
+ "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_module_id",
+ "param-value": "${vf-module-id}"
+ },
+ {
+ "param-name": "vnf_id",
+ "param-value": "${vnf-id}"
+ },
+ {
+ "param-name": "vnf_name",
+ "param-value": "${vnf_name}"
+ },
+ {
+ "param-name": "vf_module_name",
+ "param-value": "${vf_module_name}"
+ },
+ {
+ "param-name": "ubuntuCDS_pub_key",
+ "param-value": "${ubuntuCDS_pub_key}"
+ },
+ {
+ "param-name": "ubuntuCDS_image_name",
+ "param-value": "${ubuntuCDS_image_name}"
+ },
+ {
+ "param-name": "ubuntuCDS_flavor_name",
+ "param-value": "${ubuntuCDS_flavor_name}"
+ },
+ {
+ "param-name": "ubuntuCDS_name_0",
+ "param-value": "${ubuntuCDS_name_0}"
+ },
+ {
+ "param-name": "admin_plane_net_name",
+ "param-value": "${admin_plane_net_name}"
+ }
+ ],
+ "capability-data": [
+ {
+ "capability-name": "aai-vf-module-put",
+ "key-mapping": [
+ {
+ "payload": [
+ {
+ "param-name": "vf-module",
+ "param-value": "vf-module"
+ }
+ ],
+ "output-key-mapping": [
+ {
+ "resource-name": "aai-vf-module-put",
+ "resource-value": "${status}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/ubuntuCDS-mapping.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/ubuntuCDS-mapping.json new file mode 100755 index 000000000..f0b2308bb --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/ubuntuCDS-mapping.json @@ -0,0 +1,65 @@ +[ + { + "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": "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_name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "ubuntuCDS-VNF-name" + }, + "input-param": false, + "dictionary-name": "vnf_name", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + } +]
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/ubuntuCDS-template.vtl b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/ubuntuCDS-template.vtl new file mode 100755 index 000000000..209d78023 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/Templates/ubuntuCDS-template.vtl @@ -0,0 +1,37 @@ +{ + "resource-accumulator-resolved-data": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "vnf_id", + "param-value": "${vnf-id}" + }, + { + "param-name": "vnf_name", + "param-value": "${vnf_name}" + } + ], + "capability-data": [ + { + "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/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/cba-ubuntuCDS-enriched.zip b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/cba-ubuntuCDS-enriched.zip Binary files differnew file mode 100755 index 000000000..bb9ce8a42 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-after-enrichment/cba-ubuntuCDS-enriched.zip diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Definitions/ubuntuCDS.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Definitions/ubuntuCDS.json new file mode 100755 index 000000000..4859b8167 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Definitions/ubuntuCDS.json @@ -0,0 +1,86 @@ +{ + "tosca_definitions_version": "ubuntuCDS_1_0_0", + "metadata": { + "template_author": "ONES", + "author-email": "rene.robert@orange.com", + "user-groups": "ADMIN, OPERATION", + "template_name": "ubuntuCDS", + "template_version": "1.0.0", + "template_tags": "ubuntuCDS" + }, + "imports": [], + "dsl_definitions": {}, + "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" + ] + } + } + } + } + }, + "node_templates": { + "resource-assignment": { + "type": "component-resource-resolution", + "interfaces": { + "ResourceResolutionComponent": { + "operations": { + "process": { + "inputs": { + "artifact-prefix-names": { + "get_input": "template-prefix" + } + } + } + } + } + }, + "artifacts": { + "ubuntuCDS-template": { + "type": "artifact-template-velocity", + "file": "Templates/ubuntuCDS-template.vtl" + }, + "ubuntuCDS-mapping": { + "type": "artifact-mapping-resource", + "file": "Templates/ubuntuCDS-mapping.json" + }, + "base_ubuntuCDS-template": { + "type": "artifact-template-velocity", + "file": "Templates/base_ubuntuCDS-template.vtl" + }, + "base_ubuntuCDS-mapping": { + "type": "artifact-mapping-resource", + "file": "Templates/base_ubuntuCDS-mapping.json" + } + } + } + } + } + } diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/TOSCA-Metadata/TOSCA.meta b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/TOSCA-Metadata/TOSCA.meta new file mode 100755 index 000000000..ed91e91cf --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,6 @@ +TOSCA-Meta-File-Version: 1.0.0 +CSAR-Version: 1.0 +Created-By: RG, ONES <romain.garel@orange.com> +Entry-Definitions: Definitions/ubuntuCDS.json +Template-Tags: ubuntuCDS +Content-Type: application/vnd.oasis.bpmn
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/base_ubuntuCDS-mapping.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/base_ubuntuCDS-mapping.json new file mode 100755 index 000000000..825f05add --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/base_ubuntuCDS-mapping.json @@ -0,0 +1,185 @@ +[
+ {
+ "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": "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": "vf-module-id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vf-module-id",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "vnf_id",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ },
+ "default": "ubuntuCDS_VNF"
+ },
+ "input-param": false,
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "sdnc",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "ubuntuCDS_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": "ubuntuCDS_flavor_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "vlb_flavor_name",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "ubuntuCDS_pub_key",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "pub_key",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ },
+ {
+ "name": "ubuntuCDS_name_0",
+ "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": "admin_plane_net_name",
+ "property": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "input-param": false,
+ "dictionary-name": "public_net_id",
+ "dictionary-source": "input",
+ "dependencies": [],
+ "version": 0
+ }
+]
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/base_ubuntuCDS-template.vtl b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/base_ubuntuCDS-template.vtl new file mode 100755 index 000000000..bfbe352d6 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/base_ubuntuCDS-template.vtl @@ -0,0 +1,69 @@ +{
+ "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_module_id",
+ "param-value": "${vf-module-id}"
+ },
+ {
+ "param-name": "vnf_id",
+ "param-value": "${vnf-id}"
+ },
+ {
+ "param-name": "vnf_name",
+ "param-value": "${vnf_name}"
+ },
+ {
+ "param-name": "vf_module_name",
+ "param-value": "${vf_module_name}"
+ },
+ {
+ "param-name": "ubuntuCDS_pub_key",
+ "param-value": "${ubuntuCDS_pub_key}"
+ },
+ {
+ "param-name": "ubuntuCDS_image_name",
+ "param-value": "${ubuntuCDS_image_name}"
+ },
+ {
+ "param-name": "ubuntuCDS_flavor_name",
+ "param-value": "${ubuntuCDS_flavor_name}"
+ },
+ {
+ "param-name": "ubuntuCDS_name_0",
+ "param-value": "${ubuntuCDS_name_0}"
+ },
+ {
+ "param-name": "admin_plane_net_name",
+ "param-value": "${admin_plane_net_name}"
+ }
+ ],
+ "capability-data": [
+ {
+ "capability-name": "aai-vf-module-put",
+ "key-mapping": [
+ {
+ "payload": [
+ {
+ "param-name": "vf-module",
+ "param-value": "vf-module"
+ }
+ ],
+ "output-key-mapping": [
+ {
+ "resource-name": "aai-vf-module-put",
+ "resource-value": "${status}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/ubuntuCDS-mapping.json b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/ubuntuCDS-mapping.json new file mode 100755 index 000000000..f0b2308bb --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/ubuntuCDS-mapping.json @@ -0,0 +1,65 @@ +[ + { + "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": "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_name", + "property": { + "description": "", + "required": false, + "type": "string", + "status": "", + "constraints": [ + {} + ], + "entry_schema": { + "type": "" + }, + "default": "ubuntuCDS-VNF-name" + }, + "input-param": false, + "dictionary-name": "vnf_name", + "dictionary-source": "input", + "dependencies": [], + "version": 0 + } +]
\ No newline at end of file diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/ubuntuCDS-template.vtl b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/ubuntuCDS-template.vtl new file mode 100755 index 000000000..209d78023 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/Templates/ubuntuCDS-template.vtl @@ -0,0 +1,37 @@ +{ + "resource-accumulator-resolved-data": [ + { + "param-name": "service-instance-id", + "param-value": "${service-instance-id}" + }, + { + "param-name": "vnf_id", + "param-value": "${vnf-id}" + }, + { + "param-name": "vnf_name", + "param-value": "${vnf_name}" + } + ], + "capability-data": [ + { + "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/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/cba-before-enrichment.zip b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/cba-before-enrichment.zip Binary files differnew file mode 100644 index 000000000..492e63bf1 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/cba-before-enrichment/cba-before-enrichment.zip diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/curls_resource_dictionary.txt b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/curls_resource_dictionary.txt new file mode 100644 index 000000000..da04447fd --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/curls_resource_dictionary.txt @@ -0,0 +1,50 @@ + +HERE AFTER A REQUEST TO ADD RESOURCE IN CDS RESOURCE DICTIONARY +WE ADD a radius_test_user parameter with 3 methods to resolve that parameter: input, default, sdnc + + +curl -k 'https://cds-ui:30497/resourcedictionary/save' -X POST -H 'Content-type: application/json' \ +-d '{ + "name": "radius_test_user", + "tags": "radius_test_user", + "data_type": "string", + "description": "radius_test_user", + "entry_schema": "string", + "updatedBy": "Seaudi, Abdelmuhaimen <abdelmuhaimen.seaudi@orange.com>", + "definition": { + "tags": "radius_test_user", + "name": "radius_test_user", + "property": { + "description": "radius_test_user", + "type": "string" + }, + "updated-by": "Seaudi, Abdelmuhaimen <abdelmuhaimen.seaudi@orange.com>", + "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/radius_test_user", + "path": "/param/0/value", + "input-key-mapping": { + "service-instance-id": "service-instance-id", + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + "radius_test_user": "value" + }, + "key-dependencies": ["service-instance-id", + "vnf-id"] + } + } + } + } +}' diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.env b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.env new file mode 100755 index 000000000..b9e55fa7f --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.env @@ -0,0 +1,14 @@ +parameters: +# Metadata required by ONAP + vnf_id: ubuntuCDS-VNF + vf_module_id: ubuntuCDS-VF-module + vnf_name: ubuntuCDS-VNF-name + +# Server parameters, naming required by ONAP + ubuntuCDS_image_name: ubuntu-18 + ubuntuCDS_flavor_name: onap.small + ubuntuCDS_pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDY15cdBmIs2XOpe4EiFCsaY6bmUmK/GysMoLl4UG51JCfJwvwoWCoA+6mDIbymZxhxq9IGxilp/yTA6WQ9s/5pBag1cUMJmFuda9PjOkXl04jgqh5tR6I+GZ97AvCg93KAECis5ubSqw1xOCj4utfEUtPoF1OuzqM/lE5mY4N6VKXn+fT7pCD6cifBEs6JHhVNvs5OLLp/tO8Pa3kKYQOdyS0xc3rh+t2lrzvKUSWGZbX+dLiFiEpjsUL3tDqzkEMNUn4pdv69OJuzWHCxRWPfdrY9Wg0j3mJesP29EBht+w+EC9/kBKq+1VKdmsXUXAcjEvjovVL8l1BrX3BY0R8D imported-openssh-key + ubuntuCDS_name_0: ubuntuCDS + +# Network parameters, naming required by ONAP + admin_plane_net_name: admin diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.yaml b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.yaml new file mode 100755 index 000000000..ad250fa52 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.yaml @@ -0,0 +1,110 @@ +heat_template_version: 2013-05-23 + +description: Heat template to deploy a ubuntuCDS VM + +parameters: + # Metadata required by ONAP + vnf_name: + type: string + label: VM name + description: The VM name + vnf_id: + type: string + label: VNF ID + description: The VNF ID is provided by ONAP + vf_module_id: + type: string + label: VF module ID + description: The VF Module ID is provided by ONAP + +# Server parameters, naming required by ONAP + ubuntuCDS_image_name: + type: string + label: Image name or ID + description: Image to be used for compute instance + ubuntuCDS_flavor_name: + type: string + label: Flavor + description: Type of instance (flavor) to be used + ubuntuCDS_pub_key: + type: string + label: Public key + description: Public key to be installed on the compute instance + ubuntuCDS_name_0: + type: string + label: VM name + description: The VM name + +# Network parameters, naming required by ONAP + admin_plane_net_name: + type: string + label: management network + description: The external management network + +resources: + random-str: + type: OS::Heat::RandomString + properties: + length: 4 + + ubuntuCDS_instantiated_key_name: + type: OS::Nova::KeyPair + properties: + name: + str_replace: + template: pre_base_rand + params: + pre: key_ + base: { get_param: vnf_name } + rand: { get_resource: random-str } + public_key: { get_param: ubuntuCDS_pub_key } + save_private_key: false + + ubuntuCDS_admin_security_group: + type: OS::Neutron::SecurityGroup + properties: + description: security group + name: + str_replace: + template: pre_base_rand + params: + pre: sg_ + base: { get_param: vnf_name } + rand: { get_resource: random-str } + rules: [ + {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 22, port_range_max: 22}, + {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}] + + ubuntuCDS_0_admin_plane_port_0: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: pre_base_rand + params: + pre: port_ + base: { get_param: vnf_name } + rand: { get_resource: random-str } + network: { get_param: admin_plane_net_name } + security_groups: [{ get_resource: ubuntuCDS_admin_security_group }] + + ubuntuCDS_VM_settings: + type: OS::Heat::SoftwareConfig + properties: + config: | + #!/bin/bash + sudo apt-get update + + ubuntuCDS_server_0: + type: OS::Nova::Server + properties: + image: { get_param: ubuntuCDS_image_name } + flavor: { get_param: ubuntuCDS_flavor_name } + name: { get_param: ubuntuCDS_name_0 } + metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, vnf_name: { get_param: vnf_name }} + key_name: { get_resource: ubuntuCDS_instantiated_key_name } + networks: + - port: { get_resource: ubuntuCDS_0_admin_plane_port_0 } + user_data_format: RAW + user_data: + get_resource: ubuntuCDS_VM_settings diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/ubuntuCDS_heat.zip b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/ubuntuCDS_heat.zip Binary files differnew file mode 100755 index 000000000..ad359bf32 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/ubuntuCDS_heat.zip |