This section provides a sample of configuring a device to send accounting packets for address updating using the merge method.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-nac:nac-access/configure-mode/unified-mode/authentication-profile/realtime-accounting-trigger/update-ip-accounting |
Item |
Data |
Description |
---|---|---|
name |
p1 |
Configure the authentication profile named p1. |
update-ip-accounting |
true |
Configure a device to send accounting packets for address updating. |
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-nac:nac-access xmlns:hw-nac="urn:huawei:params:xml:ns:yang:huawei-nac"> <hw-nac:authentication-profile> <hw-nac:name>p1</hw-nac:name> <hw-nac:realtime-accounting-trigger xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge"> <hw-nac:update-ip-accounting>true</hw-nac:update-ip-accounting> </hw-nac:realtime-accounting-trigger> </hw-nac:authentication-profile> </hw-nac:nac-access> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-nac:nac-access/authentication-profile[name='xuandong']/realtime-accounting-trigger/update-ip-accounting</error-path> <error-message>parse rpc config error.(Invalid value "error" in "update-ip-accounting" element.).</error-message> </rpc-error> </rpc-reply>