Redfish analog simulation method and device and electronic equipment

By using Redfish simulation method in server testing, simulation data files are generated and simulation simulation is performed, the problem of extended adaptation time and increased testing costs caused by the inconsistency of the test machine and the development environment is solved, and the effect of reducing hardware and maintenance costs is achieved.

CN119645749APending Publication Date: 2025-03-18BEIJING TIANDI CHAOYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411890424.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When conducting server testing, since the test machine and the development environment are not together, the test machine needs to be seconded and transported, resulting in extended adaptation time and increased testing costs.

Method used

The simulation data collector obtains the data to be called, generates a simulation data file, and determines the BMC information when starting the simulation service. When receiving the Redfish call instruction, the Redfish is simulated and simulated based on the BMC information and simulation data file.

Benefits of technology

This method replaces real hardware through virtualized environments, significantly reducing hardware and maintenance costs and improving development and testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645749A_ABST
    Figure CN119645749A_ABST
Patent Text Reader

Abstract

The invention provides a Redfish analog simulation method, a Redfish analog simulation device and electronic equipment. The Redfish analog simulation method comprises the following steps: acquiring to-be-called data required by an analog service; collecting actual operation data corresponding to the to-be-called data through a simulation data collector; generating a simulation data file according to the actual operation data; when the simulation service is started, determining BMC information corresponding to the simulation data file through the simulation service; and when a Redfish calling instruction is received, carrying out analogue simulation on Redfish according to the BMC information and the simulation data file. According to the method, real hardware can be replaced by a virtualized environment through an analog simulation method, so that the hardware and maintenance cost is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server testing, and in particular to a Redfish simulation method, device and electronic equipment. Background Art

[0002] The baseboard management controller (BMC) is the baseboard management controller of the server. The BMC contains hardware interfaces (LAN / Serial) and software (Firmware / Linux). Redfish is a software service included in the BMC. It is an open industry standard specification that provides simple, modern and secure management functions for scalable platform hardware. The present invention relates to simulating and implementing the Redfish service in the BMC through software, and providing asset data of the server, device control, and data acquisition of the server operation status through the service protocol interface of Redfish.

[0003] After the popularization of the unified management interface specification based on Redfish, the use of the server intelligent management platform to uniformly manage servers can improve the efficiency of server management and operation and maintenance. Because there will be servers of different manufacturers and models connected to the management platform, it will cause a lot of adaptation, development and testing work brought by the management platform. And when performing these adaptation and testing work, it is also necessary to provide a test machine for testing and connect to the real server. However, usually, the test machine and the development environment are not together, so it is necessary to borrow and transport the test model, which will lead to longer adaptation time and increased testing costs. Summary of the invention

[0004] The purpose of the present invention is to provide a Redfish simulation method, device and electronic equipment to alleviate the technical problem that the test machine and the development environment are not together, so the test machine needs to be borrowed and transported, which will lead to prolonged adaptation time and increased test costs, so as to reduce the test cost.

[0005] In a first aspect, an embodiment of the present invention provides a Redfish simulation method, comprising: obtaining data to be called required by a simulation service; collecting actual operation data corresponding to the data to be called through a simulation data collector; generating a simulation data file according to the actual operation data; when starting the simulation service, determining BMC information corresponding to the simulation data file through the simulation service; when receiving a Redfish call instruction, simulating Redfish according to the BMC information and the simulation data file.

[0006] In a preferred embodiment of the present invention, after the step of generating a simulation data file according to the actual operation data, the method comprises: importing a development and test environment, and generating call configuration data according to the simulation data file; when a Redfish call instruction is received, simulating Redfish according to the BMC information and the simulation data file, the method comprises: when a Redfish call instruction is received, starting a service port according to the BMC information; querying the target configuration data corresponding to the simulation data file in the call configuration data; simulating Redfish according to the target configuration data.

[0007] In a preferred embodiment of the present invention, after the step of generating calling configuration data according to the above-mentioned simulation data file, the above-mentioned method includes: judging the missing data of the simulation data in the above-mentioned simulation data file according to the preset simulation data file integrity judgment parameters; querying the above-mentioned missing data from the system data of the operating system through a preset configuration interface, and storing the above-mentioned missing data in the above-mentioned calling configuration data to obtain the supplemented calling configuration data; storing the above-mentioned supplemented calling configuration data in a preset configuration database.

