This section provides a sample of configuring a device to send accounting packets for roaming using the merge method.
Operation |
XPATH |
|---|---|
edit-config:merge |
/huawei-nac:nac-access/configure-mode/unified-mode/authentication-profile/realtime-accounting-trigger/roam-accounting |
Item |
Data |
Description |
|---|---|---|
name |
p1 |
Configure the authentication profile named p1. |
roam-accounting |
true |
Configure a device to send accounting packets for roaming. |
<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:roam-accounting>true</hw-nac:roam-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/roam-accounting</error-path>
<error-message>parse rpc config error.(Invalid value "error" in "roam-accounting" element.).</error-message>
</rpc-error>
</rpc-reply>