No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S600-E V200R012C00 NETCONF YANG API Reference

This document describes the NETCONF YANG API functions supported by the switch, including the data model and samples.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring the HTTP Service Function

Configuring the HTTP Service Function

This section describes the configuration model of the HTTP service function and provides examples of XML packets.

Data Model

The data model file matching configuring the HTTP service function is huawei-system-web.yang.

Table 2-38  Data model of configuring the HTTP service function

Object

Description

Value

Remarks

/huawei-system-web:web/web-server/service-configuration/enable

Enables the HTTP service function.

The value is of the enumerated type:

  • true: enable
  • false: disable

The default value is true.

N/A

Disabling the HTTP Service Function

This section provides a sample of disabling the HTTP service function using the edit-config method.

Table 2-39  Disabling the HTTP service function

Operation

XPATH

edit-config

/huawei-system-web:web/web-server/service-configuration/enable

Data Requirement 1

Table 2-40  Disabling the HTTP service function

Item

Data

Description

Whether to enable the HTTP service function.

false

Disable the HTTP service function.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <web:web xmlns:web="urn:huawei:params:xml:ns:yang:huawei-system-web">
        <web:web-server>
          <web:service-configuration>
            <web:enable>false</web:enable>
          </web:service-configuration>
        </web:web-server>
      </web:web>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <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="1">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Data Requirement 2

Table 2-41  Deleting packets used for disabling the HTTP service function

Item

Data

Description

Whether to delete packets used for disabling the HTTP service function.

false

Delete packets used for disabling the HTTP service function.

Deletion Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <web:web xmlns:web="urn:huawei:params:xml:ns:yang:huawei-system-web">
        <web:web-server>
          <web:service-configuration>
            <web:enable xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">false</web:enable>
          </web:service-configuration>
        </web:web-server>
      </web:web>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <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="1">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>
Translation
Download
Updated: 2018-09-01

Document ID: EDOC1100037962

Views: 6358

Downloads: 8

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next