[go: up one dir, main page]

CN105681069A - CLI (Command-Line Interface) configuration command response method and device - Google Patents

CLI (Command-Line Interface) configuration command response method and device Download PDF

Info

Publication number
CN105681069A
CN105681069A CN201410673534.0A CN201410673534A CN105681069A CN 105681069 A CN105681069 A CN 105681069A CN 201410673534 A CN201410673534 A CN 201410673534A CN 105681069 A CN105681069 A CN 105681069A
Authority
CN
China
Prior art keywords
command
string
order
subcommand
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410673534.0A
Other languages
Chinese (zh)
Inventor
张平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201410673534.0A priority Critical patent/CN105681069A/en
Priority to PCT/CN2015/072455 priority patent/WO2016078234A1/en
Publication of CN105681069A publication Critical patent/CN105681069A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0879Manual configuration through operator

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明提供一种CLI配置命令响应方法及装置,用以解决现有技术CLI配置命令响应方式导致用户操作复杂的问题。其中,CLI配置命令响应方法,包括:在当前输入的命令行界面CLI配置命令中包含命令层次命令串,且命令层次命令串指示的命令层次与当前命令层次不同的情况下,跳转到命令层次命令串指示的命令层次,在跳转后的命令层次执行配置命令,基于该方案,用户无需先退出当前命令层次再重新进入指定命令层次,简化了用户操作。

The invention provides a method and device for responding to a CLI configuration command, which are used to solve the problem of complex user operations caused by the response mode of the CLI configuration command in the prior art. Wherein, the CLI configuration command response method includes: jumping to the command level when the currently input command line interface CLI configuration command contains a command level command string, and the command level indicated by the command level command string is different from the current command level The command level indicated by the command string executes the configuration command at the command level after the jump. Based on this scheme, the user does not need to exit the current command level and then re-enter the specified command level, which simplifies user operations.

Description

一种CLI配置命令响应方法及装置A CLI configuration command response method and device

技术领域technical field

本发明涉及通讯领域,特别是涉及一种CLI(command-lineinterface,命令行界面)配置命令响应方法及装置。The present invention relates to the communication field, in particular to a CLI (command-line interface, command line interface) configuration command response method and device.

背景技术Background technique

目前,一般通讯设备的命令行配置时,配置命令输入是有不同的层次的,也就是说,配置命令时,首先需要做一些准备命令到达指定的配置层次,再做后续的命令输入。如果新的配置命令需要的配置层次与当前配置层次不一致,需要退出当前配置层次重新进入到合适的配置层次,导致用户操作复杂。而对于命令提示符的显示,一般采用简化显示的方式,即,命令提示符与进入命令层次所需要的操作命令并不是一致的。At present, in the command line configuration of general communication equipment, there are different levels of configuration command input. That is to say, when configuring commands, you first need to do some preparation commands to reach the specified configuration level, and then do subsequent command input. If the configuration level required by the new configuration command is inconsistent with the current configuration level, it is necessary to exit the current configuration level and re-enter the appropriate configuration level, resulting in complicated user operations. As for the display of the command prompt, a simplified display method is generally adopted, that is, the command prompt is not consistent with the operation commands required to enter the command level.

发明内容Contents of the invention

本发明提供一种CLI配置命令响应方法及装置,用以解决现有技术CLI配置命令响应方式导致用户操作复杂的问题。The invention provides a method and device for responding to a CLI configuration command, which are used to solve the problem of complex user operations caused by the response mode of the CLI configuration command in the prior art.

根据本发明的一个方面,提供了一种CLI配置命令响应方法,包括:在当前输入的命令行界面CLI配置命令中包含命令层次命令串,且命令层次命令串指示的命令层次与当前命令层次不同的情况下,跳转到命令层次命令串指示的命令层次,在跳转后的命令层次执行配置命令。According to one aspect of the present invention, a method for responding to a CLI configuration command is provided, including: a command level command string is included in the currently input command line interface CLI configuration command, and the command level indicated by the command level command string is different from the current command level In the case of , jump to the command level indicated by the command string of the command level, and execute the configuration command at the command level after the jump.

进一步的,上述方法还包括:在命令层执行配置命令之前,在配置命令中包含命令层次命令串,且命令层次命令串指示增加命令层次的情况下,在命令层次命令串的末尾增加配置命令;在配置命令中包含命令层次命令串,且命令层次命令串指示批量退出配置命令层次的情况下,清空命令层次命令串;在配置命令中包含命令层次命令串,且命令层次命令串指示退出配置命令的情况下,清除命令层次命令串的末尾。Further, the above method further includes: before executing the configuration command at the command layer, including a command level command string in the configuration command, and when the command level command string indicates to increase the command level, adding the configuration command at the end of the command level command string; In the case that the command level command string is included in the configuration command, and the command level command string indicates to exit the configuration command level in batches, clear the command level command string; the command level command string is included in the configuration command, and the command level command string indicates to exit the configuration command In the case of the command hierarchy, clear the end of the command string.

进一步的,上述方法还包括:在执行配置命令后,并将命令层次命令串作为命令提示符的一部分在CLI上显示。Further, the above method further includes: after executing the configuration command, displaying the command hierarchy command string on the CLI as a part of the command prompt.

其中,将命令层次命令串作为命令提示符的一部分在CLI上显示包括:在显示命令层次命令串时,同时显示命令层次命令串的标识符。Wherein, displaying the command-level command string as a part of the command prompt on the CLI includes: displaying the identifier of the command-level command string while displaying the command-level command string.

其中,将命令层次命令串作为命令提示符的一部分在CLI上显示,包括:在与配置命令对应的命令提示符前,增加命令层次命令串;或,在与配置命令对应的命令提示符前增加一行,在该行显示命令层次命令串;或,以单独的一行显示命令层次命令串,且,在输入提示光标位行,仅显示网元标识。Among them, displaying the command-level command string as a part of the command prompt on the CLI includes: adding the command-level command string before the command prompt corresponding to the configuration command; or adding One line, display the command level command string on this line; or, display the command level command string on a single line, and, in the line where the input prompt cursor is located, only the network element ID is displayed.

根据本发明的另一个方面,提供了一种CLI配置命令响应装置,包括:执行模块,用于在当前输入的命令行界面CLI配置命令中包含命令层次命令串,且命令层次命令串指示的命令层次与当前命令层次不同的情况下,跳转到命令层次命令串指示的命令层次,在跳转后的命令层次执行配置命令。According to another aspect of the present invention, a CLI configuration command response device is provided, including: an execution module, configured to include a command-level command string in the currently input command-line interface CLI configuration command, and the command indicated by the command-level command string When the level is different from the current command level, jump to the command level indicated by the command string of the command level, and execute the configuration command at the command level after the jump.

进一步的,上述装置还包括:第一维护模块,用于在命令层次执行配置命令之前,在配置命令中包含命令层次命令串,且命令层次命令串指示增加命令层次的情况下,在命令层次命令串的末尾增加配置命令;第二维护模块,用于在配置命令中包含命令层次命令串,且命令层次命令串指示批量退出配置命令层次的情况下,清空命令层次命令串;第三维护模块,用于在配置命令中包含命令层次命令串,且命令层次命令串指示退出配置命令的情况下,清除命令层次命令串的末尾。Further, the above-mentioned device further includes: a first maintenance module, configured to include a command-level command string in the configuration command before executing the configuration command at the command level, and when the command-level command string indicates to increase the command level, the command-level command Add a configuration command at the end of the string; the second maintenance module is used to include a command hierarchy command string in the configuration command, and the command hierarchy command string indicates to exit the configuration command hierarchy in batches, clear the command hierarchy command string; the third maintenance module, Used to clear the end of the command-level command string when the command-level command string is included in the configuration command, and the command-level command string indicates an exit configuration command.

进一步的,上述装置还包括:显示模块,用于在执行配置命令后,并将命令层次命令串作为命令提示符的一部分在CLI上显示。Further, the above device further includes: a display module, configured to display the command hierarchy command string on the CLI as a part of the command prompt after the configuration command is executed.

其中,显示模块具体用于:在显示命令层次命令串时,同时显示命令层次命令串的标识符。Wherein, the display module is specifically used for: when displaying the command string of the command level, simultaneously displaying the identifier of the command string of the command level.

其中,显示模块具体用于:在与配置命令对应的命令提示符前,增加命令层次命令串;或,在与配置命令对应的命令提示符前增加一行,在该行显示命令层次命令串;或,以单独的一行显示命令层次命令串,且,在输入提示光标位行,仅显示网元标识。Wherein, the display module is specifically used to: add a command level command string before the command prompt corresponding to the configuration command; or add a line before the command prompt corresponding to the configuration command, and display the command level command string on this line; or , to display the command hierarchy command string in a single line, and only display the network element ID in the input prompt cursor line.

本发明实施例,在配置命令中包含命令层次命令串时,跳转至命令层次命令串指定的命令层次,使得在输入的配置命令与当前命令层次不同时,用户无需先退出当前命令层次再重新进入指定命令层次,简化了用户操作。In the embodiment of the present invention, when the configuration command contains a command level command string, it jumps to the command level specified by the command level command string, so that when the input configuration command is different from the current command level, the user does not need to exit the current command level first and then start again. Enter the specified command level, which simplifies the user operation.

附图说明Description of drawings

图1是本发明实施例1的CLI配置命令响应方法的流程图;Fig. 1 is the flowchart of the CLI configuration order response method of embodiment 1 of the present invention;

图2为本发明实施例2的命令提示符信息维护流程图;Fig. 2 is the flow chart of command prompt information maintenance in embodiment 2 of the present invention;

图3是本发明实施例2的配置命令的执行流程的流程图;FIG. 3 is a flow chart of the execution flow of the configuration command in Embodiment 2 of the present invention;

图4是本发明实施例6的CLI配置命令响应装置的结构框图。Fig. 4 is a structural block diagram of a device for responding to a CLI configuration command according to Embodiment 6 of the present invention.

具体实施方式detailed description

为了解决现有技术现有技术CLI配置命令响应方式导致用户操作复杂的问题的问题,本发明提供了一种CLI配置命令响应方法及装置,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。In order to solve the problem of complex user operations caused by the prior art CLI configuration command response mode in the prior art, the present invention provides a CLI configuration command response method and device. The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments . It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

实施例1Example 1

图1是本发明实施例1的CLI配置命令响应方法的流程图。如图1所示,该方法包括以下步骤:FIG. 1 is a flowchart of a CLI configuration command response method according to Embodiment 1 of the present invention. As shown in Figure 1, the method includes the following steps:

步骤101:在当前输入的命令行界面CLI配置命令中包含命令层次命令串,且所述命令层次命令串指示的命令层次与当前命令层次不同的情况下,跳转到命令层次命令串指示的命令层次;Step 101: In the case that the currently input command line interface CLI configuration command contains a command level command string, and the command level indicated by the command level command string is different from the current command level, jump to the command indicated by the command level command string level;

步骤102:在跳转后的命令层次执行所述配置命令。Step 102: Execute the configuration command at the redirected command level.

在上述步骤101中,对配置命令的响应之前,可以分以下三种情况来维护命令提示符层次信息:In the above step 101, before responding to the configuration command, the command prompt level information can be maintained in the following three situations:

在配置命令中包含命令层次命令串,且命令层次命令串指示增加命令层次的情况下,在命令层次命令串的末尾增加配置命令;In the case that the command hierarchy command string is included in the configuration command, and the command hierarchy command string indicates to increase the command hierarchy, the configuration command is added at the end of the command hierarchy command string;

在配置命令中包含命令层次命令串,且命令层次命令串指示退出到底层配置界面的情况下,清空命令层次命令串;When the configuration command contains a command-level command string, and the command-level command string indicates to exit to the underlying configuration interface, clear the command-level command string;

在配置命令中包含命令层次命令串,且命令层次命令串指示退出一层配置命令的情况下,清除命令层次命令串的末尾。In the case that the command hierarchy command string is included in the configuration command, and the command hierarchy command string indicates exiting a configuration command at one level, the end of the command hierarchy command string is cleared.

本实施例提供的配置命令响应方法具体还包括显示命令提示符的处理,基于此,上述方法还包括:在执行配置命令后,在CLI上显示将命令层次命令串作为命令提示符信息的一部分进行显示,即在CLI上显示命令层次提示符信息,其中,命令层次提示符信息,是当前命令层次命令串在CLI提示符的显示内容。The configuration command response method provided in this embodiment specifically includes the processing of displaying the command prompt. Based on this, the above method further includes: after executing the configuration command, displaying the command hierarchy command string as part of the command prompt information on the CLI. Display, that is, to display the command-level prompt information on the CLI, where the command-level prompt information is the display content of the current command-level command string on the CLI prompt.

为了与现有命令提示符进行区别,本发明实施例可以对命令层次命令串进行区别显示,基于此,可以在返回的作为命令提示符的一部分中增加命令层次命令串标识符,优选地,该标识符可以为“#”。In order to distinguish from the existing command prompt, the embodiment of the present invention can display the command-level command string differently. Based on this, the command-level command string identifier can be added to the returned part of the command prompt. Preferably, the The identifier can be "#".

在返回命令提示符并将命令层次命令串作为命令提示符的一部分在CLI上显示的的处理中,可以按照以下两种方式来进:In the process of returning to the command prompt and displaying the command-level command string as part of the command prompt on the CLI, you can proceed in the following two ways:

在与配置命令对应的命令提示符前,增加命令层次命令串;Before the command prompt corresponding to the configuration command, add a command hierarchy command string;

或,在与配置命令对应的命令提示符前增加一行,在该行显示命令层次命令串;Or, add a line before the command prompt corresponding to the configuration command, and display the command hierarchy command string on this line;

或,以单独的一行显示命令层次命令串,且,在输入提示光标位行,仅显示网元标识。Or, display the command hierarchy command string in a single line, and only display the network element ID in the line where the cursor position of the input prompt is displayed.

实施例2Example 2

本实施例提供一种CLI配置命令响应方法,其与实施例1的实施原理相同,其通过公开实现本发明所述方法的更多技术细节,以更清楚的表述本发明的具体实现过程。需要说明的是,本实施例是一种较佳的实施例,其公开的内容并不用于唯一限定本发明的实施过程。This embodiment provides a CLI configuration command response method, which has the same implementation principle as that of Embodiment 1, and discloses more technical details for implementing the method of the present invention to more clearly describe the specific implementation process of the present invention. It should be noted that this embodiment is a preferred embodiment, and the disclosed content thereof is not used to exclusively limit the implementation process of the present invention.

本实施例中,具体包括当前在使用的命令层次命令串的维护流程以及配置命令的执行流程:In this embodiment, it specifically includes the maintenance process of the currently used command-level command string and the execution process of the configuration command:

图2为本发明实施例2的维护当前执行的命令层次命令串的流程图,如图2所示,该流程包括如下处理:Fig. 2 is the flowchart of maintaining the command hierarchy command string currently executed according to Embodiment 2 of the present invention. As shown in Fig. 2, the process includes the following processing:

维护引起命令层次改变的命令层次命令串:Maintain command-level command strings that cause command-level changes:

在根据预先设置的判断增加命令层次命令的依据判断出当前执行的命令为增加命令层次的命令时(比如,configure,进入端口配置层次等),将该命令增加到命令层次命令串末尾。When it is judged that the currently executed command is a command to increase the command level based on the basis of the pre-set judgment to increase the command level (for example, configure, enter the port configuration level, etc.), the command is added to the end of the command level command string.

在根据预先设置的判断退出命令层次命令的依据判断出当前执行的的命令为退出配置命令层次的命令时(比如:命令退出一层配置命令层次),则将命令层次命令串的末尾删除。When judging that the currently executed command is a command for exiting the configuration command level according to the pre-set basis for judging the exit command level command (such as: the command exits a level of configuration command level), the end of the command level command string is deleted.

在根据预先设置的判断批量退出命令层次命令的依据判断出当前执行的的命令为批量退出配置命令层次的命令时,(比如:命令退出所有配置命令层次),则将命令层次命令串清空。每个命令执行完毕,返回命令提示符时,将命令层次命令串作为命令提示符的一部分返回。When judging that the currently executed command is a command to exit the configuration command level in batches according to the pre-set basis for judging the batch exit command level command (for example: the command exits all configuration command levels), then the command level command string is cleared. After each command is executed, when returning to the command prompt, the command-level command string is returned as a part of the command prompt.

为了与常规的输入命令显示区别,命令提示符中中包括命令层次命令串时,通过特殊标志标注。例如“#”符号。In order to distinguish it from the conventional input command display, when the command prompt includes the command hierarchy command string, it is marked with a special symbol. For example the "#" symbol.

图3是本发明实施例2的配置命令的执行流程的流程图,如图3所示,该流程包括如下处理:Fig. 3 is a flow chart of the execution flow of the configuration command in Embodiment 2 of the present invention, as shown in Fig. 3, the flow includes the following processing:

