< Home

Configuring Parameters for Parsing and Replying to POST Request Packets of the HTTP or HTTPS Protocol

This section provides a sample of configuring parameters for parsing and replying to POST request packets of the HTTP or HTTPS protocol using the merge method.

Table 1 Configuring parameters for parsing and replying to POST request packets of the HTTP or HTTPS protocol

Operation

XPATH

edit-config:merge

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/cmd-key/cmd-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/cmd-key/login-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/cmd-key/logout-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/password-key/password-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/initial-url-key/init-url-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/user-ip-key/user-ip-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/user-mac-key/user-mac-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/user-name-key/user-name-key

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/response-parameters/login-fail

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/response-parameters/login-success

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/response-parameters/logout-fail

/huawei-aaa-portal:portal/portal-server/http-method-parameters/post-parameters/response-parameters/logout-success

Data Requirements

Table 2 Configuring parameters for parsing and replying to POST request packets of the HTTP or HTTPS protocol

Item

Data

Description

name

huawei

Configure the Portal server template named huawei.

cmd-key

key1

Set the user login identification keyword to key1.

login-key

key2

Set the user logout identification keyword to key2.

logout-key

key3

Set the command identification keyword to key3.

password-key

psw1

Set the password identification keyword to psw1.

init-url-key

key4

Set the identification keyword for the user initial login URL to key1.

user-ip-key

key5

Set the identification keyword for the user IP address to key1.

user-mac-key

key6

Set the identification keyword for the user MAC address to key1.

user-name-key

key7

Set the user name identification keyword to key1.

message

msg1

Set the response message upon a user login failure to msg1.

message

msg2

Set the response message upon a user login success to msg2.

message

msg3

Set the response message upon a user logout failure to msg3.

message

msg4

Set the response message upon a user logout success to msg4.

Request Example

<?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-aaa-portal:portal xmlns:hw-aaa-portal="urn:huawei:params:xml:ns:yang:huawei-aaa-portal">
        <hw-aaa-portal:portal-server>
          <hw-aaa-portal:name>huawei</hw-aaa-portal:name>
          <hw-aaa-portal:http-method-parameters>
            <hw-aaa-portal:post-parameters>
              <hw-aaa-portal:cmd-key>
                <hw-aaa-portal:cmd-key>key1</hw-aaa-portal:cmd-key>
                <hw-aaa-portal:login-key>key2</hw-aaa-portal:login-key>
                <hw-aaa-portal:logout-key>key3</hw-aaa-portal:logout-key>
              </hw-aaa-portal:cmd-key>
              <hw-aaa-portal:password-key>
                <hw-aaa-portal:password-key>psw1</hw-aaa-portal:password-key>
              </hw-aaa-portal:password-key>
              <hw-aaa-portal:initial-url-key>
                <hw-aaa-portal:init-url-key>key4</hw-aaa-portal:init-url-key>
              </hw-aaa-portal:initial-url-key>
              <hw-aaa-portal:user-ip-key>
                <hw-aaa-portal:user-ip-key>key5</hw-aaa-portal:user-ip-key>
              </hw-aaa-portal:user-ip-key>
              <hw-aaa-portal:user-mac-key>
                <hw-aaa-portal:user-mac-key>key6</hw-aaa-portal:user-mac-key>
              </hw-aaa-portal:user-mac-key>
              <hw-aaa-portal:user-name-key>
                <hw-aaa-portal:user-name-key>key7</hw-aaa-portal:user-name-key>
              </hw-aaa-portal:user-name-key>
              <hw-aaa-portal:response-parameters>
                <hw-aaa-portal:login-fail>
                  <hw-aaa-portal:message>msg1</hw-aaa-portal:message>
                </hw-aaa-portal:login-fail>
                <hw-aaa-portal:login-success>
                  <hw-aaa-portal:message>msg2</hw-aaa-portal:message>
                </hw-aaa-portal:login-success>
                <hw-aaa-portal:logout-fail>
                  <hw-aaa-portal:message>msg3</hw-aaa-portal:message>
                </hw-aaa-portal:logout-fail>
                <hw-aaa-portal:logout-success>
                  <hw-aaa-portal:message>msg4</hw-aaa-portal:message>
                </hw-aaa-portal:logout-success>
              </hw-aaa-portal:response-parameters>
            </hw-aaa-portal:post-parameters>
          </hw-aaa-portal:http-method-parameters>
        </hw-aaa-portal:portal-server>
      </hw-aaa-portal:portal>
    </config>
  </edit-config>
</rpc>

Response Example

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

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="16">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path>/huawei-aaa-portal:portal/portal-server[name='huawei']/http-method-parameters/post-parameters/response-parameters/logout-fail/redirect-url</error-path>
    <error-message>parse rpc config error.(Data for more than one case branch of "response" choice present.).</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic