Disclosure of Invention
An object of the embodiments of the present application is to provide a server configuration modification method and apparatus, so as to solve the above problem.
In a first aspect, the present invention provides a server configuration modification method, including: acquiring a first configuration file and a second configuration file of BIOS options of a server, wherein the first configuration file comprises a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file comprises the plurality of BIOS options and current option values corresponding to each BIOS option; acquiring each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; searching a corresponding BIOS option in the second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
In the server configuration modification method, the first configuration file and the second configuration file of the BIOS of the server are automatically acquired, then the first current modification value corresponding to each BIOS option and each BIOS option in the first configuration file are acquired, then the corresponding BIOS option is automatically searched in the second configuration file according to each acquired BIOS option, and the editor is used for automatically modifying or replacing the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option, so that the problem of low efficiency caused by manual modification of the BIOS options at present is solved, and the modification efficiency and accuracy of the option values of the BIOS configuration files of the server are improved.
In an optional implementation manner of the first aspect, the obtaining each BIOS option in the first configuration file and a first current modified value corresponding to each BIOS option includes: saving all BIOS options in the first configuration file as a first list; saving each BIOS option in the first configuration file and a plurality of corresponding option values as a second list; and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
In the embodiment designed above, the present solution saves all BIOS options in the first configuration file as the first list, and saves each BIOS option and the corresponding multiple option values in the first configuration file as the second list, so that fewer operations can be spent on querying and obtaining the BIOS options and the corresponding multiple option values.
In an optional implementation manner of the first aspect, after the modifying, by the editor, the current option value of the BIOS option corresponding to the found second configuration file according to the first current modified value corresponding to each BIOS option, the method further includes: judging whether the current option values of all BIOS options in the second configuration file are modified; if so, uploading the modified second configuration file to the substrate management controller, and restarting the server; after the server is restarted, the second configuration file is downloaded again, and whether the modification of each BIOS option in the downloaded second configuration file is effective or not is judged; and if the BIOS option modification is not effective, prompting to modify the BIOS option which is not effective.
In the embodiment designed above, after the current option value in the second configuration file is modified, the second configuration file is downloaded again to determine whether the modification is effective, so as to ensure that the modification of the second configuration file is successful.
In an optional implementation manner of the first aspect, after the determining whether the modification of each BIOS option in the re-downloaded second configuration file is effective, the method further includes: and if the modification of all the BIOS options is effective, determining that the modification of the second configuration file is completed.
In the embodiment designed above, the scheme automatically judges whether the modification of the BIOS option in the second configuration file is effective, so as to solve the problem of low efficiency and low accuracy rate existing in the manual judgment of whether the modification of the BIOS option is effective, thereby improving the efficiency and accuracy rate of the modification of the BIOS option.
In an optional implementation manner of the first aspect, after the determining whether the modification of each BIOS option in the re-downloaded second configuration file is effective, the method further includes: if all the BIOS options are modified effectively, acquiring each BIOS option in the first configuration file and a second current modified value corresponding to each BIOS option, wherein the second current modified value is determined in a plurality of candidate values, and the second current modified value is different from the first current modified value; searching a corresponding BIOS option in the re-downloaded second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file which is downloaded again by utilizing the editor according to the second current modified value corresponding to each BIOS option.
In an optional implementation manner of the first aspect, the determining whether the modification of each BIOS option in the re-downloaded second configuration file is effective includes: acquiring the current option value of each BIOS option in the second configuration file which is downloaded again; judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value; if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective; and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
In the embodiment designed above, the scheme automatically judges whether the modification of the second configuration file is effective, and prompts the BIOS options which are not effective, so that a test engineer can conveniently check the test result; and after the active modification mode takes effect, the second configuration file can be modified again, so that the active modification of the second configuration file is tested for many times, and the accuracy of the active modification mode is ensured.
In an optional implementation manner of the first aspect, the first current modification value is a first sequence value of a corresponding BIOS option, and after the modifying, by using the editor, the current option value of the corresponding BIOS option in the found second configuration file according to the first current modification value corresponding to each BIOS option, the method further includes: judging whether the current option values of all BIOS options in the second configuration file are modified; if so, uploading the modified second configuration file to the substrate management controller, and restarting the server; after the server is restarted, the second configuration file is downloaded again, and whether the modification of each BIOS option in the downloaded second configuration file is effective or not is judged; and if all the BIOS options are effective, sequentially obtaining a second current modification value of each BIOS option according to the sequence of the plurality of candidate values of each BIOS option, and modifying the current option value of the BIOS option in the corresponding re-downloaded second configuration file by using the editor to obtain the second current modification value of the BIOS option each time until the plurality of option values of all the BIOS options are obtained.
In the embodiment designed above, the scheme uses the sequence of multiple candidate values of the BIOS option to sequentially obtain each candidate value and further modify the option value of the corresponding BIOS option in the second configuration file for multiple times, so that the modification process of the BIOS option can be automatically realized according to the sequence of the candidate values, and thus, when the server leaves the factory, full-automatic detection on the server can be realized by traversing and testing all candidate values in the BIOS option.
In a second aspect, the present invention provides a server configuration modification apparatus, including: the server comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first configuration file and a second configuration file of server BIOS options, the first configuration file comprises a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file comprises the plurality of BIOS options and current option values corresponding to each BIOS option; and; acquiring each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; the searching module is used for searching the corresponding BIOS option in the second configuration file according to each obtained BIOS option; and the modification module is used for modifying the found current option value of the corresponding BIOS option in the second configuration file by utilizing the editor according to the first current modification value corresponding to each BIOS option.
In the server configuration modification device designed above, the scheme first automatically acquires a first configuration file and a second configuration file of the BIOS of the server, then acquires each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, then automatically searches for the corresponding BIOS option in the second configuration file according to each acquired BIOS option, and automatically modifies or replaces the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option by using an editor, so that it can be seen that the scheme of the application realizes the automatic modification of the BIOS option value in the BIOS configuration file of the server, thereby solving the problem of low efficiency caused by the manual modification of the BIOS option at present, and improving the modification efficiency and accuracy of the option value of the BIOS configuration file of the server.
In an optional implementation manner of the second aspect, the obtaining module is specifically configured to store all BIOS options in the first configuration file as a first list; saving each BIOS option in the first configuration file and a plurality of corresponding option values as a second list; and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
In an optional implementation manner of the second aspect, the apparatus further includes a determining module, configured to determine whether current option values of all BIOS options in the second configuration file are modified; the uploading module is used for uploading the modified second configuration file to the substrate management controller and restarting the server after the modification is judged to be finished; the downloading module is used for downloading the second configuration file again after the server is restarted; the judging module is further configured to judge whether the modification of each BIOS option in the re-downloaded second configuration file is valid; and the prompting module is used for prompting that the BIOS option which is not in effect is modified under the condition that the BIOS option modification is judged not to be in effect.
In an optional implementation manner of the second aspect, the apparatus further includes a determining module, configured to determine that the modification of the second profile is completed, if it is determined that the modifications of all the BIOS options are in effect.
In an optional implementation manner of the second aspect, the obtaining module is further configured to, when it is determined that all modifications of the BIOS options are valid, obtain each BIOS option in the first configuration file and a second current modification value corresponding to each BIOS option, where the second current modification value is determined among a plurality of candidate values, and the second current modification value is different from the first current modification value; the searching module is further configured to search the corresponding BIOS option in the re-downloaded second configuration file according to each obtained BIOS option; and the modification module is also used for modifying the found current option value of the corresponding BIOS option in the re-downloaded second configuration file by utilizing the editor according to the second current modification value corresponding to each BIOS option.
In an optional implementation manner of the second aspect, the determining module is specifically configured to obtain a current option value of each BIOS option in the second configuration file that is downloaded again; judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value; if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective; and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
In an optional implementation manner of the second aspect, the first current modification value is a first sequence value of the corresponding BIOS option, and the determining module is further configured to determine whether current option values of all BIOS options in the second configuration file are modified; the uploading module is also used for uploading the modified second configuration file to the substrate management controller after the modification is finished and restarting the server; the downloading module is also used for downloading the second configuration file again after the server is restarted; the judging module is further configured to judge whether the modification of each BIOS option in the re-downloaded second configuration file is valid; the obtaining module is further configured to sequentially obtain a second current modification value of each BIOS option according to the sequence of the plurality of candidate values of each BIOS option after determining that all BIOS options are valid; and the modification module is further used for modifying the current option value of the BIOS option in the second configuration file corresponding to the re-download by utilizing the second current modification value of the BIOS option obtained each time by utilizing the editor until the plurality of option values of all the BIOS options are obtained. In the embodiment designed above, the scheme uses the sequence of multiple candidate values of the BIOS option to sequentially obtain each candidate value and further modify the option value of the corresponding BIOS option in the second configuration file for multiple times, so that the modification process of the BIOS option can be automatically realized according to the sequence of the candidate values, and thus, when the server leaves the factory, full-automatic detection on the server can be realized by traversing and testing all candidate values in the BIOS option.
In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the method of the first aspect, any optional implementation manner of the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to perform the method of the first aspect, any optional implementation manner of the first aspect.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The embodiment of the present application provides a server configuration modification method, which can automatically modify values of each option of a Basic Input Output System (BIOS) of a server, as shown in fig. 1, and the server configuration modification method may include the following steps:
step S100: a first configuration file and a second configuration file of a BIOS of a server are obtained.
Step S110: and acquiring each BIOS option in the first configuration file and a first current modified value corresponding to each BIOS option.
Step S120: and searching the corresponding BIOS option in the second configuration file according to each obtained BIOS option.
Step S130: and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
In step S100, the first configuration file includes a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, where the plurality of BIOS options refer to a plurality of BIOS option names, for example, BIOS option A, BIOS option B, etc.; the candidate values corresponding to each BIOS option refer to a plurality of option values that can be changed corresponding to each BIOS option, for example, the BIOS option a has three options, the values of the three options are 3, 4, and 5, respectively, and then the three option values of 3, 4, and 5 are candidate values of the BIOS option a.
The second configuration file also includes the aforementioned multiple BIOS options, but the second configuration file includes a current option value of each BIOS option, where the current option value represents a value at which the BIOS option in the server is currently located, for example, the current option value selected by the aforementioned BIOS option a among the three options is 3.
It should be noted that, in a preferred embodiment, the present solution may log in the BMC web through an API interface to download the first configuration file and the second configuration file, where the first configuration file is a downloaded attribute registry json file in the actual application, and the second configuration file is a downloaded current setup base json file in the actual application.
In step S110, the present solution obtains each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, where each obtained BIOS option refers to obtaining a name of each BIOS option, for example, the aforementioned example BIOS option a and BIOS option B.
The first current modification value corresponding to each BIOS option is determined among a plurality of candidate values, wherein the manner of determining the first current modification value may be various, and as a possible implementation manner, one candidate value among the plurality of candidate values may be randomly selected as the first current modification value corresponding to the BIOS option; as another possible implementation, one candidate value of the plurality of candidate values of each BIOS option may be designated as the first current modified value of the corresponding BIOS option; as another possible implementation, the plurality of candidate values of the BIOS option have a certain order, for example, a descending order or a descending order, and the present solution may determine the largest or smallest candidate value as the first current modification value.
As a possible implementation, step S110 can also be implemented as follows: after the first configuration file is obtained, all BIOS options in the first configuration file can be saved as a first list, and then each BIOS option in the first configuration file and a plurality of corresponding candidate values are saved as a second list; then, each BIOS option in the first list can be obtained by traversing the first list, and then, under the condition of obtaining the BIOS options in the first list, a corresponding first current modification value can be determined in a plurality of candidate values corresponding to the second list according to the BIOS options.
After obtaining each BIOS option and the first current modification value corresponding to each BIOS option, the present solution performs step S120 to find the corresponding BIOS option in the second configuration file according to each BIOS option, as a possible implementation manner, according to the present application, the BIOS options with the same name may be retrieved and located in the second configuration file according to the name of each BIOS option, and then performs step S130 to modify the current option value of the found BIOS option to the corresponding first current modification value by using the editor, thereby automatically implementing modification of the current option value of the BIOS option in the second configuration file. The editor in step S130 may be a Stream Editor (SED).
In the server configuration modification method, the first configuration file and the second configuration file of the BIOS of the server are automatically acquired, then the first current modification value corresponding to each BIOS option and each BIOS option in the first configuration file are acquired, then the corresponding BIOS option is automatically searched in the second configuration file according to each acquired BIOS option, and the editor is used for automatically modifying or replacing the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option, so that the problem of low efficiency caused by manual modification of the BIOS options at present is solved, and the modification efficiency and accuracy of the option values of the BIOS configuration files of the server are improved.
In an optional implementation manner of this embodiment, after performing step S130 to modify the second configuration file, as shown in fig. 2, the scheme of this application may further perform the following steps:
step S200: and judging whether the current option values of all the BIOS options in the second configuration file are modified, if so, going to step S210.
Step S210: and uploading the modified second configuration file to the base plate management controller, and restarting the server.
Step S220: and after the server is restarted, the second configuration file is downloaded again.
Step S230: and judging whether the modification of each BIOS option in the re-downloaded second configuration file is effective, if not, going to the step S240.
Step S240: prompting to modify BIOS options that are not in effect.
In the above embodiment, in the present scheme, after modifying the current option values of all BIOS options in the second configuration file, the modified second configuration file may be uploaded to the BMC, and then the server is restarted, and after the server is restarted, the second configuration file is downloaded again, and then it is determined whether the modification of each BIOS option in the second configuration file is valid, and if there is a BIOS option that is not valid, it is prompted to modify the BIOS option that is not valid.
As a possible implementation manner, the determining whether the modification of each BIOS option in the re-downloaded second configuration file is valid in the foregoing step S230 may be implemented by the following manner, as shown in fig. 3, including:
step S300: and acquiring the current option value of each BIOS option in the second configuration file which is downloaded again.
Step S310: judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value, if not, turning to the step S320; if yes, go to step S330.
Step S320: and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
Step S330: and if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective.
In the above embodiment, in the present scheme, the current option value of each BIOS option in the re-downloaded second configuration file is compared with the first current modification value of the corresponding BIOS option, if the current option value of the BIOS option in the re-downloaded second configuration file is the same as the first current modification value of the corresponding BIOS option, it is determined that the modification of the corresponding BIOS option is valid, and if the current option value of the BIOS option in the re-downloaded second configuration file is not the same as the first current modification value of the corresponding BIOS option, it is determined that the modification of the corresponding BIOS option is not valid, thereby determining whether the modification of the BIOS option is valid.
As a possible implementation manner, in the case that the foregoing step S230 determines that all the modifications of the BIOS options in the newly downloaded configuration file are valid, the present solution may determine that the modification of the second configuration file is completed, that is, that no error occurs in the modification of all the BIOS options in the second configuration file.
As another possible implementation manner, in the case that it is determined in the foregoing step S230 that all the modifications of the BIOS options in the newly downloaded configuration file are valid, the present solution may further continue to change the BIOS options of the server by the following steps, as shown in fig. 4, including:
step S400: and acquiring each BIOS option in the first configuration file and a second current modified value corresponding to each BIOS option.
Step S410: and searching the corresponding BIOS option in the second configuration file which is downloaded again according to each obtained BIOS option.
Step S420: and modifying the current option value of the corresponding BIOS option in the searched second configuration file which is downloaded again by utilizing the editor according to the second current modified value corresponding to each BIOS option.
In the above step, the second current modification value corresponding to each BIOS option is different from the corresponding first current modification value, that is, when the option value of the BIOS option is modified for the second time, the selected current modification value is different from the current modification value selected at the time of the first modification.
Under the condition of obtaining the second current modification value corresponding to each BIOS option, the present solution is similar to the execution solution of the foregoing steps S120 to S130, that is, the BIOS options in the second configuration file are retrieved and positioned based on each BIOS option, and then the editor is used to modify or replace the current option value of the BIOS option found in the second configuration file downloaded again according to the second current value corresponding to each BIOS option, so that the second modification of the second configuration file is completed after all the BIOS options are modified.
In the embodiment designed above, the scheme automatically judges whether the modification of the second configuration file is effective, and prompts the BIOS options which are not effective, so that a test engineer can conveniently check the test result; and after the active modification mode takes effect, the second configuration file can be modified again, so that the active modification of the second configuration file is tested for many times, and the accuracy of the active modification mode is ensured.
As a possible implementation manner, the aforementioned plurality of candidate values describing the BIOS option may have a certain order, and the first current modification value is a first sequential value of the corresponding BIOS option, that is, a maximum or minimum candidate value, on this basis, the aforementioned second current modification value in the present application may be a next sequential value of the first current modification value, and after the second modification is performed on the second configuration file, the second configuration file may be modified for multiple times until the plurality of candidate values of the BIOS option are obtained. For example, the plurality of candidate values of the BIOS option a are 3, 4, and 5, respectively, and assuming that the minimum candidate value is used as the first current modification value, in this embodiment, the present solution first modifies the BIOS option a in the second configuration file based on the candidate value 3, after the first modification is completed and takes effect, modifies the BIOS option a in the second configuration file newly downloaded based on the candidate value 4 for the second time, and after the second modification is completed and takes effect, modifies the BIOS option a in the second configuration file newly downloaded again based on the candidate value 5 for the third time, thereby completing the whole modification process.
In the embodiment designed above, the scheme uses the sequence of multiple candidate values of the BIOS option to sequentially obtain each candidate value and further modify the option value of the corresponding BIOS option in the second configuration file for multiple times, so that the modification process of the BIOS option can be automatically realized according to the sequence of the candidate values, and thus, when the server leaves the factory, full-automatic detection on the server can be realized by traversing and testing all candidate values in the BIOS option.
Fig. 5 shows a schematic structural block diagram of an image continuous acquisition device provided by the present application, and it should be understood that the device corresponds to the method embodiment executed in fig. 1 to 4, and can execute the steps related to the foregoing method, and the specific functions of the device can be referred to the description above, and a detailed description is appropriately omitted here to avoid repetition. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 500, configured to obtain a first configuration file and a second configuration file of BIOS options of a server, where the first configuration file includes a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file includes a plurality of BIOS options and a current option value corresponding to each BIOS option; and; acquiring each BIOS option in a first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; a searching module 510, configured to search, according to each obtained BIOS option, a corresponding BIOS option in the second configuration file; and a modifying module 520, configured to modify, by using an editor, the current option value of the BIOS option corresponding to the searched second configuration file according to the first current modified value corresponding to each BIOS option.
In the server configuration modification device designed above, the scheme first automatically acquires a first configuration file and a second configuration file of the BIOS of the server, then acquires each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, then automatically searches for the corresponding BIOS option in the second configuration file according to each acquired BIOS option, and automatically modifies or replaces the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option by using an editor, so that it can be seen that the scheme of the application realizes the automatic modification of the BIOS option value in the BIOS configuration file of the server, thereby solving the problem of low efficiency caused by the manual modification of the BIOS option at present, and improving the modification efficiency and accuracy of the option value of the BIOS configuration file of the server.
In an optional implementation manner of this embodiment, the obtaining module 500 is specifically configured to store all BIOS options in the first configuration file as a first list; saving each BIOS option in the first configuration file and a plurality of corresponding option values as a second list; and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
In an optional implementation manner of this embodiment, the apparatus further includes a determining module 530, configured to determine whether current option values of all BIOS options in the second configuration file are modified; the uploading module 540 is configured to, after the modification is determined to be completed, upload the modified second configuration file to the substrate management controller, and restart the server; a downloading module 550, configured to re-download the second configuration file after the server is restarted; the determining module 530 is further configured to determine whether the modification of each BIOS option in the re-downloaded second configuration file is valid; and a prompting module 560, configured to prompt, when it is determined that there is a BIOS option whose modification is not in effect, a BIOS option whose modification is not in effect.
In an optional implementation manner of this embodiment, the apparatus further includes a determining module 570, configured to determine that the modification of the second configuration file is completed, in a case that it is determined that the modifications of all the BIOS options are in effect.
In an optional implementation manner of this embodiment, the obtaining module 500 is further configured to, under a condition that it is determined that all modifications of the BIOS options are valid, obtain each BIOS option in the first configuration file and a second current modification value corresponding to each BIOS option, where the second current modification value is determined in the plurality of candidate values, and the second current modification value is different from the first current modification value; the searching module 510 is further configured to search, according to each obtained BIOS option, a corresponding BIOS option in the second configuration file downloaded again; the modifying module 520 is further configured to modify, by using the editor, the current option value of the BIOS option corresponding to the found re-downloaded second configuration file according to the second current modified value corresponding to each BIOS option.
In an optional implementation manner of this embodiment, the determining module 530 is specifically configured to obtain a current option value of each BIOS option in the second configuration file downloaded again; judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value; if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective; and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
In an optional implementation manner of this embodiment, the first current modified value is a first sequence value of the corresponding BIOS option, and the determining module 530 is further configured to determine whether the current option values of all BIOS options in the second configuration file are modified; the uploading module 540 is further configured to, after the modification is completed, upload the modified second configuration file to the substrate management controller, and restart the server; the downloading module 550 is further configured to re-download the second configuration file after the server is restarted; the determining module 530 is further configured to determine whether the modification of each BIOS option in the re-downloaded second configuration file is valid; the obtaining module 500 is further configured to, after determining that all the BIOS options are valid, sequentially obtain a second current modification value of each BIOS option according to an order of the plurality of candidate values of each BIOS option; the modifying module 520 is further configured to modify, by using the editor, the current option value of the BIOS option in the second configuration file corresponding to the re-download by using the second current modified value of the BIOS option obtained each time until the multiple option values of all BIOS options are obtained.
As shown in fig. 6, the present application provides an electronic device 6 including: processor 601 and memory 602, processor 601 and memory 602 being interconnected and in communication with each other via communication bus 603 and/or other form of connection mechanism (not shown), memory 602 storing a computer program executable by processor 601, which computer program is executed by processor 601 when the computing device is running to perform the method of any of the alternative implementations, such as steps S100 to S130: acquiring a first configuration file and a second configuration file of a BIOS of a server; acquiring each BIOS option in a first configuration file and a first current modification value corresponding to each BIOS option; searching a corresponding BIOS option in a second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the preceding alternative implementations.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product which, when run on a computer, causes the computer to perform the method of any of the alternative implementations.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.