This section provides a sample of binding an authentication-free rule profile to the authentication profile using the merge method. You can also use the create method to bind an authentication-free rule profile to the authentication profile.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-nac:nac-access/configure-mode/unified-mode/authentication-profile/free-rule-profile |
Item |
Data |
Description |
---|---|---|
free-rule-profile |
default_free_rule |
Bind the authentication-free rule profile default_free_rule to the authentication profile authen_pro. The authentication-free rule profile must exist on the switch. |
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <nac-access xmlns="urn:huawei:params:xml:ns:yang:huawei-nac"> <authentication-profile xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge"> <name>authen_pro</name> <free-rule-profile>default_free_rule</free-rule-profile> </authentication-profile> </nac-access> </config> </edit-config>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_012824316d704d43adb16b1a4245d273"> <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="50"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>config/undo access profile failed</error-message> <error-info>Error on node /huawei-nac:nac-access/authentication-profile[name="authen_pro"]/free-rule-profile</error-info> </rpc-error> </rpc-reply>