This section provides a sample of configuring a MEP using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Item |
Data |
Description |
---|---|---|
Global CFM status |
true |
Enable CFM globally. |
MD name |
md_test |
Set the MD name to md_test. |
MA name |
ma_test |
Set the MA name to ma_test. |
VLAN ID |
100 |
Associate VLAN 100 with the MA. |
MEP ID |
10 |
Create MEP 10. |
MEP type |
true |
Specify an inward-facing MEP. |
Whether the MEP is enabled to send CCMs |
true |
Enable the MEP in an MA to send CCMs. |
Interface name |
GigabitEthernet0/0/1 |
Specify the interface on which a MEP is configured. |
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="31" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<huawei-cfm:cfm xmlns:huawei-cfm="urn:huawei:params:xml:ns:yang:huawei-cfm">
<huawei-cfm:enabled>true</huawei-cfm:enabled>
<huawei-cfm:md>
<huawei-cfm:md-name>md_test</huawei-cfm:md-name>
<huawei-cfm:ma>
<huawei-cfm:ma-name>ma_test</huawei-cfm:ma-name>
<huawei-cfm:map-vlan-id>100</huawei-cfm:map-vlan-id>
<huawei-cfm:local-mep>
<huawei-cfm:mep-id>10</huawei-cfm:mep-id>
<huawei-cfm:mep-ccm-send-enabled>true</huawei-cfm:mep-ccm-send-enabled>
<huawei-cfm:interface>GigabitEthernet0/0/1</huawei-cfm:interface>
<huawei-cfm:inward>true</huawei-cfm:inward>
</huawei-cfm:local-mep>
</huawei-cfm:ma>
</huawei-cfm:md>
</huawei-cfm:cfm>
</config>
</edit-config>
</rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="31"> <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="31"> <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>