This section provides a sample of creating an 802.1X access profile using the merge method. You can also use the create method to create an 802.1X access profile.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-nac-dot1x:dot1x-access/configure-mode/unified-mode/dot1x-access-profile/name |
Item |
Data |
Description |
---|---|---|
name |
test |
Create the 802.1X access profile test. |
<?xml version='1.0' encoding='UTF-8'?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <edit-config> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <dot1x-access xmlns="urn:huawei:params:xml:ns:yang:huawei-nac-dot1x"> <dot1x-access-profile> <name>test</name> </dot1x-access-profile> </dot1x-access> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <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="3a8e485-35d2-499e-895c-e2d2d5f555a8"> <rpc-error> <error-app-tag>1</error-app-tag> <error-message>Service process failed.</error-message> <error-info>Error on node /huawei-nac-dot1x:dot1x-access/dot1x-access-profile[name="testtesttesttesttesttesttesttesttest"]/name</error-info> </rpc-error> </rpc-reply>