mapping
Belongs to a node_template, and defines the contract for each resource (the what) to be resolved; it's comprised of:
- name
- required / optional
- type (support complex type)
- dictionary-name
- dictionary-source
- dependencies: this allows to make sure given resources get resolved prior the resolution of the resources defining the dependency.
The dictionary fields reference to a specific data dictionary.
template
For the pre-instantiation use-case, the resource accumulator templates are being used. In Casablanca, these templates are manually created.
For the vFW use case, templates can be found here: https://github.com/onap/ccsdk-apps/tree/casablanca/ms/controllerblueprints/application/load/blueprints/vFW/Templates
As a requirement the template name must match the VF-MODULE label name.
The resource accumulator template can be composed of the following sections:
resource-accumulator-resolved-data: defines all the resources that can be resolved directly from the Service Logic Interpreter context. It expresses a direct mapping between the name of the resource and its value.
"resource-accumulator-resolved-data": [
{
"param-name": "service-instance-id",
"param-value": "${service-instance-id}"
},
{
"param-name": "vnf_id",
"param-value": "${vnf-id}"
}
]
capability-data: defines what capability to use to create a specific resource, along with the ingredients required to invoke the capability and the output mapping.
{
"capability-name": "netbox-ip-assign",
"key-mapping": [
{
"payload": [
{
"param-name": "service-instance-id",
"param-value": "${service-instance-id}"
},
{
"param-name": "prefix-id",
"param-value": "${private-prefix-id}"
},
{
"param-name": "vf-module-id",
"param-value": "${vf-module-id}"
},
{
"param-name": "external_key",
"param-value": "${vf-module-id}-vpg_private_ip_1"
}
],
"output-key-mapping": [
{
"resource-name": "vpg_private_ip_1",
"resource-value": "${vpg_private_ip_1}"
}
]
}
]
}
Data Dictionary
The data dictionary design time framework, part of CDS, is a standalone activity from the blueprint design. Its goal is to model the how to resolve the resource, and to make this model re-usable across services; i.e. service-instance-id parameter will probably always get resolved the same way, hence it can be designed once, and re-used across all services.
As part of modelling a data dictionary entry, the following should be provided:
- name
- tags
- property
- sources
- <type of source>: (can be any type of source as long as the data to resolve already exist, else, a capability should be used; in the case of a capability, the data dictionary model would be different)
- properties
- input key mapping: resources required to perform the request/query
- output key mapping: name of the resource to be resolved mapped to the value resolved by the request/query
- key dependencies: ensure the listed dependencies are resolved prior
- <query/request>: either SQL statement or REST URI
A data dictionary entry can have multiple sources to handle resolution of the same resources in different ways. For instance, say a resource, coming from a SQL table, is to be shared accross VF-MODULE, designer could make the resolution as part of the VNF level. Hence the data dictionary would have two sources, SQL and MDSAL. At the VNF level, process will resolve the dependency, then store it in MDSAL. So while processing VF-MODULE resolution, process can simply fetch the resolved data at VNF level from MDSAL.
The vFW data dictionaries can be found here: https://github.com/onap/ccsdk-apps/tree/casablanca/ms/controllerblueprints/application/load/resource_dictionary
"dictionary-name": "aic-cloud-region",
"dictionary-name": "image_name",
"dictionary-name": "key_name",
"dictionary-name": "nexus_artifact_repo",
"dictionary-name": "nf-role",
"dictionary-name": "nfc-naming-code",
"dictionary-name": "onap_private_net_cidr",
"dictionary-name": "onap_private_net_id",
"dictionary-name": "onap_private_subnet_id",
"dictionary-name": "private-prefix-id",
"dictionary-name": "protected-prefix-id",
"dictionary-name": "protected_private_net_cidr",
"dictionary-name": "public_net_id",
"dictionary-name": "pub_key",
"dictionary-name": "sec_group",
"dictionary-name": "service-instance-id",
"dictionary-name": "unprotected-prefix-id",
"dictionary-name": "unprotected_private_net_cidr",
"dictionary-name": "vf-module-id",
"dictionary-name": "vf-module-label",
"dictionary-name": "vf-module-model-customization-uuid",
"dictionary-name": "vf-module-type",
"dictionary-name": "vf-naming-policy",
"dictionary-name": "vf-nf-code",
"dictionary-name": "vfccustomizationuuid",
"dictionary-name": "vfw_name_0",
"dictionary-name": "vfw_private_ip_0",
"dictionary-name": "vfw_private_ip_1",
"dictionary-name": "vfw_private_ip_2",
"dictionary-name": "vf_module_name",
"dictionary-name": "vm-type",
"dictionary-name": "vnf-id",
"dictionary-name": "vnf-model-customization-uuid",
"dictionary-name": "vnf-name",
"dictionary-name": "vnfc-model-invariant-uuid",
"dictionary-name": "vnfc-model-version",
"dictionary-name": "vnf_name",
"dictionary-name": "vpg_name_0",
"dictionary-name": "vpg_private_ip_0",
"dictionary-name": "vpg_private_ip_1",
"dictionary-name": "vsn_name_0",
"dictionary-name": "vsn_private_ip_0",
"dictionary-name": "vsn_private_ip_1",
Relation between blueprint, data dictionary and template
Below are two examples using color coding to help understand the relationships.
In orange is the information regarding the template. As mentioned before, template is part of the blueprint itself, and for the blueprint to know what template to use, the name has to match.
In green is the relationship between the value resolved within the template, and how it's mapped coming from the blueprint.
In blue is the relationship between a resource mapping to a data dictionary.
In red is the relationship between the resource name to be resolved and the HEAT environment variables.
The key takeaway here is that whatever the value is for each color, it has to match all across. This means both right and left hand side are equivalent; it's all on the designer to express the modeling for the service. That said, best practice is example 1.
Policy
In order to generate consistent name across instances of the service, a naming policy has been created. The naming policy provide the recipe to generate name based on the network function type, e.g. VNF, VNC, VF-MODULE, etc...
For the vFW use case, we are auto-generating names at VNF and VF-MODULE level.
The policies get created and pushed as part of policy micro-service creation, through the invocation of a script. To have this script getting called, make sure to set the preloadPolicies
to true
in the Chart Values.yaml file.
Topology
Here is the overall topology for the vFW service.
HEAT
Each VFC has its own HEAT template and environment file. One of the HEAT templates is the base_template, it takes care of the creation of shared resources across other VFCs; i.e the protected and unprotected networks. Within the MANIFEST.json file, the base_template is identified by the boolean is_base = true, ex: https://github.com/onap/demo/blob/master/heat/vFW_NextGen/templates/MANIFEST.json#L8 This allows to correctly resolve the VFC dependency.
In Casablanca, as CDS isn't integrated within SDC, in order for the runtime to know CDS should be used for assignment, the following fields are added to the server's metadata in the HEAT template:
sdnc_model_name - This is the name of the blueprint (e.g. CBA name)
sdnc_model_version - This is the version of the blueprint
sdnc_artifact_name - This is the name of the VNF/PNF
They identify a Controller Blueprint that has been designed and published; ex: https://github.com/onap/demo/blob/master/heat/vFW_NextGen/templates/vfw.yaml#L200
SDC
Run the init goal to setup ONAP's AAI boilerplate
Run design and distribution
Do to so, :
VSP
First we need to create the Vendor Software Product (VSP). To do so, we zip the content of the vFW_NextGen/templates and we load that.
You'll see the two networks
And the four VFC
VF
Then create a VF, which is the same notion as a VNF.
This will provide the deployment artifacts, comprised of 4 VFCs:
- base_template (taking care of creating both networks)
- vFireWall
- vPacketGenerator
- vSink
The use case is making use of auto-generated name for the VFC, hence, in the properties assignment section, for each VFC we need to fill the following data:
- nfc_naming
- naming_policy: this is where we can put the naming of the naming_policy previously created and pushed in Policy engine.
nfc_naming_code
nfc_function
Service
Then design the service comprised of the VF. Similarly to the VF, we need to specify the naming policy and few other informations, that are:
- nf_naming
- nf_naming_code
- nf_role
Service Properties Assignment
Distribution
Once topology gets distributed, many component consume the CSAR file. Let's have a look at SDNC and SO, and see how their SQL tables get updated with values regarding the service.
SDNC
The notion of VF_MODEL is equivalent to VNF, as the notion of VFC is equivalent to VNFC.
For instance, the VF_MODEL table contains information regarding the naming policy, but more importantly, the information regarding the CDS blueprint to use for that particular service.
mysql> mysql> select * from VF_MODEL where nf_function="ONAP-FIREWALL";
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+-------------------------+---------------------------------------+------------------------+----------------------+---------------+---------+----------+---------+-------------------------+----------------+-----------------+--------------------+--------------------+
| customization_uuid | model_yaml | invariant_uuid | uuid | version | name | naming_policy | ecomp_generated_naming | avail_zone_max_count | nf_function | nf_code | nf_type | nf_role | vendor | vendor_version | sdnc_model_name | sdnc_model_version | sdnc_artifact_name |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+-------------------------+---------------------------------------+------------------------+----------------------+---------------+---------+----------+---------+-------------------------+----------------+-----------------+--------------------+--------------------+
| 39106d12-7629-4b6a-a6d5-b6d7a8041f00 | null | 106c91b3-c577-4658-b8c1-8bc9cd86c672 | 71256464-e388-4b7f-9b92-7c5616766465 | 1.0 | b551da0a-1fe2-489d-a486 | SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP | Y | 1 | ONAP-FIREWALL | vfw | FIREWALL | vFW | 9debd032-c839-4a61-a149 | 1.0 | vFW_spinup | 1.0.0 | vFW_vNF_Artifact |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+-------------------------+---------------------------------------+------------------------+----------------------+---------------+---------+----------+---------+-------------------------+----------------+-----------------+--------------------+--------------------+
1 row in set (0.00 sec)
We do see the correlation between the VF_MODEL above, and its VFC, express in the VF_MODULE_MODEL table.
mysql> select * from VF_MODULE_MODEL where vf_customization_uuid="39106d12-7629-4b6a-a6d5-b6d7a8041f00";
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+----------------+-------------------------+--------------------------------+--------------------------------------+-----------------+
| customization_uuid | model_yaml | invariant_uuid | uuid | version | vf_module_type | availability_zone_count | ecomp_generated_vm_assignments | vf_customization_uuid | vf_module_label |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+----------------+-------------------------+--------------------------------+--------------------------------------+-----------------+
| 18718327-3953-4fab-8802-aa55ecc42c29 | null | 5d0cc1d8-94f1-461c-a7be-3d18cc22da38 | c29a71ad-01fe-4f57-b64f-91e30da52274 | 1 | Expansion | NULL | NULL | 39106d12-7629-4b6a-a6d5-b6d7a8041f00 | vsn |
| 4e65668c-74b0-448f-b2d2-80ed3b1afa5d | null | 986109de-26dc-4084-8ca9-7306f2bb68f3 | 3f392a6b-585e-4e1c-ad98-459a17957841 | 1 | Base | NULL | NULL | 39106d12-7629-4b6a-a6d5-b6d7a8041f00 | base_template |
| 8a4361d4-18a7-4122-9fc8-554db20c03d9 | null | b95372f6-e4c3-4ee0-bb69-c343bec4d7b8 | 7bc1ace1-fe43-4b21-b5d8-60e2da5d3ada | 1 | Expansion | NULL | NULL | 39106d12-7629-4b6a-a6d5-b6d7a8041f00 | vfw |
| d48b9a01-8eb9-46e0-a1d6-bd1dbe8c769d | null | b0443ba5-090d-4210-9855-5aacd960d96e | 381bf92b-d500-4ff4-a6b0-c4c875aa2df1 | 1 | Expansion | NULL | NULL | 39106d12-7629-4b6a-a6d5-b6d7a8041f00 | vpg |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+----------------+-------------------------+--------------------------------+--------------------------------------+-----------------+
4 rows in set (0.01 sec)
The VFC_MODEL contains the naming policies as set up at design time. for each VFC.
mysql> select * from VFC_MODEL where naming_policy LIKE "SDNC_Policy%";
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+---------------------------------------+------------------------+--------------+-----------------+---------+-------------+------------------------------------------+---------------------------------------------------+-------------------+------------------------------------------------------------------------------------+---------------+---------------+
| customization_uuid | model_yaml | invariant_uuid | uuid | version | naming_policy | ecomp_generated_naming | nfc_function | nfc_naming_code | vm_type | vm_type_tag | vm_image_name | vm_flavor_name | high_availability | nfc_naming | min_instances | max_instances |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+---------------------------------------+------------------------+--------------+-----------------+---------+-------------+------------------------------------------+---------------------------------------------------+-------------------+------------------------------------------------------------------------------------+---------------+---------------+
| c619861e-6a66-4e9a-9d78-89327c07690d | null | 0f650273-b429-49f3-b075-6785fa2d19f2 | 8aa52209-f22f-44fb-ae44-26bfc8b1a5f9 | 1.0 | SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP | Y | vsn | vsn | vsn | vsn | PUT THE VM IMAGE NAME HERE (UBUNTU 1404) | PUT THE VM FLAVOR NAME HERE (m1.medium suggested) | NULL | {naming_policy=SDNC_Policy.ONAP_VSN_NAMING_TIMESTAMP, ecomp_generated_naming=true} | 0 | NULL |
| cd2b0be2-a3e0-40d9-baed-84aff8bf2516 | null | 5c55a913-b8a6-4e0f-9aed-71e27f383e25 | 18a784c9-4654-4698-bace-deda8673741c | 1.0 | SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP | Y | vfw | vfw | vfw | vfw | PUT THE VM IMAGE NAME HERE (UBUNTU 1404) | PUT THE VM FLAVOR NAME HERE (m1.medium suggested) | NULL | {naming_policy=SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP, ecomp_generated_naming=true} | 0 | NULL |
| d8d24f05-beab-4a2b-b1d3-7241fb0fe39b | null | 29fc467e-e69d-46da-8eaf-5c42996b7b26 | 20e5401b-1f75-4c56-b16e-c7a0c010e5c2 | 1.0 | SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP | Y | vpg | vpg | vpg | vpg | PUT THE VM IMAGE NAME HERE (UBUNTU 1404) | PUT THE VM FLAVOR NAME HERE (m1.medium suggested) | NULL | {naming_policy=SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP, ecomp_generated_naming=true} | 0 | NULL |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+---------+---------------------------------------+------------------------+--------------+-----------------+---------+-------------+------------------------------------------+---------------------------------------------------+-------------------+------------------------------------------------------------------------------------+---------------+---------------+
3 rows in set (0.00 sec)
SO
The service
table contains information regarding the new deployed service.
MariaDB [catalogdb]> select * from service where model_name LIKE "vFW_NextGen%";
+--------------------------------------+-------------------------+--------------------------------------+---------------+-----------------------------+---------------------+--------------------------------------+--------------+--------------+-------------------------+------------------+------------------+
| MODEL_UUID | MODEL_NAME | MODEL_INVARIANT_UUID | MODEL_VERSION | DESCRIPTION | CREATION_TIMESTAMP | TOSCA_CSAR_ARTIFACT_UUID | SERVICE_TYPE | SERVICE_ROLE | ENVIRONMENT_CONTEXT | WORKLOAD_CONTEXT | SERVICE_CATEGORY |
+--------------------------------------+-------------------------+--------------------------------------+---------------+-----------------------------+---------------------+--------------------------------------+--------------+--------------+-------------------------+------------------+------------------+
| f688ee9f-0fa0-4e22-bc93-ce1abd43f52e | vFWNG 2018-11-16 13:04: | ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00 | 1.0 | catalog service description | 2018-10-29 20:11:10 | 44918885-33b1-4f46-a2db-8caa4707f71b | | | General_Revenue-Bearing | Production | NULL |
+--------------------------------------+-------------------------+--------------------------------------+---------------+-----------------------------+---------------------+--------------------------------------+--------------+--------------+-------------------------+------------------+------------------+
2 rows in set (0.00 sec)
As well as the vf_module
table.
MariaDB [catalogdb]> select * from vf_module;
+--------------------------------------+--------------------------------------+---------------+-----------------------------------------------+-------------+---------+--------------------------------------+---------------------------------+---------------------+--------------------------------------+
| MODEL_UUID | MODEL_INVARIANT_UUID | MODEL_VERSION | MODEL_NAME | DESCRIPTION | IS_BASE | HEAT_TEMPLATE_ARTIFACT_UUID | VOL_HEAT_TEMPLATE_ARTIFACT_UUID | CREATION_TIMESTAMP | VNF_RESOURCE_MODEL_UUID |
+--------------------------------------+--------------------------------------+---------------+-----------------------------------------------+-------------+---------+--------------------------------------+---------------------------------+---------------------+--------------------------------------+
| 7bc1ace1-fe43-4b21-b5d8-60e2da5d3ada | b95372f6-e4c3-4ee0-bb69-c343bec4d7b8 | 1 | B551da0a1fe2489dA486..vfw..module-3 | NULL | 0 | 3e504ebd-fd7c-416f-9dac-045205670672 | NULL | 2018-10-29 18:51:11 | a2f4ba61-b8cf-4313-80cd-87f10c80039a |
| c29a71ad-01fe-4f57-b64f-91e30da52274 | 5d0cc1d8-94f1-461c-a7be-3d18cc22da38 | 1 | B551da0a1fe2489dA486..vsn..module-1 | NULL | 0 | 6c08bc85-32e4-4103-8706-f6bef5828a54 | NULL | 2018-10-29 18:51:11 | a2f4ba61-b8cf-4313-80cd-87f10c80039a |
| 381bf92b-d500-4ff4-a6b0-c4c875aa2df1 | b0443ba5-090d-4210-9855-5aacd960d96e | 1 | B551da0a1fe2489dA486..vpg..module-2 | NULL | 0 | 03595fd9-691b-475e-81c8-b3cfb7b2fb87 | NULL | 2018-10-29 18:51:11 | a2f4ba61-b8cf-4313-80cd-87f10c80039a |
| 3f392a6b-585e-4e1c-ad98-459a17957841 | 986109de-26dc-4084-8ca9-7306f2bb68f3 | 1 | B551da0a1fe2489dA486..base_template..module-0 | NULL | 1 | 35f14cda-0259-4b1f-9467-a6f21e28976e | NULL | 2018-10-29 18:51:11 | a2f4ba61-b8cf-4313-80cd-87f10c80039a |
+--------------------------------------+--------------------------------------+---------------+-----------------------------------------------+-------------+---------+--------------------------------------+---------------------------------+---------------------+--------------------------------------+
6 rows in set (0.00 sec)
Instantiation
Assignment
SO requests
For context, please see SO Building Block flows.
Either you can invoke the Macro for assign, then for activate. The payload for assign and activate are slightly different, as for the activation, you don't need the userParams section providing the information regarding what to assign. Based on the action and the content of the userParams, during the decomposition step within SO, the list of building block to execute, along with the what they should be doing, will be generated. In this use case, we used the all-in-one SO request, hence you can see the decomposition results here.
Build it
For the Service, VNF, and VF-MODULE, the model information are required to send the request to SO. In order to fetch it, we will use an API call to SO CatalogDB micro-service.
In the response below, there is some mapping to do for the SO request:
We now have the model info for VNF and VF-MODULE.
GET http://{{ip}}:{{so-catalog-port}}/ecomp/mso/catalog/v2/serviceVnfs?serviceModelName=vFWNG 2018-11-16 13:04:
Output:
{
"serviceVnfs": [
{
"modelInfo": {
"modelName": "b551da0a-1fe2-489d-a486",
"modelUuid": "71256464-e388-4b7f-9b92-7c5616766465",
"modelInvariantUuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672",
"modelVersion": "1.0",
"modelCustomizationUuid": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"modelInstanceName": "b551da0a-1fe2-489d-a486 0"
},
"toscaNodeType": "org.openecomp.resource.vf.B551da0a1fe2489dA486",
"nfFunction": "vfw",
"nfType": "vfw",
"nfRole": "vfw",
"nfNamingCode": "100",
"multiStageDesign": "false",
"vfModules": [
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..vfw..module-3",
"modelUuid": "7bc1ace1-fe43-4b21-b5d8-60e2da5d3ada",
"modelInvariantUuid": "b95372f6-e4c3-4ee0-bb69-c343bec4d7b8",
"modelVersion": "1",
"modelCustomizationUuid": "8a4361d4-18a7-4122-9fc8-554db20c03d9"
},
"isBase": false,
"vfModuleLabel": "vfw",
"initialCount": 0,
"hasVolumeGroup": false
},
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..vsn..module-1",
"modelUuid": "c29a71ad-01fe-4f57-b64f-91e30da52274",
"modelInvariantUuid": "5d0cc1d8-94f1-461c-a7be-3d18cc22da38",
"modelVersion": "1",
"modelCustomizationUuid": "18718327-3953-4fab-8802-aa55ecc42c29"
},
"isBase": false,
"vfModuleLabel": "vsn",
"initialCount": 0,
"hasVolumeGroup": false
},
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..vpg..module-2",
"modelUuid": "381bf92b-d500-4ff4-a6b0-c4c875aa2df1",
"modelInvariantUuid": "b0443ba5-090d-4210-9855-5aacd960d96e",
"modelVersion": "1",
"modelCustomizationUuid": "d48b9a01-8eb9-46e0-a1d6-bd1dbe8c769d"
},
"isBase": false,
"vfModuleLabel": "vpg",
"initialCount": 0,
"hasVolumeGroup": false
},
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..base_template..module-0",
"modelUuid": "3f392a6b-585e-4e1c-ad98-459a17957841",
"modelInvariantUuid": "986109de-26dc-4084-8ca9-7306f2bb68f3",
"modelVersion": "1",
"modelCustomizationUuid": "4e65668c-74b0-448f-b2d2-80ed3b1afa5d"
},
"isBase": true,
"vfModuleLabel": "base_template",
"initialCount": 1,
"hasVolumeGroup": false
}
]
}
]
}
To get the model info for the service, we can ; if you have multiple services designed, you can then look up by the name of the service to find the uuid and invariantUUID.
As above, there is some mapping to perform:
name → modelName
uuid -> modelVersionId
invariantUUID -> modelInvariantId
GET http://{{ip}}:{{sdc_port}}/sdc/v1/catalog/services
Ouput:
[
{
"uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"invariantUUID": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00",
"name": "vFWNG 2018-11-16 13:04:",
"version": "1.0",
"toscaModelURL": "/sdc/v1/catalog/services/f688ee9f-0fa0-4e22-bc93-ce1abd43f52e/toscaModel",
"category": "Network L1-3",
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "jm0007",
"distributionStatus": "DISTRIBUTED"
}
]
We now have all the model information to build the SO request.
Now, as part of assignment process, they are a few resources that we want to input, both at VNF and VF-MODULE level. These are captured under the instanceParams
of the element.
For VNF level, we have the following:
- onap_private_net_id: this is the ONAP general purpose 10.0.0.0/16 network name
- onap_private_subnet_id: this is the ONAP general purpose 10.0.0.0/16 subnet name
- pub_key: this is the public key to use to SSH into the created VMs
- image_name: this is the image to use for the VMs.
For the VF-MODULE level, we have these two:
- sec_group: this is the security group to use (can vary depending on the type of VNF (in ONAP's lab, we use default)
- public_net_id: this is the public network name (in ONAP lab it's external)
Send it
We are now able to construct the payload, and we can then send the request.
POST http://{{ip}}:{{so_port}}/onap/so/infra/serviceInstantiation/v7/serviceInstances/assign
{
"requestDetails": {
"subscriberInfo": {
"globalSubscriberId": "Demonstration"
},
"requestInfo": {
"suppressRollback": true,
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"requestorId": "adt",
"instanceName": "vFWNG_CDS",
"source": "VID"
},
"cloudConfiguration": {
"lcpCloudRegionId": "RegionOne",
"tenantId": "09d8566ea45e43aa974cf447ed591d77"
},
"requestParameters": {
"subscriptionServiceType": "vFW",
"userParams": [
{
"Homing_Solution": "none"
},
{
"service": {
"instanceParams": [
],
"instanceName": "Service_E2E_vFW",
"resources": {
"vnfs": [
{
"modelInfo": {
"modelName": "b551da0a-1fe2-489d-a486",
"modelVersionId": "71256464-e388-4b7f-9b92-7c5616766465",
"modelInvariantUuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672",
"modelVersion": "1.0",
"modelCustomizationId": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"modelInstanceName": "b551da0a-1fe2-489d-a486 0"
},
"cloudConfiguration": {
"lcpCloudRegionId": "RegionOne",
"tenantId": "09d8566ea45e43aa974cf447ed591d77"
},
"platform": {
"platformName": "test"
},
"lineOfBusiness": {
"lineOfBusinessName": "someValue"
},
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"instanceName": "vFirewall 0",
"instanceParams": [
{
"onap_private_net_id": "oam_network_FMYR",
"onap_private_subnet_id": "oam_network_FMYR",
"pub_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwj7uJMyKiP1ogEsZv5kKDFw9mFNhxI+woR3Tuv8vjfNnqdB1GfSnvTFyNbdpyNdR8BlljkiZ1SlwJLEkvPk0HpOoSVVek/QmBeGC7mxyRcpMB2cNQwjXGfsVrforddXOnOkj+zx1aNdVGMc52Js3pex8B/L00H68kOcwP26BI1o77Uh+AxjOkIEGs+wlWNUmXabLDCH8l8IJk9mCTruKEN9KNj4NRZcaNC+XOz42SyHV9RT3N6efp31FqKzo8Ko63QirvKEEBSOAf9VlJ7mFMrGIGH37AP3JJfFYEHDdOA3N64ZpJLa39y25EWwGZNlWpO/GW5bNjTME04dl4eRyd",
"image_name": "Ubuntu_14.04.5_LTS"
}
],
"vfModules": [
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..base_template..module-0",
"modelVersionId": "3f392a6b-585e-4e1c-ad98-459a17957841",
"modelInvariantUuid": "986109de-26dc-4084-8ca9-7306f2bb68f3",
"modelVersion": "1",
"modelCustomizationId": "4e65668c-74b0-448f-b2d2-80ed3b1afa5d"
},
"instanceName": "vfirewall0..Vfirewall..base_template..module-0",
"instanceParams": [
]
},
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..vsn..module-1",
"modelVersionId": "c29a71ad-01fe-4f57-b64f-91e30da52274",
"modelInvariantUuid": "5d0cc1d8-94f1-461c-a7be-3d18cc22da38",
"modelVersion": "1",
"modelCustomizationId": "18718327-3953-4fab-8802-aa55ecc42c29"
},
"instanceName": "vfirewall0..Vfirewall..vsn..module-0",
"instanceParams": [
{
"sec_group": "default",
"public_net_id": "external"
}
]
},
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..vfw..module-3",
"modelVersionId": "7bc1ace1-fe43-4b21-b5d8-60e2da5d3ada",
"modelInvariantUuid": "b95372f6-e4c3-4ee0-bb69-c343bec4d7b8",
"modelVersion": "1",
"modelCustomizationId": "8a4361d4-18a7-4122-9fc8-554db20c03d9"
},
"instanceName": "vfirewall0..Vfirewall..vfw..module-0",
"instanceParams": [
{
"sec_group": "default",
"public_net_id": "external"
}
]
},
{
"modelInfo": {
"modelName": "B551da0a1fe2489dA486..vpg..module-2",
"modelVersionId": "381bf92b-d500-4ff4-a6b0-c4c875aa2df1",
"modelInvariantUuid": "b0443ba5-090d-4210-9855-5aacd960d96e",
"modelVersion": "1",
"modelCustomizationId": "d48b9a01-8eb9-46e0-a1d6-bd1dbe8c769d"
},
"instanceName": "vfirewall0..Vfirewall..vpg..module-0",
"instanceParams": [
{
"sec_group": "default",
"public_net_id": "external"
}
]
}
]
}
]
},
"modelInfo": {
"modelVersion": "1.0",
"modelVersionId": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"modelInvariantId": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00",
"modelName": "vFWNG 2018-11-16 13:04:",
"modelType": "service"
}
}
}
],
"aLaCarte": false
},
"project": {
"projectName": "Project-Demonstration"
},
"owningEntity": {
"owningEntityId": "24ef5425-bec4-4fa3-ab03-c0ecf4eaac96",
"owningEntityName": "OE-Demonstration"
},
"modelInfo": {
"modelVersion": "1.0",
"modelVersionId": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"modelInvariantId": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00",
"modelName": "vFWNG 2018-11-16 13:04:",
"modelType": "service"
}
}
}
SDNC requests
During the assignment process, SO building blocks are calling SDNC GENERIC-RESOURCE-API with the assignment action. This occurs as Service, VNF and VF-MODULE level. Below are the payloads.
http://sdnc.onap:8282/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation/
{
"input": {
"request-information": {
"request-action": "CreateServiceInstance",
"source": "MSO",
"request-id": "e9701845-a7af-4a60-b800-84647693f5f8"
},
"sdnc-request-header": {
"svc-request-id": "e9701845-a7af-4a60-b800-84647693f5f8",
"svc-action": "assign"
},
"service-information": {
"onap-model-information": {
"model-name": "vFWNG 2018-11-16 13:04:",
"model-version": "1.0",
"model-uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"model-invariant-uuid": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00"
},
"subscription-service-type": "vFW",
"service-id": "c478e926-f4ca-41e8-9c74-af700ba80f56",
"global-customer-id": "Demonstration",
"service-instance-id": "c478e926-f4ca-41e8-9c74-af700ba80f56"
},
"service-request-input": {
"service-instance-name": "vFWNG_CDS_0"
}
}
}
POST http://sdnc.onap:8282/restconf/operations/GENERIC-RESOURCE-API:vnf-topology-operation/
{
"input": {
"request-information": {
"request-action": "CreateVnfInstance",
"source": "MSO",
"request-id": "142ce2b5-f7ef-44be-b310-74e18895cfb8"
},
"sdnc-request-header": {
"svc-request-id": "142ce2b5-f7ef-44be-b310-74e18895cfb8",
"svc-action": "assign"
},
"service-information": {
"onap-model-information": {
"model-name": "vFWNG 2018-11-16 13:04:",
"model-version": "1.0",
"model-uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"model-invariant-uuid": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00"
},
"subscription-service-type": "vFW",
"service-id": "c478e926-f4ca-41e8-9c74-af700ba80f56",
"global-customer-id": "Demonstration",
"service-instance-id": "c478e926-f4ca-41e8-9c74-af700ba80f56"
},
"vnf-information": {
"onap-model-information": {
"model-name": "b551da0a-1fe2-489d-a486",
"model-version": "1.0",
"model-customization-uuid": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"model-uuid": "71256464-e388-4b7f-9b92-7c5616766465",
"model-invariant-uuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672"
},
"vnf-id": "cdf6d5d1-f589-49a1-9868-ae3bd927c8a9",
"vnf-name": "vFirewall 0",
"vnf-type": "vFWNG 2018-11-16 13:04:/null"
},
"vnf-request-input": {
"aic-cloud-region": "RegionOne",
"cloud-owner": "CloudOwner",
"tenant": "09d8566ea45e43aa974cf447ed591d77",
"vnf-network-instance-group-ids": [
],
"vnf-input-parameters": {
"param": [
{
"name": "image_name",
"value": "Ubuntu_14.04.5_LTS"
},
{
"name": "onap_private_net_id",
"value": "oam_network_FMYR"
},
{
"name": "pub_key",
"value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwj7uJMyKiP1ogEsZv5kKDFw9mFNhxI+woR3Tuv8vjfNnqdB1GfSnvTFyNbdpyNdR8BlljkiZ1SlwJLEkvPk0HpOoSVVek/QmBeGC7mxyRcpMB2cNQwjXGfsVrforddXOnOkj+zx1aNdVGMc52Js3pex8B/L00H68kOcwP26BI1o77Uh+AxjOkIEGs+wlWNUmXabLDCH8l8IJk9mCTruKEN9KNj4NRZcaNC+XOz42SyHV9RT3N6efp31FqKzo8Ko63QirvKEEBSOAf9VlJ7mFMrGIGH37AP3JJfFYEHDdOA3N64ZpJLa39y25EWwGZNlWpO/GW5bNjTME04dl4eRyd"
}
]
},
"vnf-name": "vFirewall 0"
}
}
}
POST http://sdnc.onap:8282/restconf/operations/GENERIC-RESOURCE-API:vf-module-topology-operation/
{
"input": {
"request-information": {
"request-action": "CreateVfModuleInstance",
"source": "MSO",
"request-id": "e90d493b-a530-4c8e-b7ff-1bce99a79783"
},
"sdnc-request-header": {
"svc-request-id": "e90d493b-a530-4c8e-b7ff-1bce99a79783",
"svc-action": "assign"
},
"service-information": {
"onap-model-information": {
"model-name": "vFWNG 2018-11-16 13:04:",
"model-version": "1.0",
"model-uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"model-invariant-uuid": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00"
},
"subscription-service-type": "vFW",
"service-id": "c478e926-f4ca-41e8-9c74-af700ba80f56",
"global-customer-id": "Demonstration",
"service-instance-id": "c478e926-f4ca-41e8-9c74-af700ba80f56"
},
"vf-module-information": {
"onap-model-information": {
"model-name": "B551da0a1fe2489dA486..base_template..module-0",
"model-version": "1",
"model-customization-uuid": "4e65668c-74b0-448f-b2d2-80ed3b1afa5d",
"model-uuid": "3f392a6b-585e-4e1c-ad98-459a17957841",
"model-invariant-uuid": "986109de-26dc-4084-8ca9-7306f2bb68f3"
},
"vf-module-id": "b7384274-aa66-4794-91ae-637d775c6725",
"vf-module-type": "B551da0a1fe2489dA486..base_template..module-0"
},
"vf-module-request-input": {
"aic-cloud-region": "RegionOne",
"cloud-owner": "CloudOwner",
"tenant": "09d8566ea45e43aa974cf447ed591d77",
"vf-module-name": "vfirewall0..Vfirewall..base_template..module-0",
"vf-module-input-parameters": {
}
},
"vnf-information": {
"onap-model-information": {
"model-name": "b551da0a-1fe2-489d-a486",
"model-version": "1.0",
"model-customization-uuid": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"model-uuid": "71256464-e388-4b7f-9b92-7c5616766465",
"model-invariant-uuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672"
},
"vnf-id": "cdf6d5d1-f589-49a1-9868-ae3bd927c8a9",
"vnf-name": "RegionOne_vFW_20181116T195414474Z",
"vnf-type": "vFWNG 2018-11-16 13:04:/null"
}
}
}
POST http://sdnc.onap:8282/restconf/operations/GENERIC-RESOURCE-API:vf-module-topology-operation/
{
"input": {
"request-information": {
"request-action": "CreateVfModuleInstance",
"source": "MSO",
"request-id": "eab8ec76-9fa1-4f87-b39d-a6e87b451478"
},
"sdnc-request-header": {
"svc-request-id": "eab8ec76-9fa1-4f87-b39d-a6e87b451478",
"svc-action": "assign"
},
"service-information": {
"onap-model-information": {
"model-name": "vFWNG 2018-11-16 13:04:",
"model-version": "1.0",
"model-uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"model-invariant-uuid": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00"
},
"subscription-service-type": "vFW",
"service-id": "c478e926-f4ca-41e8-9c74-af700ba80f56",
"global-customer-id": "Demonstration",
"service-instance-id": "c478e926-f4ca-41e8-9c74-af700ba80f56"
},
"vf-module-information": {
"onap-model-information": {
"model-name": "B551da0a1fe2489dA486..vfw..module-3",
"model-version": "1",
"model-customization-uuid": "8a4361d4-18a7-4122-9fc8-554db20c03d9",
"model-uuid": "7bc1ace1-fe43-4b21-b5d8-60e2da5d3ada",
"model-invariant-uuid": "b95372f6-e4c3-4ee0-bb69-c343bec4d7b8"
},
"vf-module-id": "f4cf32a2-fa4f-4239-9621-8c5f3121a0ea",
"vf-module-type": "B551da0a1fe2489dA486..vfw..module-3"
},
"vf-module-request-input": {
"aic-cloud-region": "RegionOne",
"cloud-owner": "CloudOwner",
"tenant": "09d8566ea45e43aa974cf447ed591d77",
"vf-module-name": "vfirewall0..Vfirewall..vfw..module-0",
"vf-module-input-parameters": {
"param": [
{
"name": "public_net_id",
"value": "external"
},
{
"name": "sec_group",
"value": "default"
}
]
}
},
"vnf-information": {
"onap-model-information": {
"model-name": "b551da0a-1fe2-489d-a486",
"model-version": "1.0",
"model-customization-uuid": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"model-uuid": "71256464-e388-4b7f-9b92-7c5616766465",
"model-invariant-uuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672"
},
"vnf-id": "cdf6d5d1-f589-49a1-9868-ae3bd927c8a9",
"vnf-name": "RegionOne_vFW_20181116T195414474Z",
"vnf-type": "vFWNG 2018-11-16 13:04:/null"
}
}
}
POST http://sdnc.onap:8282/restconf/operations/GENERIC-RESOURCE-API:vf-module-topology-operation/
{
"input": {
"request-information": {
"request-action": "CreateVfModuleInstance",
"source": "MSO",
"request-id": "bdcd47ee-bbb6-477b-8af4-5c387ea0404e"
},
"sdnc-request-header": {
"svc-request-id": "bdcd47ee-bbb6-477b-8af4-5c387ea0404e",
"svc-action": "assign"
},
"service-information": {
"onap-model-information": {
"model-name": "vFWNG 2018-11-16 13:04:",
"model-version": "1.0",
"model-uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"model-invariant-uuid": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00"
},
"subscription-service-type": "vFW",
"service-id": "c478e926-f4ca-41e8-9c74-af700ba80f56",
"global-customer-id": "Demonstration",
"service-instance-id": "c478e926-f4ca-41e8-9c74-af700ba80f56"
},
"vf-module-information": {
"onap-model-information": {
"model-name": "B551da0a1fe2489dA486..vsn..module-1",
"model-version": "1",
"model-customization-uuid": "18718327-3953-4fab-8802-aa55ecc42c29",
"model-uuid": "c29a71ad-01fe-4f57-b64f-91e30da52274",
"model-invariant-uuid": "5d0cc1d8-94f1-461c-a7be-3d18cc22da38"
},
"vf-module-id": "b698db6f-8177-4a95-9ca6-6cf1da9ed92e",
"vf-module-type": "B551da0a1fe2489dA486..vsn..module-1"
},
"vf-module-request-input": {
"aic-cloud-region": "RegionOne",
"cloud-owner": "CloudOwner",
"tenant": "09d8566ea45e43aa974cf447ed591d77",
"vf-module-name": "vfirewall0..Vfirewall..vsn..module-0",
"vf-module-input-parameters": {
"param": [
{
"name": "public_net_id",
"value": "external"
},
{
"name": "sec_group",
"value": "default"
}
]
}
},
"vnf-information": {
"onap-model-information": {
"model-name": "b551da0a-1fe2-489d-a486",
"model-version": "1.0",
"model-customization-uuid": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"model-uuid": "71256464-e388-4b7f-9b92-7c5616766465",
"model-invariant-uuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672"
},
"vnf-id": "cdf6d5d1-f589-49a1-9868-ae3bd927c8a9",
"vnf-name": "RegionOne_vFW_20181116T195414474Z",
"vnf-type": "vFWNG 2018-11-16 13:04:/null"
}
}
}
POST http://sdnc.onap:8282/restconf/operations/GENERIC-RESOURCE-API:vf-module-topology-operation/
{
"input": {
"request-information": {
"request-action": "CreateVfModuleInstance",
"source": "MSO",
"request-id": "8478ac1b-8ce5-4058-898a-11c1a9c89d77"
},
"sdnc-request-header": {
"svc-request-id": "8478ac1b-8ce5-4058-898a-11c1a9c89d77",
"svc-action": "assign"
},
"service-information": {
"onap-model-information": {
"model-name": "vFWNG 2018-11-16 13:04:",
"model-version": "1.0",
"model-uuid": "f688ee9f-0fa0-4e22-bc93-ce1abd43f52e",
"model-invariant-uuid": "ec75d7c7-8fdf-4f35-a4bf-3df4cc66dc00"
},
"subscription-service-type": "vFW",
"service-id": "c478e926-f4ca-41e8-9c74-af700ba80f56",
"global-customer-id": "Demonstration",
"service-instance-id": "c478e926-f4ca-41e8-9c74-af700ba80f56"
},
"vf-module-information": {
"onap-model-information": {
"model-name": "B551da0a1fe2489dA486..vpg..module-2",
"model-version": "1",
"model-customization-uuid": "d48b9a01-8eb9-46e0-a1d6-bd1dbe8c769d",
"model-uuid": "381bf92b-d500-4ff4-a6b0-c4c875aa2df1",
"model-invariant-uuid": "b0443ba5-090d-4210-9855-5aacd960d96e"
},
"vf-module-id": "c99eb0c8-ddb0-411d-85df-9761da7bc895",
"vf-module-type": "B551da0a1fe2489dA486..vpg..module-2"
},
"vf-module-request-input": {
"aic-cloud-region": "RegionOne",
"cloud-owner": "CloudOwner",
"tenant": "09d8566ea45e43aa974cf447ed591d77",
"vf-module-name": "vfirewall0..Vfirewall..vpg..module-0",
"vf-module-input-parameters": {
"param": [
{
"name": "public_net_id",
"value": "external"
},
{
"name": "sec_group",
"value": "default"
}
]
}
},
"vnf-information": {
"onap-model-information": {
"model-name": "b551da0a-1fe2-489d-a486",
"model-version": "1.0",
"model-customization-uuid": "39106d12-7629-4b6a-a6d5-b6d7a8041f00",
"model-uuid": "71256464-e388-4b7f-9b92-7c5616766465",
"model-invariant-uuid": "106c91b3-c577-4658-b8c1-8bc9cd86c672"
},
"vnf-id": "cdf6d5d1-f589-49a1-9868-ae3bd927c8a9",
"vnf-name": "RegionOne_vFW_20181116T195414474Z",
"vnf-type": "vFWNG 2018-11-16 13:04:/null"
}