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
order
string
subcommand
level
layer order
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

The invention provides a CLI (Command-Line Interface) configuration command response method and device used for solving a problem of complex user operation caused by a CLI configuration command response mode in the prior art. The CLI configuration command response method comprises the following steps of jumping to a command level indicated by a command level command string under the conditions that a currently-input command line interface CLI configuration command includes the command level command string and the command level indicated by the command level command string is different from the current command level, and then executing the configuration command at the jumped command level. A user does not need to quit the current command level to reenter the appointed command level based on the scheme, so that the user operation is simplified.

Description

A kind of CLI configuration order response method and device
Technical field
The present invention relates to communication field, particularly relate to a kind of CLI (command-lineinterface, Command Line Interface) configuration order response method and device.
Background technology
At present, when the order line of general communication apparatus configures, configuration order input is to have different levels, say, that during configuration order, it is necessary first to does some warning orders and arrives the configuration level specified, then does follow-up order input. If the configuration level that new configuration order needs is with to be currently configured level inconsistent, it is necessary to exit being currently configured level and re-enter into suitable configuration level, cause that user operation is complicated. And for the display of CMD, it being generally adopted the mode simplifying display, i.e. CMD is not consistent with the operational order entered required for order level.
Summary of the invention
The present invention provides a kind of CLI configuration order response method and device, in order to solve the problem that prior art CLI configuration order response mode causes user operation complicated.
According to an aspect of the present invention, provide a kind of CLI configuration order response method, including: in the Command Line Interface CLI configuration order being currently entered, comprise layer order subcommand string, and layer order subcommand string instruction order level different from the current command level when, jumping to the order level of layer order subcommand string instruction, the order level after redirecting performs configuration order.
Further, said method also includes: before layer order performs configuration order, comprises layer order subcommand string in configuration order, and when the instruction of layer order subcommand string increases order level, increases configuration order at the end of layer order subcommand string; Configuration order comprises layer order subcommand string, and when layer order subcommand string instruction batch exits configuration order level, empties layer order subcommand string; Configuration order comprises layer order subcommand string, and when configuration order is exited in the instruction of layer order subcommand string, the end of clear command level commands string.
Further, said method also includes: after performing configuration order, and shown on CLI as a part for CMD by layer order subcommand string.
Wherein, layer order subcommand string is shown as the part of CMD on CLI and includes: when display command level commands string, the identifier of display command level commands string simultaneously.
Wherein, layer order subcommand string is shown on CLI as a part for CMD, including: before the CMD corresponding with configuration order, increase layer order subcommand string; Or, before the CMD corresponding with configuration order, increase a line, at this row display command level commands string; Or, with independent a line display command level commands string, and, at input prompt light mark row, only show network element ID.
According to another aspect of the present invention, provide a kind of CLI configuration order responding device, including: perform module, for comprising layer order subcommand string in the Command Line Interface CLI configuration order being currently entered, and layer order subcommand string instruction order level different from the current command level when, jumping to the order level of layer order subcommand string instruction, the order level after redirecting performs configuration order.
Further, said apparatus also includes: the first maintenance module, before performing configuration order at order level, comprises layer order subcommand string in configuration order, and when layer order subcommand string instruction increase order level, increase configuration order at the end of layer order subcommand string; Second maintenance module, for comprising layer order subcommand string in configuration order, and when layer order subcommand string instruction batch exits configuration order level, empties layer order subcommand string; The third dimension protects module, for comprising layer order subcommand string in configuration order, and when configuration order is exited in the instruction of layer order subcommand string, and the end of clear command level commands string.
Further, said apparatus also includes: display module, is used for after performing configuration order, and is shown on CLI as a part for CMD by layer order subcommand string.
Wherein, display module specifically for: when display command level commands string, the simultaneously identifier of display command level commands string.
Wherein, display module specifically for: before the CMD corresponding with configuration order, increase layer order subcommand string; Or, before the CMD corresponding with configuration order, increase a line, at this row display command level commands string; Or, with independent a line display command level commands string, and, at input prompt light mark row, only show network element ID.
The embodiment of the present invention, when configuration order comprises layer order subcommand string, jump to the order level that layer order subcommand string is specified, when making the configuration order in input different from the current command level, user specifies order level without first exiting the current command level re-enter, simplifies user operation.
Accompanying drawing explanation
Fig. 1 is the flow chart of the CLI configuration order response method of the embodiment of the present invention 1;
Fig. 2 is the CMD maintenance of information flow chart of the embodiment of the present invention 2;
Fig. 3 is the flow chart of the execution flow process of the configuration order of the embodiment of the present invention 2;
Fig. 4 is the structured flowchart of the CLI configuration order responding device of the embodiment of the present invention 6.
Detailed description of the invention
For the problem solving the problem that prior art prior art CLI configuration order response mode causes user operation complicated, the invention provides a kind of CLI configuration order response method and device, below in conjunction with accompanying drawing and embodiment, the present invention is further elaborated. Should be appreciated that specific embodiment described herein is only in order to explain the present invention, does not limit the present invention.
Embodiment 1
Fig. 1 is the flow chart of the CLI configuration order response method of the embodiment of the present invention 1.As it is shown in figure 1, the method comprises the following steps:
Step 101: comprise 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, jump to the order level that layer order subcommand string indicates;
Step 102: the order level after redirecting performs described configuration order.
In above-mentioned steps 101, before the response to configuration order, it is possible to point following three kinds of situations carry out maintenance command prompt hierarchical information:
Configuration order comprises layer order subcommand string, and when the instruction of layer order subcommand string increases order level, increases configuration order at the end of layer order subcommand string;
Configuration order comprises layer order subcommand string, and when the instruction of layer order subcommand string is withdrawn into bottom configuration interface, empties layer order subcommand string;
Configuration order comprises layer order subcommand string, and when one layer of configuration order is exited in the instruction of layer order subcommand string, the end of clear command level commands string.
The configuration order response method that the present embodiment provides specifically also includes the process of display command prompt, based on this, said method also includes: after performing configuration order, CLI shows layer order subcommand string is displayed as a part for CMD information, i.e. display command depth cue symbol information on CLI, wherein, order level prompt information, is the current command level commands string display content at CLI prompt.
In order to distinguish with existing CMD, layer order subcommand string can be differently shown by the embodiment of the present invention, based on this, it is possible to increases layer order subcommand string identifier in the part return as CMD, preferably, this identifier can be " # ".
Return command prompt and layer order subcommand string is shown on CLI as the part of CMD process in, it is possible to enter according to following two mode:
Before the CMD corresponding with configuration order, increase layer order subcommand string;
Or, before the CMD corresponding with configuration order, increase a line, at this row display command level commands string;
Or, with independent a line display command level commands string, and, at input prompt light mark row, only show network element ID.
Embodiment 2
The present embodiment provides a kind of CLI configuration order response method, and it is identical with the enforcement principle of embodiment 1, its more ins and outs passing through openly to realize the method for the invention, implements process with the clearer statement present invention. It should be noted that the present embodiment is a kind of preferred embodiment, disclosure of which is not used to uniquely limit the implementation process of the present invention.
In the present embodiment, specifically include the execution flow process of the current maintenance process at the layer order subcommand string used and configuration order:
Fig. 2 is the flow chart safeguarding the current layer order subcommand string performed of the embodiment of the present invention 2, as in figure 2 it is shown, this flow process includes following process:
Safeguard the layer order subcommand string causing order level to change:
When the foundation judging to increase layer order subcommand that basis pre-sets judges the order ordered as increasing order level of current execution (such as, configure, entry port configuration layer is inferior), this order is increased to layer order subcommand string end.
According to judging of pre-setting exit command level commands according to judge current execution order for exiting the order of configuration order level time (such as: order and exit one layer of configuration order level), then the end of layer order subcommand string is deleted.
According to pre-set judge batch exit command level commands according to judge current execution order as exiting the order of configuration order level in batches time, (such as: all configuration order levels are exited in order), then empty layer order subcommand string. Each order is finished, and during return command prompt, is returned as a part for CMD by layer order subcommand string.
In order to distinguish with conventional input order display, when CMD includes layer order subcommand string, marked by distinctive mark. Such as " # " symbol.
Fig. 3 is the flow chart of the execution flow process of the configuration order of the embodiment of the present invention 2, as it is shown on figure 3, this flow process includes following process:
Whether the configuration order of analysis input comprises is labeled as layer order subcommand string information, if it has, the order comprised according to layer order subcommand string, arrives and specifies order level, then perform remaining configuration order, if it is not, directly perform configuration order.
Embodiment 3
The present embodiment mainly provides the presentation mode of preferred CMD, and the response for the configuration order of input is identical with above-described embodiment 1, repeats no more herein.
Before the CMD corresponding with configuration order, increase layer order subcommand string; That is, when presenting CMD, do not increase the input of former order line and the line number returned, do not change the content of former CMD, before former CMD, only increase layer order subcommand string.
On the basis that existing CMD realizes, as follows according to the mode display command prompt presented content of the present embodiment:
ZXAN(config)#
ZXAN(config)#interfacegpon-olt_1/14/1
#interfacegpon-olt_1/14/1#ZXAN(config-if)#
#interfacegpon-olt_1/14/1#ZXAN(config-if)#descriptionxxxx
#interfacegpon-olt_1/14/1#ZXAN(config)#exit
Embodiment 4
The present embodiment mainly provides the presentation mode of preferred CMD, and the response for the configuration order of input is identical with above-described embodiment 1, repeats no more herein.
A line is increased before the CMD corresponding with configuration order, at this row display command level commands string, namely when display command topic states symbol, do not change the content of former CMD, before former CMD, only increase a line, layer order subcommand string is shown.
On the basis that existing CMD realizes, as follows according to the mode display command prompt presented content of the present embodiment:
ZXAN(config)#
ZXAN(config)#interfacegpon-olt_1/14/1
#interfacegpon-olt_1/14/1#
ZXAN(config-if)#
#interfacegpon-olt_1/14/1#
ZXAN(config-if)#descriptionxxxx
#interfacegpon-olt_1/14/1#
ZXAN(config)#exit
ZXAN(config)#
Embodiment 5
The present embodiment mainly provides the presentation mode of preferred CMD, and the response for the configuration order of input is identical with above-described embodiment 1, repeats no more herein.
After having performed configuration order, with the layer order subcommand string in independent a line display configuration order, and, at input prompt light mark row, only show network element ID. The content of standing order prompt according to new form, is all incorporated layer order subcommand string by the program, newly increases an independent CMD row and presents layer order subcommand string. At input prompt row of cursor, only remain simple network element ID information (such as device name).
On the basis that existing CMD realizes, as follows according to the mode display command prompt presented content of the present embodiment:
#config#
ZXAN#interfacegpon-olt_1/14/1
#config#interfacegpon-olt_1/14/1#
ZXAN#
#config#interfacegpon-olt_1/14/1#
ZXAN#descriptionxxxx
#config#interfacegpon-olt_1/14/1#
ZXAN#exit
#config#
ZXAN#
Embodiment 6
Fig. 4 is the structured flowchart of the CLI configuration order responding device of the embodiment of the present invention 6. As shown in Figure 4, this device 40 includes following ingredient:
Perform module 41, for performing module, for comprising layer order subcommand string in the Command Line Interface CLI configuration order being currently entered, and layer order subcommand string instruction order level different from the current command level when, jumping to the order level of layer order subcommand string instruction, the order level after redirecting performs configuration order.
Preferably, said apparatus 40 can also include: the first maintenance module, before performing configuration order at order level, configuration order comprises layer order subcommand string, and when layer order subcommand string instruction increase order level, increase configuration order at the end of layer order subcommand string; Second maintenance module, for comprising layer order subcommand string in configuration order, and when layer order subcommand string instruction batch exits configuration order level, empties layer order subcommand string; The third dimension protects module, for comprising layer order subcommand string in configuration order, and when configuration order is exited in the instruction of layer order subcommand string, and the end of clear command level commands string.
The present embodiment additionally provides a kind of preferred CMD display function, and based on this, said apparatus 40 also includes: display module, is used for after performing configuration order, and is shown on CLI as a part for CMD by layer order subcommand string.
In order to layer order subcommand string and other CMDs are distinguished, above-mentioned display module specifically for: when display command level commands string, the identifier of display command level commands string simultaneously.
Preferably, display module specifically can carry out display command prompt by following three kinds of modes: before the CMD corresponding with configuration order, increases layer order subcommand string; Or, before the CMD corresponding with configuration order, increase a line, at this row display command level commands string; Or, with independent a line display command level commands string, and, at input prompt light mark row, only show network element ID.
The scheme that the embodiment of the present invention provides, when configuration order comprises layer order subcommand string, jump to the order level that layer order subcommand string is specified, when making the configuration order in input different from the current command level, user specifies order level without first exiting the current command level re-enter, simplifies user operation.
Although being example purpose, having been disclosed for the preferred embodiments of the present invention, it is also possible for those skilled in the art will recognize various improvement, increase and replacement, and therefore, the scope of the present invention should be not limited to above-described embodiment.

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
CN102999362A (en) Method for modifying sequence of boot options of basic input/output system (BIOS)
RU2014136806A (en) HIERARCHLY ORGANIZED CONTROL GALLERIES
US20150106153A1 (en) Workflow compilation
JP2013065316A5 (en)
CN106339146A (en) Method and device for recommending applications
CN106484464B (en) Tuner chip driving method and electronic equipment
CN104750063A (en) A system for configuring an industrial safety relay and an industrial safety system configuration method
CN106648864B (en) Method and device for opening and/or switching multiple applications
CN103728518A (en) System and method for debugging frequency converter
US20150355935A1 (en) Management system, management program, and management method
CN109101397A (en) High-Performance Computing Cluster monitoring method, unit and storage medium
US11960925B2 (en) Program generating device, program generating method, and information storage medium
CN105468674A (en) Window interception method and device and terminal equipment
CN112364266A (en) Seamless navigation method, device, electronic equipment and medium for applet and host application
CN106445805B (en) Visual test report generation method
CN104156305A (en) Application program testing method and device
CN109740092A (en) Browser, message treatment method, electronic equipment, device and storage medium
CN106294172A (en) App self-testing method based on terminal unit and device
CN105681069A (en) CLI (Command-Line Interface) configuration command response method and device
CN110543113B (en) Robot hardware assembling and managing method, device, medium, system, front-end assembling client and robot body operation system
CN108427361A (en) Method, module and the mobile terminal that programmable logic controller (PLC) is monitored
US20150277413A1 (en) System construction support apparatus
CN108023905B (en) Internet of things application system and method
CN104598133A (en) Instruction book generating method and device for object
CN103105787A (en) Method for automatically transferring a configuration of an automation device during replacement of an automation device

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

Application publication date: 20160615

WD01 Invention patent application deemed withdrawn after publication