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 User Interface

Configuring the User Interface

This section describes the configuration model of the user interface and provides examples of XML packets.

Data Model

The configuration model file matching the user interface is huawei-user-interface.yang.

Table 2-50  Configuring the user interface

Object

Description

Value

Remarks

/huawei-user-interface:user-interfaces/user-interface/name

Indicates the user interface name.

The value is a character string and must be similar to vty 3 or con 0.

N/A

/huawei-user-interface:user-interfaces/user-interface/authentication-mode/aaa/aaa-protocol

Indicates that the user interface authentication mode is the login protocol corresponding to AAA authentication.

The value is of the Boolean type:
  • all: SSH and Telnet
  • ssh: SSH
  • telnet: Telnet
  • none

The value none can be delivered only when user-interface:name in a request message is con 0. Additionally, the con 0 interface can only deliver the none option.

/huawei-user-interface:user-interfaces/user-interface/authentication-mode/password/password-protocol

Indicates that the user interface authentication mode is the login protocol corresponding to password authentication.

The value is of the Boolean type:
  • all: SSH and Telnet
  • telnet: Telnet
  • none

The value none can be delivered only when user-interface:name in a request message is con 0. Additionally, the con 0 interface can only deliver the none option.

/huawei-user-interface:user-interfaces/user-interface/authentication-mode/password/password

Indicates the local authentication password.

The value is a string of 8 to 16 case-sensitive characters without spaces.

N/A

/huawei-user-interface:user-interfaces/user-interface/privilege-level

Indicates the user interface priority.

The value is an integer that ranges from 0 to 15.

N/A

/huawei-user-interface:user-interfaces/user-interface/idle-timeout/minutes

Indicates the user connection timeout period, in minutes.

The value is an integer that ranges from 0 to 35791, in minutes.

N/A

/huawei-user-interface:user-interfaces/user-interface/idle-timeout/seconds

Indicates the user connection timeout period, in seconds.

The value is an integer that ranges from 0 to 59, in seconds.

N/A

/huawei-user-interface:user-interfaces/user-interface/screen-length/line-num

Indicates the number of lines on each terminal screen.

The value is an integer that ranges from 0 to 512. The default value is 24.

N/A

/huawei-user-interface:user-interfaces/user-interface/acl/ipv4-inbound

Indicates the ACL that restricts users with an IPv4 address or within an address segment from logging in to a device.

  • The value is an integer that ranges from 2000 to 3999.
  • The value is a string of 1 to 64 case-sensitive characters without spaces and must start with a letter.

The value must be an existing ACL delivered by the controller.

/huawei-user-interface:user-interfaces/user-interface/acl/ipv4-outbound

Indicates the ACL that restricts IPv4 users who have logged in to a device from logging in to other devices.

  • The value is an integer that ranges from 2000 to 3999.
  • The value is a string of 1 to 64 case-sensitive characters without spaces and must start with a letter.

The value must be an existing ACL delivered by the controller.

/huawei-user-interface:user-interfaces/user-interface/acl/ipv6-inbound

Indicates the ACL that restricts users with an IPv6 address or within an address segment from logging in to a device.

  • The value is an integer that ranges from 2000 to 3999.
  • The value is a string of 1 to 64 case-sensitive characters without spaces and must start with a letter.

The value must be an existing ACL delivered by the controller.

/huawei-user-interface:user-interfaces/user-interface/acl/ipv6-outbound

Indicates the ACL that restricts IPv6 users who have logged in to a device from logging in to other devices.

  • The value is an integer that ranges from 2000 to 3999.
  • The value is a string of 1 to 64 case-sensitive characters without spaces and must start with a letter.

The value must be an existing ACL delivered by the controller.

Configuring the User Interface

This section provides a sample of configuring the user interface using the config method.

Table 2-51  Configuring the user interface

Operation

XPATH

edit-config:config

  • /huawei-user-interface:user-interfaces/user-interface/name
  • /huawei-user-interface:user-interfaces/user-interface/authentication-mode/aaa/aaa-protocol
  • /huawei-user-interface:user-interfaces/user-interface/authentication-mode/password/password-protocol
  • /huawei-user-interface:user-interfaces/user-interface/authentication-mode/password/password
  • /huawei-user-interface:user-interfaces/user-interface/privilege-level
  • /huawei-user-interface:user-interfaces/user-interface/idle-timeout/minutes
  • /huawei-user-interface:user-interfaces/user-interface/idle-timeout/seconds
  • /huawei-user-interface:user-interfaces/user-interface/screen-length/line-num
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv4-inbound
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv4-outbound
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv6-inbound
  • /huawei-user-interface:user-interfaces/user-interface/acl/ipv6-outbound

Data Requirements

Table 2-52  Configuring the user interface

Item

Data

Description

User interface name

vty 4

Set the password, priority, timeout interval, number of lines displayed on each terminal screen, and ACL on the VTY 4 user interface.

Login protocol corresponding to password authentication as the user interface authentication mode

all

Local authentication password

root@123

User interface priority

15

User connection timeout period, in minutes

30 minutes

User connection timeout period, in seconds

49 seconds

Number of lines on each terminal screen

512

ACL that restricts users with an IPv4 address or within an address segment from logging in to a device

test1

ACL that restricts IPv4 users who have logged in to a device from logging in to other devices

test2

ACL that restricts users with an IPv6 address or within an address segment from logging in to a device

test3

ACL that restricts IPv6 users who have logged in to a device from logging in to other devices

test4

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>
      <user-interface:user-interfaces xmlns:user-interface="urn:huawei:params:xml:ns:yang:huawei-user-interface">
        <user-interface:user-interface>
          <user-interface:name>vty 4</user-interface:name>
          <user-interface:password-protocol>all</user-interface:password-protocol>
          <user-interface:password>root@123</user-interface:password>
          <user-interface:privilege-level>15</user-interface:privilege-level>
          <user-interface:idle-timeout>
            <user-interface:minutes>30</user-interface:minutes>
            <user-interface:seconds>49</user-interface:seconds>
          </user-interface:idle-timeout>
          <user-interface:screen-length>
            <user-interface:line-num>512</user-interface:line-num>
          </user-interface:screen-length>
          <user-interface:acl>
            <user-interface:ipv4-inbound>test1</user-interface:ipv4-inbound>
            <user-interface:ipv4-outbound>test2</user-interface:ipv4-outbound>
            <user-interface:ipv6-inbound>test3</user-interface:ipv6-inbound>
            <user-interface:ipv6-outbound>test4</user-interface:ipv6-outbound>
          </user-interface:acl>
        </user-interface:user-interface>
      </user-interface:user-interfaces>
    </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="2">
  <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: 6229

Downloads: 8

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