CN107818002A - The management method and device of a kind of Command Line Interface - Google Patents
The management method and device of a kind of Command Line Interface Download PDFInfo
- Publication number
- CN107818002A CN107818002A CN201610816418.9A CN201610816418A CN107818002A CN 107818002 A CN107818002 A CN 107818002A CN 201610816418 A CN201610816418 A CN 201610816418A CN 107818002 A CN107818002 A CN 107818002A
- Authority
- CN
- China
- Prior art keywords
- resource
- order
- parameter
- line interface
- parameters
- 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.)
- Granted
Links
- 238000007726 management method Methods 0.000 title claims abstract description 28
- 238000000034 method Methods 0.000 claims abstract description 22
- 238000001514 detection method Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 11
- 238000003860 storage Methods 0.000 description 9
- 238000012423 maintenance Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 239000000463 material Substances 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 229910052799 carbon Inorganic materials 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000004549 pulsed laser deposition Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a kind of management method of Command Line Interface and device, wherein, this method includes:The order of user's input is detected on Command Line Interface;The order is matched using the command tree pre-set;When the match is successful, resource parameters corresponding to the order are obtained;Determine that resource can use situation corresponding to the resource parameters from the system resource list pre-established;When detecting that resource corresponding to the resource parameters is exported on the Command Line Interface can use situation when including preset characters in the order.Implement the embodiment of the present invention, available resource information in current business scene can be exported automatically when inputting order line, improve the input efficiency of order.
Description
Technical field
The present invention relates to the management method and device of software technology field, more particularly to a kind of Command Line Interface.
Background technology
Command Line Interface (Command-Line Interface, CLI), which refers to key under user's prompt, can perform
The interface of instruction.It does not support mouse generally, and user is instructed by input through keyboard, after computer receives instruction and performed,
The word of implementing result is shown on CLI interfaces.CLI interfaces are compared to graphic user interface (Graphical User
Interface, GUI), the resource of computer system can be more saved, and perform speed faster, function is also stronger.However, with industry
Business scene increases, and it is more and use more complicated order line to generate many dependence system resources.Now, at CLI interfaces
It is upper to need user to be manually entered the system resource of specific transactions scene as reference value under some scenes when keying in order, but
It is that user can not perceive the available resources of system under current scene, and need to exit the current command, removal search when inputting order
The system resource of inquiry adaptation current business scene.This executive mode complex operation, and the input efficiency ordered is low.
The content of the invention
, can be when inputting order line certainly the embodiment of the invention discloses a kind of management method of Command Line Interface and device
The available situation of resource information in dynamic output current business scene, improve the input efficiency of order.
First aspect of the embodiment of the present invention discloses a kind of management method of Command Line Interface, including:
The order of user's input is detected on Command Line Interface;
The order is matched using the command tree pre-set;
When the match is successful, resource parameters corresponding to the order are obtained;
Determine that resource can use situation corresponding to the resource parameters from the system resource list pre-established;
When detect include preset characters in the order when, the resource parameters pair are exported on the Command Line Interface
The resource answered can use situation.That is, resource in current business scene can be exported automatically when Command Line Interface inputs order line to believe
The available situation of breath, so as to help user more preferably to complete the input of order faster, and then can improve the execution efficiency of order.
With reference to the embodiment of the present invention in a first aspect, first aspect of the embodiment of the present invention the first possible embodiment
In, before the order that user's input is detected on Command Line Interface, methods described also includes:
Inquire about system resource present in current system;
According to the system resource inquired, system resource list is created, the system resource list is included at least
Resource corresponding to one parameter and at least one parameter can use situation.
With reference to the possible embodiment of the first of first aspect of the embodiment of the present invention or first aspect, implement in the present invention
In second of possible embodiment of example first aspect, methods described also includes:
When detecting in the order comprising target resource parameter and when not including the preset characters, the target is obtained
The attribute information of available resources corresponding to resource parameters, the resource parameters include the target resource parameter;
The attribute information of available resources corresponding to the target resource parameter is exported on the Command Line Interface.Wherein,
The attribute information of available resources corresponding to the target resource parameter can include but is not limited to can corresponding to the target resource parameter
With information such as the title of resource, place disk areas, space total capacity size, active volume size, running statuses.In order line
The details of available resources corresponding to resource parameters are exported on interface, can more facilitate user accurately to input suitable parameter and take
Value, so as to guide user more preferably to complete the input of order line faster, improve the input efficiency of order.
With reference to the first or second of possible embodiment of first aspect of the embodiment of the present invention or first aspect, at this
It is described to be determined from the system resource list pre-established in the third possible embodiment of inventive embodiments first aspect
Resource corresponding to the resource parameters can use situation, including:
Search and the title identical parameter of the resource parameters from the system resource list pre-established, and will be with institute
State resource corresponding to the title identical parameter of resource parameters can be defined as the resource parameters with situation corresponding to resource can use
Situation.
Any possible implementation into the third with reference to the first of first aspect of the embodiment of the present invention or first aspect
Mode, in the 4th kind of possible embodiment of first aspect of the embodiment of the present invention, methods described also includes:
After the order is finished, the money of resource parameters corresponding to order described in the system resource list is updated
Source can use situation.The system asset information that can so include in time to system resource list is updated, to facilitate next time
During input order, newest resource information can be obtained.
Second aspect of the embodiment of the present invention discloses a kind of managing device of Command Line Interface, including:
Detection unit, for detecting the order of user's input on Command Line Interface;
Matching unit, for being matched using the command tree pre-set to the order;
Acquiring unit, for when the match is successful for the matching unit, obtaining resource parameters corresponding to the order;
Determining unit, for determining that resource corresponding to the resource parameters can use from the system resource list pre-established
Situation;
Output unit, for when the detection unit detects and includes preset characters in the order, in the order
Resource corresponding to the resource parameters is exported on row interface can use situation.
With reference to second aspect of the embodiment of the present invention, in the first possible embodiment of second aspect of the embodiment of the present invention
In, described device also includes:
Query unit, for the detection unit detected on Command Line Interface user input order before, inquiry
System resource present in current system;
Creating unit, for the system resource inquired according to the query unit, create system resource list, institute
State system resource list include at least one parameter and at least one parameter corresponding to resource can use situation.
With reference to the possible embodiment of the first of second aspect of the embodiment of the present invention or second aspect, implement in the present invention
In second of possible embodiment of example second aspect, the acquiring unit, it is additionally operable to when the detection unit detects institute
State comprising target resource parameter and when not including the preset characters in order, obtaining can use corresponding to the target resource parameter
The attribute information of resource, the resource parameters include the target resource parameter;
The output unit, money can be used by being additionally operable to export on the Command Line Interface corresponding to the target resource parameter
The attribute information in source.
With reference to the first or second of possible embodiment of second aspect of the embodiment of the present invention or second aspect, at this
In the third possible embodiment of inventive embodiments second aspect, the determining unit specifically for being from what is pre-established
Unite search and the title identical parameters of the resource parameters in the Resources list, and by the title identical with the resource parameters
Resource corresponding to parameter can be defined as resource corresponding to the resource parameters with situation can use situation.
Any possible implementation into the third with reference to the first of second aspect of the embodiment of the present invention or second aspect
Mode, in the 4th kind of possible embodiment of second aspect of the embodiment of the present invention, described device also includes:
Updating block, corresponded to for after the order is finished, updating to order described in the system resource list
The resources of resource parameters can use situation.
The third aspect of the embodiment of the present invention discloses a kind of computer-readable recording medium, wherein being stored with executable journey
Sequence code, the program code are used to realize all or part of step in method disclosed in first aspect of the embodiment of the present invention.
Fourth aspect of the embodiment of the present invention discloses a kind of managing device of Command Line Interface, including processor, memory,
Input unit, output device and communication bus, processor are connected with memory, input unit, output device by communication bus;
Memory is used for store instruction, and processor is used to perform the instruction, and under the control of a processor, input unit and output device are used
Interacted in user;When the instruction of computing device memory storage so that the computing device embodiment of the present invention
The possible embodiment of any of method disclosed in one side.
In the embodiment of the present invention, when detecting the order of user's input on Command Line Interface, it can utilize and set in advance
The command tree put matches to the order, when the match is successful, can obtain resource parameters corresponding to the order, and from advance
Determine that resource corresponding to the resource parameters can use situation in the system resource list of foundation, preset when detecting to include in the order
During character, resource corresponding to the resource parameters can be exported on Command Line Interface can use situation.Implement it can be seen that implementing the present invention
Example, the available situation of resource information in current business scene can be exported automatically when Command Line Interface inputs order line, so as to
Help user more preferably to complete the input of order faster, and then the input efficiency of order can be improved.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, it will use below required in embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability
For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached
Figure.
Fig. 1 is a kind of management system configuration diagram of Command Line Interface disclosed in the embodiment of the present invention;
Fig. 2 be the Command Line Interface shown in Fig. 1 management system in key modules operating diagram;
Fig. 3 is a kind of schematic flow sheet of the management method of Command Line Interface disclosed in the embodiment of the present invention;
Fig. 4 is the order display schematic diagram on a kind of Command Line Interface disclosed in the embodiment of the present invention;
Fig. 5 is the order display schematic diagram on another Command Line Interface disclosed in the embodiment of the present invention;
Fig. 6 is a kind of structural representation of the managing device of Command Line Interface disclosed in the embodiment of the present invention;
Fig. 7 is the structural representation of the managing device of another Command Line Interface disclosed in the embodiment of the present invention;
Fig. 8 is the structural representation of the managing device of another Command Line Interface disclosed in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Based on this
Embodiment in invention, the every other reality that those of ordinary skill in the art are obtained under the premise of creative work is not made
Example is applied, belongs to the scope of protection of the invention.
The embodiment of the invention discloses a kind of management method of Command Line Interface and device, can be inputted in Command Line Interface
Automatically the available situation of resource information in current business scene is exported during order line, so as to help user more preferably to complete life faster
The input of order, and then the input efficiency of order can be improved.It is described in detail individually below.
In order to be better understood from the embodiment of the present invention, below first to a kind of Command Line Interface disclosed in the embodiment of the present invention
Management system framework is described.Referring to Fig. 1, Fig. 1 is a kind of management system of Command Line Interface disclosed in the embodiment of the present invention
System configuration diagram.In the system architecture shown in Fig. 1, it can at least include Command Line Interface CLI business modules, system resource
Maintenance and respond module and resource display module.Wherein, CLI business modules, system material resource maintenance and respond module and money
Source display module can be encapsulated in same device, the device can be computer equipment (such as PC, tablet personal computer,
Palm PC etc.), personal digital assistant (Personal Digital Assistant, PDA), mobile internet device
All kinds of devices such as (Mobile Internet Device, MID).
CLI softwares can be logged in CLI business modules, wherein, CLI softwares can include but is not limited to Windows systems
Under CMD, the Shell class softwares such as Bash, Csh under linux system.After CLI softwares login successfully, system resource
Safeguard and respond module initializes to system, current all system resource in inquiry system (including available system money
Source and occupied system resource), and a system resource list is built according to the system resource inquired.The system provides
Resource corresponding to the resource parameters and each resource parameters of all system resources that can include inquiring in the list of source can
It with situation, can be showed by way of setting and identifying, available, system resource are labeled as if system resource is available
It is unavailable to be then labeled as unavailable.After CLI business modules receive the order of user's input, it may search in advance
The command tree of setting, to be matched to the order being currently received.Wherein, the order of user's input can be only comprising order
Head, it can also not only include command header but also include resource parameters.It can be pair to carry out matching to the order received using command tree
Command header is matched, specifically, the command node in each element and command tree of command header is carried out into uniformity matching.When
During with succeeding, CLI business modules to obtain all resource parameters corresponding to the order, and can be incited somebody to action with resolve command parameter list
These resource parameters are put into queue.Then, resource parameters are taken out from queue, and from system material resource maintenance and respond module
Resource corresponding to searching resource parameter can use situation in the system resource list of establishment.Further, can be with CLI business modules
Continue to capture user's input, when the input for detecting user includes preset characters, display command is helped in resource display module
Supplementary information.The essential information of resource parameters corresponding to the order can be shown in the order help information, each resource can be included
The information such as implication, span and the constraints of parameter.In addition, each resource parameters pair can be also shown in resource display module
The resource answered can use situation.Wherein, the preset characters are that the triggering bar of situation can be used for display command help information and resource
Part, can include but is not limited to "", " * ", " # ", one or more of character such as " & " combination, preset characters can be seen
Work is a shortcut for being used to export order help information.When the input for detecting user includes resource parameters and does not include default
During character, resource display module can export command parameter information, and the resource detected can also be shown in the command parameter information
Implication, span and the constraints information of the essential information of parameter, such as resource parameters.Further, resource shows mould
Block will obtain the attribute information of available resources and display corresponding to the resource parameters.Wherein, the attribute information of available resources can be with
Including but not limited to resource name, place disk areas, space total capacity size, active volume size, running status etc. are believed
Breath.In the management system framework of the Command Line Interface shown in Fig. 1, it can be exported automatically when Command Line Interface inputs order line
The available situation of resource information and/or can be with the attribute information of resource, so as to help user more preferable faster in current business scene
Completion order input, and then the input efficiency and execution efficiency of order can be improved.
Referring to Fig. 2, Fig. 2 be the Command Line Interface shown in Fig. 1 management system in key modules operating diagram.Such as
Shown in Fig. 2, two main modulars in the management system of Command Line Interface, i.e. CLI business modules and system money have been referred here to
Source is safeguarded and respond module, and the system business interactive module of bottom.Wherein, system material resource maintenance and respond module are mainly complete
Into the resource query structure in system initialization and the renewal after order performs to system resource.CLI business module masters
If the search and inquiry of system resource corresponding to response parameter., can be with specifically, CLI business modules are after CLI softwares are logged in
Inquiry system resource situation, to cause system material resource maintenance and respond module to initialize constructing system the Resources list.When CLI business
Module receives the order of user's input, and after viewing command help information or parameter help information, can be tieed up in system resource
Using the system resource list search matching resource parameters title of structure in shield and respond module, if the match is successful, respond simultaneously
Return to resource details.After order has been performed in CLI business modules, system material resource maintenance and respond module can be promoted to go
Update system resource list.It should be noted that the operating process in above-mentioned modules illustrate only the step of key, not
It is a complete flow, specifically may refer to the concrete operations flow of each module shown in Fig. 1.In addition, to system resource
Renewal and inquiry need logical by TLV (Type-Length-Value, type-length-value) with first floor system service interaction module
Interrogate message flow and carry out communication interaction.
Management system framework based on the Command Line Interface shown in Fig. 1, the embodiment of the invention discloses a kind of order line circle
The management method in face.Referring to Fig. 3, Fig. 3 is a kind of flow of the management method of Command Line Interface disclosed in the embodiment of the present invention
Schematic diagram.As shown in figure 3, the management method of the Command Line Interface may comprise steps of:
301st, the order of user's input is detected on Command Line Interface.
In the embodiment of the present invention, after the Command Line Interface CLI softwares installed in the managing device for entering Command Line Interface,
The order that user inputs in Command Line Interface can be detected.The life that user inputs in Command Line Interface can be detected in real time
Order, it can also be not construed as limiting every the order that preset time detection user inputs in Command Line Interface, the embodiment of the present invention.
In the embodiment of the present invention, the managing device of Command Line Interface can include but is not limited to computer equipment (such as individual
Computer, tablet personal computer, palm PC etc.), personal digital assistant PDA, all kinds of devices such as mobile internet device MID.CLI softwares
To be installed on the software for being used to key in and perform the order that user inputs in the managing device of the Command Line Interface, such as
Shell class softwares such as Bash, Csh under CMD, linux system under Windows systems etc., can complete the device
The function such as management, monitoring and maintenance.
In the embodiment of the present invention, the order of user's input can be a complete order, as include command header, it is required
All resource parameters etc.;The order of user's input can also be the part in an order, such as only include command header, or bag
Include command header and part resource parameter etc..
302nd, the order is matched using the command tree pre-set.
In the embodiment of the present invention, command tree can be built in advance in the managing device of Command Line Interface, wherein, command tree
Command set is can be described as again.Multiple command nodes are included in one command tree.When detected on Command Line Interface user input
After order, the order can be matched using the command tree pre-set.Specifically, each element during can this be ordered
Uniformity matching is carried out with the command node in command tree, i.e., the command node in each element and command tree in the order is interior
Hold with put in order be both needed to it is corresponding consistent.Preferably, can be by each element and command tree in the command header in ordering
Command node carry out uniformity matching.
303rd, when the match is successful, resource parameters corresponding to the order are obtained.
In the embodiment of the present invention, when the match is successful for the order and default command tree, the order can be further obtained
Corresponding all applicable resource parameters.When it fails to match for the order and default command tree, this operation can be terminated, and
Prompt message can be exported on Command Line Interface, to prompt the command format mistake that user inputs, please be re-enter.
In the embodiment of the present invention, resource parameters corresponding to the order can be all moneys corresponding to the command header in the order
Source parameter.Specifically, all resource parameters corresponding to the command header can be obtained from the command parameter list pre-established.Should
Command parameter list can include the corresponding relation of different command head and resource parameters, and a command header can correspond to one or more
Individual resource parameters.
304th, determine that resource can use situation corresponding to the resource parameters from the system resource list pre-established.
, can be from the system money pre-established after resource parameters corresponding to the order are got in the embodiment of the present invention
The resource corresponding to the resource parameters is inquired about in the list of source can use situation, that is, whether inquire about the resource that is used needed for the resource parameters
It can use.
As an alternative embodiment, before step 301 is performed, the method described by Fig. 3 can also include with
Lower step:
31) system resource present in current system is inquired about;
32) according to the system resource inquired, system resource list is created, the system resource list includes at least one
Resource corresponding to parameter and above-mentioned at least one parameter can use situation.
In this embodiment, after CLI softwares are entered, system can be initialized, the institute that there is currently in inquiry system
There is system resource, these system resources can include available (such as unappropriated) and disabled (as occupied).
It is possible to further create a system resource list according to all system resources inquired, wherein, system resource row
Resource corresponding to can including at least one parameter and each of which parameter in table can use situation.One parameter can correspond to
Multiple resources, different parameters can correspond to same resource.Resource can be can be understood as with situation corresponding to parameter mentioned here
Whether one or more resources can use corresponding to parameter.
As an alternative embodiment, step 304 determines that the resource is joined from the system resource list pre-established
Resource corresponding to number can be may comprise steps of with the embodiment of situation:
33) search and the title identical parameters of the resource parameters from the system resource list pre-established, and will be with
Resource corresponding to the title identical parameter of the resource parameters can be defined as resource corresponding to the resource parameters with situation can use feelings
Condition.
In this embodiment, for any one resource parameters corresponding to the order, can be looked into system resource list
The title identical parameter with the resource parameters is ask, and can be right by the use of situation as resource parameters institute using resource corresponding to the parameter
The resource answered can use situation.Wherein, title corresponding to different resource parameters is different, therefore can pass through resource parameters name
Claim that to obtain corresponding resource situation can be used.
305th, when detect include preset characters in the order when, exported on Command Line Interface corresponding to the resource parameters
Resource can use situation.
In the embodiment of the present invention, include preset characters when being detected on Command Line Interface in the order that user inputs
When, the available situation of the resource used needed for resource parameters corresponding to the order can be exported on Command Line Interface.Wherein, in advance
If character can be used for triggering CLI softwares export each resource parameters corresponding to resource can use situation, can including "”、“*”、
The combination of one or any number of in the character such as " # ", " & ", the present invention implement to be not construed as limiting.The order is detected in addition, working as
In when including preset characters, can be with addition to situation except resource corresponding to resource parameters can be exported on Command Line Interface, can be with
The essential information of resource parameters corresponding to the order is exported on Command Line Interface, such as includes the title of resource parameters, use rule
The information such as model, span.
For example, referring to Fig. 4, Fig. 4 is a kind of order disclosed in the embodiment of the present invention on Command Line Interface shows
Schematic diagram.As shown in figure 4, Command Line Interface can mainly include two parts, a part is order input viewing area, in the area
Domain user can input order, and show the order of user's input, i.e. user directly can enter edlin in the region.It is another
Part is help information viewing area, the interim help information that can be automatically generated according to the order that user inputs, can be included
Order help information and resource parameters help information, this partial content are usually what can not be edited.User can be in order line circle
" the admin that order input viewing area on face is shown:/>" input order below, " create host_ are have input here
Group ", wherein, partial order is only have input here, and host_group is command header.The managing device of the Command Line Interface can
So that according to the command header removal search command tree, to be matched to the command header, after the match is successful, the command header can be obtained
Corresponding all resource parameters.When detect user input order include preset characters, as "" when, it can help to believe
Breath viewing area shows all resource parameters corresponding to the order.User, can be and then defeated after " host_group " is inputted
Enter "", by tapping " carriage return " or " space " key, help information can be exported.Wherein, preset characters "" can be without aobvious
Show.Here resource parameters corresponding to host_group have name, host_group_id and host_id_list, and are helping
The information such as implication, operating specification and span corresponding to each resource parameters is shown in supplementary information viewing area.Meanwhile
It can also show that resource corresponding to each resource parameters can use situation in help information viewing area, because name parametric users can
To its automatic name, system resource category is not belonging to, so need not indicate whether its corresponding resource can use.Here host_
Resource corresponding to two resource parameters of group_id and host_id_list is available.If system corresponding to some resource parameters
When resource is unavailable, it can individually create and configure the system resource that the resource parameters are relied on.
As an alternative embodiment, the method described by Fig. 3 can also comprise the following steps:
34) when detecting in the order comprising target resource parameter and when not including preset characters, the target resource is obtained
The attribute information of available resources corresponding to parameter, the resource parameters include the target resource parameter;
35) attribute information of available resources corresponding to the target resource parameter is exported on Command Line Interface.
In this embodiment, can when detecting that the order includes target resource parameter but when not including preset characters
To obtain the attribute information of available resources corresponding to the target resource parameter, and by the category of available resources corresponding to the target resource
Property presentation of information is on Command Line Interface.Wherein, the target resource parameter belongs to resource parameters corresponding to the order.The target provides
The attribute information of available resources corresponding to the parameter of source can include but is not limited to available resources corresponding to the target resource parameter
The information such as title, place disk areas, space total capacity size, active volume size, running status.
For example, referring to Fig. 5, Fig. 5 is order disclosed in the embodiment of the present invention on another Command Line Interface shows
Show schematic diagram.As shown in figure 5, " the admin that user can show in the order input viewing area on Command Line Interface:/>" after
Face input order, have input here " create file_system general name=file001pool_id=", its
In, the order of user's input includes command header and part resource parameter.Resource parameters corresponding to the order can include name and
Pool_id, wherein, pool_id is considered as that for target resource parameter, preset characters are not included in the order, such as "”.When with
Family is inputting " pool_id=", after, " carriage return " or " space " key can be directly tapped, so as to export the target resource parameter
The attribute information of available resources corresponding to pool_id.The attribute information of the available resources can include title Pool001, place
Disk areas ID number is 0, and health status Normal, running status is online (Online), and space total capacity size is
100GB, active volume size are 100GB, and usage type is file system (File System).It is possible to further according to aobvious
The attribute information for the available resources shown carries out the input of parameter value to target resource parameter pool_id.Here illustrate only
One attribute information, show the available resource of pool_id parameters be only one kind, if available resources corresponding to the parameter have it is more
Kind, then the attribute information of all available resources can be shown simultaneously.In addition, in available resources corresponding to output target resource parameter
Attribute information while export the essential information of the target resource parameter, not shown in Fig. 5.
In the embodiment of the present invention, the method described by Fig. 3 can also comprise the following steps:
36) after the order is finished, the resource of resource parameters can corresponding to the order in renewal system resource list
Use situation.
In the embodiment of the present invention, when user is inputting order on Command Line Interface, CLI softwares can show the order
The essential information of corresponding resource parameters and used resource can use the help informations such as situation, and user can believe according to the help
The suitable resource parameters of breath input.Further, CLI softwares can show the attribute letter of available resources corresponding to resource parameters
Breath, help user accurately to input suitable parameter value, so as to guide user more preferably to complete the input of order line faster, improve
The input efficiency of order.After CLI softwares, which perform order, to be terminated, it is corresponding that the order that system resource list includes can be updated
The resources of resource parameters can use situation.For example, when by performing the newly-built file of the order, then can be by this document
Folder is updated in system resource list as available resources.And for example, occupy a certain system resource when performing the order, then can be with
Update the system resource list and the system resource is changed to down state by upstate.
, can be when Command Line Interface inputs order line certainly by the method described by implementing Fig. 3 in the embodiment of the present invention
The available situation of resource information and/or can be with the attribute information of resource, so as to help user more in dynamic output current business scene
It is good to complete the input of order faster, and then the input efficiency and execution efficiency of order can be improved.
Management system framework based on the Command Line Interface shown in Fig. 1, the embodiment of the invention discloses a kind of order line circle
The managing device in face.Referring to Fig. 6, Fig. 6 is a kind of structure of the managing device of Command Line Interface disclosed in the embodiment of the present invention
Schematic diagram, it can be used for the management method for performing Command Line Interface disclosed in the embodiment of the present invention.As shown in fig. 6, the order line
The managing device at interface can include:
Detection unit 601, for detecting the order of user's input on Command Line Interface.
In the embodiment of the present invention, the order of user's input can be a complete order, as include command header, it is required
All resource parameters etc.;The order of user's input can also be the part in an order, such as only include command header, or bag
Include command header and part resource parameter etc..
Matching unit 602, for being matched using the command tree pre-set to the order.
Acquiring unit 603, for when the match is successful for matching unit 602, obtaining resource parameters corresponding to the order.
Determining unit 604, for determining that resource corresponding to the resource parameters can from the system resource list pre-established
Use situation.
As an alternative embodiment, determining unit 604 specifically can be used for from the system resource row pre-established
Search and the title identical parameter of the resource parameters in table, and provided corresponding with the title identical parameter of the resource parameters
Source can be defined as resource corresponding to the resource parameters with situation can use situation.
Output unit 605, for when detection unit 601 detects and includes preset characters in the order, in order line circle
Resource corresponding to the resource parameters is exported on face can use situation.
As an alternative embodiment, acquiring unit 603, is additionally operable to when detection unit 601 is detected in the order
When comprising target resource parameter and not including preset characters, the attribute letter of available resources corresponding to the target resource parameter is obtained
Breath, resource parameters corresponding to the order include the target resource parameter;
Correspondingly, output unit 605, money can be used by being additionally operable to export on Command Line Interface corresponding to the target resource parameter
The attribute information in source.
Wherein, the attribute information of available resources can include but is not limited to the target resource corresponding to the target resource parameter
The titles of available resources corresponding to parameter, place disk areas, space total capacity size, active volume size, running status etc.
Information.
Also referring to Fig. 7, Fig. 7 is the structure of the managing device of another Command Line Interface disclosed in the embodiment of the present invention
Schematic diagram, it can be used for the management method for performing Command Line Interface disclosed in the embodiment of the present invention.Wherein, the order shown in Fig. 7
The managing device at row interface is that further optimization obtains on the basis of the managing device of the Command Line Interface shown in Fig. 6.With
The managing device of Command Line Interface shown in Fig. 6 is compared, and the managing device of the Command Line Interface shown in Fig. 7 can also include:
Query unit 606, for detection unit 601 detected on Command Line Interface user input order before, look into
Ask system resource present in current system;
Creating unit 607, for the system resource inquired according to query unit 606, system resource list is created, this is
System the Resources list, which includes resource corresponding at least one parameter and above-mentioned at least one parameter, can use situation, to determine
Resource corresponding to resource parameters corresponding to the order is determined in the system resource list that unit 604 creates from creating unit 607
Situation can be used.
As an alternative embodiment, the managing device of the Command Line Interface shown in Fig. 7 can also include:
Updating block 608, provided for after the order is finished, updating in the system resource list corresponding to the order
The resource of source parameter can use situation.
In the embodiment of the present invention, by implementing the managing device of the Command Line Interface shown in Fig. 6 and Fig. 7, it can order
Row interface exports the available situation of resource information in current business scene when inputting order line and/or can be with the attribute of resource automatically
Information, so as to help user more preferably to complete the input of order faster, and then the input efficiency of order can be improved and perform effect
Rate.
Management system framework based on the Command Line Interface shown in Fig. 1, the embodiment of the invention discloses another order line
The managing device at interface.Referring to Fig. 8, Fig. 8 is the managing device of another Command Line Interface disclosed in the embodiment of the present invention
Structural representation, it can be used for the management method for performing Command Line Interface disclosed in the embodiment of the present invention.As shown in figure 8, the life
Making the managing device 800 at row interface can include:At least one processor 801, at least one input unit 802 are at least one
Output device 803, the grade component of memory 804.Wherein, these components carry out communication link by one or more communication bus 805
Connect.It will be understood by those skilled in the art that the structure of the managing device 800 of the Command Line Interface shown in Fig. 8 is not formed pair
The restriction of the embodiment of the present invention, it both can be busbar network or hub-and-spoke configuration, can also include more more than illustrating
Or less part, either combine some parts or different parts arrangement.
In the embodiment of the present invention, processor 801 can be CPU (Central Processing Unit,
CPU), the processor can also be other general processors, digital signal processor (Digital Signal Processor,
DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate
Array (Field-Programmable Gate Array, FPGA) either other PLDs, discrete gate or crystal
Pipe logical device, discrete hardware components etc..General processor can be microprocessor or the processor can also be it is any often
Processor of rule etc..
In the embodiment of the present invention, input unit 802 can include Trackpad, keyboard, mouse, microphone etc..Output device
803 can include display (LCD etc.), loudspeaker etc..
In the embodiment of the present invention, memory 804 can be high-speed RAM memory or nonvolatile memory
(non-volatile memory), for example, at least a magnetic disk storage.Memory 804 optionally can also be at least one
It is located remotely from the storage device of aforementioned processor 801.As shown in figure 8, operating system, at least one can be included in memory 804
Application program needed for individual function and created data etc., this hair are used according to the managing device 800 of Command Line Interface
Bright embodiment is not construed as limiting.
In the managing device 800 of the Command Line Interface shown in Fig. 8, processor 801, which can call, is stored in memory 804
In application program, for performing following operation:
The order that user is inputted by input unit 802 is detected on Command Line Interface;
The order is matched using the command tree pre-set in memory 804;
When the match is successful, resource parameters corresponding to the order are obtained;
Determine that resource can use feelings corresponding to the resource parameters in the system resource list pre-established from memory 804
Condition;
When detecting the preset characters for including in the order and being stored in memory 804, triggering output device 803 is being ordered
Resource corresponding to the resource parameters is exported on row interface can use situation.
As an alternative embodiment, processor 801 detects user on Command Line Interface passes through input unit 802
Before the order of input, the application program being stored in memory 804 is may call upon, and performs following operate:
Inquire about system resource present in current system;
According to the system resource inquired, system resource list is created, the system resource list includes at least one ginseng
Resource corresponding to several and above-mentioned at least one parameter can use situation.
As an alternative embodiment, processor 801 may call upon the application journey being stored in memory 804
Sequence, and perform following operate:
When detecting in the order comprising target resource parameter and when not including preset characters, the target resource parameter is obtained
The attribute information of corresponding available resources, the resource parameters include the target resource parameter;
Triggering output device 803 exports the attribute letter of available resources corresponding to the target resource parameter on Command Line Interface
Breath.
As an alternative embodiment, in the system resource list that processor 801 pre-establishes from memory 804
Determining resource corresponding to the resource parameters can be able to be with the embodiment of situation:
Search and the title identical of the resource parameters are joined in the system resource list pre-established from memory 804
Number, and resource corresponding with the title identical parameter of the resource parameters can be defined as money corresponding to the resource parameters with situation
Source can use situation.
As an alternative embodiment, processor 801 may call upon the application journey being stored in memory 804
Sequence, and perform following operate:
After the order is finished, updates the resource of resource parameters corresponding to the order in the system resource list and can use
Situation.
Specifically, the managing device for the Command Line Interface introduced in the embodiment of the present invention can implement the present invention and combine Fig. 3
Part or all of flow in the management method embodiment of the Command Line Interface of introduction.
, can be in Command Line Interface by implementing the managing device of the Command Line Interface shown in Fig. 8 in the embodiment of the present invention
Exported automatically in current business scene when inputting order line the available situation of resource information and/or can with the attribute information of resource,
So as to help user more preferably to complete the input of order faster, and then the input efficiency and execution efficiency of order can be improved.
It should be noted that for foregoing each embodiment of the method, in order to be briefly described, therefore it is all expressed as to a system
The combination of actions of row, but those skilled in the art should know, the present invention is not limited by described sequence of movement, because
For according to the application, certain some step can use other orders or carry out simultaneously.Secondly, those skilled in the art also should
Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this Shen
Please be necessary.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in some embodiment
Part, may refer to the associated description of other embodiment.
Step in the method for the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.
Unit in device of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
To instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable recording medium, storage
Medium include read-only storage (Read-Only Memory, ROM), random access memory (Random Access Memory,
RAM), programmable read only memory (Programmable Read-only Memory, PROM), erasable programmable is read-only deposits
Reservoir (Erasable Programmable Read Only Memory, EPROM), disposable programmable read-only storage (One-
Time Programmable Read-Only Memory, OTPROM), the electronics formula of erasing can make carbon copies read-only storage
(Electrically-Erasable Programmable Read-Only Memory, EEPROM), read-only optical disc (Compact
Disc Read-Only Memory, CD-ROM) or other disk storages, magnetic disk storage, magnetic tape storage or can
For carrying or any other computer-readable medium of data storage.
A kind of management method of Command Line Interface and device disclosed in the embodiment of the present invention are described in detail above,
Specific case used herein is set forth to the principle and embodiment of the present invention, and the explanation of above example is simply used
Understand the method and its core concept of the present invention in help;Meanwhile for those of ordinary skill in the art, according to the present invention's
Thought, there will be changes in specific embodiments and applications, in summary, this specification content should not be construed as
Limitation of the present invention.
Claims (10)
- A kind of 1. management method of Command Line Interface, it is characterised in that including:The order of user's input is detected on Command Line Interface;The order is matched using the command tree pre-set;When the match is successful, resource parameters corresponding to the order are obtained;Determine that resource can use situation corresponding to the resource parameters from the system resource list pre-established;When detect include preset characters in the order when, exported on the Command Line Interface corresponding to the resource parameters Resource can use situation.
- 2. according to the method for claim 1, it is characterised in that the order that user's input is detected on Command Line Interface Before, methods described also includes:Inquire about system resource present in current system;According to the system resource inquired, system resource list is created, the system resource list includes at least one Resource corresponding to parameter and at least one parameter can use situation.
- 3. method according to claim 1 or 2, it is characterised in that methods described also includes:When detecting in the order comprising target resource parameter and when not including the preset characters, the target resource is obtained The attribute information of available resources corresponding to parameter, the resource parameters include the target resource parameter;The attribute information of available resources corresponding to the target resource parameter is exported on the Command Line Interface.
- 4. according to the method any one of claim 1-3, it is characterised in that described from the system resource pre-established row Determine that resource corresponding to the resource parameters can use situation in table, including:Search and the title identical parameter of the resource parameters from the system resource list pre-established, and will be with the money Resource corresponding to the title identical parameter of source parameter can be defined as resource corresponding to the resource parameters with situation can use situation.
- 5. according to the method any one of claim 1-4, it is characterised in that methods described also includes:After the order is finished, the resource for updating resource parameters corresponding to order described in the system resource list can Use situation.
- A kind of 6. managing device of Command Line Interface, it is characterised in that including:Detection unit, for detecting the order of user's input on Command Line Interface;Matching unit, for being matched using the command tree pre-set to the order;Acquiring unit, for when the match is successful for the matching unit, obtaining resource parameters corresponding to the order;Determining unit, for determining that resource can use feelings corresponding to the resource parameters from the system resource list pre-established Condition;Output unit, for when the detection unit detects and includes preset characters in the order, in order line circle Resource corresponding to the resource parameters is exported on face can use situation.
- 7. device according to claim 6, it is characterised in that described device also includes:Query unit, for user's input is detected on Command Line Interface in the detection unit order before, inquiry is current System resource present in system;Creating unit, for the system resource inquired according to the query unit, create system resource list, the system System the Resources list include at least one parameter and at least one parameter corresponding to resource can use situation.
- 8. the device according to claim 6 or 7, it is characterised in thatThe acquiring unit, it is additionally operable to when the detection unit is detected in the order comprising target resource parameter and not including During the preset characters, the attribute information of available resources corresponding to the target resource parameter is obtained, the resource parameters include The target resource parameter;The output unit, it is additionally operable to export available resources corresponding to the target resource parameter on the Command Line Interface Attribute information.
- 9. according to the device described in claim any one of 6-8, it is characterised in that the determining unit is specifically used for building from advance Search and the title identical parameters of the resource parameters in vertical system resource list, and by the title with the resource parameters Resource corresponding to identical parameter can be defined as resource corresponding to the resource parameters with situation can use situation.
- 10. according to the device described in claim any one of 6-9, it is characterised in that described device also includes:Updating block, for after the order is finished, updating and being provided corresponding to being ordered described in the system resource list The resource of source parameter can use situation.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610816418.9A CN107818002B (en) | 2016-09-12 | 2016-09-12 | Management method and device of command line interface |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610816418.9A CN107818002B (en) | 2016-09-12 | 2016-09-12 | Management method and device of command line interface |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107818002A true CN107818002A (en) | 2018-03-20 |
| CN107818002B CN107818002B (en) | 2021-08-13 |
Family
ID=61600563
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610816418.9A Active CN107818002B (en) | 2016-09-12 | 2016-09-12 | Management method and device of command line interface |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107818002B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109376024A (en) * | 2018-11-01 | 2019-02-22 | 郑州云海信息技术有限公司 | A service information configuration method and device |
| CN110417978A (en) * | 2019-07-24 | 2019-11-05 | 广东商路信息科技有限公司 | Menu configuration method, device, equipment and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101924656A (en) * | 2010-08-26 | 2010-12-22 | 北京天融信科技有限公司 | Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration |
| CN101944023A (en) * | 2010-09-14 | 2011-01-12 | 南京联创科技集团股份有限公司 | Implement method of universal command line interface of UNIX server software |
| CN102279744A (en) * | 2011-08-24 | 2011-12-14 | 北京星网锐捷网络技术有限公司 | System and method for processing command line |
| US20160232209A1 (en) * | 2015-02-07 | 2016-08-11 | International Business Machines Corporation | Optionally compressed output from command-line interface |
-
2016
- 2016-09-12 CN CN201610816418.9A patent/CN107818002B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101924656A (en) * | 2010-08-26 | 2010-12-22 | 北京天融信科技有限公司 | Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration |
| CN101944023A (en) * | 2010-09-14 | 2011-01-12 | 南京联创科技集团股份有限公司 | Implement method of universal command line interface of UNIX server software |
| CN102279744A (en) * | 2011-08-24 | 2011-12-14 | 北京星网锐捷网络技术有限公司 | System and method for processing command line |
| US20160232209A1 (en) * | 2015-02-07 | 2016-08-11 | International Business Machines Corporation | Optionally compressed output from command-line interface |
Non-Patent Citations (1)
| Title |
|---|
| 华为技术有限公司: "OceanStor 5300 V3&5500 V3&5600 V3&5800 V3&6800 V3 存储系统V300R002 命令参考", 《HTTPS://SUPPORT.HUAWEI.COM/ENTERPRISE/ZH/DOC/EDOC1000059403》 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109376024A (en) * | 2018-11-01 | 2019-02-22 | 郑州云海信息技术有限公司 | A service information configuration method and device |
| CN109376024B (en) * | 2018-11-01 | 2021-07-06 | 郑州云海信息技术有限公司 | A service information configuration method and device |
| CN110417978A (en) * | 2019-07-24 | 2019-11-05 | 广东商路信息科技有限公司 | Menu configuration method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107818002B (en) | 2021-08-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7110343B2 (en) | Blockchain network transaction processing method, device, equipment and storage medium | |
| TW578047B (en) | Pictorial-based user interface management of computer hardware components | |
| US9792264B2 (en) | Inheritance of rules across hierarchical levels | |
| US20160092049A1 (en) | Generic editor layout using intrinsic persistence metadata | |
| US8286087B1 (en) | Active route validation in workflow process authoring | |
| US11126920B2 (en) | Interaction scenario display control method and information processing apparatus | |
| CN112559101A (en) | Page label processing method and device, computer equipment and medium | |
| CN109683880A (en) | Webpage exchange method, device, equipment and storage medium | |
| US20090007157A1 (en) | Mapping Data Sources to a Procedural API | |
| JPWO2014061093A1 (en) | Screen creation device and screen creation method | |
| WO2019242167A1 (en) | Method for managing requirements and computer device | |
| CN107818002A (en) | The management method and device of a kind of Command Line Interface | |
| US10839036B2 (en) | Web browser having improved navigational functionality | |
| CN106648280B (en) | Task management interaction method and device | |
| US12223479B2 (en) | Detecting usage issues on enterprise systems and dynamically providing user assistance | |
| US20210294966A1 (en) | Systems and methods for binding lookup controls | |
| KR102031810B1 (en) | System and method for providing service menu based on application service, and apparatus applied to the same | |
| CN113781602A (en) | Gantt chart generation method and device, computer readable storage medium and electronic equipment | |
| CN114331325A (en) | Flow management platform | |
| CN113919313A (en) | Litigation case information processing method, litigation case information processing device, and storage medium | |
| US10805176B2 (en) | SW framework support method for open IPMI and DCMI development | |
| JP2011180635A (en) | File access control device and method, and program | |
| CN105118095B (en) | The efficient charging method of controller of swiping the card for system of instrument managing | |
| CN111191057A (en) | User-defined retrieval method and device, electronic equipment and storage medium thereof | |
| CN113457164B (en) | Virtual object abnormality detection method and device, readable storage medium and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20221010 Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041 Patentee after: Chengdu Huawei Technologies Co.,Ltd. Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China Patentee before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd. |
|
| TR01 | Transfer of patent right |