< Home

Creating a Portal Access Profile

This section provides a sample of creating a Portal access profile using the merge method. You can also use the create method to create a Portal access profile.

Table 1 Creating a Portal access profile

Operation

XPATH

edit-config:merge

/huawei-nac-portal:portal-access/configure-mode/unified-mode/portal-access-profile/portal-server/portal-server

/huawei-nac-portal:portal-access/configure-mode/unified-mode/portal-access-profile/portal-server/bak-portal-server

/huawei-nac-portal:portal-access/configure-mode/unified-mode/portal-access-profile/portal-mode

Data Requirement

Table 2 Portal access profile

Item

Data

Description

name

test

Create the Portal access profile test.

portal-server

webauthserver

Configure the Portal server template webauthserver bound to the Portal access profile test.

bak-portal-server

webauthbakserver

Configure the backup Portal server template webauthbakserver bound to the Portal access profile test.

Request Example

<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config>
    <portal-access xmlns="urn:huawei:params:xml:ns:yang:huawei-nac-portal">
      <portal-access-profile xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge">
        <name>test</name>
        <portal-server ns0:operation="merge">
          <portal-server>webauthserver</portal-server>
          <bak-portal-server>webauthbakserver</bak-portal-server>
        </portal-server>
        <portal-mode>direct</portal-mode>
      </portal-access-profile>
    </portal-access>
    <portal xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa-portal">
      <portal-server xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge">
        <name>webauthserver</name>
        <portal-server-ip>11.11.11.11</portal-server-ip>
        <destination-port>
          <port>50100</port>
          <always>true</always>
        </destination-port>
      </portal-server>
      <portal-server xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="merge">
        <name>webauthbakserver</name>
        <portal-server-ip>10.10.10.22</portal-server-ip>
        <destination-port>
          <port>50100</port>
          <always>true</always>
        </destination-port>
      </portal-server>
    </portal>
  </config>
</edit-config>

Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_012824316d704d43adb16b1a4245d273">
 <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="38">
  <rpc-error>
    <error-app-tag>1</error-app-tag>
    <error-message>Service process failed.</error-message>
    <error-info>Error on node /huawei-nac-portal:portal-access/portal-access-profile[name="test"]/name</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >