This section provides a sample of enabling NTDP globally using the rpc method.
Operation |
XPATH |
|---|---|
edit-config:create |
/huawei-ntdp/ntdp/enabled |
Data Requirements
Item |
Data |
Description |
|---|---|---|
Whether NTDP is enabled globally |
true |
Enable NTDP globally. |
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<huawei-ntdp:ntdp xmlns:huawei-ntdp="urn:huawei:params:xml:ns:yang:huawei-ntdp">
<huawei-ntdp:enabled>true</huawei-ntdp:enabled>
</huawei-ntdp:ntdp>
</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="0"> <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-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>