分析输入的配置命令是否包含标注为命令层次命令串信息,如果有,根据命令层次命令串包含的命令,到达指定命令层次,然后执行其余的配置命令,如果没有,则直接执行配置命令。Analyze whether the input configuration command contains the command string information marked as the command level. If yes, reach the specified command level according to the commands contained in the command level command string, and then execute the remaining configuration commands. If not, execute the configuration command directly.

实施例3Example 3

本实施例主要提供优选的命令提示符的呈现方式,对于输入的配置命令的响应与上述实施例1相同,此处不再赘述。This embodiment mainly provides a preferred presentation mode of the command prompt, and the response to the input configuration command is the same as that of the above-mentioned embodiment 1, and will not be repeated here.

在与配置命令对应的命令提示符前,增加命令层次命令串;即,在呈现命令提示符时,不增加原命令行输入与返回的行数,不改变原命令提示符的内容,只在原命令提示符前增加命令层次命令串。Before the command prompt corresponding to the configuration command, add the command hierarchy command string; that is, when the command prompt is displayed, the number of lines input and returned by the original command line will not be increased, and the content of the original command prompt will not be changed. Add a command hierarchy command string before the prompt.

在现有命令提示符实现的基础上,按照本实施例的方式显示命令提示符所呈现内容如下:On the basis of the implementation of the existing command prompt, the displayed content of the command prompt according to the method of this embodiment is as follows:

ZXAN(config)#ZXAN(config)#

ZXAN(config)#interfacegpon-olt_1/14/1ZXAN(config)#interfacegpon-olt_1/14/1

#interfacegpon-olt_1/14/1#ZXAN(config-if)##interfacegpon-olt_1/14/1#ZXAN(config-if)#

#interfacegpon-olt_1/14/1#ZXAN(config-if)#descriptionxxxx#interfacegpon-olt_1/14/1#ZXAN(config-if)#descriptionxxxx

#interfacegpon-olt_1/14/1#ZXAN(config)#exit#interfacegpon-olt_1/14/1#ZXAN(config)#exit

实施例4Example 4

本实施例主要提供优选的命令提示符的呈现方式,对于输入的配置命令的响应与上述实施例1相同,此处不再赘述。This embodiment mainly provides a preferred presentation mode of the command prompt, and the response to the input configuration command is the same as that of the above-mentioned embodiment 1, and will not be repeated here.

在与配置命令对应的命令提示符前增加一行,在该行显示命令层次命令串,即在显示命令题述符时,不改变原命令提示符的内容,仅在原命令提示符前增加一行,将命令层次命令串显示出来。Add a line before the command prompt corresponding to the configuration command, and display the command hierarchy command string on this line, that is, when displaying the command title character, do not change the content of the original command prompt, only add a line before the original command prompt, will The command hierarchy command string is displayed.

在现有命令提示符实现的基础上,按照本实施例的方式显示命令提示符所呈现内容如下:On the basis of the implementation of the existing command prompt, the displayed content of the command prompt according to the method of this embodiment is as follows:

ZXAN(config)#ZXAN(config)#

ZXAN(config)#interfacegpon-olt_1/14/1ZXAN(config)#interfacegpon-olt_1/14/1

#interfacegpon-olt_1/14/1##interfacegpon-olt_1/14/1#

ZXAN(config-if)#ZXAN(config-if)#

#interfacegpon-olt_1/14/1##interfacegpon-olt_1/14/1#

ZXAN(config-if)#descriptionxxxxZXAN(config-if)#descriptionxxxx

#interfacegpon-olt_1/14/1##interfacegpon-olt_1/14/1#

ZXAN(config)#exitZXAN(config)#exit

ZXAN(config)#ZXAN(config)#

实施例5Example 5

本实施例主要提供优选的命令提示符的呈现方式,对于输入的配置命令的响应与上述实施例1相同,此处不再赘述。This embodiment mainly provides a preferred presentation mode of the command prompt, and the response to the input configuration command is the same as that of the above-mentioned embodiment 1, and will not be repeated here.

在执行完配置命令后,以单独的一行显示配置命令中的命令层次命令串,且,在输入提示光标位行,仅显示网元标识。该方案将常规命令提示符的内容按照新的格式,全部融入命令层次命令串,新增加一单独的命令提示符行呈现命令层次命令串。在输入提示光标行,只保留了简单的网元标识信息(比如设备名称)。After the configuration command is executed, the command hierarchy command string in the configuration command is displayed on a single line, and only the network element ID is displayed in the line where the cursor position of the input prompt is displayed. In this scheme, the contents of the conventional command prompt are all integrated into the command-level command string according to the new format, and a separate command prompt line is newly added to present the command-level command string. In the input prompt cursor line, only simple network element identification information (such as device name) is reserved.

在现有命令提示符实现的基础上,按照本实施例的方式显示命令提示符所呈现内容如下:On the basis of the implementation of the existing command prompt, the displayed content of the command prompt according to the method of this embodiment is as follows:

#config##config#

ZXAN#interfacegpon-olt_1/14/1ZXAN #interfacegpon-olt_1/14/1

#config#interfacegpon-olt_1/14/1##config#interfacegpon-olt_1/14/1#

ZXAN#ZXAN#

#config#interfacegpon-olt_1/14/1##config#interfacegpon-olt_1/14/1#

ZXAN#descriptionxxxxZXAN #descriptionxxxx

#config#interfacegpon-olt_1/14/1##config#interfacegpon-olt_1/14/1#

ZXAN#exitZXAN #exit

#config##config#

ZXAN#ZXAN#

实施例6Example 6

图4是本发明实施例6的CLI配置命令响应装置的结构框图。如图4所示,该装置40包括如下组成部分:Fig. 4 is a structural block diagram of a device for responding to a CLI configuration command according to Embodiment 6 of the present invention. As shown in Figure 4, the device 40 includes the following components:

执行模块41,用于执行模块,用于在当前输入的命令行界面CLI配置命令中包含命令层次命令串,且命令层次命令串指示的命令层次与当前命令层次不同的情况下,跳转到命令层次命令串指示的命令层次,在跳转后的命令层次执行配置命令。The execution module 41 is used for executing the module, and is used for jumping to the command when the command level command string indicated by the command level command string is different from the current command level in the currently input command line interface CLI configuration command. The command level indicated by the level command string executes the configuration command at the command level after the jump.

优选的,上述装置40还可以包括:第一维护模块,用于在命令层次执行配置命令之前,在配置命令中包含命令层次命令串,且命令层次命令串指示增加命令层次的情况下,在命令层次命令串的末尾增加配置命令;第二维护模块,用于在配置命令中包含命令层次命令串,且命令层次命令串指示批量退出配置命令层次的情况下,清空命令层次命令串;第三维护模块,用于在配置命令中包含命令层次命令串,且命令层次命令串指示退出配置命令的情况下,清除命令层次命令串的末尾。Preferably, the above-mentioned device 40 may further include: a first maintenance module, configured to include a command-level command string in the configuration command before executing the configuration command at the command level, and when the command-level command string indicates an increase in the command level, the command A configuration command is added at the end of the hierarchical command string; the second maintenance module is used to include the command hierarchical command string in the configuration command, and the command hierarchical command string indicates batch exit configuration command hierarchy, clear the command hierarchical command string; the third maintenance A module, configured to clear the end of the command-level command string when the configuration command contains a command-level command string, and the command-level command string indicates to exit the configuration command.

本实施例还提供了一种优选的命令提示符显示功能,基于此,上述装置40还包括:显示模块,用于在执行配置命令后,并将命令层次命令串作为命令提示符的一部分在CLI上显示。This embodiment also provides a preferred command prompt display function. Based on this, the above-mentioned device 40 also includes: a display module, which is used to display the command hierarchy command string as a part of the command prompt on the CLI after executing the configuration command. on display.

为了将命令层次命令串与其他命令提示符进行区别,上述显示模块具体用于:在显示命令层次命令串时,同时显示命令层次命令串的标识符。In order to distinguish the command-level command string from other command prompts, the above-mentioned display module is specifically used to: when displaying the command-level command string, simultaneously display the identifier of the command-level command string.

优选的,显示模块具体可以通过以下三种方式来显示命令提示符:在与配置命令对应的命令提示符前,增加命令层次命令串;或,在与配置命令对应的命令提示符前增加一行,在该行显示命令层次命令串;或,以单独的一行显示命令层次命令串,且,在输入提示光标位行,仅显示网元标识。Preferably, the display module can specifically display the command prompt in the following three ways: before the command prompt corresponding to the configuration command, add a command hierarchy command string; or, add a line before the command prompt corresponding to the configuration command, Display the command hierarchy command string in this line; or, display the command hierarchy command string in a separate line, and only display the network element ID in the line where the input prompt cursor is located.

