NQA
This section describes the configuration model of NQA and provides examples of XML packets.
Data Model
The configuration model file matching network quality analysis (NQA) is huawei-nqa.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-nqa:testcase-config/cases/admin-name |
Specifies the administrator of an NQA test instance. |
The value is a string of 1 to 32 characters, excluding question marks (?), spaces, and en dashes (-).
NOTE:
If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
N/A |
/huawei-nqa:testcase-config/cases/test-name |
Specifies the name of an NQA test instance. |
The value is a string of 1 to 32 characters, excluding question marks (?), spaces, and en dashes (-).
NOTE:
If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
N/A |
/huawei-nqa:testcase-config/cases/type |
Specifies the type of an NQA test instance. |
The value is ping, which indicates an ICMP test. By default, no test type is configured. |
N/A |
/huawei-nqa:testcase-config/cases/case-input/ping-case/destination |
Specifies the destination address for an NQA test instance. |
The value is an IPv4 address in dotted decimal notation or a 128-bit IPv6 address in hexadecimal notation. An IPv6 address is typically in the format X:X:X:X:X:X:X:X, with each X representing four hexadecimal numbers. By default, no destination address is configured. |
|
/huawei-nqa:testcase-config/cases/case-input/ping-case/frequency |
Specifies the interval at which an NQA test instance is automatically executed. |
The value is an integer in the range from 1 to 604800, in seconds. By default, no automatic test interval is set, and the system performs the test only once. |
The /huawei-nqa:testcase-config/cases/type object must be configured first. |
/huawei-nqa:testcase-config/cases/case-input/ping-case/interval |
Specifies the interval at which packets are sent in an NQA test instance. |
The value is an integer in the range from 1 to 60, in seconds. The default interval is 4 seconds. |
The /huawei-nqa:testcase-config/cases/type object must be configured first. |
/huawei-nqa:testcase-config/cases/case-input/ping-case/count |
Specifies the number of probes to be sent each time for an NQA test instance. |
The value is an integer in the range from 1 to 15. By default, three probes are sent each time for a test instance. |
The /huawei-nqa:testcase-config/cases/type object must be configured first. |
/huawei-nqa:testcase-config/cases/case-input/ping-case/timeout |
Specifies the timeout period of a probe for an NQA test instance. |
The value is an integer in the range from 1 to 60, in seconds. By default, the detection timeout period is 3 seconds. |
The /huawei-nqa:testcase-config/cases/type object must be configured first. |
/huawei-nqa:testcase-config/cases/case-input/ping-case/nexthop |
Specifies next-hop address for an NQA test instance. |
The value is an IPv4 address in dotted decimal notation. |
This object is mutually exclusive with the /huawei-nqa:testcase-config/cases/case-input/ping-case/vpn object. |
/huawei-nqa:testcase-config/cases/case-input/ping-case/vpn |
Specifies the VPN instance to which the destination address for a test instance belongs. |
The value must be an existing VPN instance name. |
This object is mutually exclusive with the /huawei-nqa:testcase-config/cases/case-input/ping-case/nexthop object. |
/huawei-nqa:testcase-config/cases/case-input/ping-case/source-address |
Specifies the source IP address for an NQA test instance. |
The value is an IPv4 address in dotted decimal notation. |
Before configuring this object, you need to configure the /huawei-nqa:testcase-config/cases/type object, but the specified test type cannot be PWE3Ping, PWE3Trace, or MAC Ping. |
/huawei-nqa:testcase-config/cases/execution-policy/start-time/on-reception/on-reception |
If a NETCONF configuration packet does not carry this parameter, an NQA test instance is created but is not executed immediately. If a NETCONF configuration packet carries this parameter, an NQA test instance is created and executed immediately. If another NETCONF configuration packet is delivered without carrying this parameter after an NQA test instance is executed, the NQA test instance will be stopped immediately. |
- |
|
Configuring NQA
This section provides a sample of configuring NQA using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Administrator of an NQA test instance |
user |
Set the administrator of an NQA test instance to user. |
Name of an NQA test instance |
test |
Set the name of an NQA test instance to test. |
Type of an NQA test instance |
ping |
Set the type of the NQA test instance to ping. |
Destination address for an NQA test instance |
10.1.1.2 |
Set the destination address for the NQA test instance to 10.1.1.2. |
Interval at which an NQA test instance is automatically executed |
1 |
Set the interval at which the NQA test instance is automatically executed to 1 second. |
Interval at which packets are sent in an NQA test instance |
1 |
Set the interval at which packets are sent in the NQA test instance to 1 second. |
Number of probes to be sent each time for an NQA test instance |
1 |
Set the number of probes to be sent each time for the NQA test instance to 1. |
Timeout period of a probe for an NQA test instance |
1 |
Set the timeout period of a probe for the NQA test instance to 1 second. |
VPN instance to which the destination address for a test instance belongs |
123 |
Set the VPN instance to which the destination address for the test instance belongs to 123. |
Starting an NQA test instance immediately |
- |
Start the NQA test instance immediately. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc message-id="46" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <huawei-nqa:testcase-config xmlns:huawei-nqa="urn:huawei:params:xml:ns:yang:huawei-nqa" nc:operation="replace"> <huawei-nqa:cases> <huawei-nqa:admin-name>user</huawei-nqa:admin-name> <huawei-nqa:test-name>test</huawei-nqa:test-name> <huawei-nqa:type>huawei-nqa:ping</huawei-nqa:type> <huawei-nqa:execution-policy> <huawei-nqa:on-reception/> </huawei-nqa:execution-policy> <huawei-nqa:case-input> <huawei-nqa:ping-case> <huawei-nqa:destination>10.1.1.2</huawei-nqa:destination> <huawei-nqa:count>1</huawei-nqa:count> <huawei-nqa:frequency>1</huawei-nqa:frequency> <huawei-nqa:interval>1</huawei-nqa:interval> <huawei-nqa:timeout>1</huawei-nqa:timeout> <huawei-nqa:vpn>123</huawei-nqa:vpn> </huawei-nqa:ping-case> </huawei-nqa:case-input> </huawei-nqa:cases> </huawei-nqa:testcase-config> </config> </edit-config> </rpc>
Response Example
# Sample of successful response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="46"> <ok/> </rpc-reply>
# Sample of failed response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="46"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>The destination value is not an ipv4 address.</error-message> <error-info>Error on node /huawei-nqa:testcase-config/cases[admin-name="user",test-name="test"]</error-info> </rpc-error> </rpc-reply>