This section describes how to apply the HWTACACS server template in a domain using the merge method.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-aaa:aaa/huawei-aaa:aaa-domain/huawei-aaa-hwtacacs:hwtacacs-server/huawei-aaa-hwtacacs:hwtacacs-server |
Item |
Data |
Description |
---|---|---|
Domain name. |
domain1 | Create a domain named domain1. |
Name of the HWTACACS server template that is applied in a domain. |
tac1 NOTE:
Make sure that this template has been created on
the device. |
Apply the HWTACACS server template named tac1 in the domain. |
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> <edit-config> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <aaa xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa"> <aaa-domain xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" > <name>domain1</name> <vsys>public</vsys> <hwtacacs-server xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa-hwtacacs"> <hwtacacs-server ns0:operation="merge">tac1</hwtacacs-server> </hwtacacs-server> </aaa-domain> </aaa> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>config hwtacacs server failed</error-message> <error-info>Error on node /huawei-aaa:aaa/aaa-domain[name="domain2",vsys="public"]/huawei-aaa-hwtacacs:hwtacacs-server/hwtacacs-server</error-info> </rpc-error> </rpc-reply>