< Home

Binding the URL Template to the Portal Server Template

This section provides a sample of binding the URL template to the Portal server template using the merge method. You can also use the create method to bind the URL template to the Portal server template.

Table 1 Binding the URL template to the Portal server template

Operation

XPATH

edit-config:merge

/huawei-aaa-portal/portal/portal-server/url-template/name

Data Requirement

Table 2 Binding the URL template to the Portal server template

Item

Data

Description

name

abc

Bind the URL template abc to the Portal server template huawei.

The URL template abc and the Portal server template huawei must have been created.

Request Example

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="123">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <portal xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa-portal">
    <url-template>
     <name>abc</name>
    </url-template>
    <portal-server> 
     <name>huawei</name>
     <url-template xc:operation="merge">
      <name>abc</name>
     </url-template>
    </portal-server>  
   </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="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="35">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message>Undo/config url template failed.</error-message>
    <error-info>Error on node /huawei-aaa-portal:portal/portal-server[name="huawei"]/url-template/name</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >