MQC Management
This section describes the configuration model of MQC management and provides examples of XML packets.
Data Model
The configuration model files matching MQC management are huawei-mqc.yang and huawei-mqc-apply.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/huawei-mqc:mqc/traffic-classifier/name |
Indicates the name of a traffic classifier. |
The value is a string of 1 to 64 case-sensitive characters without spaces. If the string is enclosed in double quotation marks ("), the string can contain spaces. |
N/A |
/huawei-mqc:mqc/traffic-classifier/precedence |
Indicates the priority of a traffic classifier. |
The value is an integer in the range from 0 to 65535. A smaller value represents a higher priority. |
N/A |
/huawei-mqc:mqc/traffic-classifier/operator |
Indicates the logical relationship between rules in a traffic classifier. |
Boolean value:
The default value is false. |
N/A |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/acl |
Indicates the number or name of an ACL. |
When an ACL number is used, the value is an integer in the range from 2000 to 5999.
When an ACL name is used, the ACL name must have been created. |
N/A |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/packet-field/named-field/named-field/dot1p |
Indicates the 802.1p priority in VLAN packets. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
N/A |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/packet-field/named-field/named-field/vlan/start-vlan |
Indicates the start outer VLAN ID. |
The value is an integer in the range from 1 to 4094. |
N/A |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/packet-field/named-field/named-field/vlan/end-vlan |
Indicates the end outer VLAN ID. |
The value is an integer in the range from 1 to 4094. |
The end outer VLAN ID must be larger than the start outer VLAN ID. If end-vlan is not specified, only the VLAN ID specified by start-vlan is matched. |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/packet-field/named-field/named-field/ip-priority-format/dscp-name/dscp-name |
Indicates the DSCP priority name in IP packets. |
The value is a character string and is af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default-dscp, or ef. |
This object cannot be configured with ip-priority-format/dscp-value/dscp-value in a traffic classifier simultaneously. |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/packet-field/named-field/named-field/ip-priority-format/dscp-value/dscp-value |
Indicates the DSCP priority value in IP packets. |
The value is an integer in the range from 0 to 63. |
This object cannot be configured with ip-priority-format/dscp-name/dscp-name in a traffic classifier simultaneously. |
/huawei-mqc:mqc/traffic-classifier/operator/match-condition/packet-field/named-field/named-field/any |
Indicates that all packets are matched. |
The value is a string. The value is any-packet. |
N/A |
/huawei-mqc:mqc/traffic-behaviour/name |
Indicates the name of a traffic behavior. |
The value is a string of 1 to 64 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
N/A |
/huawei-mqc:mqc/traffic-behaviour/action |
Indicates the action taken for packets. |
Enumerated value. The values are as follows:
|
N/A |
/huawei-mqc:mqc/traffic-behaviour/remark-dot1p |
Indicates that 802.1p priorities of VLAN packets are re-marked. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
This object cannot be configured with redirect or remark-local-precedence in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/remark-dscp/dscp-name/dscp-name |
Indicates that the DSCP priority name of IP packets is re-marked. |
The value is a character string and is af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default-dscp, or ef. |
This object cannot be configured with remark-dscp/dscp-value/dscp-value in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/remark-dscp/dscp-value/dscp-value |
Indicates that the DSCP priority value of IP packets is re-marked. |
The value is an integer in the range from 0 to 63. A larger value indicates a higher priority. |
This object cannot be configured with remark-dscp/dscp-name/dscp-name in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/remark-local-precedence/local-precedence/precedence-name |
Indicates that the local priority name of IP packets is re-marked. |
The value is a character string and is af1, af2, af3, af4, be, cs6, cs7, or ef. |
This object cannot be configured with precedence-value or remark-dot1p in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/remark-local-precedence/precedence-value/precedence-value |
Indicates that the local priority value of IP packets is re-marked. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
This object cannot be configured with precedence-name or remark-dot1p in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/remark-local-precedence/precedence-value/color |
Indicates the color of packets that correspond to a local priority. |
Enumerated value. The values are as follows:
|
N/A |
/huawei-mqc:mqc/traffic-behaviour/car/mode |
Indicates the color mode for traffic policing. |
Enumerated value. The values are as follows:
|
N/A |
/huawei-mqc:mqc/traffic-behaviour/car/cir |
Indicates the CIR. |
The value is an integer in the range from 8 to 4294967295, in kbit/s. |
On SA series cards, the minimum value of cir is 64 kbit/s. |
/huawei-mqc:mqc/traffic-behaviour/car/max-rate/pir/pir |
Indicates the PIR. |
The value is an integer in the range from 8 to 4294967295, in kbit/s. The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
On SA series cards, the minimum value of pir is 64 kbit/s. |
/huawei-mqc:mqc/traffic-behaviour/car/cbs |
Indicates the CBS. |
The value is an integer in the range from 4000 to 4294967295, in bytes. The default CBS is 125 times the CIR. If the default CBS is smaller than 4000 because the CIR is small, the switch uses the CBS of 4000. If the default CBS is larger than 4294967295 because the CIR is large, the switch uses the CBS of 4294967295. |
N/A |
/huawei-mqc:mqc/traffic-behaviour/car/max-burst-size/pbs/pbs |
Indicates the PBS. |
The value is an integer in the range from 4000 to 4294967295, in bytes. If the PIR is not set, the default PBS is 125 times the CIR. If the PIR is set, the default PBS is 125 times the PIR. If the default PBS is smaller than 4000 because the CIR or PIR is small, the switch uses the PBS of 4000. If the default PBS is larger than 4294967295 because the CIR or PIR is large, the switch uses the PBS of 4294967295. |
N/A |
/huawei-mqc:mqc/traffic-behaviour/car/green/processing |
Indicates the mode in which green packets are processed. |
Enumerated value. The values are as follows:
|
N/A |
/huawei-mqc:mqc/traffic-behaviour/car/green/service-class/service-class-name/service-class-name |
Indicates that the service class name of green packets is re-marked. |
The value is a character string and is af1, af2, af3, af4, be, cs6, cs7, or ef. |
This object cannot be configured with green/service-class/service-class-value/service-class-value in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/car/green/service-class/service-class-value/service-class-value |
Indicates that the service class value of green packets is re-marked. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
This object cannot be configured with green/service-class/service-class-name/service-class-name in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/car/yellow/processing |
Indicates the mode in which yellow packets are processed. |
Enumerated value. The values are as follows:
|
This object must be set to discard if green/processing is discard. |
/huawei-mqc:mqc/traffic-behaviour/car/yellow/service-class/service-class-name/service-class-name |
Indicates that the service class name of yellow packets is re-marked. |
The value is a character string and is af1, af2, af3, af4, be, cs6, cs7, or ef. |
This object can be configured only when the value of yellow/processing is pass. This object cannot be configured with yellow/service-class/service-class-value/service-class-value in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/car/yellow/service-class/service-class-value/service-class-value |
Indicates that the service class value of yellow packets is re-marked. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
This object can be configured only when the value of yellow/processing is pass. This object cannot be configured with yellow/service-class/service-class-name/service-class-name in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/car/red/processing |
Indicates the mode in which red packets are processed. |
Enumerated value. The values are as follows:
|
This object must be set to discard if yellow/processing is discard. |
/huawei-mqc:mqc/traffic-behaviour/car/red/service-class/service-class-name/service-class-name |
Indicates that the service class name of red packets is re-marked. |
The value is a character string and is af1, af2, af3, af4, be, cs6, cs7, or ef. |
This object can be configured only when the value of red/processing is pass. This object cannot be configured with red/service-class/service-class-value/service-class-value in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/car/red/service-class/service-class-value/service-class-value |
Indicates that the service class value of red packets is re-marked. |
The value is an integer in the range from 0 to 7. A larger value indicates a higher priority. |
This object can be configured only when the value of red/processing is pass. This object cannot be configured with red/service-class/service-class-name/service-class-name in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/redirect/destination/interface/interface |
Indicates the interface where traffic is redirected. |
The value is a string and is in the format of interface-typeinterface-number. |
This object cannot be configured with destination/next-hop/next-hop or remark-dot1p in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/redirect/destination/next-hop/next-hop/next-hop-ip |
Indicates the next-hop IP address where traffic is redirected. |
The value is in dotted decimal notation. |
This object cannot be configured with /destination/interface/interface or remark-dot1p in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/redirect/destination/next-hop/next-hop/nexthop-extend/track-nqa/admin-name |
Indicates the administrator name of an NQA test instance. |
The value is a string of 1 to 32 case-sensitive characters, excluding question marks (?), en dashes (-), a single or consecutive quotation marks ("). |
This object cannot be configured with /destination/interface/interface or remark-dot1p in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/redirect/destination/next-hop/next-hop/nexthop-extend/track-nqa/test-name |
Indicates the name of an NQA test instance. |
The value is a string of 1 to 32 case-sensitive characters, excluding question marks (?), en dashes (-), a single or consecutive quotation marks ("). |
This object cannot be configured with /destination/interface/interface or remark-dot1p in a traffic behavior simultaneously. |
/huawei-mqc:mqc/traffic-behaviour/mirror |
Indicates the index of an observing interface. |
The value is an integer in the range from 1 to 8. |
N/A |
/huawei-mqc:mqc/traffic-behaviour/enable-statistics |
Indicates whether the traffic statistics function is enabled. |
Boolean value:
The default value is false. |
N/A |
/huawei-mqc:mqc/traffic-policy/name |
Indicates the name of a traffic policy. |
The value is a string of 1 to 64 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
N/A |
/huawei-mqc:mqc/traffic-policy/match-order |
Indicates the matching order of traffic classifiers in the traffic policy. |
Enumerated value. The values are as follows:
The default value is configuration. |
N/A |
/huawei-mqc:mqc/traffic-policy/rule/traffic-classifier |
Indicates the name of a traffic classifier. |
The value must be the name of an existing traffic classifier. |
N/A |
/huawei-mqc:mqc/traffic-policy/rule/traffic-behaviour |
Indicates the name of a traffic behavior. |
The value must be the name of an existing traffic behavior. |
N/A |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply/name |
Indicates the name of a traffic policy. |
The value must be the name of an existing traffic policy. |
N/A |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply/interface/name |
Indicates the interface that the traffic policy is applied to. |
The value is a string and is in the format of interface-typeinterface-number. |
N/A |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply/interface/inbound |
Indicates the inbound direction of an interface to which a traffic policy is applied. |
The value is a string of spaces only with no limited length. |
Only one traffic policy can be applied to each direction on an interface. |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply/interface/outbound |
Indicates the outbound direction of an interface to which a traffic policy is applied. |
The value is a string of spaces only with no limited length. |
Only one traffic policy can be applied to each direction on an interface. |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply-global/direction |
Indicates the direction in which the traffic policy is applied. |
The value is of the enumerated type:
|
N/A |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply-global/name |
Indicates the name of a traffic policy. |
The value must be the name of an existing traffic policy. |
N/A |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply-global/slot |
Indicates the slot ID to which the traffic policy is applied. |
The value is an integer. It must be the slot ID of a running card. |
N/A |
Configuring a Traffic Policy
This section describes how to configure, modify, and delete a traffic policy using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-mqc:mqc/traffic-classifier /huawei-mqc:mqc/traffic-behaviour /huawei-mqc:mqc/traffic-policy |
Data Requirements 1
Create a traffic classifier named c1 and define traffic classification rules, create a traffic behavior named b1 and define actions, and create a traffic policy named p1 and bind the traffic classifier c1 and traffic behavior b1 to it.
Item |
Data |
Description |
---|---|---|
Name of a traffic classifier |
c1 |
The name of a traffic classifier is c1. |
Start outer VLAN ID |
100 |
Packets tagged with VLAN 100 are matched. |
Name of a traffic behavior |
b1 |
The name of a traffic behavior is b1. |
DSCP priority value of IP packets to be re-marked |
46 |
The DSCP priority value of IP packets is re-marked with 46. |
CIR |
2000 |
The CIR is 2000 kbit/s. |
PIR |
10000 |
The PIR is 10000 kbit/s. |
Mode in which yellow packets are processed |
pass |
Yellow packets are allowed to pass through. |
Whether the traffic statistics function is enabled |
true |
The traffic statistics function is enabled. |
Name of a traffic policy |
p1 |
The name of a traffic policy is p1. |
Name of a traffic classifier |
c1 |
The traffic classifier c1 and traffic behavior b1 are bound to the traffic policy p1. |
Name of a traffic behavior |
b1 |
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-mqc:mqc xmlns:hw-mqc="urn:huawei:params:xml:ns:yang:huawei-mqc"> <hw-mqc:traffic-classifier> <hw-mqc:name>c1</hw-mqc:name> <hw-mqc:match-condition> <hw-mqc:named-field> <hw-mqc:vlan> <hw-mqc:start-vlan>100</hw-mqc:start-vlan> </hw-mqc:vlan> </hw-mqc:named-field> </hw-mqc:match-condition> </hw-mqc:traffic-classifier> <hw-mqc:traffic-behaviour> <hw-mqc:name>b1</hw-mqc:name> <hw-mqc:dscp-value>46</hw-mqc:dscp-value> <hw-mqc:car> <hw-mqc:cir>2000</hw-mqc:cir> <hw-mqc:pir>10000</hw-mqc:pir> <hw-mqc:yellow> <hw-mqc:processing>pass</hw-mqc:processing> </hw-mqc:yellow> </hw-mqc:car> <hw-mqc:enable-statistics>true</hw-mqc:enable-statistics> </hw-mqc:traffic-behaviour> <hw-mqc:traffic-policy> <hw-mqc:name>p1</hw-mqc:name> <hw-mqc:rule> <hw-mqc:traffic-classifier>c1</hw-mqc:traffic-classifier> <hw-mqc:traffic-behaviour>b1</hw-mqc:traffic-behaviour> </hw-mqc:rule> </hw-mqc:traffic-policy> </hw-mqc:mqc> </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="4"> <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="4"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Data Requirements 2
Change the DSCP priority of IP packets to be re-marked to 50.
Only changed data items are provided here. For other information, see data requirement 1.
Item |
Data |
Description |
---|---|---|
DSCP priority value of IP packets to be re-marked |
50 |
The DSCP priority of IP packets to be re-marked is changed to 50. |
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-mqc:mqc xmlns:hw-mqc="urn:huawei:params:xml:ns:yang:huawei-mqc" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace"> <hw-mqc:traffic-classifier> <hw-mqc:name>c1</hw-mqc:name> <hw-mqc:match-condition> <hw-mqc:named-field> <hw-mqc:vlan> <hw-mqc:start-vlan>100</hw-mqc:start-vlan> </hw-mqc:vlan> </hw-mqc:named-field> </hw-mqc:match-condition> </hw-mqc:traffic-classifier> <hw-mqc:traffic-behaviour> <hw-mqc:name>b1</hw-mqc:name> <hw-mqc:dscp-value>50</hw-mqc:dscp-value> <hw-mqc:car> <hw-mqc:cir>2000</hw-mqc:cir> <hw-mqc:pir>10000</hw-mqc:pir> <hw-mqc:yellow> <hw-mqc:processing>pass</hw-mqc:processing> </hw-mqc:yellow> </hw-mqc:car> <hw-mqc:enable-statistics>true</hw-mqc:enable-statistics> </hw-mqc:traffic-behaviour> <hw-mqc:traffic-policy> <hw-mqc:name>p1</hw-mqc:name> <hw-mqc:rule> <hw-mqc:traffic-classifier>c1</hw-mqc:traffic-classifier> <hw-mqc:traffic-behaviour>b1</hw-mqc:traffic-behaviour> </hw-mqc:rule> </hw-mqc:traffic-policy> </hw-mqc:mqc> </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="5"> <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="5"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Data Requirements 3
Delete the configuration in data requirement 1.
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-mqc:mqc xmlns:hw-mqc="urn:huawei:params:xml:ns:yang:huawei-mqc" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="remove"> <hw-mqc:traffic-classifier> <hw-mqc:name>c1</hw-mqc:name> <hw-mqc:match-condition> <hw-mqc:named-field> <hw-mqc:vlan> <hw-mqc:start-vlan>100</hw-mqc:start-vlan> </hw-mqc:vlan> </hw-mqc:named-field> </hw-mqc:match-condition> </hw-mqc:traffic-classifier> <hw-mqc:traffic-behaviour> <hw-mqc:name>b1</hw-mqc:name> <hw-mqc:dscp-value>50</hw-mqc:dscp-value> <hw-mqc:car> <hw-mqc:cir>2000</hw-mqc:cir> <hw-mqc:pir>10000</hw-mqc:pir> <hw-mqc:yellow> <hw-mqc:processing>pass</hw-mqc:processing> </hw-mqc:yellow> </hw-mqc:car> <hw-mqc:enable-statistics>true</hw-mqc:enable-statistics> </hw-mqc:traffic-behaviour> <hw-mqc:traffic-policy> <hw-mqc:name>p1</hw-mqc:name> <hw-mqc:rule> <hw-mqc:traffic-classifier>c1</hw-mqc:traffic-classifier> <hw-mqc:traffic-behaviour>b1</hw-mqc:traffic-behaviour> </hw-mqc:rule> </hw-mqc:traffic-policy> </hw-mqc:mqc> </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="6"> <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="6"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>
Applying a Traffic Policy
This section describes how to apply a traffic policy and cancel the traffic policy that is applied using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-mqc-apply:mqc-apply/traffic-policy-apply |
Data Requirements 1
Item |
Data |
Description |
---|---|---|
Name of a traffic policy |
p1 |
The traffic policy p1 is applied to GigabitEthernet1/0/1 in the inbound direction. |
Interface |
GigabitEthernet1/0/1 |
|
Inbound direction |
inbound |
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<hw-mqc-ap:mqc-apply xmlns:hw-mqc-ap="urn:huawei:params:xml:ns:yang:huawei-mqc-apply">
<hw-mqc-ap:traffic-policy-apply>
<hw-mqc-ap:name>p1</hw-mqc-ap:name>
<hw-mqc-ap:interface>
<hw-mqc-ap:name>GigabitEthernet1/0/1</hw-mqc-ap:name>
<hw-mqc-ap:inbound> </hw-mqc-ap:inbound>
</hw-mqc-ap:interface>
</hw-mqc-ap:traffic-policy-apply>
</hw-mqc-ap:mqc-apply>
</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="1"> <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="1"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Exception Found</error-message> <error-info>Error on node /huawei-mqc-apply:mqc-apply/traffic-policy-apply[name="p1"]</error-info> </rpc-error> </rpc-reply>
Data Requirements 2
Delete the configuration in data requirement 1, that is, cancel the traffic policy p1 that is applied to GigabitEthernet1/0/1 in the inbound direction.
Request example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<hw-mqc-ap:mqc-apply xmlns:hw-mqc-ap="urn:huawei:params:xml:ns:yang:huawei-mqc-apply">
<hw-mqc-ap:traffic-policy-apply xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
<hw-mqc-ap:name>p1</hw-mqc-ap:name>
<hw-mqc-ap:interface>
<hw-mqc-ap:name>GigabitEthernet1/0/1</hw-mqc-ap:name>
<hw-mqc-ap:inbound> </hw-mqc-ap:inbound>
</hw-mqc-ap:interface>
</hw-mqc-ap:traffic-policy-apply>
</hw-mqc-ap:mqc-apply>
</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="3"> <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="3"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Exception Found</error-message> <error-info>Error on node /huawei-mqc-apply:mqc-apply/traffic-policy-apply[name="p1"]</error-info> </rpc-error> </rpc-reply>