[0008] In a preferred embodiment of the present invention, the step of simulating Redfish according to the target configuration data includes: receiving simulation result data returned by the service port according to the target configuration data; and determining the simulation result of Redfish according to the simulation result data.

[0009] In a preferred embodiment of the present invention, the step of collecting the actual operation data corresponding to the above-mentioned data to be called by simulating the data collector includes: traversing and calling Redfish data by simulating the data collector, collecting the response data, calling path and calling method corresponding to the above-mentioned data to be called.

[0010] In a preferred embodiment of the present invention, the data format of the above-mentioned data to be called is JSON.

[0011] In a preferred embodiment of the present invention, the step of collecting the actual operation data corresponding to the above-mentioned data to be called through a simulation data collector includes: collecting the URL address of the current page corresponding to the above-mentioned data to be called and the sub-path of the above-mentioned URL address through a simulation data collector to collect the above-mentioned actual operation data.

[0012] In a second aspect, an embodiment of the present invention provides a Redfish simulation device, comprising: a data acquisition module, used to acquire the to-be-called data required for the simulation service; collect the actual operation data corresponding to the above-mentioned to-be-called data through a simulation data collector; a file generation module, used to generate a simulation data file according to the above-mentioned actual operation data; an information determination module, used to determine the BMC information corresponding to the above-mentioned simulation data file through the simulation service when the simulation service is started; and a simulation module, used to simulate Redfish according to the above-mentioned BMC information and the above-mentioned simulation data file when a Redfish call instruction is received.

[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions according to the method.

[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the method when executed by a processor.

[0015] The embodiments of the present invention have the following beneficial technical effects:

[0016] The embodiment of the present invention provides a Redfish simulation method, device and electronic device, including: obtaining the to-be-called data required for the simulation service; collecting the actual operation data corresponding to the to-be-called data through a simulation data collector; generating a simulation data file based on the actual operation data; when starting the simulation service, determining the BMC information corresponding to the simulation data file through the simulation service; when receiving a Redfish call instruction, simulating Redfish based on the BMC information and the simulation data file. The method can use a virtualized environment to replace real hardware through a simulation method, thereby greatly reducing the cost of hardware and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic diagram of a Redfish simulation method provided by an embodiment of the present invention;

[0019] Figure 2A schematic diagram of a flow chart of another Redfish simulation method provided by an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of the structure of a Redfish simulation device provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0022] Icons: 31 - data acquisition module; 32 - file generation module; 33 - information determination module; 34 - simulation module; 41 - memory; 42 - processor; 43 - bus; 44 - communication interface. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0024] After the popularization of the unified management interface specification based on Redfish, the use of the server intelligent management platform to uniformly manage servers can improve the efficiency of server management and operation and maintenance. Because there will be servers of different manufacturers and models connected to the management platform, it will cause a lot of adaptation, development and testing work brought by the management platform. And when performing these adaptation and testing work, it is also necessary to provide a test machine for testing and connect to the real server. However, usually, the test machine and the development environment are not together, so it is necessary to borrow and transport the test model, which will lead to longer adaptation time and increased testing costs.

[0025] Based on this, the embodiment of the present invention provides a Redfish simulation method, device and electronic device, which can use a virtualized environment to replace real hardware through a simulation method, thereby greatly reducing the cost of hardware and maintenance. For ease of understanding, a Redfish simulation method is first introduced in detail.

[0026] Example 1

[0027] In this embodiment, Figure 1 A schematic diagram of a flow chart of a Redfish simulation method provided by an embodiment of the present invention.

[0028] Depend on Figure 1 As can be seen, the method includes:

[0029] Step S101: Obtain the data to be called required for the simulation service.

[0030] Step S102: Collecting actual operation data corresponding to the above-mentioned data to be called through a simulation data collector.

[0031] In this embodiment, the data to be called required by the simulation service is collected through a simulation data collector. This collector runs in the real environment where the server is located and is generated based on the actual operating data of the real server. This allows the data of the simulation service to be real and also avoids the need to enter too much data, thus achieving a convenient process.

[0032] Step S103: Generate a simulation data file based on the above actual operation data.

[0033] Here, after the simulation data file is generated, the exported data file is imported into the development and test environment. This will generate the simulated data of the simulation call into the call configuration database, which is convenient for subsequent research.

[0034] Step S104: when the simulation service is started, the BMC information corresponding to the simulation data file is determined through the simulation service.

