This section describes how to bind an ACL to a service scheme using the rpc method.
Operation |
XPATH |
---|---|
edit-config:create |
/huawei-aaa:aaa/service-scheme |
Item |
Data |
Description |
---|---|---|
Number of the ACL bound to a service scheme | 3101 | Bind ACL 3101 to a service scheme. |
Before binding an ACL to a service scheme, create the ACL first using the acl command.
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <edit-config> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <aaa xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa"> <service-scheme xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge"> <name>lsw_serv</name> <vsys>public</vsys> <acl>3101</acl> </service-scheme> </aaa> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Unrecognized information.</error-message> <error-info>Error on node /huawei-aaa:aaa/service-scheme[name="lsw_serv",vsys="public"]/acl[.="3101"]</error-info> </rpc-error> </rpc-reply>