CN113467868B - Method and device for creating equipment resources - Google Patents
Method and device for creating equipment resources Download PDFInfo
- Publication number
- CN113467868B CN113467868B CN202110671897.0A CN202110671897A CN113467868B CN 113467868 B CN113467868 B CN 113467868B CN 202110671897 A CN202110671897 A CN 202110671897A CN 113467868 B CN113467868 B CN 113467868B
- Authority
- CN
- China
- Prior art keywords
- command
- parameter
- user
- name
- target
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000012795 verification Methods 0.000 claims description 8
- 239000000758 substrate Substances 0.000 claims 2
- 230000006870 function Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 238000012360 testing method Methods 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 4
- 230000003068 static effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a method and a device for creating equipment resources, and belongs to the technical field of computing. The method comprises the following steps: the user can receive a help information acquisition instruction of a target command name through operating the trigger equipment, and the equipment can search a resource identifier corresponding to a command parameter of equipment resources associated with the target command name according to a corresponding relation between a prestored command parameter of equipment resources and the resource identifier of currently available equipment resources; if the target command parameter which is associated with the target command name and needs the device resource exists in the command parameter which does not find the corresponding resource identification, the device can create the device resource which is needed by the target command parameter and display the help information of the target command name and the resource identification of the newly created device resource. By adopting the invention, the efficiency of executing the command can be improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for creating a device resource.
Background
Currently, users can configure the storage device with services, such as storing data, creating virtual machines, through CLI (Command Line Interface ) applications installed in the storage device.
The user can implement the service configuration on the storage device by inputting a command corresponding to a certain service configuration in the CLI interface, where the command is composed of a command name, a command parameter (the command parameter may be a command parameter associated with a command name capable of implementing the service configuration), and a parameter value, for example, the service configuration is to store data in a folder with an identifier of 0 included in the storage device, in this case, the command name of the command input by the technology may be the stored data (where the command name may be an english name corresponding to the stored data), the command parameter is a folder identifier, and the parameter value is 0. When a user performs service configuration on a storage device through a certain command, the usage rule of the certain command name may not be clear, at this time, the user may view help information of the command name through a command help function, specifically, after the user inputs the command name through the CLI interface, the user may click "? The terminal can display help information of the command name in a text form, wherein command parameters related to the command name and meanings of the command parameters can be displayed, after a user reads the text information, a command consisting of the command name, the command parameters and parameter values of the command parameters can be input into a CLI interface, a carriage return key in a keyboard is clicked, at this time, the terminal can receive an execution instruction, further, the target command parameters (the target command parameters can be folder identifications) of the device resources required to be used in the command can be determined, the parameter values of the command parameters required to be the resource identifications of the device resources, and whether the device resources (the device resources can be folders with folder identifications of 0) corresponding to the parameter values of the target command parameters are contained in a storage device can be judged, if the device resources do not exist in the storage device, at this time, the user can create the device resources according to the commands of the device resources in error, after the device resources are created, the user can input the command corresponding to the service configuration parameters again according to the created device resources (at this time, the command parameters can be set up as the command identifications when the command parameters are clicked in the keyboard, and the command can be set up to the corresponding command parameters).
In carrying out the invention, the inventors have found that the prior art has at least the following problems:
based on the above processing manner, after the user inputs a command according to the help information of the command name of the command, if there is no device resource required for executing the command in the storage device, the terminal will not execute the command correctly and will report errors, at this time, the user needs to create the device resource by using the command for creating the device resource first, and then inputs the command corresponding to the service configuration again, thereby resulting in lower efficiency for executing the command.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides a method and a device for creating equipment resources. The technical scheme is as follows:
in a first aspect, there is provided a method of creating a device resource, the method comprising:
receiving a help information acquisition instruction of a target command name; searching a resource identifier corresponding to the command parameter of the equipment resource associated with the target command name according to the corresponding relation between the prestored command parameter of the equipment resource and the resource identifier of the currently available equipment resource; if the target command parameter which is associated with the target command name and needs the equipment resource exists in the command parameter which does not find the corresponding resource identification, the equipment resource which is needed by the target command parameter can be created, and the help information of the target command name and the resource identification of the newly created equipment resource are displayed.
According to the scheme disclosed by the embodiment of the invention, a user can directly input a command containing the target command name, the command parameter and the parameter value based on the equipment identification of the equipment resource created in the process of displaying the help information of the target command name, namely, the user can realize service configuration by inputting the command only once, after the target command is not required to be input once, the command for creating the equipment resource is input according to error reporting, and then the target command is input once again, so that the efficiency of executing the command can be improved.
In one possible implementation, displaying help information for the target command name includes: acquiring parameter values corresponding to command parameters associated with the target command name in advance; the target command name, each command parameter, and the parameter value corresponding to each command parameter may be displayed according to the usage rule of the target command name.
According to the scheme disclosed by the embodiment of the invention, after the equipment receives the help information acquisition instruction of the target command name, equipment resources required by the target command parameter can be created, and the help information of the target command name can be displayed in an exemplary mode (wherein the equipment can perform parallel processing on the creation equipment resources and the help information of the target command name, and can also create the equipment resources first and then display the help information of the target command name), namely, a command comprising the target command name, each command parameter associated with the target command name and the parameter value of each command parameter stored in advance is displayed in an exemplary mode, and the mode can be called as a help demonstration mode. In this way, the displayed exemplary command is more helpful for the user to understand the usage rule of the target command name, and further, the user can more quickly and accurately input the command containing the target command name for realizing a certain service configuration, so that the efficiency of executing the command by the device can be improved, and the difficulty of carrying out the service configuration by the user through the command is also reduced.
In one possible implementation, displaying help information for a target command name includes: and displaying the instruction parameters associated with the target instruction names and the description information of the instruction parameters.
In one possible implementation, the method includes: displaying parameter value input bits corresponding to each command parameter; the parameter values input by the user in the parameter value input bits corresponding to each command parameter can be obtained; when the execution instruction is received, a target command may be generated and executed based on the parameter value corresponding to each command parameter input by the user and the target command name.
According to the scheme disclosed by the embodiment of the invention, after the equipment receives the help information acquisition instruction of the target command name, equipment resources required by the target command parameter can be created, then command parameters related to the target command name, description information of each command parameter and input bits of parameter values are sequentially displayed, so that a user can input corresponding parameters at the parameter value input bits corresponding to the command parameters, wherein after the user inputs the parameter values of the current command parameters and clicks a preset key in a keyboard, the equipment displays the next command parameter, description information of the command parameter and input bits of the parameter values until the last command parameter related to the target command name is displayed. After the user inputs the parameter value of the last command parameter and clicks a preset key in the keyboard, the device may execute the target command including the parameter value corresponding to each command parameter and the target command name. Under the condition, when the user acquires the help information of the target command name, the device guides the user to input the parameter value of each command parameter in a guiding execution mode, and finally executes the target command without the need of inputting the target command according to the understanding of the user after the user reads the help information in a text form, so that the efficiency of executing the command by the device can be improved, and the difficulty of service configuration by the user through the command is reduced.
In addition, the device may also support both the help presentation mode and the boot execution mode.
In one possible implementation, the method further includes: and adding the target command parameter and the resource identifier of the newly created equipment resource into the corresponding relation.
In one possible implementation, the method further includes: and displaying the resource identifiers corresponding to other command parameters except the target command parameters in the command parameters which are associated with the target command name and need the device resources.
According to the scheme, after the equipment receives the help information acquisition instruction of the target command name, the resource identification corresponding to the command parameter which needs equipment resources and is associated with the target command name can be displayed, so that when a user inputs a command which contains the target command name, the parameter value corresponding to the command parameter which needs equipment resources can be intuitively and conveniently obtained, the user does not need to search the resource identification of the command parameter by using the command name which needs the resource identification corresponding to the command parameter of the equipment, and the efficiency of executing the command by the equipment can be improved.
In a second aspect, there is provided an apparatus comprising a processor, a memory, a display, the processor configured to execute instructions stored in the memory; the processor implements the method of creating a device resource provided in the first aspect described above by executing instructions.
In a third aspect, there is provided an apparatus for creating a device resource, the apparatus comprising at least one module for implementing the method for creating a device resource provided in the first aspect.
The technical effects obtained by the second to third aspects of the embodiments of the present invention are similar to those obtained by the corresponding technical means in the first aspect, and are not described herein.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
in the embodiment of the invention, before a user realizes a certain service configuration through a target command name, a help information acquisition instruction of the target command name of the device can be triggered through operation, and then the device can search the device resources required by the command parameters which are related to the target command name and need the device resources in the device, if the device resources of the certain command parameters are not searched, the device can create the device resources required by the command parameters, and help information of the target command name and the resource identification of the newly created device resources can be displayed. Therefore, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identification of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user can realize the service configuration by only inputting the command once without inputting the target command once, then inputting the command for creating the device resource according to the error after inputting the target command once, and then inputting the target command once again, thereby improving the efficiency of executing the command.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of an apparatus according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for creating device resources provided by an embodiment of the present invention;
FIG. 3 (a) is a schematic diagram of an interface according to an embodiment of the present invention;
FIG. 3 (b) is a schematic diagram of an interface according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an interface provided by an embodiment of the present invention;
FIG. 5 (a) is a schematic illustration of an interface provided by an embodiment of the present invention;
FIG. 5 (b) is a schematic illustration of an interface provided by an embodiment of the present invention;
FIG. 5 (c) is a schematic illustration of an interface provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an apparatus for creating a device resource according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an apparatus for creating a device resource according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an apparatus for creating a device resource according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an apparatus for creating a device resource according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for creating equipment resources, and an execution main body of the method is equipment with a service configuration function realized through a command line interface, wherein the equipment can be storage equipment, a server, a personal computer and the like which are provided with CLI (Command Line Interface ) application programs, and can be equipment provided with shell (shell) application programs. The following embodiments are described in detail by taking a device as an example of a device with a CLI application installed thereon, and other cases are similar to the above and will not be described in detail.
The device may include a processor 110, a memory 120, and a display 130, and the processor 110 may be coupled to the memory 120 and the display 130, respectively, as shown in fig. 1. The processor 110 may be a control center of the device, utilizing various interfaces and wiring to connect various parts of the device, to perform various functions of the device and process data by running or executing software programs and/or modules stored in the memory 120, and invoking data stored in the memory 120. Processor 110 may include one or more processing units; the processor 110 may be a general-purpose processor, including a central processing unit (central processing unit, CPU for short), a network processor (network processor, NP for short), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), field Programmable Gate Array (FPGA), or other programmable logic device, etc. The memory 120 may be used to store programs. Specifically, the program may include program code including computer operation instructions, and in the embodiment of the present invention, the memory 120 may be further configured to store a correspondence between a command parameter of a device resource and a resource identifier of a currently available device resource. The memory 120 may include RAM, and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. Processor 110 executes program code stored in memory 120 to perform various functions, in which memory 120 may also be used to store data needed and generated during the processing described below in embodiments of the present invention. The display may be used to display various interfaces, and in embodiments of the present invention, the display may be used to display help information for the target command name and a resource identification for the device resource.
As shown in fig. 2, the specific process flow of the method may include the following steps:
in step 201, the device receives a help information acquisition instruction for a target command name.
The target command name may be any one of all command names for implementing service configuration, and may be a command name corresponding to help information to be acquired by the user.
In implementation, a user may perform various service configurations on a device through a CLI application installed in the device, and specifically, when the user wants to perform a certain service configuration, a command name corresponding to the service configuration, a command parameter associated with the command name, and a parameter value corresponding to each command parameter may be input in a CLI interface. To prevent a user from forgetting the usage rule of a command name, wherein the usage rule may be a command structure of a command containing the command name, the device may be further provided with a command help function, so that the user may view help information of the command name through the command help function before configuring the service through the command containing the command name. Specifically, the user may input a command name (i.e., a target command name) in the CLI interface, and may tap a preset key in the keyboard for obtaining help information of the command name, for example "? At this point, the device will receive a help information retrieval instruction for the target command name.
This step may be implemented by the processor 110 in particular.
Step 202, the device searches the resource identifier corresponding to the command parameter of the required device resource associated with the target command name according to the corresponding relation between the pre-stored command parameter of the required device resource and the resource identifier of the currently available device resource.
Wherein the currently available device resources may be currently unoccupied device resources contained in the device.
In an implementation, a correspondence between a command parameter of a device resource and a resource identifier of a currently available device resource may be stored in the device in advance, where the command parameter of the device resource may be a command parameter whose corresponding parameter value is the resource identifier of the device resource in the device. For example, the target command name is storage data, the command containing the command name is storage data in the folder 0, the command parameter associated with the target command name comprises a folder identifier, 0 is a parameter value of the folder identifier, if the command is to be executed, the required device contains a folder with the identifier of 0, that is, the folder is a device resource, 0 is a resource identifier of the device resource (folder), that is, the folder identifier is a command parameter of the required device resource, for example, the target command name is creation of a virtual machine, the command parameter associated with the target command name comprises a name and the like, wherein the name can be the name of the virtual machine to be created, the parameter value of the command parameter is a command parameter which requires a user to draw a name for the virtual machine to be created according to own requirements, and the command parameter does not require the device resource, that is, that the command parameter is not the command parameter which requires the device resource.
The command parameters associated with the target command names may include command parameters requiring equipment resources, after the equipment receives a command for acquiring help information of the target command names, the target command names input by a user can be acquired, and the command parameters associated with the target command names are acquired in the corresponding relation between the pre-stored command names and the associated command parameters, so that the command parameters requiring the equipment resources in all the command parameters associated with the target command names can be determined, and whether the equipment includes currently available equipment resources corresponding to the command parameters or not is judged. Specifically, the device may determine, from among all command parameters associated with the target command name, command parameters that require device resources, and find, in a pre-stored correspondence between command parameters that require device resources and resource identifiers of currently available device resources, resource identifiers corresponding to command parameters that require device resources associated with the target command name, if device resources that include all command parameters that require device resources associated with the target command name are included in the device, resource identifiers corresponding to command parameters that require device resources of each device can be found by the device, and if device resources that do not include a certain command parameter (may be referred to as a target command parameter) in command parameters that require device resources associated with the target command name are not included in the device, the device cannot find the resource identifiers corresponding to the target command parameters.
This step may be implemented in particular by the processor 110 and the memory 120 together.
In step 203, if the command parameter associated with the target command name and requiring the device resource has a target command parameter for which the corresponding resource identifier is not found, the device creates the device resource required by the target command parameter, and displays the help information of the target command name and the resource identifier of the newly created device resource.
In an implementation, if the device does not include the device resource of the target command parameter, that is, if the command parameter associated with the target command name and requiring the device resource has the target command parameter for which the corresponding resource identifier is not found, the device may create the device resource required by the target command parameter, where the device may allocate the resource identifier for the newly created device resource according to a preset rule, for example, the resource identifier of the device resource is a number, and the device may allocate the resource identifier for the device resource when creating the device resource. After the device creates the device resource, help information of the target command name and the resource identifier of the newly created device resource can be displayed on the CLI interface, wherein the help information of the target command name can be use help information of the target command name, and can be used for a user to define a use rule of the target command name. In addition, the device may display the resource identifier corresponding to other command parameters except the target command parameter in the command parameters needing the device resource associated with the target command name, that is, after the device receives the help information acquisition instruction of the target command name, the device may display the resource identifier of the currently available device resource corresponding to the command parameter needing the device resource associated with the target command name on the CLI interface.
This step may be implemented in particular by the processor 110 in conjunction with the display 130.
Optionally, after the device creates the device resource, the target command parameter may be stored corresponding to the resource identifier of the device resource, and the corresponding processing procedure may be as follows: and the device correspondingly adds the target command parameter and the resource identifier of the newly created device resource into the corresponding relation.
In implementation, after the device creates the device resource required by the target command parameter, the corresponding relationship between the target command parameter and the resource identifier of the newly created device resource may be added to the corresponding relationship, that is, the corresponding relationship between the pre-stored command parameter required by the device resource and the resource identifier of the currently available device resource.
The process may be implemented by the processor 110 in particular.
Optionally, the device may display help information of the target command name in an exemplary form according to a usage rule of the target command name, and the processing procedure may be as follows: acquiring parameter values corresponding to command parameters associated with a pre-stored target command name respectively; and displaying the target command name, each command parameter and the parameter value corresponding to each command parameter according to the use rule of the target command name.
In implementation, after receiving a help information acquisition instruction of a target command name, the device may display a static text help option and a dynamic demonstration help option on the CLI interface, and the user may select the two options. When the user selects the dynamic presentation help option, the device may display a help presentation mode option and a guide execution mode option on the CLI interface, for example, the user may select the two options, for example, a static text help option and a dynamic presentation help option may be displayed on the CLI interface, and a number tab may be correspondingly displayed, and an option selection input may be displayed, the user may select the corresponding option by inputting the corresponding number tab in the option selection input, as shown in fig. 3 (a), such as 1 (where 1 represents the dynamic presentation help option and 2 represents the static text help option) being selected by the user, and then the device may continue to display the help presentation mode option and the guide execution mode option on the CLI interface, and a number tab may be correspondingly displayed, and an option selection input may be displayed, the user may select the corresponding option by inputting the corresponding number tab in the option selection input, as shown in fig. 3 (b), such as 1 (where 1 represents the help presentation mode and 2 represents the guide execution mode being selected by the user).
When the user selects the help demonstration mode option, the device may obtain parameter values corresponding to command parameters associated with the target command name stored in advance, and further, may sequentially display the target command name, the command parameters and the parameter values corresponding to the command parameters according to a usage rule of the target command name, where the content command displayed at this time is an example command including the target command name, and the user may input a command including the target command name with reference to the example command. In addition, after the device obtains the parameter values corresponding to the command parameters associated with the target command names, the device can judge whether the parameter values corresponding to the command parameters meet the verification conditions according to the verification conditions corresponding to the command parameters, and if so, the device can display text information of successful command execution. For example, the target command name is create virtual machine general, and the command parameters include: the parameter values meeting the verification conditions of each command parameter may be stored in the device in advance, and the clear_ machine general name =xlj owner_container_id=0 memory=4gb vcpu_count=1sys_disk_size=100 GB may be displayed in the CLI interface, as shown in fig. 4.
The process may be implemented by processor 110 and display 130 in particular.
Optionally, after the device creates the device resource required by the target command parameter, the user may be guided to input the command containing the target command name, and the corresponding processing procedure may be as follows: and displaying the instruction parameters associated with the target instruction names and the description information of the instruction parameters.
In implementation, after the device creates the device resource required by the target command parameter, each command parameter associated with the target command name and the description information of each command parameter may be displayed on the CLI interface, where the description information of the command parameter may be the definition of the command parameter and the input requirement information.
The process may be implemented by display 130, in particular.
Optionally, the device may also display input bits corresponding to each command parameter, and the processing may be as follows: displaying parameter value input bits corresponding to each command parameter; acquiring parameter values input by a user in parameter value input bits corresponding to each command parameter respectively; when an execution instruction is received, a target command is generated and executed based on the parameter value corresponding to each command parameter input by the user and the target command name.
In an implementation, after the device creates the device resource required by the target command parameter, the device may display a parameter value input bit corresponding to each displayed command parameter on the CLI interface, so that the user may input the parameter value corresponding to the command parameter in the parameter value input bit corresponding to each command parameter, further, the device may obtain the parameter value input by the user in the parameter value input bit corresponding to each command parameter, and after the user inputs the parameter value to all command parameters, may strike a trigger key (such as an enter key) in the keyboard for executing the command, at this time, when the device will receive an execution instruction, and further, may generate and execute the target command based on the parameter value corresponding to each command parameter input by the user and the target command name.
Specifically, after the device creates the device resource required by the target command parameter, the device may display the first command parameter and the description information of the first command parameter in each command parameter associated with the target command name, where the parameter value input bit corresponding to the first command parameter is further displayed, the user may input the parameter value corresponding to the first command parameter in the parameter value input bit, after inputting, the user may tap the enter key in the keyboard, at this time, the device may be triggered to obtain the parameter value of the first command parameter input by the user, and detect, according to the verification condition of the first command parameter, whether the parameter value of the first command parameter input by the user meets the verification condition (for example, the verification condition of the first command parameter is that the parameter value is an english character, if the parameter value input by the user is an english character, the parameter value input by the user meets the verification condition, if the parameter value input by the user is a chinese text, the device may determine whether the command parameter (i.e. the first command parameter) is the last command parameter, if the last command parameter is, the device may perform the command based on each command corresponding to the first command parameter input by the user and the parameter, and display the parameter until the parameter is not the target command value, and the description information is displayed.
The following describes the above processing procedure in detail, taking the target command name as the create virtual machine general as an example:
after the device creates the device resource needed by the target command parameter, the name, the description information of the name and the parameter value input bit can be displayed on the CLI interface, and the display is as follows:
Please input the value of<name>:|
Name string using alphanumeric,underscores(_),dots(.)or hyphens(-)(length is from 1to 31).
the "|" symbol indicates a parameter value input bit (the symbol may not be displayed), that is, the position where the symbol is located is an inputtable state, and the user may input the parameter value of the name at the position, for example, the parameter value input by the user is test, and press the enter key in the keyboard, where the device may determine whether the command parameter is the last command parameter, if the command parameter is not related information of the next command parameter, the display content in the CLI interface is as follows as shown in fig. 5 (a):
Please input the value of<name>:test
Name string using alphanumeric,underscores(_),dots(.)or hyphens(-)(length is from 1to 31).
Please input the value of<owner_container_id>:|
ID of Container that manage virtual machine,and is an integer(0-15).
the user may input the parameter value of the owner_container_id in the parameter value input bit corresponding to the owner_container_id, for example, the parameter value input by the user is 0, and click the enter key in the keyboard, where the device may determine whether the command parameter is the last command parameter, if not, the device may continue to display the related information of the next command parameter, where the display content in the CLI interface is as follows:
Please input the value of<name>:test
Name string using alphanumeric,underscores(_),dots(.)or hyphens(-)(length is from 1to 31).
Please input the value of[owner_container_id]:0
ID of Container that manage virtual machine,and is an integer(0-15).
Please input the value of[memory]:|
Memory value use integer followed by unit MB,GB,TB(128MB-1TB,GB support three decimal places).
the user can input the parameter value of the memory in the parameter value input bit corresponding to the memory, for example, the parameter value input by the user is 4GB, and the enter key in the keyboard is clicked, at this time, the device can judge whether the command parameter is the last command parameter, if not, the related information of the next command parameter is not continuously displayed, at this time, the display content in the CLI interface is as follows:
Please input the value of<name>:test
Name string using alphanumeric,underscores(_),dots(.)or hyphens(-)(length is from 1to 31).
Please input the value of[owner_container_id]:0
ID of Container that manage virtual machine,and is an integer(0-15).
Please input the value of[memory]:4GB
Memory value use integer followed by unit MB,GB,TB(128MB-1TB,GB support three decimal places).
Please input the value of[vcpu_count]:|
The cpu counts(1-32).
the user may input the parameter value of vcpu_count at the parameter value input bit corresponding to vcpu_count, for example, the parameter value input by the user is 1, and click the enter key in the keyboard, where the device may determine whether the command parameter is the last command parameter, if not, the device may continue to display the related information of the next command parameter, where the display content in the CLI interface is as follows:
Please input the value of<name>:test
Name string using alphanumeric,underscores(_),dots(.)or hyphens(-)(length is from 1to 31).
Please input the value of[owner_container_id]:0
ID of Container that manage virtual machine,and is an integer(0-15).
Please input the value of[memory]:4GB
Memory value use integer followed by unit MB,GB,TB(128MB-1TB,GB support three decimal places).
Please input the value of[vcpu_count]:1
The cpu counts(1-32).
Please input the value of[sys_disk_size]:|
Disk size value use integer followed by unit GB,TB(1GB-1TB,GB and TB support three decimal places).
the user may input the parameter value of sys_disk_size at the parameter value input bit corresponding to sys_disk_size, for example, the parameter value input by the user is 100GB, and press the enter key in the keyboard, at this time, the device may determine whether the command parameter is the last command parameter, if yes, execute the target command including the parameter value corresponding to each command parameter input by the user and the target command name, and may display text information that the command execution is successful, as shown in fig. 5 (b). In addition, when displaying the command parameter, the description information and the parameter value input bit of the device resource, the device may display the resource identifier of the currently available device resource corresponding to the command parameter, as shown in fig. 5 (c).
In addition, the embodiment of the invention can support two modes of the help demonstration mode and the guide execution mode at the same time, namely, when the device can select the guide execution mode option after the help demonstration mode option and the guide execution mode option are displayed on the CLI interface, the device can guide the user to continuously input the parameter values of all command parameters according to the method until the device executes the target command comprising the target command name after the parameter value of the last command parameter is input. That is, in this mode, after receiving the help information acquisition instruction of the target command name, the device may directly guide the user to complete the input of the command including the target command name, without the need of the user simply reading the text information, and input the entire content of the target command by himself again according to the understanding of the text information, thereby being more beneficial to the user to input the command for implementing the service configuration, and further improving the efficiency of the device to execute the command.
The process may be implemented by processor 110 and display 130 in particular.
In the embodiment of the invention, before a user realizes a certain service configuration through a target command name, a help information acquisition instruction of the target command name of the device can be triggered through operation, and then the device can search the device resources required by the command parameters which are related to the target command name and need the device resources in the device, if the device resources of the certain command parameters are not searched, the device can create the device resources required by the command parameters, and help information of the target command name and the resource identification of the newly created device resources can be displayed. Therefore, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identification of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user can realize the service configuration by only inputting the command once without inputting the target command once, then inputting the command for creating the device resource according to the error after inputting the target command once, and then inputting the target command once again, thereby improving the efficiency of executing the command.
Fig. 6 is a block diagram of an apparatus for creating device resources provided by an embodiment of the present invention. The means for creating the device resource may be implemented as part or all of the device by software, hardware, or a combination of both. The apparatus for creating a device resource according to the embodiment of the present invention may implement the flow shown in fig. 2 according to the embodiment of the present invention, where the apparatus for creating a device resource includes: a receiving module 610, a searching module 620, a creating module 630, a displaying module 640, a first obtaining module 650, a second obtaining module 660, an executing module 670, and an adding module 680, wherein:
the receiving module 610 is configured to receive a help information acquisition instruction of the target command name, and specifically may implement the receiving function in step 201 and other implicit steps of receiving information by the device.
The searching module 620 is configured to search, according to a pre-stored correspondence between a command parameter of a required device resource and a resource identifier of a currently available device resource, a resource identifier corresponding to the command parameter of the required device resource associated with the target command name, where the searching function in step 202 and other implicit steps of searching information by the device may be specifically implemented.
The creation module 630 is configured to create the device resource required by the target command parameter if the target command parameter of the device resource required by the target command name has a target command parameter for which no corresponding resource identifier is found, which may specifically implement the creation function in step 203 and other implicit steps for creating information by the device.
The display module 640 is configured to display help information of the target command name and a resource identifier of the newly created device resource, and specifically may implement the display function in step 203 and other implicit steps for displaying information by the device.
Optionally, as shown in fig. 7, the apparatus further includes:
a first obtaining module 650, configured to obtain parameter values corresponding to command parameters associated with the target command name stored in advance;
the display module 640 is specifically configured to:
and displaying the target command name, the command parameters and the parameter values corresponding to the command parameters respectively according to the use rule of the target command name.
Optionally, the display module 640 is specifically configured to:
and displaying the command parameters associated with the target command names and the description information of the command parameters.
Optionally, the display module 640 is further configured to:
displaying parameter value input bits corresponding to each command parameter;
as shown in fig. 8, the apparatus further includes:
a second obtaining module 660, configured to obtain parameter values input by the user in parameter value input bits corresponding to each command parameter respectively;
and an execution module 670, configured to generate and execute a target command based on the parameter value corresponding to each command parameter input by the user and the target command name when receiving the execution instruction.
Optionally, as shown in fig. 9, the apparatus further includes:
an adding module 680, configured to add the target command parameter and the resource identifier of the newly created device resource to the corresponding relationship.
Optionally, the display module 640 is further configured to:
and displaying the resource identifiers corresponding to other command parameters except the target command parameters in the command parameters which are associated with the target command name and need the equipment resources.
The relevant details may be in connection with the method embodiment described in fig. 2.
It should be noted that, the receiving module 610, the searching module 620, the creating module 630, the first obtaining module 650, the second obtaining module 660, the executing module 670, and the adding module 680 may be implemented by a processor, or the processor may be implemented by matching with a memory, or the processor may execute program instructions in the memory, and the display module 640 may be implemented by a display, or may be implemented in combination with the processor.
In the embodiment of the invention, before a user realizes a certain service configuration through a target command name, a help information acquisition instruction of the target command name of the device can be triggered through operation, and then the device can search the device resources required by the command parameters which are related to the target command name and need the device resources in the device, if the device resources of the certain command parameters are not searched, the device can create the device resources required by the command parameters, and help information of the target command name and the resource identification of the newly created device resources can be displayed. Therefore, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identification of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user can realize the service configuration by only inputting the command once without inputting the target command once, then inputting the command for creating the device resource according to the error after inputting the target command once, and then inputting the target command once again, thereby improving the efficiency of executing the command.
It should be noted that: the apparatus for creating device resources provided in the foregoing embodiment is only exemplified by the division of the foregoing functional modules when creating device resources, and in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for creating a device resource provided in the foregoing embodiment belongs to the same concept as the method embodiment for creating a device resource, and the specific implementation process of the apparatus is detailed in the method embodiment, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.
Claims (5)
1. An information display method, characterized in that the method comprises:
receiving a help information acquisition instruction of a target command name, and displaying a dynamic demonstration help option;
receiving selection operation of a user on the dynamic demonstration help option, and displaying a help demonstration mode option and a guide execution mode option;
receiving selection operation of a user on the help demonstration mode option or the guide execution mode option, and displaying information of a plurality of command parameters corresponding to the target command names according to a preset sequence of the plurality of command parameters; if receiving the selection operation of the help demonstration mode option from the user, the information of the command parameters comprises parameter value input bits; if receiving the selection operation of the user on the guiding execution mode option, the information of the command parameters comprises preset parameter values;
the displaying the information of the plurality of command parameters corresponding to the target command name according to the preset sequence of the plurality of command parameters includes:
the following steps are performed until information of the last command parameter of the plurality of command parameters is displayed: acquiring a parameter value corresponding to one command parameter in a plurality of command parameters corresponding to the target command name input by a user;
and when the parameter value of one of the command parameters meets the verification condition, displaying the parameter value corresponding to the one of the command parameters input by the user.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the displayed information of the plurality of command parameters corresponding to the target command name comprises a preset parameter value, and the obtaining of the parameter value corresponding to one of the plurality of command parameters corresponding to the target command name input by the user comprises the following steps:
and modifying a preset parameter value corresponding to one command parameter in a plurality of command parameters corresponding to the target command name according to the input of a user.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the displayed information of the plurality of command parameters corresponding to the target command name comprises a parameter value input bit, and the acquiring the parameter value corresponding to one of the plurality of command parameters corresponding to the target command name input by the user comprises the following steps:
and receiving a parameter value input by a user in a parameter value input bit corresponding to one command parameter in a plurality of command parameters corresponding to the target command name.
4. An electronic device comprising a processor and a memory, the memory storing program instructions, the processor executing the program instructions to perform the method of any one of claims 1-3.
5. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program, which is executed by a processor to implement the method of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110671897.0A CN113467868B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110671897.0A CN113467868B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
CN201610736591.8A CN107783786B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610736591.8A Division CN107783786B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113467868A CN113467868A (en) | 2021-10-01 |
CN113467868B true CN113467868B (en) | 2023-12-15 |
Family
ID=61440401
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110671897.0A Active CN113467868B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
CN201610736591.8A Active CN107783786B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610736591.8A Active CN107783786B (en) | 2016-08-26 | 2016-08-26 | Method and device for creating equipment resources |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN113467868B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109840414A (en) * | 2018-12-13 | 2019-06-04 | 北京华胜天成信息技术发展有限公司 | Safety protecting method, device and the electronic equipment of baseboard management controller |
CN110543302A (en) * | 2019-09-05 | 2019-12-06 | 无锡华云数据技术服务有限公司 | Input method and device for input parameters in resource arrangement process |
CN110955409B (en) * | 2019-12-02 | 2023-03-28 | 郑州阿帕斯数云信息科技有限公司 | Method and device for creating resources on cloud platform |
CN111158770B (en) * | 2019-12-30 | 2023-01-06 | 联想(北京)有限公司 | Configuration information display method, device and storage medium |
CN113495769B (en) * | 2020-04-07 | 2023-04-07 | 西安理邦科学仪器有限公司 | Page guidance method, equipment, system and storage medium |
CN114385285B (en) * | 2021-11-30 | 2024-02-06 | 重庆长安汽车股份有限公司 | Image creation method based on automobile AI intelligent assistant |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1534460A (en) * | 2003-03-28 | 2004-10-06 | 烽火通信科技股份有限公司 | Management method possessing real time helping function in insertion type system |
CN101226525A (en) * | 2007-01-19 | 2008-07-23 | 国际商业机器公司 | Method, server, client terminal and system for controlling download and display of web page layout |
CN111143006A (en) * | 2019-12-25 | 2020-05-12 | 杭州迪普科技股份有限公司 | Method and device for acquiring command help information |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7290248B2 (en) * | 2003-01-27 | 2007-10-30 | Bea Systems, Inc. | Command-line interface system and method for JAVA message service mark-up language |
US7640540B2 (en) * | 2003-10-24 | 2009-12-29 | Microsoft Corporation | Mechanism for providing extended functionality to command line instructions |
CN1652510A (en) * | 2004-02-07 | 2005-08-10 | 华为技术有限公司 | Method and terminal for operating and maintaining telecommunication apparatus |
US7478380B2 (en) * | 2004-11-15 | 2009-01-13 | Dell Products L.P. | Dynamically updatable and easily scalable command line parser using a centralized data schema |
US9177269B2 (en) * | 2009-05-29 | 2015-11-03 | International Business Machines Corporation | Complexity reduction of user tasks |
CN101674375B (en) * | 2009-09-02 | 2014-02-05 | 优视科技有限公司 | Display method of helping prompt for mobile communication terminal and system thereof |
CN102043570A (en) * | 2009-10-22 | 2011-05-04 | 华为技术有限公司 | Command line input method and device |
CN101924656B (en) * | 2010-08-26 | 2013-11-06 | 北京天融信科技有限公司 | Method and device for realizing network equipment CLI (Command Line Interface for batch scripti) based on dynamic configuration |
CN101944023B (en) * | 2010-09-14 | 2013-05-08 | 南京联创科技集团股份有限公司 | Implement method of universal command line interface of UNIX server software |
US8744980B2 (en) * | 2011-09-21 | 2014-06-03 | Dell Products Lp | Systems and methods for analysis of network equipment command line interface (CLI) and runtime management of user interface (UI) generation for same |
US20140006944A1 (en) * | 2012-07-02 | 2014-01-02 | Microsoft Corporation | Visual UI Guide Triggered by User Actions |
-
2016
- 2016-08-26 CN CN202110671897.0A patent/CN113467868B/en active Active
- 2016-08-26 CN CN201610736591.8A patent/CN107783786B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1534460A (en) * | 2003-03-28 | 2004-10-06 | 烽火通信科技股份有限公司 | Management method possessing real time helping function in insertion type system |
CN101226525A (en) * | 2007-01-19 | 2008-07-23 | 国际商业机器公司 | Method, server, client terminal and system for controlling download and display of web page layout |
CN111143006A (en) * | 2019-12-25 | 2020-05-12 | 杭州迪普科技股份有限公司 | Method and device for acquiring command help information |
Also Published As
Publication number | Publication date |
---|---|
CN107783786A (en) | 2018-03-09 |
CN113467868A (en) | 2021-10-01 |
CN107783786B (en) | 2021-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113467868B (en) | Method and device for creating equipment resources | |
US11461111B2 (en) | Method for running applets, and electronic device | |
CN108984388B (en) | Method and terminal equipment for generating automatic test case | |
CN109558525B (en) | Test data set generation method, device, equipment and storage medium | |
CN111045653B (en) | System generation method and device, computer readable medium and electronic equipment | |
US11741002B2 (en) | Test automation systems and methods using logical identifiers | |
CN114741070A (en) | Code generation method and device, electronic equipment and storage medium | |
CN110705226A (en) | Spreadsheet creating method and device and computer equipment | |
CN111666201A (en) | Regression testing method, device, medium and electronic equipment | |
CN114090671A (en) | Data import method and device, electronic equipment and storage medium | |
CN112631924A (en) | Automatic testing method and device, computer equipment and storage medium | |
CN104156305A (en) | Application program testing method and device | |
US10372760B2 (en) | Building queries directed to objects hosted on clouds | |
CN112948264B (en) | Method and device for executing test task, system, storage medium and electronic device | |
US10073852B2 (en) | Computer-readable storage medium, file management apparatus, and file management method | |
CN114218072A (en) | Test script generation method and device, storage medium and computer equipment | |
CN111488286B (en) | Method and device for independently developing Android modules | |
US9787552B2 (en) | Operation process creation program, operation process creation method, and information processing device | |
CN114816772B (en) | Debugging method, debugging system and computing device for application running based on compatible layer | |
CN116521148A (en) | Code generation method and device, nonvolatile storage medium and electronic equipment | |
CN116009847A (en) | Code generation method, device, electronic equipment and storage medium | |
CN113918254A (en) | Language text management method and device, storage medium and electronic equipment | |
CN113094367A (en) | Data processing method and device and server | |
CN112947846B (en) | Batch processing task execution method and device of object storage system and electronic equipment | |
CN118133794B (en) | Table configuration method, apparatus, device and storage medium |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220928 Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041 Applicant after: Chengdu Huawei Technologies Co.,Ltd. Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China Applicant before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |