...
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
SDNC Modeling Process (via Controller Design Studio UI).
Execution - Runtime process (via VID to SO to SDNC) 5. Capability DGs execution flow Logic for vnf and vf-module assignement is pretty much the same. The main difference is, vnf assignment will take care of calling the naming microservice if specified in the controller blueprint artifact.
This is the general logic of the vf-module assign flow and sub-flows: call vf-module-topology-operation call vf-module-topology-operation-assign set service-data based on SO request (userParams / cloudParams) call self-serve-vf-module-assign set capability.execution-order: this is where we're adding our capability flow: netbox-ip-assign call self-serve-vfmodule-ra-assignment execute ConfigAssignment (Resource Accumulator micro-service) put resource-accumulator-resolved-data in MDSAL service-data call self-serve- + capability-name, e.g. self-serve-netbox-ip-assign execute NetboxClient assignIpAddress put vf-module information in AAI put vnfc information in AAI
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OverviewThe generic-resource-api is used to assign cloud parameter assignment during instantiation flow. The vf-module instantiation flow begins with the main DG, self-serve-vfmodule-assign, when the svc-action = assign in the rpc request. The main DG will call a series of sub-DGs according to the execution order of all the predefined capability components, such as generate-name, vlan-tag-assignment, eipam-ip-assignment, etc. For IP assignment, the main DG calls the sub-DG, self-serve-eipam-ip-assignment to start the ip assignment process. This wiki serves as the blueprint for capability integration with generic-resource-api for ip assignments, and it is used to integrate EIPAM custom plugin to obtain ip address assignments during vf-module orchestration. PrerequisiteThe following parameters must be set in context memory prior to the self-serve-eipam-ip-assignment sub-DG is called.
Logic1. Unresolved Parameter Resolution- Calls self-serve-capability-param-resolution DG to resolve all the unresolved values in vf-module-parameters.param[].resource-resolution-data.resource-key[].value where resource-resolution-data.capability-name matches this DG name. 2. Call EIPAM Plugin- The EIPAM plugin returns the ip assignment in a context variable, called eipam-ip-block - eipam-ip-block.plans[].requests[].ip-prefix - eipam-ip-block.plans[].requests[].ip-prefix-length - eipam-ip-block.plans[].requests[].ReservedAssignments[0]. ReservedAssignment[3].ReservedKeyIPAddress - Insert an entry to EIPAM_IP_ASSIGNMENTS table 3. Set Heat ParametersThe sub-DG, self-serve-vfmodule-assign will set value of then heat parameters based on the EIPAM - vmxvre_oam_ip_0 = eipam-ip-block.plans[].requests[].ip-prefix - vmxvre_oam_ip_prefix_0 = eipam-ip-block.plans[].requests[].ip-prefix-length - vmxvre_oam_gateway = eipam-ip-block.plans[].requests[].ReservedAssignments[0]. - ReservedAssignment[3].ReservedKeyIPAddress 4. Netbox API call | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Verb | URI | JSON payload (Bare minimal) | Params | Type | Comments | JSON response | Note | POST | /api/ipam/prefixes/{prefix-id}/available-ips/ | { "custom_fields": { "external-key": "test", "resource-name": "cloudParamName" } } | prefix-id | Integer | The ID of the prefix from which to retrieve next available IP | Loop function within the SDNC for getting the next available for each cloud param resource. |
Code Block | |
---|---|
{
"input": {
"module-name": "GENERIC-RESOURCE-API",
"rpc-name": "self-serve-netbox-ip-assignment",
"mode": "sync",
"sli-parameter": [
{
"parameter-name": "ss.capability-name",
"string-value": "netbox-ip-assign"
},
{
"parameter-name": "ss.capability-action",
"string-value": "assign"
},
{
"parameter-name": "vnf-index",
"int-value": 0
},
{
"parameter-name": "vf-module-index",
"int-value": 0
},
{
"parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param_length",
"string-value": "2"
},
{
"parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param[0].name",
"string-value": "unprotected_private_net_cidr"
},
{
"parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param[0].resource-resolution-data.capability-name",
"string-value": "netbox-ip-assign"
},
{
"parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param[0].resource-resolution-data.status",
"string-value": "PENDING"
},
|
Expand | ||
---|---|---|
| ||
Work items required to add a new capability: If there is any database needed for the plugin, create them in sdnc/oam: sdnc/oam: - add a dump of the tables + static data if any in sdnc-oam/installation/sdnc/src/main/resources with the file name being ${SOMETHING}.data.dump. example: https://gerrit.onap.org/r/#/c/61137/ - add the DG flow for the operation you're implementing. The DG should be named 'self-serve-$CAPABILITY_NAME', e.g. self-serve-netbbox-ip-assign The code to interact with the external system has to be done in the ccsdk/sli/adaptors: ccsdk/sli/apdaptors: - create a new plugin composed of features/installer/provider. example: https://github.com/onap/ccsdk-sli-adaptors/tree/master/netbox-client - add the module in the root pom.xml file. example: https://github.com/onap/ccsdk-sli-adaptors/blob/master/pom.xml#L114 - add the plugin feature into ccsdk/sli/apdaptors/features/ccsdk-sli-adaptors-all/pom.xml. example: https://github.com/onap/ccsdk-sli-adaptors/blob/master/features/ccsdk-sli-adaptors-all/pom.xml#L61-L67 - the interface you will create in the provider has to extend org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin. example: https://github.com/onap/ccsdk-sli-adaptors/blob/master/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/api/NetboxClient.java#L27 - the functions defined in your interfaces: example: https://github.com/onap/ccsdk-sli-adaptors/blob/master/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/api/NetboxClient.java#L32-L42 - can have up to two parameters, a Map<String,String> passing all the input parameters, and the org.onap.ccsdk.sli.core.sli.SvcLogicContext being the DG context - have to return org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus as this is the standard output for 'execute' block of DG In order to of the plugin has to be added to odlsli to it's landing in the SDNC image down the CI: ccsdk/distribution: - add the *.repo artifact in ccsdk/distribution/odlsli/pom.xml. example: https://github.com/onap/ccsdk-distribution/blob/master/odlsli/pom.xml#L122-L128 |
Expand | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
OverviewThe generic-resource-api is used to assign cloud parameter assignment during instantiation flow. The vf-module instantiation flow begins with the main DG, self-serve-vfmodule-assign, when the svc-action = assign in the rpc request. The main DG will call a series of sub-DGs according to the execution order of all the predefined capability components, such as generate-name, vlan-tag-assignment, eipam-ip-assignment, etc. For IP assignment, the main DG calls the sub-DG, self-serve-eipam-ip-assignment to start the ip assignment process. This wiki serves as the blueprint for capability integration with generic-resource-api for ip assignments, and it is used to integrate EIPAM custom plugin to obtain ip address assignments during vf-module orchestration. PrerequisiteThe following parameters must be set in context memory prior to the self-serve-eipam-ip-assignment sub-DG is called.
Logic1. Unresolved Parameter Resolution- Calls self-serve-capability-param-resolution DG to resolve all the unresolved values in vf-module-parameters.param[].resource-resolution-data.resource-key[].value where resource-resolution-data.capability-name matches this DG name. 2. Call EIPAM Plugin- The EIPAM plugin returns the ip assignment in a context variable, called eipam-ip-block - eipam-ip-block.plans[].requests[].ip-prefix - eipam-ip-block.plans[].requests[].ip-prefix-length - eipam-ip-block.plans[].requests[].ReservedAssignments[0]. ReservedAssignment[3].ReservedKeyIPAddress - Insert an entry to EIPAM_IP_ASSIGNMENTS table 3. Set Heat ParametersThe sub-DG, self-serve-vfmodule-assign will set value of then heat parameters based on the EIPAM - vmxvre_oam_ip_0 = eipam-ip-block.plans[].requests[].ip-prefix - vmxvre_oam_ip_prefix_0 = eipam-ip-block.plans[].requests[].ip-prefix-length - vmxvre_oam_gateway = eipam-ip-block.plans[].requests[].ReservedAssignments[0]. - ReservedAssignment[3].ReservedKeyIPAddress 4. Netbox API call
5. Testing out the DGTo test the DG to resolve multiple IPs, that mock-up data can be used:
6. Additional notes
6. Additional notes
| ||||||||||||||||||||||||||||
Expand | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
OverviewThe generic-resource-api is used to unassign cloud parameters during the vf-module unassign flow. The vf-module unassign flow begins with the main DG, self-serve-vfmodule-unassign, when the svc-action = unassign in the rpc request. The main DG will call a series of sub-DGs according to the execution order of all the predefined capability components, such as generate-name, vlan-tag-assignment, eipam-ip-assignment, etc to unassign cloud parameters. Upon successful unassignment, the main DG will clear the service-data data in MD-SAL PrerequisitesThe following parameters must be set in context memory prior to the self-serve-eipam-ip-assignment sub-DG is called.
Logic1. Set EIPAM_IP_ASSIGNMENTS status
2. Call EIPAM Plugin unassignIp
3. Set Heat Parameters status
4. Netbox API call | ||||||||||||||||||||||||||||
Action | Verb | URI | JSON payload (Bare minimal) | Params | Type | Comments | JSON response | Note | ||||||||||||||||||||
Delete IP | DELETE | /api/ipam/ip-addresses/{ip-id}/ | - | ip-id | Integer | The ID of the IP address to delete | - | done as part of the VF Module delete action. |
Code Block |
---|
{ "input": { "module-name": "GENERIC-RESOURCE-API", "rpc-name": "self-serve-netbox-ip-assignment", "mode": "sync", "sli-parameter": [ { "parameter-name": "ss.capability-name", "string-value": "netbox-ip-assign" }, { "parameter-name": "ss.capability-action", "string-value": "unassign" }, { "parameter-name": "vnf-index", "int-value": 0 }, { "parameter-name": "vf-module-index", "int-value": 0 }, { "parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param_length", "string-value": "2" }, { "parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param[0].resource-resolution-data.capability-name", "string-value": "netbox-ip-assign" }, { "parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param[0].resource-resolution-data.status", "string-value": "PENDING" }, { "parameter-name": "service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.param[0].resource-resolution-data.resource-key_length", "int-value": 2When self-serve-ra-assignment returns success, loop thru VNF capability execution order to call each capability DG by capabaility-name - Each capability DG will call self-serve-capability-param-resolution to resolve all unresolved value in resource-keys before calling its - capability component. - When ALL capability DG returns success, call self-serve-unresolved-composite-data DG. - Call AAI Put to update AAI - If ALL capability DG and AAI update are successful, persists service-data in MD-SAL and return SUCCESS to MSO - If Any capability DG returns failure, persists service-data in MD-SAL and return FAILED to MSO self-serve-ra-assignment - Called by self-serve-vnf-assign - Generate input json string for configAssignmentNode - Call ConfigAssignmentNode - Parse ConfigAssignmentNode Response - Copy RA response to param[] self-service-capability-param-resolution - Called by all Capability DGs - Loop thru all resource-key[].value that contains “$” - Resolve resource-key[].value by looping thru all param[].value - Return failure if resource-key[].value cannot be resolved. |
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
OverviewThe generic-resource-api is used to unassign cloud parameters during the vf-module unassign flow. The vf-module unassign flow begins with the main DG, self-serve-vfmodule-unassign, when the svc-action = unassign in the rpc request. The main DG will call a series of sub-DGs according to the execution order of all the predefined capability components, such as generate-name, vlan-tag-assignment, eipam-ip-assignment, etc to unassign cloud parameters. Upon successful unassignment, the main DG will clear the service-data data in MD-SAL PrerequisitesThe following parameters must be set in context memory prior to the self-serve-eipam-ip-assignment sub-DG is called.
Logic1. Set EIPAM_IP_ASSIGNMENTS status
2. Call EIPAM Plugin unassignIp
3. Set Heat Parameters status
4. Netbox API call
5. Testing out the DGTo test the DG to release multiple IPs, that mock-up data can be used:
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1. SDNC Blueprint
2. Artifact Templates
3. Data Dictionaries
|