本发明实施例提供的方案,在配置命令中包含命令层次命令串时,跳转至命令层次命令串指定的命令层次,使得在输入的配置命令与当前命令层次不同时,用户无需先退出当前命令层次再重新进入指定命令层次,简化了用户操作。The solution provided by the embodiment of the present invention jumps to the command level specified by the command level command string when the configuration command contains the command level command string, so that when the input configuration command is different from the current command level, the user does not need to exit the current command first Level and then re-enter the specified command level, which simplifies the user operation.

尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。Although preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and therefore, the scope of the present invention should not be limited to the above-described embodiments.

Claims (10)

1. a CLI configuration order response method, it is characterised in that including:
The Command Line Interface CLI configuration order being currently entered comprises layer order subcommand string, and the order level of described layer order subcommand string instruction different from the current command level when, jumping to the order level of described layer order subcommand string instruction, the order level after redirecting performs described configuration order.
2. the method for claim 1, it is characterised in that described method also includes:
Before order level after redirecting performs described configuration order, described configuration order comprises layer order subcommand string, and when described layer order subcommand string instruction increase order level, increase described configuration order at the end of described layer order subcommand string;
Described configuration order comprises layer order subcommand string, and when described layer order subcommand string instruction batch exits configuration order level, empties described layer order subcommand string;
Described configuration order comprises layer order subcommand string, and when configuration order is exited in the instruction of described layer order subcommand string, removes the end of described layer order subcommand string.
3. the method for claim 1, it is characterised in that described method also includes:
After performing described configuration order, described layer order subcommand string is shown on CLI as a part for CMD.
4. method as claimed in claim 3, it is characterised in that described display on CLI as the part of CMD by described layer order subcommand string includes:
When showing described layer order subcommand string, the identifier of display command level commands string simultaneously.
5. method as claimed in claim 3, it is characterised in that described described layer order subcommand string is shown on CLI as a part for CMD, including:
Before the CMD corresponding with described configuration order, increase described layer order subcommand string;
Or, before the CMD corresponding with described configuration order, increase a line, show described layer order subcommand string at this row;
Or, show described layer order subcommand string with independent a line, and, at input prompt light mark row, only show network element ID.
6. a CLI configuration order responding device, it is characterised in that including:
Perform module, for comprising layer order subcommand string in the Command Line Interface CLI configuration order being currently entered, and the order level of described layer order subcommand string instruction different from the current command level when, jumping to the order level of described layer order subcommand string instruction, the order level after redirecting performs described configuration order.
7. device as claimed in claim 6, it is characterised in that described device also includes:
First maintenance module, before performing described configuration order at described order level, described configuration order comprises layer order subcommand string, and when the instruction of described layer order subcommand string increases order level, increases described configuration order at the end of described layer order subcommand string;
Second maintenance module, for comprising layer order subcommand string in described configuration order, and when described layer order subcommand string instruction batch exits configuration order level, empties described layer order subcommand string;
The third dimension protects module, for comprising layer order subcommand string in described configuration order, and when configuration order is exited in the instruction of described layer order subcommand string, removes the end of described layer order subcommand string.
8. device as claimed in claim 6, it is characterised in that described device also includes:
Display module, for, after performing described configuration order, showing described layer order subcommand string as a part for CMD on CLI.
9. device as claimed in claim 8, it is characterised in that described display module specifically for:
When showing described layer order subcommand string, the identifier of display command level commands string simultaneously.
10. device as claimed in claim 8, it is characterised in that described display module specifically for:
Before the CMD corresponding with described configuration order, increase described layer order subcommand string;
Or, before the CMD corresponding with described configuration order, increase a line, show described layer order subcommand string at this row;
Or, show described layer order subcommand string with independent a line, and, at input prompt light mark row, only show network element ID.
CN201410673534.0A 2014-11-21 2014-11-21 CLI (Command-Line Interface) configuration command response method and device Pending CN105681069A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410673534.0A CN105681069A (en) 2014-11-21 2014-11-21 CLI (Command-Line Interface) configuration command response method and device
PCT/CN2015/072455 WO2016078234A1 (en) 2014-11-21 2015-02-06 Cli configuration command response method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410673534.0A CN105681069A (en) 2014-11-21 2014-11-21 CLI (Command-Line Interface) configuration command response method and device

Publications (1)

Publication Number Publication Date
CN105681069A true CN105681069A (en) 2016-06-15

Family