[0035] In this embodiment, when the simulation service is started, the manufacturer and model of the BMC that the simulator is simulating will be bound, and the HTTP service port will also be started. When a Redfish call is received, the method will be called according to the request address, the configuration will be searched in the configuration database, and then the corresponding response will be made, so that Redfish can be simulated.

[0036] Step S105: When a Redfish call instruction is received, Redfish is simulated according to the BMC information and the simulation data file.

[0037] The embodiment of the present invention provides a Redfish simulation method, including: obtaining the to-be-called data required for the simulation service; collecting the actual operation data corresponding to the to-be-called data through a simulation data collector; generating a simulation data file according to the actual operation data; when starting the simulation service, determining the BMC information corresponding to the simulation data file through the simulation service; when receiving a Redfish call instruction, simulating Redfish according to the BMC information and the simulation data file. The method can use a virtualized environment to replace real hardware through a simulation method, thereby greatly reducing the cost of hardware and maintenance.

[0038] Example 2

[0039] Figure 2 A flowchart of another Redfish simulation method provided by an embodiment of the present invention.

[0040] Depend on Figure 2 As can be seen, the method includes:

[0041] Step S201: Obtain the data to be called required for the simulation service.

[0042] Step S202: Collect the actual operation data corresponding to the above-mentioned data to be called through the simulation data collector.

[0043] Step S203: Generate a simulation data file based on the above actual operation data.

[0044] Step S204: importing the development and testing environment, and generating call configuration data according to the above simulation data file.

[0045] Step S205: when the simulation service is started, the BMC information corresponding to the simulation data file is determined through the simulation service.

[0046] Step S206: When the Redfish call instruction is received, the service port is started according to the above BMC information.

[0047] Step S207: In the above-mentioned calling configuration data, query the target configuration data corresponding to the above-mentioned simulation data file.

[0048] Step S208: simulating Redfish according to the target configuration data.

[0049] In this embodiment, after the step of generating calling configuration data according to the above-mentioned simulation data file, the above-mentioned method includes: judging the missing data of the simulation data in the above-mentioned simulation data file according to the preset simulation data file integrity judgment parameters; querying the above-mentioned missing data from the system data of the operating system through a preset configuration interface, and storing the above-mentioned missing data in the above-mentioned calling configuration data to obtain the supplemented calling configuration data; storing the above-mentioned supplemented calling configuration data in a preset configuration database.

[0050] Furthermore, the step of simulating Redfish according to the target configuration data includes: receiving simulation result data returned by the service port according to the target configuration data; and determining the simulation result of Redfish according to the simulation result data.

[0051] Furthermore, the step of collecting actual operation data corresponding to the above-mentioned data to be called through the simulation data collector includes: traversing and calling Redfish data through the simulation data collector, collecting response data, calling path and calling method corresponding to the above-mentioned data to be called.

[0052] Furthermore, the data format of the above data to be called is JSON.

[0053] Furthermore, the step of collecting the actual operation data corresponding to the above-mentioned data to be called through the simulation data collector includes: collecting the URL address of the current page corresponding to the above-mentioned data to be called and the sub-path of the above-mentioned URL address through the simulation data collector to collect the above-mentioned actual operation data.

[0054] The embodiment of the present invention provides a Redfish simulation method, including: obtaining the to-be-called data required for the simulation service; collecting the actual operation data corresponding to the above-mentioned to-be-called data through a simulation data collector; generating a simulation data file according to the above-mentioned actual operation data; importing the development and testing environment, and generating call configuration data according to the above-mentioned simulation data file; when starting the simulation service, determining the BMC information corresponding to the above-mentioned simulation data file through the simulation service; when receiving the Redfish call instruction, starting the service port according to the above-mentioned BMC information; in the above-mentioned call configuration data, querying the target configuration data corresponding to the above-mentioned simulation data file; simulating Redfish according to the above-mentioned target configuration data. The method reduces the demand for physical equipment through virtualization, improves the efficiency of development and testing, flexibly utilizes resources, reduces risks, is easy to expand and maintain, ensures data consistency and accuracy, and thus significantly reduces costs.

[0055] Example 3

[0056] Based on the above embodiments, Figure 3 A schematic diagram of the structure of a Redfish simulation device provided by an embodiment of the present invention.

[0057] Depend on Figure 3 As can be seen, the device includes:

[0058] The data acquisition module 31 is used to acquire the to-be-called data required for the simulation service; and to collect the actual operation data corresponding to the to-be-called data through the simulation data collector.

[0059] The file generating module 32 is used to generate a simulation data file according to the above-mentioned actual operation data.

[0060] The information determination module 33 is used to determine the BMC information corresponding to the simulation data file through the simulation service when the simulation service is started.

[0061] The simulation module 34 is used to simulate Redfish according to the BMC information and the simulation data file when receiving the Redfish call instruction.

[0062] Among them, the data acquisition module 31, the file generation module 32, the information determination module 33 and the simulation module 34 are connected in sequence.

[0063] The Redfish simulation device provided in the embodiment of the present invention has the same technical features as the Redfish simulation method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the above method embodiment, and will not be repeated here.

[0064] Example 4

[0065] This embodiment provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the Redfish simulation method.

[0066] This embodiment provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the Redfish simulation method are implemented.

[0067] See also Figure 4 The structure diagram of an electronic device shown in the figure includes: a memory 41 and a processor 42. The memory 41 stores a computer program that can be run on the processor 42. When the processor executes the computer program, the steps provided by the above-mentioned Redfish simulation method are implemented.

[0068] like Figure 4 As shown, the device further includes: a bus 43 and a communication interface 44, a processor 42, a communication interface 44 and a memory 41 are connected via the bus 43; the processor 42 is used to execute executable modules stored in the memory 41, such as computer programs.

[0069] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 44 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0070] The bus 43 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0071] Among them, the memory 41 is used to store the program, and the processor 42 executes the program after receiving the execution instruction. The method performed by the Redfish simulation device disclosed in any embodiment of the present invention can be applied to the processor 42, or implemented by the processor 42. The processor 42 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 42. The above-mentioned processor 42 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 42 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.

[0072] Furthermore, an embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 42, the machine-executable instructions prompt the processor 42 to implement the above-mentioned Redfish simulation method.

[0073] The electronic device and computer-readable storage medium provided by the embodiments of the present invention have the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0074] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0075] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

Claims

1. A Redfish simulation method, characterized in that: include: Get the data to be called required by the simulation service; Collecting actual operation data corresponding to the data to be called by means of a simulation data collector; Generate a simulation data file according to the actual operation data; When the simulation service is started, the BMC information corresponding to the simulation data file is determined through the simulation service; When a Redfish call instruction is received, Redfish is simulated according to the BMC information and the simulation data file.

2. The Redfish simulation method according to claim 1, characterized in that: After the step of generating a simulation data file according to the actual operation data, the method comprises: Importing the development and testing environment, and generating call configuration data according to the simulation data file; When a Redfish call instruction is received, the step of simulating Redfish according to the BMC information and the simulation data file includes: When a Redfish call instruction is received, the service port is started according to the BMC information; In the calling configuration data, querying the target configuration data corresponding to the simulation data file; According to the target configuration data, Redfish is simulated.

3. The Redfish simulation method according to claim 2, characterized in that: After the step of generating call configuration data according to the simulation data file, the method comprises: Determine the missing data of the simulation data in the simulation data file according to the preset simulation data file integrity judgment parameter; Through a preset configuration interface, query the missing data from the system data of the operating system, and store the missing data in the calling configuration data to obtain supplemented calling configuration data; The supplemented calling configuration data is stored in a preset configuration database.

4. The Redfish simulation method according to claim 2, characterized in that: The step of simulating Redfish according to the target configuration data includes: According to the target configuration data, receiving the simulation result data returned by the service port; According to the simulation result data, the simulation result of Redfish is determined.

5. The Redfish simulation method according to claim 1, characterized in that: The step of collecting the actual operation data corresponding to the data to be called by the simulation data collector includes: By simulating the data collector's data traversal call to Redfish, the response data, call path and call method corresponding to the data to be called are collected.

6. The Redfish simulation method according to claim 1, characterized in that: The data format of the data to be called is JSON.

7. The Redfish simulation method according to claim 1, characterized in that: The step of collecting the actual operation data corresponding to the data to be called by the simulation data collector includes: The URL address of the current page corresponding to the data to be called and the sub-path of the URL address are collected through a simulation data collector to collect the actual operation data.

8. A Redfish simulation device, characterized in that: include: A data acquisition module is used to obtain the data to be called required by the simulation service; Collecting actual operation data corresponding to the data to be called by means of a simulation data collector; A file generation module, used to generate a simulation data file according to the actual operation data; An information determination module, used for determining the BMC information corresponding to the simulation data file through the simulation service when the simulation service is started; The simulation module is used to simulate Redfish according to the BMC information and the simulation data file when receiving a Redfish call instruction.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.