< Home

Creating an MD

This section provides a sample of creating an MD using the edit-config method.

Table 1 Creating an MD

Operation

XPATH

edit-config

  • /huawei-cfm/cfm/enabled

  • /huawei-cfm/cfm/md/md-name

  • /huawei-cfm/cfm/md/level

  • /huawei-cfm/cfm/md/md-format/string

Data Requirements

Item

Data

Description

Global CFM status

true

Enable CFM globally.

MD name

mdccl

Create an MD named mdccl.

MD level

3

Set the MD level to 3.

MD format

string_example

Specify an MD name as a character string.

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>
      <huawei-cfm:cfm xmlns:huawei-cfm="urn:huawei:params:xml:ns:yang:huawei-cfm">
        <huawei-cfm:enabled>true</huawei-cfm:enabled>
        <huawei-cfm:md xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="create">
          <huawei-cfm:md-name>mdccl</huawei-cfm:md-name>
          <huawei-cfm:level>3</huawei-cfm:level>
          <huawei-cfm:md-format>
            <huawei-cfm:string>string_example</huawei-cfm:string>
          </huawei-cfm:md-format>
        </huawei-cfm:md>
      </huawei-cfm:cfm>
    </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-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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >