This section provides a sample of creating a MAC access profile using the merge method. You can also use the create method to create a MAC access profile.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-nac-mac:mac-access/configure-mode/unified-mode/mac-access-profile/name |
Item |
Data |
Description |
---|---|---|
name |
test |
Create the MAC access profile test. |
<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> <mac-access xmlns="urn:huawei:params:xml:ns:yang:huawei-nac-mac"> <mac-access-profile> <name>test</name> </mac-access-profile> </mac-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="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>invalid mac-access-profile name</error-message> <error-info>Error on node /huawei-nac-mac:mac-access/mac-access-profile[name="mactestmactestmactestmactestmactest"]/name</error-info> </rpc-error> </rpc-reply>