This section provides a sample of binding the authentication profile to an interface using the merge method. You can also use the create method to bind the authentication profile to an interface.
Operation |
XPATH |
---|---|
edit-config:merge |
/ietf-interfaces:interfaces/ietf-interfaces:interface/huawei-nac:authentication-profile/authentication-profile-name |
Item |
Data |
Description |
---|---|---|
interface name |
GigabitEthernet0/0/1 |
Bind the authentication profile lzl to GigabitEthernet0/0/1. |
authentication-profile-name |
lzl |
<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>lzl</name> </authentication-profile> </nac-access> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <if:name>GigabitEthernet0/0/1</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type> <hw-nac:authentication-profile xmlns:hw-nac="urn:huawei:params:xml:ns:yang:huawei-nac"> <hw-nac:authentication-profile-name>lzl</hw-nac:authentication-profile-name> </hw-nac:authentication-profile> </if:interface> </if:interfaces> </config> </edit-config>
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 message-id="123" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc-error> <error-type>application</error-type> <error-tag>invalid-value</error-tag> <error-severity>error</error-severity> <error-message>The request specifies an unacceptable value for one or more parameters.</error-message> </rpc-error> </rpc-reply>