Workflow to configure NSP test templates for Wavence CFM Loopback and CFM Stats

Description

You can create test templates using NSP Data Collection and Management to use in the creation of OAM tests. Creating the template requires configuring parameters, and then using the REST API to activate data collection.

Steps
 

In NSP Data Collection and Management, create a new test template. See the NSP Data Collection and Analysis Guide for information about working with test templates.


For a Wavence CFM Loopback test template, specify a name for the template, then configure the parameters as specified in the following table.

Parameter

Value

Destination Type

Enable

Destination Mac Address

00-00-00-00-00-01

Execute Type

On-demand

Priority

Enable

MA Name

srv:${service-id}

MD Name

TEMP_CFM

Reuse existing MEP

Enable

System Type

Enable

System template

Enable


For a Wavence CFM DMM Stats test template, specify a name for the template, then configure the parameters as specified in the following table.

Parameter

Value

Destination Type

Enable

Destination Mac Address

00-00-00-00-00-01

Execute Type

Proactive

Bin Group

1

Bulk Result

Enable

MA Name

srv:${service-id}

MD Name

TEMP_CFM

Reuse existing MEP

Enable

System Type

Enable

System template

Enable


Use the test templates to create OAM tests, as required. See the NSP Data Collection and Analysis Guide for information about performing OAM tests.


Using the POST REST API, create the following result-classifier. For information about the API, see the Developer Portal.    

{

"result-classifier": [

        {

            "name": "wavence_result_classifier",

            "description": "Wavence specific",

            "admin-state": "enable",

            "test-class-mappings": [

                {

                    "nsp-class-id": "telemetry:/base/oam-pm/eth-cfm-delay-streaming",

                    "pass-func": "function accept(data) { return (data.get('delay') > 0); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-pm/twamp-light-delay-streaming",

                    "pass-func": "function accept(data) { return (data.get('delay') > 0); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-pm/eth-cfm-delay-session",

                    "pass-func": "function accept(data) { return (data.get('two-way-average') >= 0); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-pm/twamp-light-delay-session",

                    "pass-func": "function accept(data) { return (data.get('two-way-average') > 0); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-pm/eth-cfm-delay-base",

                    "pass-func": "function accept(data) { return (data.get('frames-sent') == data.get('frames-received')); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-pm/twamp-light-delay-base",

                    "pass-func": "function accept(data) { return (data.get('frames-sent') == data.get('frames-received')); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/twl-session-acc-stats",

                    "pass-func": "function accept(data) { return ((data.get('pdu-sent').equals(data.get('pdu-received'))) && (data.get('pdu-sent')!=0)); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/twl-session-loss-acc-stats",

                    "pass-func": "function accept(data) { return ((data.get('pdu-sent').equals(data.get('pdu-received'))) && (data.get('pdu-sent')!=0)); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/twl-bin-acc-stats",

                    "pass-func": "function accept(data) { return true; }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/cfm-dmm-session-acc-stats",

                    "pass-func": "function accept(data) { return ((data.get('pdu-sent').equals(data.get('pdu-received'))) && (data.get('pdu-sent')!=0)); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/cfm-dmm-bin-acc-stats",

                    "pass-func": "function accept(data) { return true; }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-result/loopback-result",

                    "pass-func": "function accept(data) { return ('success'.equals(data.get('result-status')) || 'succeeded'.equals(data.get('result-status'))); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/cfm-slm-session-acc-stats",

                    "pass-func": "function accept(data) { return ((data.get('pdu-sent').equals(data.get('pdu-received'))) && (data.get('pdu-sent')!=0)); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oampm-accounting/cfm-lmm-session-acc-stats",

                    "pass-func": "function accept(data) { return ((data.get('pdu-sent').equals(data.get('pdu-received'))) && (data.get('pdu-sent')!=0)); }"

                },

                {

                    "nsp-class-id": "telemetry:/base/oam-result/link-trace-result",

                    "pass-func": "function accept(data) { return ('success'.equals(data.get('result-status')) || 'succeeded'.equals(data.get('result-status'))); }"

                }

            ]

        }

    ]

}


After the results classifier is deployed, the results of the tests are displayed in the NSP and the NFM-P.

End of steps