CN113467868A - Method and device for creating equipment resources - Google Patents

Method and device for creating equipment resources Download PDF

Info

Publication number
CN113467868A
CN113467868A CN202110671897.0A CN202110671897A CN113467868A CN 113467868 A CN113467868 A CN 113467868A CN 202110671897 A CN202110671897 A CN 202110671897A CN 113467868 A CN113467868 A CN 113467868A
Authority
CN
China
Prior art keywords
command
parameter
name
target command
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.)
Granted
Application number
CN202110671897.0A
Other languages
Chinese (zh)
Other versions
CN113467868B (en
Inventor
宋科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Digital Technologies Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Digital Technologies Chengdu Co Ltd filed Critical Huawei Digital Technologies Chengdu Co Ltd
Priority to CN202110671897.0A priority Critical patent/CN113467868B/en
Publication of CN113467868A publication Critical patent/CN113467868A/en
Application granted granted Critical
Publication of CN113467868B publication Critical patent/CN113467868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution 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: a user can receive a help information acquisition instruction of a target command name by operating a trigger device, and then the device can search a resource identifier corresponding to a command parameter of a required device resource associated with the target command name according to a pre-stored corresponding relation between the command parameter of the required device resource and a resource identifier of a currently available device resource; if the command parameters of the required device resources associated with the target command name have target command parameters for which the corresponding resource identifiers are not found, the device can create the device resources required by the target command parameters and display the help information of the target command name and the resource identifiers of the newly created device resources. By adopting the invention, the efficiency of executing the command can be improved.

Description

Method and device for creating equipment resources
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for creating device resources.
Background
Currently, a user may perform service configuration on a storage device, such as storing data and creating a virtual machine, through a CLI (Command Line Interface) application installed in the storage device.
A user may input a command corresponding to a certain service configuration on a CLI interface to implement the service configuration on a storage device, where the command is composed of a command name, a command parameter (the command parameter may be a command parameter associated with the command name capable of implementing the service configuration), and a parameter value, for example, the service configuration is to store data in a folder identified as 0 included in the storage device, in this case, the command name of the technically input command may be storage data (where the command name may be an english name corresponding to the storage 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 command, it may be unclear the usage rule of a command name, at this time, the user may view help information of the command name through a command help function, and specifically, after the user inputs the command name on the CLI interface, the user may click "? After reading the text information, the user can input a command consisting of the command name, the command parameter and parameter values of the command parameter on the CLI interface, and click an enter key in the keyboard, at this time, the terminal receives an execution instruction, and further can determine a target command parameter (the target command parameter may be a folder identifier) of a device resource that needs to be used in the command, wherein the parameter value of the command parameter of the device resource needs to be a resource identifier of the device resource, and can determine whether the storage device contains the device resource corresponding to the parameter value of the target command parameter (the device resource may be a folder with a folder identifier of 0, and 0 may be a resource identifier of the device resource), if the device resource does not exist in the storage device, the terminal will report an error, at this time, the user can create the device resource by using the command for creating the device resource according to the error, after creating the device resource, the user can re-input the command corresponding to the service configuration according to the created device resource (wherein, when inputting the command at this time, the parameter value of the target command parameter can be set as the resource identifier of the device resource just created), and click the enter key in the keyboard, the storage device will be triggered to execute the command, and the service configuration corresponding to the command is completed.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
based on the above processing manner, after the user inputs the command according to the help information of the command name of the command, if the storage device does not have the device resource required for executing the command, the terminal may not correctly execute the command and may report an error, at this time, the user is required to create the device resource by using the command for creating the device resource first, and then input the command corresponding to the service configuration again, thereby resulting in a low efficiency of executing the command.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for creating device resources. The technical scheme is as follows:
in a first aspect, a method for creating a device resource is provided, the method including:
receiving a help information acquisition instruction of a target command name; searching a resource identifier corresponding to the command parameter of the required equipment resource associated with the target command name according to the corresponding relation between the command parameter of the required equipment resource stored in advance and the resource identifier of the currently available equipment resource; if the command parameters of the required device resources associated with the target command name have target command parameters of which the corresponding resource identifiers are not found, the device resources required by the target command parameters can be created, and the help information of the target command name and the newly created resource identifiers of the device resources are displayed.
According to the scheme provided by the embodiment of the invention, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identifier of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user only needs to input the command once to realize the service configuration, the command for creating the device resource is input according to the error report after the target command is input once, 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 the help information of the target command name includes: acquiring pre-stored parameter values corresponding to the command parameters associated with the target command name; the target command name, the command parameters and the parameter values corresponding to the command parameters can be displayed according to the usage rules of the target command name.
According to the scheme shown in the embodiment of the present invention, after receiving the help information acquisition instruction of the target command name, the device may create the device resource required by the target command parameter, and may display the help information of the target command name in an exemplary form (where, the device may perform parallel processing on the created device resource and the help information for displaying the target command name, or create the device resource first and then display the help information of the target command name), that is, in an exemplary form, a command including the target command name, each command parameter associated with the target command name, and a parameter value of each command parameter stored in advance is displayed, and this mode may be referred to as a help demonstration mode. Therefore, the displayed exemplary command is more helpful for the user to understand the use rule of the target command name, and further, the user can input the command which comprises the target command name and is used for realizing certain service configuration more quickly and accurately, so that the efficiency of executing the command by the equipment can be improved, and the difficulty of carrying out service configuration by the user through the command is also reduced.
In one possible implementation, displaying help information of the target command name includes: and displaying each command parameter related to the target command name and description information of each command parameter.
In one possible implementation, the method includes: corresponding to each command parameter, displaying a parameter value input bit; 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, the target command can 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 provided by the embodiment of the invention, after the device receives the help information acquisition instruction of the target command name, the device resource required by the target command parameter can be created, and then the command parameter associated with the target command name, the description information of each command parameter and the input bit of the parameter value are sequentially displayed, so that a user can input the corresponding parameter at the parameter value input bit corresponding to the command parameter, wherein after the user inputs the parameter value of the current command parameter and clicks the preset key in the keyboard, the device displays the next command parameter, the description information of the command parameter and the input bit of the parameter value until the last command parameter associated with the target command name is displayed. After the user inputs the parameter value of the last command parameter and taps the preset key in the keyboard, the device can execute the target command containing the parameter value corresponding to each command parameter and the target command name. In this case, when the user obtains the help information of the target command name, the device guides the user to input the parameter value of each command parameter in the guidance execution mode, and finally executes the target command without inputting the target command according to the understanding of the user after the user reads the help information in the text form.
Furthermore, the device may also support both the help presentation mode and the boot execution mode.
In one possible implementation, the method further includes: and correspondingly 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 resource identifiers corresponding to other command parameters except the target command parameter in the command parameters needing equipment resources and related to the target command name.
According to the scheme provided by the embodiment of the invention, after the device receives the help information acquisition instruction of the target command name, the resource identifier corresponding to the command parameter of the required device resource associated with the target command name can be displayed, so that when a user inputs a command containing the target command name, the parameter value corresponding to the command parameter of the required device resource can be obtained more intuitively and conveniently, and the user does not need to search the command name of the resource identifier corresponding to the command parameter of the required device resource and search the resource identifier of the command parameter, thereby improving the efficiency of the device for executing the command.
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 for creating device resources provided by the first aspect described above by executing the instructions.
In a third aspect, an apparatus for creating a device resource is provided, where the apparatus includes at least one module, and the at least one module is configured to implement 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 the technical effects obtained by the corresponding technical means in the first aspect, and are not described herein again.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, before a user realizes certain service configuration through a target command name, the user can trigger the help information acquisition instruction of the target command name of the equipment through operation, and then the equipment can search equipment resources which are associated with the target command name and are required by command parameters of equipment resources in the equipment, if the equipment resources of the command parameter are not searched, the equipment can create the equipment resources required by the command parameter, and can display the help information of the target command name and the resource identification of the newly created equipment resources. Therefore, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identifier of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user only needs to input the command once to realize the service configuration, the user does not need to input the command for creating the device resource according to the error after inputting the target command once, and then re-input the target command once, thereby improving the efficiency of executing the command.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used 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 for a user in the field, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of an apparatus according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for creating device resources according to an embodiment of the present invention;
FIG. 3(a) is a schematic view of an interface provided by an embodiment of the present invention;
FIG. 3(b) is a schematic diagram of an interface provided by an embodiment of the present invention;
FIG. 4 is a schematic view of an interface provided by an embodiment of the present invention;
FIG. 5(a) is a schematic view of an interface provided by an embodiment of the present invention;
FIG. 5(b) is a schematic view of an interface provided by an embodiment of the present invention;
FIG. 5(c) is a schematic view of an interface provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for creating device resources according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for creating device resources according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus for creating device resources according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an apparatus for creating device resources according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for creating equipment resources, wherein 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 provided with a Command Line Interface (CLI) application program, and can be equipment provided with a shell application program. The following embodiments take a device as an example of a device installed with a CLI application program for detailed description, and other cases are similar and will not be described again.
The device may include a processor 110, a memory 120, and a display 130, and the processor 110 may be connected 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, connect various parts of the device using various interfaces and lines, perform various functions of the device and process data by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby monitoring the device as a whole. Processor 110 may include one or more processing units; the processor 110 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, etc. The memory 110 may be used to store programs. Specifically, the program may include a program code including computer operation instructions, and in this embodiment of the present invention, the memory 120 may be further configured to store a correspondence between a command parameter of the required device resource and a resource identifier of the currently available device resource. Memory 120 may comprise RAM and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The processor 110 executes the program codes stored in the memory 120 to realize various functions, wherein in the embodiment of the present invention, the memory 120 can also be used for storing data required and generated in the following processing procedures. The display may be used to display various interfaces, and in the embodiment of the present invention, the display may be used to display help information of the target command name and a resource identifier of the device resource.
As shown in fig. 2, the specific processing flow of the method may include the following steps:
in step 201, the device receives a help information acquisition instruction of 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 a 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, command parameters associated with the command name, and parameter values corresponding to the command parameters may be input in a CLI interface. In order to prevent the 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 can view help information of the command name through the command help function before performing service configuration 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 click a preset key of the keyboard for obtaining help information of the command name, for example, "? ", the device receives the help information acquisition instruction of the target command name.
This step may be specifically implemented by the processor 110.
Step 202, the device searches for a resource identifier corresponding to the command parameter of the required device resource associated with the target command name according to the pre-stored correspondence between the command parameter of the required device resource and the resource identifier of the currently available device resource.
The currently available device resources may be currently unoccupied device resources contained in the device.
In implementation, the device may store in advance a correspondence between a command parameter of the device resource required and a resource identifier of the currently available device resource, where the command parameter of the device resource required 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 includes a folder identifier, 0 is a parameter value of the folder identifier, if the command can be executed, it is necessary that the device includes the folder identified as 0, i.e. the folder is a device resource, 0 is a resource identifier of the device resource (folder), i.e. the folder identifier is a command parameter requiring the device resource, and for example, the target command name is to create a virtual machine, the command parameter associated with the target command name includes 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 needs the user to draw a name for the virtual machine to be created according to the requirement of the user, the command parameter does not require device resources, i.e., the command parameter is not a command parameter that requires device resources.
The command parameters associated with the target command name may include command parameters requiring device resources, and after receiving the help information acquisition instruction of the target command name, the device may acquire the target command name input by the user, and acquire the command parameters associated with the target command name in the pre-stored correspondence between the command name and the associated command parameters, thereby determining the command parameters requiring device resources in all the command parameters associated with the target command name, and determining whether the device includes currently available device resources corresponding to the command parameters. Specifically, the device may determine, from the command parameters in the pre-stored correspondence, a command parameter that requires device resources among all command parameters associated with the target command name, and in the pre-stored correspondence between the command parameters of the required device resources and the resource identifiers of the currently available device resources, searching a resource identifier corresponding to the command parameter needing the equipment resource and associated with the target command name, if all device resources requiring the command parameters of the device resource associated with the target command name are included in the device, the device may find the resource identifier corresponding to the command parameter for each device resource that is needed, if the device does not include a device resource of a command parameter (which may be referred to as a target command parameter) of all the command parameters requiring device resources associated with the target command name, the device does not find a resource identifier corresponding to the target command parameter.
This step may be implemented in particular by the processor 110 and the memory 120 together.
Step 203, if there is a target command parameter for which the corresponding resource identifier is not found in the command parameters of the required device resources associated with the target command name, the device creates the device resources 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 implementation, if the device does not include a device resource of the target command parameter, that is, if there is a target command parameter that does not find a corresponding resource identifier in the command parameter of the device resource that needs to be associated with the target command name, the device may create a device resource that is needed by the target command parameter, where the device may allocate a resource identifier to 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 to the device resource when creating the device resource. After the device creates the device resource, help information of the target command name and a resource identifier of the newly created device resource may be displayed on the CLI interface, where the help information of the target command name may be use help information of the target command name, and may be used for a user to specify a use rule of the target command name. In addition, the device may also display a resource identifier corresponding to another command parameter except the target command parameter in the command parameters requiring device resources associated with the target command name, that is, after the device receives the help information obtaining instruction of the target command name, the resource identifier of the currently available device resource corresponding to the command parameter requiring device resources associated with the target command name may be displayed on the CLI interface.
This step may be specifically implemented by processor 110 and display 130 together.
Optionally, after the device creates the device resource, the target command parameter may be stored in correspondence with the resource identifier of the device resource, and accordingly, the processing procedure may be as follows: and correspondingly adding the target command parameter and the resource identifier of the newly created equipment resource into the corresponding relation by the equipment.
In implementation, after the device creates the device resource required by the target command parameter, the target command parameter and the resource identifier of the newly created device resource may be correspondingly added to the corresponding relationship, that is, to the pre-stored corresponding relationship between the command parameter required by the device resource and the resource identifier of the currently available device resource.
The process may be specifically implemented by the processor 110.
Optionally, the device may display the help information of the target command name in an exemplary form according to the usage rule of the target command name, and accordingly, the processing procedure may be as follows: acquiring parameter values corresponding to command parameters associated with a pre-stored target command name; 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 the help information acquisition instruction of the 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 guidance execution mode option in the CLI interface, and the user may select the two options, for example, the CLI interface may display a static text help option and a dynamic presentation help option, and correspondingly display a number label, and may display an option selection input bit, and the user may select the corresponding options by inputting the corresponding number label in the option selection input bit, as shown in fig. 3(a), for example, the user selects 1 (where 1 denotes the dynamic presentation help option, and 2 denotes the static text help option), and then the device may continue to display the help presentation mode option and the guidance execution mode option in the CLI interface, and correspondingly display a number label, and may display an option selection input bit, and the user may input the corresponding number label in the option selection input bit, to select the corresponding option, as shown in fig. 3(b), such as 1 selected by the user (where 1 represents the help presentation mode option and 2 represents the boot execution mode option).
When a user selects the help demonstration mode option, the device may obtain parameter values corresponding to command parameters associated with a pre-stored target command name, and may further sequentially display the target command name, the command parameters, and the parameter values corresponding to the command parameters according to the usage rules of the target command name, where the content command displayed at this time is an example command including the target command name, the user may input a command including the target command name with reference to the example command, and when inputting the command, the user only needs to modify the parameter values corresponding to the command parameters on the example basis. In addition, after the device obtains the parameter values corresponding to the command parameters associated with the target command name, whether the parameter values corresponding to the command parameters meet the verification conditions or not can be judged according to the verification conditions corresponding to the command parameters, and if the parameter values meet the verification conditions, text information of successful command execution can be displayed. For example, the target command is named create virtual _ machine generator, and the command parameters include: name, inner _ container _ id, memory, vcpu _ count, and sys _ disk _ size, parameter values meeting the verification conditions of the command parameters may be stored in advance in the device, and a create virtual _ machine general name ═ xlj inner _ container _ id ═ 0memory ═ 4GB vcpu _ count ═ 1sys _ disk _ size ═ 100GB may be displayed in the CLI interface, as shown in fig. 4.
The processing may be specifically implemented by the processor 110 and the display 130 in combination.
Optionally, after the device creates the device resource required by the target command parameter, the device may guide the user to input the command including the target command name, and accordingly, the processing procedure may be as follows: and displaying each command parameter related to the target command name and description information of each command parameter.
In implementation, after the device creates the device resources required by the target command parameter, the command parameters associated with the target command name and the description information of the command parameters may be displayed on the CLI interface, where the description information of the command parameters may be definitions of the command parameters, and input requirement information.
The process may be embodied by display 130.
Optionally, the device may further display an input bit corresponding to each command parameter, and accordingly, the processing procedure may be as follows: corresponding to each command parameter, displaying a parameter value input bit; acquiring parameter values input by a user in a parameter value input bit corresponding to each command parameter; when an execution instruction is received, a target command is generated and executed based on a parameter value corresponding to each command parameter input by a user and a target command name.
In implementation, after the device creates device resources required by a target command parameter, a parameter value input bit may be further displayed corresponding to each displayed command parameter on the CLI interface, so that a user may input a parameter value corresponding to the command parameter at the parameter value input bit corresponding to each command parameter, further, the device may obtain a parameter value input by the user in the parameter value input bit corresponding to each command parameter, and after the user inputs the parameter values for all command parameters, the device may tap a trigger key (for example, enter key) for executing a command in the keyboard, at this time, when the device receives an execution instruction, the device may further 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, a first command parameter and description information of the first command parameter in each command parameter associated with the target command name may be displayed, wherein a parameter value input bit is also displayed corresponding to the first command parameter, a user may input a parameter value corresponding to the first command parameter at the parameter value input bit, after the input, the user may click an enter key in a keyboard, at this time, the device is triggered to obtain the parameter value of the first command parameter input by the user, and whether the parameter value of the first command parameter input by the user satisfies a check condition is detected according to the check condition of the first command parameter (for example, the check 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 satisfies the check condition, if the parameter value input by the user is Chinese characters, the parameter value input by the user meets the check condition), if so, the equipment can judge whether the command parameter (namely, the first command parameter) is the last command parameter, if so, the equipment can 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, if not, the equipment can display the next command parameter (namely, the second command parameter) and the description information of the second command parameter, and can display the parameter value input bit of the second command parameter until the last command parameter, the description information and the parameter value input bit are displayed.
The following describes the above processing procedure in detail, taking the target command name as create virtual _ machine generator as an example:
after the device creates the device resource needed by the target command parameter, the name description information and the parameter value input bit can be displayed on the CLI interface, as follows:
Please input the value of<name>:|
Name string using alphanumeric,underscores(_),dots(.)or hyphens(-)(length is from 1to 31).
the "|" symbol represents a parameter value input bit (the symbol may not be displayed), that is, the position of the symbol is an inputtable state, 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 a enter key in the keyboard is clicked, at this time, the device may determine whether the command parameter is the last command parameter, if not, the related information of the next command parameter is continuously displayed, at this time, as shown in fig. 5(a), 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>:|
ID of Container that manage virtual machine,and is an integer(0-15).
the user may input the parameter value of inner _ container _ id at the parameter value input bit corresponding to inner _ container _ id, for example, the parameter value input by the user is 0, and hit the enter key in the keyboard, at this time, the device may determine whether the command parameter is the last command parameter, if not, continue to display the related information of the next command parameter, 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]:|
Memory value use integer followed by unit MB,GB,TB(128MB-1TB,GB support three decimal places).
the user may input the parameter value of the memory at the parameter value input position corresponding to the memory, for example, the parameter value input by the user is 4GB, and tap an enter key in the keyboard, at this time, the device may determine whether the command parameter is the last command parameter, if not, continue to display the related information of the next command parameter, 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 tap an enter key in the keyboard, at this time, the device may determine whether the command parameter is the last command parameter, and if not, continue to display the related information of the next command parameter, 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]: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 tap the enter key in the keyboard, at this time, the device may determine whether the command parameter is the last command parameter, if so, 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 indicating that the command execution is successful, as shown in fig. 5 (b). In addition, the device may display the resource identifier of the currently available device resource corresponding to the command parameter when displaying the command parameter, the specification information, and the parameter value input bit of the device resource that is needed, as shown in fig. 5 (c).
In addition, the embodiment of the invention can simultaneously support two modes of a help demonstration mode and a guide execution mode, namely after the device displays the help demonstration mode option and the guide execution mode option on the CLI interface, when the user can select the guide execution mode option, under the condition, the device can guide the user to continuously input the parameter value of each command parameter according to the method until the device executes the target command containing the target command name after the parameter value of the last command parameter is input. In other words, in this mode, after receiving the help information acquisition instruction of the target command name, the device can directly guide the user to complete the input of the command including the target command name, and the user does not need to simply read the text information and automatically input all the contents of the target command according to the understanding of the user on the text information, so that the user can input the command for realizing the service configuration more conveniently, and further, the efficiency of executing the command by the device can be improved.
The processing may be specifically implemented by the processor 110 and the display 130 in combination.
In the embodiment of the invention, before a user realizes certain service configuration through a target command name, the user can trigger the help information acquisition instruction of the target command name of the equipment through operation, and then the equipment can search equipment resources which are associated with the target command name and are required by command parameters of equipment resources in the equipment, if the equipment resources of the command parameter are not searched, the equipment can create the equipment resources required by the command parameter, and can display the help information of the target command name and the resource identification of the newly created equipment resources. Therefore, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identifier of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user only needs to input the command once to realize the service configuration, the user does not need to input the command for creating the device resource according to the error after inputting the target command once, and then re-input the target command once, thereby improving the efficiency of executing the command.
Fig. 6 is a block diagram of an apparatus for creating device resources according to an embodiment of the present invention. The means for creating device resources may be implemented as part or all of the device in software, hardware, or a combination of both. The apparatus for creating device resources provided in the embodiment of the present invention may implement the process described in fig. 2 in the embodiment of the present invention, where the apparatus for creating device resources includes: the device comprises 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 obtaining instruction of the target command name, and may specifically 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 correspondence between a pre-stored command parameter of a device resource that needs to be searched and a resource identifier of a currently available device resource, a resource identifier corresponding to the command parameter of the device resource that needs to be searched and is associated with the target command name, and may specifically implement the searching function in step 202 and other implicit steps of searching information by the device.
A creating module 630, configured to create, if there is a target command parameter that does not find a corresponding resource identifier in the command parameters of the required device resource associated with the target command name, a device resource required by the target command parameter, which may specifically implement the creating function in step 203 and other implicit steps of creating information by a device.
The display module 640 is configured to display the help information of the target command name and the resource identifier of the newly created device resource, and may specifically implement the display function in step 203 and other implicit steps of 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, where the parameter values are 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 according to the use rule of the target command name.
Optionally, the display module 640 is specifically configured to:
and displaying each command parameter associated with the target command name and description information of each command parameter.
Optionally, the display module 640 is further configured to:
corresponding to each command parameter, displaying a parameter value input bit;
as shown in fig. 8, the apparatus further includes:
a second obtaining module 660, configured to obtain a parameter value input by the user in the parameter value input bit corresponding to each command parameter;
and the execution module 670 is configured to, when an execution instruction is received, generate and execute a target command based on a parameter value corresponding to each command parameter input by the user and the target command name.
Optionally, as shown in fig. 9, the apparatus further includes:
an adding module 680, configured to correspondingly 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 resource identifiers corresponding to other command parameters except the target command parameter in the command parameters of the required equipment resources associated with the target command name.
The relevant details may be combined with the method embodiment described in fig. 2.
It should be noted that the receiving unit 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 is implemented by matching a memory, or the processor executes program instructions in the memory, and the displaying module 640 may be implemented by a display, or implemented by combining the processor.
In the embodiment of the invention, before a user realizes certain service configuration through a target command name, the user can trigger the help information acquisition instruction of the target command name of the equipment through operation, and then the equipment can search equipment resources which are associated with the target command name and are required by command parameters of equipment resources in the equipment, if the equipment resources of the command parameter are not searched, the equipment can create the equipment resources required by the command parameter, and can display the help information of the target command name and the resource identification of the newly created equipment resources. Therefore, the user can directly input the command containing the target command name, the command parameter and the parameter value based on the device identifier of the device resource created by the device in the process of displaying the help information of the target command name, namely, the user only needs to input the command once to realize the service configuration, the user does not need to input the command for creating the device resource according to the error after inputting the target command once, and then re-input the target command once, thereby improving the efficiency of executing the command.
It should be noted that: in the apparatus for creating device resources according to the foregoing embodiments, when creating device resources, only the division of the functional modules is described as an example, and in practical applications, the above function allocation may be completed 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 device resources and the method for creating device resources provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and will not be described herein again.
It will be understood by those skilled in the art that all or part of the steps of the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (7)

1. An information display method, characterized in that the method comprises:
receiving a help information acquisition instruction of a target command name;
acquiring a plurality of command parameters corresponding to the target command name;
and sequentially and dynamically displaying the information of the command parameters corresponding to the target command name.
2. The method of claim 1,
the displayed information of at least one command parameter corresponding to the target command name comprises preset parameter values, and the method further comprises the following steps:
and modifying the preset parameter value according to the input of the user.
3. The method of claim 1,
the displayed information of the at least one command parameter corresponding to the target command name includes a parameter value input bit, and the method further includes:
and receiving the parameter value input by the user at the parameter value input bit.
4. The method according to any one of claims 1 to 3,
displaying dynamic demonstration help options after receiving a help information acquisition instruction of a target command name;
and after receiving the selection operation of the user on the dynamic demonstration help option, sequentially and dynamically displaying the information of the command parameters corresponding to the target command name.
5. The method of claim 4, wherein the method comprises:
displaying a boot execution mode option after the user selects the dynamic demonstration help option;
and after the user selects the guide execution mode option, the displayed information of at least one command parameter corresponding to the target command name comprises a preset parameter value.
6. The method of claim 4, wherein the method comprises:
displaying a help demonstration mode option after the user selects the dynamic demonstration help option;
and after the user selects the help demonstration mode option, the displayed information of the at least one command parameter corresponding to the target command name comprises a parameter value input bit.
7. 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 of claims 1-6.
CN202110671897.0A 2016-08-26 2016-08-26 Method and device for creating equipment resources Active CN113467868B (en)

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 true CN113467868A (en) 2021-10-01
CN113467868B 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)

* Cited by examiner, † Cited by third party
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 (4)

* Cited by examiner, † Cited by third party
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
US20060129980A1 (en) * 2004-11-15 2006-06-15 David Schmidt Dynamically updatable and easily scalable command line parser using a centralized data schema
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 (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7290249B2 (en) * 2003-01-27 2007-10-30 Bea Systems, Inc. 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
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
US20060129980A1 (en) * 2004-11-15 2006-06-15 David Schmidt Dynamically updatable and easily scalable command line parser using a centralized data schema
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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
华为技术有限公司: ""OceanStor 2800 V3 存储*** V300R001 命令参考 04"", pages 1 - 2, Retrieved from the Internet <URL:《https://support.huawei.com/enterprise/zh/doc/EDOC1000057387》> *

Also Published As

Publication number Publication date
CN107783786A (en) 2018-03-09
CN113467868B (en) 2023-12-15
CN107783786B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN107783786B (en) Method and device for creating equipment resources
EP3433732B1 (en) Converting visual diagrams into code
CN109558525B (en) Test data set generation method, device, equipment and storage medium
CN105868166B (en) Regular expression generation method and system
CN109656815B (en) Test statement writing method, device and medium with configuration file and electronic equipment
CN111813680B (en) Method and device for generating test script, computer equipment and storage medium
CN114416667A (en) Method and device for rapidly sharing network disk file, network disk and storage medium
CN104156305A (en) Application program testing method and device
CN110362404B (en) SQL-based resource allocation method and device and electronic equipment
CN115576828A (en) Test case generation method, device, equipment and storage medium
US20150355888A1 (en) Acquiring identification of an application lifecycle management entity associated with similar code
CN111382044A (en) Positioning method and positioning device for performance bottleneck, electronic equipment and storage medium
CN111694992A (en) Data processing method and device
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
WO2018228001A1 (en) Electronic device, information query control method, and computer-readable storage medium
US10073852B2 (en) Computer-readable storage medium, file management apparatus, and file management method
CN107766228B (en) Multi-language-based automatic testing method and device
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN105893614A (en) Information recommendation method and device and electronic equipment
CN114816772A (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN114385891A (en) Data searching method and device, electronic equipment and storage medium
CN112165549A (en) Short message processing method, device, equipment and medium applied to intelligent terminal
CN111078550A (en) Software testing method and device, computer device and storage medium
CN114911534B (en) Page information extraction method, setting method, device, electronic equipment and medium
CN112445790B (en) Report data storage method, device, equipment and 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