This section provides a sample of configuring NQA using the edit-config method.
Operation |
XPATH |
|---|---|
edit-config |
|
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. |
<?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>
# 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>