This tutorial is mainly focused to create OAM test configuration, execution and result retrieval on MDM (Model Driven Mediation) network and Dual Managed NEs.
NSP OAM tests provide functionality for the following use cases:
These use cases are achieved by provisioning OAM tests, the tests supported in 23.11 are:
This tutorial will provide the APIs to create two test cases: TWAMP Light and CFM DMM. This tutorial uses accounting to retrieve the data from the nodes, if you want to cover streaming tests MD-OAM streaming contains examples for streaming.
Moreover, this tutorial also includes examples of OAM config objects, such as MD, MA, and MEP.
This tutorial requires at least two model driven SROS based network elements that have been discovered by NSP.
This tutorial has been tested with and is supported in NSP 22.11.
This tutorial is meant as a proof of concept and as an example method for configuring a service. It is not designed to be implemented, and must not be used as is, in a production network. It is intended to guide the development of a client application like an OSS.
All steps in this tutorial are provided in the OAM/OAM-PM tutorial examples. Example responses for each request are also included.
After you go through the list in the postman collection, you'll discover the preceding configuration required to activate the tests, the process of creating a TWAMP light test, initiating the test, gathering the results, and finally stopping and deleting the test.
POST: https://{{server}}:8545/restconf/data/nsp-oam-config:oam-pm
{
"bin-groups" : [ {
"bin-group-id" : 61,
"ne-id" : "10.10.10.1",
"admin-state" : "enable",
"deployment-asynchronous" : false,
"description" : "certMD-OAM-BG61",
"bin-type" : [
{
"bin-metric" : "fd",
"delay-event" : [ {
"direction" : "forward",
"lowest-bin": 2,
"raise-threshold": 4321,
"clear-threshold": 1234,
"exclude-lowest-bin": 3
} ],
"bin" : [
{
"bin-number" : 2,
"lower-bound" : 5500
},
{
"bin-number" : 3,
"lower-bound" : 6000
} ]
}
]
} ]
}
2. Create TWAMP reflector
POST: https://{{server}}:8545/restconf/data/nsp-oam-config:oam-pm
{
"twamp-light-reflector-rtr": [
{
"ne-id": "10.10.10.1",
"admin-state": "enable",
"description": "cert_OAM_TWL_routing_instance_base_reflector",
"udp-port": 64372,
"prefix": [
{
"ip-prefix": "0.0.0.0/0",
"description": "Prefix_all"
}
]
}
]
}
3. Create TWAMP light test using RESTCONF API from postman collection.
POST: https://{{server}}:{{port}}/restconf/data/nsp-oam:tests/oam-test:tests
{
"twamp-light": [
{
"name": "TWAMPLight_sampleTest",
"description": "TWAMPLight_sampleTest",
"test-id": "15",
"ne-id": "10.10.10.1",
"measurement-interval": 5,
"deployment-asynchronous": "false",
"bulk-result": "true",
"execute-type": "proactive",
"admin-state": "disable",
"owner": "oam",
"bin-group": 61,
"interval": 100,
"test-duration": null,
"allow-egress-remark-dscp": "true",
"destination-ip-address": "10.10.10.3",
"destination-udp-port": 64372,
"source-udp-port": 64382,
"do-not-fragment": "true",
"dscp": "cp60",
"fc": "nc",
"profile": "in",
"router-instance": "Base",
"source-ip-address": "10.10.10.1",
"ttl": 255,
"flr-threshold": 60,
"frames-per-delta-t": 1,
"consec-delta-t": 8,
"chli-threshold": 5,
"hli-force-count": "true",
"pad-size": 567,
"record-stats": "delay-and-loss",
...
}
]
}
You can use the GET API to verify the TWAMP light test case, or you can also verify it from GUI.
4. Start the execution of the TWAMP test. In the API, input the SR's IP address and TWAMP light name.
POST: https://{{server}}:8545/restconf/data/nsp-oam:tests/oam-test:tests/twamp-light=10.10.10.1,TWAMPLight_sampleTest/start
{
"input": {
"sync-mode": "async",
"publish-results": "true",
"test-timeout": "60",
"result-classifier": "default",
"stop-test-after-result": "false",
"extra-fields-profile": "default"
}
}
5. Retrieve the test result, you can use the API from the postman collection to retrieve the test result. For example, in this case, retrieve telemetry:/base/oampm-accounting/twl-bin-acc-stats result class.
In this tutorial, there is another example to retrieve TWAMP session accounting stats. The input will be the session accounting stats as the result class.
POST: https://{{server}}:8545/restconf/data/nsp-oam:tests/oam-test:tests/twamp-light=10.10.10.1,TWAMPLight_sampleTest/get-results
{
"input" : {
"result-class" : "telemetry:/base/oampm-accounting/twl-bin-acc-stats"
}
}
Here is the output of the test result from API:
{
"time-captured": "1681263834833",
"test-id": "15",
"time-issued": "1681263834877",
"elapsed-time-periodic": "0",
"execution-id": "45",
"time-recorded-periodic": "0",
"time-recorded": "1681263532000",
"source-ip-address": "10.10.10.1",
"start-timestamp": "1681263000000",
"record-stats": "delay-and-loss",
"destination-ne-id": "",
"delay-twl-bin-count-periodic": "0",
"destination-udp-port": "64372",
"router-instance": "Base",
"elapsed-time": "300000",
"start-timestamp-periodic": "0",
"delay-twl-bin-lower-bound": "5000",
"result-classification": "PASS",
"direction": "backward",
"owner": "oam",
"destination-ip-address": "10.10.10.2",
"app-id": "NSP",
"test-suite": "",
"interval-duration": "5",
"source-udp-port": "64382",
"pmbin-type": "ifdv",
"time-captured-periodic": "299947",
"system-id": "10.10.10.1",
"ts-execution-id": "0",
"service": "",
"session-name": "TWAMPLight_sampleTest15",
"pmstats-interval-num": "19",
"delay-twl-bin-count": "3000",
"suspect-flag": "f",
"object-id": "/TWLBinAccStats[delayTwlBinLowerBound='5000'][pmBinType='3'][direction='2'][binType='-1'][sessionName='TWAMPLight_sampleTest15']",
"kpiType": "telemetry:/base/oampm-accounting/twl-bin-acc-stats",
"dataType": "1"
}
Here is the Kafka command to retrieve OAM PM test result, the topic is "oam.test_execution". With this topic, you can get more detailed information about OAM PM test results. This topic is applicable to all OAM test results.
/opt/bitnami/kafka/bin/kafka-console-consumer.sh --topic oam.test_execution --consumer.config /opt/bitnami/kafka/config/consumer.properties --bootstrap-server nspos-kafka-0.nspos-kafka-headless.default.svc.cluster.local:9192 --from-beginning
{
"time-issued-iso" : "2023-04-12T19:59:55.338Z",
"time-issued" : 1681329595338,
"app-id" : "md-resync",
"event-type" : "TEST_RESULT",
"test-id" : "6",
"neId" : "10.10.10.2",
"elapsed-time-periodic" : 0,
"execution-id" : 32,
"time-recorded-periodic" : 300000,
"time-recorded" : 1681328880000,
"source-ip-address" : "10.1.2.2",
"start-timestamp" : 1681328400000,
"record-stats" : "delay",
"destination-ne-id" : null,
"delay-twl-bin-count-periodic" : 2,
"destination-udp-port" : "64372",
"router-instance" : "Base",
"elapsed-time" : 300000,
"start-timestamp-periodic" : 300000,
"delay-twl-bin-lower-bound" : 5000,
"oam-nsp-class-id" : "telemetry:/base/oampm-accounting/twl-bin-acc-stats",
"result-classification" : "PASS",
"objectId" : "/TWLBinAccStats[delayTwlBinLowerBound='5000'][pmBinType='1'][direction='3'][binType='-1'][sessionName='TWL01_SR2-SR1']",
"direction" : "two-way",
"owner" : null,
"destination-ip-address" : "10.1.2.1",
"dataType" : 1,
"interval-duration" : 5,
"source-udp-port" : null,
"pmbin-type" : "fd",
"time-captured-periodic" : 299099,
"system-id" : "10.10.10.2",
"service" : null,
"session-name" : "TWL01_SR2-SR1",
"kpiType" : "telemetry:/base/oampm-accounting/twl-bin-acc-stats",
"test-key" : {
"neId" : "10.10.10.2",
"testType" : "twamp-light",
"name" : "TWL01_SR2-SR1",
"valid" : true,
"classId" : "/nsp-oam:tests/oam-test:tests/twamp-light"
},
"pmstats-interval-num" : 10703,
"time-captured" : 1681329595331,
"delay-twl-bin-count" : 4,
"suspect-flag" : false
}
You can see the result from GUI as well.
6. Stop the TWAMP light test. In the API, enter the SR IP address and TWAMP light test name.
POST: https://{{server}}:8545/restconf/data/nsp-oam:tests/oam-test:tests/twamp-light=10.10.10.1,TWAMPLight_sampleTest/stop
7. Delete the TWAMP light test.
DEL: https://{{server}}:{{port}}/restconf/data/nsp-oam:tests/oam-test:tests/twamp-light=10.10.10.1,TWAMPLight_sampleTest
In this folder, we have created two examples of CFM DMM test cases. one for proactive and one for on-demand.
The postman collection provides API to create CFM DMM, execute the test; get the test results and delete the CFM DMM test.
The flow is similar to above TWAMP light use case.
POST: https://{{server}}:{{port}}/restconf/data/nsp-oam:tests/oam-test:tests
{
"cfm-dmm" : [{
"name" : "CFMDMM_sampleTest",
"description": "CFMDMM_sampleTest",
"test-id" : 1,
"execute-type" : "proactive",
"owner" : "nfmp",
"bulk-result" : true,
"measurement-interval" : 15,
"deployment-asynchronous" : "false",
"admin-state" : "disable",
"test-duration" : null,
"priority" : 5,
"ne-id" : "10.10.10.1",
"streaming-template" : "OAM_PM_CFM",
"dest-mac-address" : "10:4b:01:01:00:04",
"source-mep-id" : 1,
"md-name" : "7000",
"ma-name" : "1050",
"bin-group" : 1
}]
}
The rest procedure is in the same flow as TWAMP light above. You can follow through the postman collection's API and output.
A config object in Insights Administrator represents an OAM configuration object that is used for testing, other than the test object itself, such as Bin group; CFM Maintenance Domain (level 0-7) ; CFM Maintenance Associations; and CFM Maintenance Entity Point. A MEP is an end point in an MA, on which CFM tests can be performed. Each MEP with the same MD and MA represent endpoints for a single service. Each MD can include multiple MAs.
In this postman collection folder, it provides API for the following examples:
In the previous example of creating TWAMP light test, Bin group, reflector are part of OAM configuration objects as well. In the Use Case 1, after creating Bin and reflector, you can find the Config Objects in Insight Administrator GUI.
Bin Group In the Config Objects tab in the Insight Administrator GUI:
Reflector Object:
NSP Insights Admin allows managing the OAM tests. Once the OAM tests are created (either via API or GUI), they will appear in NSP Insights Admin. At this point, you can start or execute the test from the GUI if required.
As soon as the tests are functional, you will see test results in NSP Insights Admin GUI. The API in this tutorial also provided examples how to retrieve test results.
The telemetry subscriptions for each test are created automatically when the test is started. You will see the subscription in the Subscription tab in NSP Insights Admin.
In this tutorial, we provided 2 samples for the OAM tests. For the rest OAM PM tests, such as CFM LMM, SLM, CFM loopback has very much similar APIs.
Please refer to MD-OAM link on the DEV portal for details.