Configure Deployments Using WorkFlows
This is a workflow that simplifies the creation of ICM configuration deployments. It takes the inputs and create new deployment. For the creation of new deployment, we used the "create-deployments" ICM endpoint and the following inputs:
For this workflow to run successfully, an intent type must be created or imported, and the required templates must already exist; otherwise, the workflow will either terminate quickly or return an error indicating that the intent type or template is missing.
This tutorial requires a NSP managed network with at least one SROS device. In order to exercise all examples, a minimum of 3 SROS devices is recommended. Devices can be either classic managed, via NFM-P, or model driven.
This tutorial is meant as a proof of concept and as an example method for configuring devices. It is not designed to be implemented, and must not be used as is, in a production network. It is intended to guide development of an OSS.
This tutorial has only been tested with SROS-based network elements in a lab environment and may not be suitable for performance or scalability in a production network.
This tutorial has been tested with and is supported in NSP 25.8.
The workflow has the following functions:
For this workflow to run successfully, an intent type must be created or imported, and the required templates must already exist; otherwise, the workflow will either terminate quickly or return an error indicating that the intent type or template is missing.
While the workflow checks for the ICM template existence, no templates are being created as part of this workflow. It will create new intent deployment once the intent and template are existing.
The workflow will initially check whether a deployment already exists. If the intent deployment already exists there are 2 possible ways on how to proceed:
a) If the intent deployment exists and is associated to the same ICM template the workflow uses the ICM "update-deployments" API endpoint to only update the intents target-data.
b) If the intent deployment exists but is associated to a different ICM template the workflow uses the ICM "replace-deployments" API endpoint to recreate the ICM intent using the ICM template of this workflows execution input.
There is a boolean input variable called "delete" which can be used to delete ICM intents as well. If set to "true", this workflow will delete the ICM intent that is associated to the template-name, target and target-identifier-value of this workflow executions input.
This workflow includes some error handling that turned out to be useful during ICM Intent deployments. There are:
ICM Deployment Postman Collection
{
"intentType": "qos-sap-egress_msros_24-10-1_24-4",
"intentTypeVersion": 1,
"templateName": "sap-egress-md",
"templateDescription": "Demo_sap_egress_md",
"neId": "10.10.10.1",
"targetIdentifierValue": "demoSapEgressMd",
"targetData": "\"{\\\"sap-egress\\\":{\\\"description\\\":\\\"demoSapEgressMd\\\",\\\"policy-id\\\":678,\\\"queue\\\":[{\\\"queue-id\\\":1,\\\"rate\\\":{\\\"pir\\\":1000000}}],\\\"ip-criteria\\\":{\\\"entry\\\":[{\\\"entry-id\\\":10,\\\"match\\\":{\\\"dscp\\\":\\\"be\\\"},\\\"action\\\":{\\\"fc\\\":\\\"be\\\"}}]}}}\"",
"target": "/nsp-equipment:network/network-element[ne-id='10.10.10.1']",
"delete": false,
"deleteOption": "network-and-nsp"
}
Here is the sample of YAML format:
intentType: qos-sap-egress_msros_24-10-1_24-4
intentTypeVersion: 1
templateName: sap-egress-md
templateDescription: Demo_sap_egress_md
neId: 10.10.10.1
targetIdentifierValue: demoSapEgressMd
targetData: >-
"{\"sap-egress\":{\"description\":\"demoSapEgressMd\",\"policy-id\":678,\"queue\":[{\"queue-id\":1,\"rate\":{\"pir\":1000000}}],\"ip-criteria\":{\"entry\":[{\"entry-id\":10,\"match\":{\"dscp\":\"be\"},\"action\":{\"fc\":\"be\"}}]}}}"
target: /nsp-equipment:network/network-element[ne-id='10.10.10.1']
delete: false
deleteOption: network-and-nsp
POST https://{{server}}/restconf/operations/nsp-inventory:find
{
"nsp-inventory:input" : {
"xpath-filter": "/nsp-icm:icm/deployments/deployment[ne-id = '10.10.10.1' and template-name='sap-egress-md' and target-identifier-value='demoSapEgressMd']",
"depth" : "2"
}
}
Output:
{
"nsp-inventory:output": {
"data": [
{
"@": {
"nsp-model:schema-nodeid": "/nsp-icm:icm/deployments/deployment",
"nsp-model:identifier": "/nsp-icm:icm/deployments/deployment[template-name='sap-egress-md'][target='/nsp-equipment:network/network-element[ne-id='10.10.10.1']'][target-identifier-value='demoSapEgressMd']",
"nsp-model:creation-time": "2025-09-30T19:29:25.942Z",
"nsp-model:last-modified-time": "2025-09-30T19:29:26.428Z"
},
"template-name": "sap-egress-md",
"target-identifier-value": "demoSapEgressMd",
"merge": true,
"deployment-action": "deploy",
"ne-id": "10.10.10.1",
"ne-name": "SR1",
"status": "intent-aligned",
"message": "Alignment Successful",
"detailed-message": "Alignment Successful",
"warning": null,
"target": "/nsp-equipment:network/network-element[ne-id='10.10.10.1']",
"target-data": "{\"sap-egress\":{\"description\":\"demoSapEgressMd\",\"policy-id\":666,\"queue\":[{\"queue-id\":1,\"rate\":{\"pir\":1000000}}],\"ip-criteria\":{\"entry\":[{\"entry-id\":10,\"match\":{\"dscp\":\"be\"},\"action\":{\"fc\":\"be\"}}]}}}",
"deployed-target-data": "{\"qos-sap-egress_msros_24-10-1_24-4:qos-sap-egress_msros_24-10-1_24-4\" : {\"sap-egress\":{\"description\":\"demoSapEgressMd\",\"policy-id\":666,\"queue\":[{\"queue-id\":1,\"rate\":{\"pir\":1000000}}],\"ip-criteria\":{\"entry\":[{\"entry-id\":10,\"match\":{\"dscp\":\"be\"},\"action\":{\"fc\":\"be\"}}]}}}}",
"deployment-status": "deployed-aligned",
"deployment-status-message": "Alignment Successful",
...
...
When the status is deployed-aligned, its target data would be pushed down to the NE. To verify in NSP GUI, go to Model Driven Configurator, go to Root -> Nokia:Conf/Configure-> Qos -> Sap e-gress List , you should see the information:
You can also use Get API to verify. Sample is listed in the postman collection as well.
GET https://{{server}}/restconf/data/network-device-mgr:network-devices/network-device=10.10.10.1/root/nokia-conf:configure/qos/sap-egress=demoSapEgressMd
Output:
{
"nokia-conf:sap-egress": [
{
"ip-criteria": {
"entry": [
{
"entry-id": 10,
"match": {
"dscp": "be"
},
"action": {
"fc": "be"
}
}
]
},
"sap-egress-policy-name": "demoSapEgressMd",
"description": "demoSapEgressMd",
"policy-id": 666,
"queue": [
{
"queue-id": 1,
"rate": {
"pir": "1000000"
}
}
]
}
]
}
In the case of deployment failed scenario, the workflow would return icmError message indicate deployment failed. The deployment target information would only remain in NSP, wont be pushed down to the NE.
As mentioned above, this work flow can also hand update / replace deployment when the condition is met.
For example, here is the output of an updating existing deployment. The workflow finds the template and deployment both existing, it would update the existing deployment with the current target data.
This workflow can also delete an existing deployment. When the input 'delete' is set to true, the deleteOption is set to 'network-and-nsp', the deployment would be removed from both NSP and the NE. There are 3 deleteOptions:
Here is an sample of the input:
intentType: qos-sap-egress_msros_24-10-1_24-4
intentTypeVersion: 1
templateName: sap-egress-md
templateDescription: demo testing sap
neId: 10.10.10.1
targetIdentifierValue: demo
targetData: >-
"{\"sap-egress\":{\"description\":\"demo\",\"policy-id\":689,\"queue\":[{\"queue-id\":1,\"rate\":{\"pir\":1000000}}],\"ip-criteria\":{\"entry\":[{\"entry-id\":10,\"match\":{\"dscp\":\"be\"},\"action\":{\"fc\":\"be\"}}]}}}"
target: /nsp-equipment:network/network-element[ne-id='10.10.10.1']
delete: true
deleteOption: nsp
The workflow would go through the checking process: checkDeploymentExists -> deleteExistingIcmDeployment->done
Here is the output of the workflow looks like:
result:
url: https://restconf-gateway/restconf/operations/nsp-icm:delete-deployments
content:
nsp-icm:output:
status-code: 200
message: Delete deployments started.
resultFilter: null
elapsed: 0.019424
status: 200
icmStatus: >-
ICM Deployment for Target
/nsp-equipment:network/network-element[ne-id='10.10.10.1'] and configuration
template "sap-egress-md" was successful following Delete Deployment procedure
The primary purpose of this workflow is to demonstrate how to create an ICM deployment based on intent and to fully automate the process. The workflow can do create/update/replace/delete an intent deployment.
This workflow can function independently as a standalone workflow or be leveraged as a sub-workflow within others. The targetData, provided as an input, can be generated by a parent workflow.