This section provides a sample of configuring policy association on an access device using the config method.
Operation |
XPATH |
|---|---|
edit-config:config |
|
| Item | Data | Description |
|---|---|---|
| IP address of the control device | 10.1.1.1 | - |
| Source VLANIF interface of the CAPWAP tunnel established between the access device and control device | 100 | - |
<?xml version='1.0' encoding='UTF-8'?>
<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:policy-association>
<hw-nac:as-access>
<hw-nac:controller-ip>10.1.1.1</hw-nac:controller-ip>
<hw-nac:vlanif>100</hw-nac:vlanif>
</hw-nac:as-access>
</hw-nac:policy-association>
</hw-nac:nac-access>
</config>
</edit-config>
</rpc>
# Sample of successful response.
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <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="0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-path>/huawei-nac:nac-access/policy-association/as-access/vlanif</error-path>
<error-message>parse rpc config error.(Value "5000" does not satisfy the constraint "1..4094" (range, length, or pattern).).</error-message>
</rpc-error>
</rpc-reply>