ID=56013149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410673534.0A Pending CN105681069A (en) 2014-11-21 2014-11-21 CLI (Command-Line Interface) configuration command response method and device

Country Status (2)

Country Link
CN (1) CN105681069A (en)
WO (1) WO2016078234A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158770A (en) * 2019-12-30 2020-05-15 联想(北京)有限公司 Configuration information display method, equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11349907B1 (en) 2021-02-17 2022-05-31 Cisco Technology, Inc. Patternless prompt detection of command completion

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003069849A1 (en) * 2002-02-14 2003-08-21 Bivio Networks, Inc. Systems and methods for packet filtering
CN1627700A (en) * 2003-12-08 2005-06-15 鸿富锦精密工业(深圳)有限公司 Command line interface and control method
US20050132043A1 (en) * 2003-12-12 2005-06-16 Hon Hai Precision Industry Co., Ltd. System and method for command line interface command processing
CN101110702A (en) * 2007-08-14 2008-01-23 中兴通讯股份有限公司 Method for command line interface authority classification and system thereof
CN102902547A (en) * 2012-10-18 2013-01-30 上海师范大学 Command construction and analysis method of command line interface

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7210120B2 (en) * 2003-02-12 2007-04-24 Wind River Systems, Inc. CLI configuration dump command support generation
US20050243066A1 (en) * 2004-04-28 2005-11-03 Adc Broadband Access Systems, Inc. Command line interface in a communication system
US20070168322A1 (en) * 2005-09-28 2007-07-19 Siemens Aktiengesellschaft Administrable command line interface
CN101387980B (en) * 2007-09-13 2010-09-22 英业达股份有限公司 Configuration file testing system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003069849A1 (en) * 2002-02-14 2003-08-21 Bivio Networks, Inc. Systems and methods for packet filtering
CN1627700A (en) * 2003-12-08 2005-06-15 鸿富锦精密工业(深圳)有限公司 Command line interface and control method
US20050132043A1 (en) * 2003-12-12 2005-06-16 Hon Hai Precision Industry Co., Ltd. System and method for command line interface command processing
CN101110702A (en) * 2007-08-14 2008-01-23 中兴通讯股份有限公司 Method for command line interface authority classification and system thereof
CN102902547A (en) * 2012-10-18 2013-01-30 上海师范大学 Command construction and analysis method of command line interface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158770A (en) * 2019-12-30 2020-05-15 联想(北京)有限公司 Configuration information display method, equipment and storage medium
CN111158770B (en) * 2019-12-30 2023-01-06 联想(北京)有限公司 Configuration information display method, device and storage medium

Also Published As

Publication number Publication date
WO2016078234A1 (en) 2016-05-26

Similar Documents

Publication Publication Date Title
US10303773B2 (en) Chatbot system and method
CN104424338B (en) The automatically generating device and automatic generation method of web system
US9619122B2 (en) Method and apparatus for automatic device program generation
JP2020505670A (en) Component Release Method, Graphic Machine Learning Algorithm Platform Based Component Construction Method, and Graphic Machine Learning Algorithm Platform
CN110687921B (en) Unmanned aerial vehicle flight control method and device, electronic equipment and storage medium
CN108399072A (en) Five application page update method and device
CN104836853A (en) Method and apparatus for business arrangement
US7802186B2 (en) Property independent in-place editing
CN105700925A (en) APP interface implementation method and apparatus
WO2014044099A1 (en) Command execution method based on command line and command line operating system
CN105681069A (en) CLI (Command-Line Interface) configuration command response method and device
US10303331B2 (en) Live mobile application visual editor demo
WO2017107725A1 (en) Method and device for controlling operation interface
CN108704311B (en) Method and device for configuring card set, electronic equipment and storage medium
CN104407893A (en) Animation displaying method and device
CN105446601B (en) A playlist management method and mobile terminal
CN102412991A (en) Service configuration method and apparatus thereof
JP2004362577A (en) Method and device for generating graphical user interface
CN110032629A (en) A kind of conversational interactive processing method and processing device
CN112260857B (en) A method, system, device and medium for initializing an optical module of a switch
CN104866329B (en) A kind of startup method and electronic equipment
CN104951325A (en) Information display method and electronic equipment
CN112650490B (en) Page switching method, electronic device and storage medium
US20150363096A1 (en) Defining a design plan
CN107818002A (en) The management method and device of a kind of Command Line Interface

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160615