A VNF testing method, apparatus, and computer-readable storage medium
By modeling the test function as part of the VNF under test and automatically building the test topology using VNF packages, the problem of complex processes in traditional VNF testing solutions is solved. This achieves synchronous compatibility and automated deployment of the test function and the function under test, thereby improving testing efficiency.
Patent Information
- Application Number
- CN202111589631.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2041-12-23
AI Technical Summary
In traditional VNF testing solutions, the deployment of VNFs, the deployment of testing tools, the configuration of test topologies, and the synchronization of test cases are separated, requiring manual operation, which is complex and inefficient.
The test function is modeled as part of the VNF under test. The required resource parameters and test case scripts are encapsulated in the VNF package. The test topology is automatically built using the Virtual Network (VL) and the test topology configuration is automatically completed through VNF instantiation. This supports the identification and deployment filtering of test functions and simplifies the manual construction process.
It achieves synchronous compatibility between the testing function and the function under test, automates the test topology construction and deployment process, improves testing efficiency, and supports flexible switching of test deployment scenarios.
Smart Images

Figure CN116346684B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile communication technology, and in particular to a virtual network function (VNF) testing method, apparatus, and computer-readable storage medium. Background Technology
[0002] In traditional VNF testing implementations, after the VNF is deployed, it needs to be tested using testing tools or instruments. The testing process requires manual configuration of the test topology between the VNF and the instrument. When relying on hardware testing tools, most test scenarios only require attention to the test configuration. With the virtualization of network functions, the form of instruments or tools is also changing. Software-based testing tools can be flexibly deployed for testing in different scenarios, which requires additional workload for testing tool deployment. Furthermore, when the tested VNF's functions are iterated, updated, or added, the test cases of the testing tools also need to be updated synchronously.
[0003] It is evident that in traditional VNF testing solutions, the deployment of VNFs, the deployment of testing tools, the configuration of test topologies, and the synchronization of test cases are all separate steps, and most of these steps require manual intervention, resulting in complex processes and low testing efficiency. Summary of the Invention
[0004] In view of this, embodiments of the present invention aim to provide a VNF testing method, apparatus, and computer-readable storage medium.
[0005] To achieve the above objectives, the technical solution of this invention is implemented as follows:
[0006] This invention provides a method for testing Virtual Network Functions (VNFs), the method comprising:
[0007] Generate the VNF packet corresponding to the VNF under test;
[0008] The VNF packet is sent to the Virtual Network Function Manager (VNFM) for instantiation;
[0009] The VNF packet includes at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC.
[0010] The connection point of the first VNFC and the connection point of the VNFC of the VNF under test are connected through a virtual network (VL) to form a test topology.
[0011] The method for generating the VNF packet corresponding to the VNF under test includes:
[0012] The resource parameters required for testing and the test case execution scripts are encapsulated in the first VNFC.
[0013] In one embodiment of the present invention, the first indication information includes:
[0014] VNF template extended field: VDU test resource testVduResouce, used to indicate that the VNF template contains a virtual deployment unit (VDU) corresponding to the first VNFC;
[0015] VNF Instantiation Interface Extended Field: InstantiationMode, used to indicate whether the first VNFC is started during instantiation.
[0016] The method for instantiating the VNF package includes:
[0017] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates the start of the first VNFC;
[0018] The VNF packet is parsed, and all VNFCs in the VNF packet, including the first VNFC, are instantiated and deployed.
[0019] Optionally, when instantiating the VNF package, the method further includes:
[0020] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates that the first VNFC should not be started;
[0021] Filter out the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU;
[0022] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0023] Optionally, when instantiating the VNF package, the method further includes:
[0024] If it is determined that the VNF packet does not carry the VNF instantiation interface extension field InstantiationMode, then parse the VNF packet.
[0025] When it is determined that the VNF packet carries the VNF template extension field testVduResouce, the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU, are filtered out.
[0026] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0027] Optionally, when it is determined that the VNF package does not carry the VNF template extension field testVduResouce, the method further includes:
[0028] Instantiate and deploy all VNFCs in the VNF package, excluding the first VNFC.
[0029] In another embodiment of the present invention, the first indication information includes:
[0030] The DeploymentFlavour indicates the list of VDUs required, as well as the maximum and minimum number of instances that can be instantiated for each VDU.
[0031] The instantiation level corresponding to the DeploymentFlavour indicates the list of VDUs included in the deployment at this instantiation level, as well as the number of instantiations of each VDU; the instantiation level includes: non-test mode and test mode.
[0032] Specifically, when it is determined that VNF needs to be tested, the VNF package is instantiated, including:
[0033] Receive an instantiation request message for the test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level of the test mode;
[0034] Deploy the VNF based on the instantiation request message of the test deployment mode, and instantiate all VNFCs in the VNF packet, including the first VNFC.
[0035] Specifically, upon confirming the completion of the VNF test, the VNF package is instantiated, including:
[0036] Delete the deployed VNF;
[0037] Receive an instantiation request message for a non-test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level for the non-test mode.
[0038] Deploy the VNF based on the instantiation request message in the non-test deployment mode, and instantiate all VNFCs in the VNF packet except for the first VNFC.
[0039] Specifically, upon confirming the completion of the VNF test, the VNF package is instantiated, including:
[0040] Receive VNF specification change request message;
[0041] The first VNFC was removed by changing the specification flavor.
[0042] This invention also provides a Virtual Network Function (VNF) testing device, which includes:
[0043] The configuration module is used to generate the VNF packet corresponding to the VNF under test;
[0044] The processing module is used to send the VNF packet to the Virtual Network Function Manager (VNFM) for instantiation;
[0045] The VNF packet includes at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC.
[0046] This invention also provides a Virtual Network Function (VNF) testing device, which includes a processor and a memory for storing computer programs that can run on the processor.
[0047] When the processor runs the computer program, it executes the steps of the above method.
[0048] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0049] The VNF testing method, apparatus, and computer-readable storage medium provided in this invention generate a VNF packet corresponding to the VNF under test; the VNF packet is sent to a Virtual Network Function Manager (VNFM) for instantiation; wherein, the VNF packet includes: at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC. This invention models the test function as part of the VNF under test. Since the core function of the VNF under test is delivered together with the test function, the test cases of the test function are compatible and synchronized with the function under test; simultaneously, the test network is modeled using VL between VNFCs, and the test topology is automatically completed through VNF instantiation, simplifying the manual construction process of the test topology. Furthermore, the solution of this invention can flexibly support the identification of test functions and the filtering function for test function deployment, enabling automatic chaining of the deployment test process, while also being flexibly compatible with existing VNF deployment operations, making the entire deployment test process more flexible. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the VNF testing method described in an embodiment of the present invention;
[0051] Figure 2 This is a schematic diagram of the VNF testing device according to an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of the VNF testing scheme described in an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of the VNFC components inside a VNF;
[0054] Figure 5 The test function described in the scenario embodiment of the present invention is modeled as a VNFC schematic diagram of the VNF under test;
[0055] Figure 6 This is a schematic diagram of the automatic deployment and testing process of VNF as described in Scheme 1 of the present invention.
[0056] Figure 7 This is a configuration example of DeploymentFlavour as described in Scheme 2 of the present invention. Detailed Implementation
[0057] The present invention will now be described in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present application will now be described in detail with reference to the accompanying drawings and embodiments.
[0058] This invention provides a method for testing Virtual Network Functions (VNFs), such as... Figure 1 As shown, the method includes:
[0059] Step 101: Generate the VNF packet corresponding to the VNF under test;
[0060] Step 102: Send the VNF packet to the Virtual Network Function Manager (VNFM) for instantiation;
[0061] The VNF packet includes at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC.
[0062] In this embodiment of the invention, the connection point of the first VNFC and the connection point of the VNFC of the VNF under test are connected through a virtual network (VL) to form a test topology.
[0063] Here, the test topology is automatically built through VNF instantiation, which simplifies the manual configuration process of the test topology. Furthermore, since the core VNFC of the VNF under test and the test function VNFC are provided together when the VNF is provided in combination, the problem of needing to manually synchronize the test function when the VNF under test is upgraded is solved.
[0064] In this embodiment of the invention, the method for generating the VNF packet corresponding to the VNF under test includes:
[0065] The resource parameters required for testing and the test case execution scripts are encapsulated in the first VNFC.
[0066] In this embodiment of the invention, the first indication information includes:
[0067] VNF template extended field: VDU test resource testVduResouce, used to indicate that the VNF template contains a virtual deployment unit (VDU) corresponding to the first VNFC;
[0068] VNF Instantiation Interface Extended Field: InstantiationMode, used to indicate whether the first VNFC is started during instantiation.
[0069] In one embodiment of the present invention, the method for instantiating the VNF package includes:
[0070] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates the start of the first VNFC;
[0071] The VNF packet is parsed, and all VNFCs in the VNF packet, including the first VNFC, are instantiated and deployed.
[0072] In this embodiment of the invention, when instantiating the VNF package, the method further includes:
[0073] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates that the first VNFC should not be started;
[0074] Filter out the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU;
[0075] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0076] In one embodiment of the present invention, when instantiating the VNF package, the method further includes:
[0077] If it is determined that the VNF packet does not carry the VNF instantiation interface extension field InstantiationMode, then parse the VNF packet.
[0078] When it is determined that the VNF packet carries the VNF template extension field testVduResouce, the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU, are filtered out.
[0079] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0080] In this embodiment of the invention, when it is determined that the VNF packet does not carry the VNF template extension field testVduResouce, the method further includes:
[0081] Instantiate and deploy all VNFCs in the VNF package, excluding the first VNFC.
[0082] Here, by configuring the extended fields of the VNF template and the extended fields of the VNF instantiation interface, we can flexibly support the identification and filtering of test functions on the basis of the original standard template, and achieve flexible configuration of deployment mode.
[0083] In this embodiment of the invention, the first indication information includes:
[0084] The DeploymentFlavour indicates the list of VDUs required, as well as the maximum and minimum number of instances that can be instantiated for each VDU.
[0085] The instantiation level corresponding to the DeploymentFlavour indicates the list of VDUs included in the deployment at this instantiation level, as well as the number of instantiations of each VDU; the instantiation level includes: non-test mode and test mode.
[0086] In one embodiment of the present invention, when it is determined that a VNF needs to be tested, the VNF packet is instantiated, including:
[0087] Receive an instantiation request message for the test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level of the test mode;
[0088] Deploy the VNF based on the instantiation request message of the test deployment mode, and instantiate all VNFCs in the VNF packet, including the first VNFC.
[0089] In one embodiment of the present invention, when it is determined that the test on the VNF is completed, instantiating the VNF packet includes:
[0090] Delete the deployed VNF;
[0091] Receive an instantiation request message for a non-test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level for the non-test mode.
[0092] Deploy the VNF based on the instantiation request message in the non-test deployment mode, and instantiate all VNFCs in the VNF packet except for the first VNFC.
[0093] In one embodiment of the present invention, when it is determined that the test on the VNF is completed, instantiating the VNF packet includes:
[0094] Receive VNF specification change request message;
[0095] The first VNFC was removed by changing the specification flavor.
[0096] Here, by configuring different instantiateLevels of DeploymentFlavor, it is possible to select or switch different instantiateLevels of DeploymentFlavor, so as to flexibly support test deployment scenarios and normal deployment scenarios, as well as the switching of different usage scenarios, reduce human intervention, and simplify deployment, testing processes and steps.
[0097] To implement the above method embodiments, this invention also provides a Virtual Network Function (VNF) testing device, such as... Figure 2 As shown, the device includes:
[0098] Configuration module 201 is used to generate the VNF packet corresponding to the VNF under test;
[0099] Processing module 202 is used to send the VNF packet to the Virtual Network Function Manager (VNFM) for instantiation;
[0100] The VNF packet includes at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC.
[0101] In this embodiment of the invention, the connection point of the first VNFC and the connection point of the VNFC of the VNF under test are connected through a virtual network (VL) to form a test topology.
[0102] In this embodiment of the invention, when the configuration module 201 generates the VNF packet corresponding to the VNF under test, it is used to encapsulate the resource parameters required for testing and the test case execution script in the first VNF.
[0103] In this embodiment of the invention, the first indication information includes:
[0104] VNF template extended field: VDU test resource testVduResouce, used to indicate that the VNF template contains a virtual deployment unit (VDU) corresponding to the first VNFC;
[0105] VNF Instantiation Interface Extended Field: InstantiationMode, used to indicate whether the first VNFC is started during instantiation.
[0106] In one embodiment of the present invention, when the processing module 202 instantiates the VNF packet, it is used to...
[0107] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates the start of the first VNFC;
[0108] The VNF packet is parsed, and all VNFCs in the VNF packet, including the first VNFC, are instantiated and deployed.
[0109] In this embodiment of the invention, when the processing module 202 instantiates the VNF packet, it is also used for
[0110] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates that the first VNFC should not be started;
[0111] Filter out the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU;
[0112] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0113] In one embodiment of the present invention, when the processing module 202 instantiates the VNF packet, it is further used to...
[0114] If it is determined that the VNF packet does not carry the VNF instantiation interface extension field InstantiationMode, then parse the VNF packet.
[0115] When it is determined that the VNF packet carries the VNF template extension field testVduResouce, the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU, are filtered out.
[0116] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0117] In this embodiment of the invention, when the processing module 202 determines that the VNF package does not carry the VNF template extension field testVduResouce, it is further used to instantiate and deploy all VNFCs in the VNF package, wherein the VNF package does not include the first VNFC.
[0118] In this embodiment of the invention, the first indication information includes:
[0119] The DeploymentFlavour indicates the list of VDUs required, as well as the maximum and minimum number of instances that can be instantiated for each VDU.
[0120] The instantiation level corresponding to the DeploymentFlavour indicates the list of VDUs included in the deployment at this instantiation level, as well as the number of instantiations of each VDU; the instantiation level includes: non-test mode and test mode.
[0121] In one embodiment of the present invention, when the processing module 202 determines that a VNF needs to be tested, it instantiates the VNF packet and is further used for...
[0122] Receive an instantiation request message for the test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level of the test mode;
[0123] Deploy the VNF based on the instantiation request message of the test deployment mode, and instantiate all VNFCs in the VNF packet, including the first VNFC.
[0124] In one embodiment of the present invention, when the processing module 202 determines that the test of the VNF is complete, it instantiates the VNF packet and is further used for...
[0125] Delete the deployed VNF;
[0126] Receive an instantiation request message for a non-test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level for the non-test mode.
[0127] Deploy the VNF based on the instantiation request message in the non-test deployment mode, and instantiate all VNFCs in the VNF packet except for the first VNFC.
[0128] In one embodiment of the present invention, when the processing module 202 determines that the test of the VNF is completed, it instantiates the VNF packet, including:
[0129] Receive VNF specification change request message;
[0130] The first VNFC was removed by changing the specification flavor.
[0131] This invention also provides a VNF testing apparatus, which includes: a processor and a memory for storing computer programs capable of running on the processor.
[0132] When the processor runs the computer program, it performs the following:
[0133] Generate the VNF packet corresponding to the VNF under test;
[0134] The VNF packet is sent to the Virtual Network Function Manager (VNFM) for instantiation;
[0135] The VNF packet includes at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC.
[0136] The connection point of the first VNFC and the connection point of the VNFC of the VNF under test are connected through a virtual network (VL) to form a test topology.
[0137] When generating the VNF packet corresponding to the VNF under test, the processor is also used to execute the following when running the computer program:
[0138] The resource parameters required for testing and the test case execution scripts are encapsulated in the first VNFC.
[0139] The first indication information includes:
[0140] VNF template extended field: VDU test resource testVduResouce, used to indicate that the VNF template contains a virtual deployment unit (VDU) corresponding to the first VNFC;
[0141] VNF Instantiation Interface Extended Field: InstantiationMode, used to indicate whether the first VNFC is started during instantiation.
[0142] When the VNF package is instantiated, the processor is also used to execute the following when running the computer program:
[0143] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates the start of the first VNFC;
[0144] The VNF packet is parsed, and all VNFCs in the VNF packet, including the first VNFC, are instantiated and deployed.
[0145] When the VNF package is instantiated, the processor is also used to execute the following when running the computer program:
[0146] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates that the first VNFC should not be started;
[0147] Filter out the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU;
[0148] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0149] When the VNF package is instantiated, the processor is also used to execute the following when running the computer program:
[0150] If it is determined that the VNF packet does not carry the VNF instantiation interface extension field InstantiationMode, then parse the VNF packet.
[0151] When it is determined that the VNF packet carries the VNF template extension field testVduResouce, the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU, are filtered out.
[0152] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0153] When it is determined that the VNF package does not carry the VNF template extension field testVduResouce, and the processor is also used to run the computer program, it executes:
[0154] Instantiate and deploy all VNFCs in the VNF package, excluding the first VNFC.
[0155] The first indication information includes:
[0156] The DeploymentFlavour indicates the list of VDUs required, as well as the maximum and minimum number of instances that can be instantiated for each VDU.
[0157] The instantiation level corresponding to the DeploymentFlavour indicates the list of VDUs included in the deployment at this instantiation level, as well as the number of instantiations of each VDU; the instantiation level includes: non-test mode and test mode.
[0158] When it is determined that a VNF needs to be tested, the VNF package is instantiated. When the processor is also used to run the computer program, it executes:
[0159] Receive an instantiation request message for the test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level of the test mode;
[0160] Deploy the VNF based on the instantiation request message of the test deployment mode, and instantiate all VNFCs in the VNF packet, including the first VNFC.
[0161] When the test of the VNF is completed, the VNF package is instantiated. The processor is also used to execute the following when running the computer program:
[0162] Delete the deployed VNF;
[0163] Receive an instantiation request message for a non-test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level for the non-test mode.
[0164] Deploy the VNF based on the instantiation request message in the non-test deployment mode, and instantiate all VNFCs in the VNF packet except for the first VNFC.
[0165] When the test of the VNF is completed, the VNF package is instantiated. The processor is also used to execute the following when running the computer program:
[0166] Receive VNF specification change request message;
[0167] The first VNFC was removed by changing the specification flavor.
[0168] It should be noted that the device provided in the above embodiments is only illustrated by the division of the above program modules when performing VNF testing. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the device provided in the above embodiments and the corresponding method embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0169] In an exemplary embodiment, the present invention also provides a computer-readable storage medium, which may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM; or it may be a device including one or any combination of the above-mentioned memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.
[0170] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the following:
[0171] Generate the VNF packet corresponding to the VNF under test;
[0172] The VNF packet is sent to the Virtual Network Function Manager (VNFM) for instantiation;
[0173] The VNF packet includes at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC.
[0174] The connection point of the first VNFC and the connection point of the VNFC of the VNF under test are connected through a virtual network (VL) to form a test topology.
[0175] When generating the VNF packet corresponding to the VNF under test, the computer program, when executed by the processor, also performs the following:
[0176] The resource parameters required for testing and the test case execution scripts are encapsulated in the first VNFC.
[0177] The first indication information includes:
[0178] VNF template extended field: VDU test resource testVduResouce, used to indicate that the VNF template contains a virtual deployment unit (VDU) corresponding to the first VNFC;
[0179] VNF Instantiation Interface Extended Field: InstantiationMode, used to indicate whether the first VNFC is started during instantiation.
[0180] When the VNF package is instantiated, the computer program, when run by the processor, also executes:
[0181] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates the start of the first VNFC;
[0182] The VNF packet is parsed, and all VNFCs in the VNF packet, including the first VNFC, are instantiated and deployed.
[0183] When the VNF package is instantiated, the computer program, when run by the processor, also executes:
[0184] It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates that the first VNFC should not be started;
[0185] Filter out the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU;
[0186] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0187] When the VNF package is instantiated, the computer program, when run by the processor, also executes:
[0188] If it is determined that the VNF packet does not carry the VNF instantiation interface extension field InstantiationMode, then parse the VNF packet.
[0189] When it is determined that the VNF packet carries the VNF template extension field testVduResouce, the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU, are filtered out.
[0190] Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
[0191] When it is determined that the VNF package does not carry the VNF template extension field testVduResouce, the computer program, when run by the processor, also executes:
[0192] Instantiate and deploy all VNFCs in the VNF package, excluding the first VNFC.
[0193] The first indication information includes:
[0194] The DeploymentFlavour indicates the list of VDUs required, as well as the maximum and minimum number of instances that can be instantiated for each VDU.
[0195] The instantiation level corresponding to the DeploymentFlavour indicates the list of VDUs included in the deployment at this instantiation level, as well as the number of instantiations of each VDU; the instantiation level includes: non-test mode and test mode.
[0196] When it is determined that a VNF needs to be tested, the VNF package is instantiated, and when the computer program is run by the processor, the following is also executed:
[0197] Receive an instantiation request message for the test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level of the test mode;
[0198] Deploy the VNF based on the instantiation request message of the test deployment mode, and instantiate all VNFCs in the VNF packet, including the first VNFC.
[0199] Upon completion of the VNF test, the VNF package is instantiated, and when the computer program is run by the processor, the following is also executed:
[0200] Delete the deployed VNF;
[0201] Receive an instantiation request message for a non-test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level for the non-test mode.
[0202] Deploy the VNF based on the instantiation request message in the non-test deployment mode, and instantiate all VNFCs in the VNF packet except for the first VNFC.
[0203] Upon completion of the VNF test, the VNF package is instantiated, and when the computer program is run by the processor, the following is also executed:
[0204] Receive VNF specification change request message;
[0205] The first VNFC was removed by changing the specification flavor.
[0206] The present invention will now be described in conjunction with specific scenario examples.
[0207] In practical applications, assuming the test scenario involves black-box functional testing of a specific VNF, the testing tool needs to simulate the behavior of surrounding network elements interacting with that VNF to perform encirclement functional testing. Assuming the VNF under test is an SMF, the testing tool needs to be able to simulate the interaction behavior of UDM, AMF, UPF, and PCF with the SMF on the N10, N11, N4, and N7 interfaces to complete the encirclement functional testing of the SMF.
[0208] Based on this, this embodiment models the test tool (also known as a test functional unit, hereinafter referred to as test functional unit or test function) as the VNFC of the VNF under test, and forms a test topology by configuring the VLs between VNFCs, such as... Figure 3 As shown; secondly, based on the test function modeling as VNFC, two schemes are provided to flexibly support the normal deployment mode of VNF (without test function VNFC) and the test deployment mode of VNF (with test function VNFC), simplifying the deployment test process and improving test efficiency.
[0209] like Figure 4 As described above, assuming a VNF consists of two VNFCs, Cp1-1 and Cp1-2 are the external connection points exposed by this VNF for network connections with other VNFs. In this embodiment, the test function of the corresponding VNF is modeled as the VNFC of the VNF under test, such as... Figure 5 As shown, the test function is modeled as the VNFC of the VNF under test, named VNFC-Test, and the connection points Cpt-1 and Cpt-2 of this VNFC are connected to the connection points of the other two VNFCs through networks Vlt1 and Vlt2 respectively, forming a test topology.
[0210] The VNFC testing function encapsulates the environment, framework, tools, dependencies, etc. required for testing, and also includes specific test case execution scripts. After VNF is installed, the test case execution scripts can be injected with the initial configuration through Config Drive or Metadata to start the automatic execution of the test case scripts, or the tests can be manually executed through the test services exposed by the testing function.
[0211] Depending on the complexity of the test function, the test function can also be modeled as multiple test VNFCs. Figure 5 The test function is illustrated using only a single VNFC.
[0212] It should be noted that the test functionality should be provided by the VNF under test, and the test functionality VNFC should be updated synchronously as the VNF's functionality is upgraded, which can solve the problem of test case synchronization.
[0213] Since VNFC is instantiated from the model VDU, it is used in the modeling phase. Figure 4 For example, a VDU for the test function VNFC-Test needs to be configured: Test-VDU, and VDU1 and VDU2 for the VNFs under test VNFC1 and VNFC2 (where the connection point CP will configure the relationship between the bound VL and VDU, which is not the focus of this embodiment and will not be repeated). For the convenience of the subsequent scheme description, Table 1 shows the correspondence between VNFC functional units and VDU templates as shown in Table 1:
[0214] VNF Functional Unit VDU Template VNFC1 VDU1 VNFC2 VDU2 VNFC-Test Test-VDU
[0215] Table 1. Correspondence between VNFC functional units and VDU templates
[0216] Based on the above modeling of the test function as VNF, the following two schemes are proposed to realize the normal deployment mode and the test deployment mode of VNF.
[0217] Option 1: Support both normal and test deployment modes of VNF by extending the Virtual Network Function Descriptor (VNFD) template and the VNFM interface.
[0218] Step 1: Perform VNF template extension;
[0219] When the test function is encapsulated as part of the VNF under test, the VNF under test needs to enable the test function VNFC during the initial deployment for testing and verification. However, when the VNF is deployed normally and combined with external VNFs to provide business functions, the test function VNFC does not need to be enabled.
[0220] To ensure compatibility with both processes described above, the VNF template needs to be extended to identify and differentiate the test function VNFC. Furthermore, considering scenarios where the test function may be provided by a combination of multiple VNFCs, the testVduResource list attribute needs to be extended in the VNF template, as shown in Table 2. This attribute is used to configure the list of VDU resources providing the test function VNFC. If the VNF template does not contain this attribute, it is assumed that the VNF does not contain the test function VNFC.
[0221]
[0222] Table 2 VNF Template Extended Fields
[0223] Step 2: Instantiate and extend the VNF interface;
[0224] To indicate whether to start the VNFC test function when instantiating a VNF, the VNF instantiation interface (VNFM northbound instantiation interface) needs to be extended with fields, as shown in Table 3. The InstantiationMode field is configured in the VNFM northbound interface extension. This field is an enumeration type and is optional.
[0225]
[0226] Table 3 VNFM Northbound Interface Extension Fields
[0227] When the interface carries this field and is in Test mode, all VNFCs are instantiated and deployed when the VNF is instantiated.
[0228] If the interface does not contain this field, or if it does contain this field and its value is NonTest, then the test function VNFC is not enabled.
[0229] The automated deployment and testing process based on Solution 1 is as follows: Figure 6 As shown, it includes:
[0230] Step 601: Begin instantiating the VNF for the configured VNF package;
[0231] Step 602: Determine whether the VNF packet carries the InstantiationMode field. If yes, proceed to step 604; otherwise, proceed to step 603.
[0232] Step 603: Parse the VNF, then proceed to step 605;
[0233] Step 604: Determine the value of the InstantiationMode field. If it is Test mode, proceed to step 609; otherwise, proceed to step 607.
[0234] Step 605: Determine whether the VNF packet carries the testVduResouce field. If yes, proceed to step 607; otherwise, proceed to step 606.
[0235] Step 606: Instantiate and deploy the VNFC in the VNF package, wherein the VNF package does not include the test function VNFC;
[0236] Step 607: Filter out the test function VDU and the cp point and vl bound to the VDU;
[0237] Step 608: Instantiate and deploy the non-test functionality VNFC in the VNF package;
[0238] Step 609: Parse the VNF, then proceed to step 610;
[0239] Step 6010: Instantiate and deploy all VNFCs in the VNF package, which includes the test function VNFC;
[0240] Step 6011: After deployment, the test will be automatically triggered or manually triggered through the test service provided by the test function.
[0241] Option 2: Configure different instantiateLevels for DeploymentFlavor to support both normal and test deployment modes of VNF.
[0242] Step 1: Configure the VNF Deployment Flavor;
[0243] correspond Figure 5 Configure the DeploymentFlavour of the VNF that includes testing capabilities: FormalFlavour. The DeploymentFlavour configures the list of VDUs required for deployment, as well as the maximum and minimum number of instances that can be instantiated for each VDU.
[0244] like Figure 7 As shown, the FormalFlavour configuration includes 3 VDUs, and each VDU contains the following number of instances:
[0245] Test-VDU: 0~1, VDU 1:1~1, VDU2:1~1.
[0246] Where Test-VDU: 0~1, indicating that the maximum number of instances of Test-VDU is 1 and the minimum number of instances is 0; the number of instances of VDU 1 and VDU2 is 1.
[0247] Step 2: Configure the instantiationLevel of the DeploymentFlavour;
[0248] The FormalFlavour configuration above specifies different instantiationLevels based on deployment requirements. Each instantiationLevel specifies the list of VDUs included in the deployment at that level, as well as the number of instantiations for each VDU. The VDU list and the number of VDU instantiations must be within the range configured in the DeploymentFlavour; that is, the VDU must be included in the DeploymentFlavour's VDU list, and the number of instantiations cannot exceed the minimum and maximum instantiation limits for that VDU configured in the DeploymentFlavour. The following describes two instantiationLevel configurations:
[0249] NormalModeLevel: {Test-VDU: 0, VDU1: 1, VDU2: 1} represents the normal deployment mode of VNF, without deploying the test function VNFC;
[0250] TestModeLevel: {Test-VDU: 1, VDU1: 1, VDU2: 1} represents the VNF test deployment mode, which deploys a VNFC with testing functionality.
[0251] The automated deployment and testing process based on Option 2 is as follows:
[0252] When instantiating a VNF, different deployment modes are implemented by passing the DeploymentFlavour and the corresponding instantiationLevelId to the VNFM instantiation interface. The following are the VNF instantiation requests for different deployment modes:
[0253] InstantiationRequest-NormalMode: {flavourId:FormalFlavour; instantiationLevelId:NormalModeLevel, ...} / / Corresponds to normal deployment mode
[0254] InstantiationRequest-TestMode: {flavourId:FormalFlavour; instantiationLevelId:TestModeLevel, ...} / / Corresponding test deployment mode
[0255] In practical applications, different InstantiationRequest instances can be selected to instantiate the corresponding VNFs depending on the usage scenario.
[0256] In practical testing scenarios, the test functionality is first deployed along with the VNF using `InstantiationRequest-TestMode`. When the test indicates that the VNF's functionality and performance meet the requirements, the test functionality VNFC can be removed. This can be done by first deleting the deployed VNF and then re-instantiating the VNF in normal mode using `InstantiationRequest-NormalMode`. Alternatively, to better reuse the deployed VNFC and reduce the cost of repeated deployments, `ChangeVnfFlavourRequest` can be used to dynamically remove the test functionality VNFC by changing its flavor.
[0257] As can be seen, this embodiment of the invention models the test function as part of the VNF under test. Since the core function of the VNF under test is delivered together with the test function, the test cases of the test function are compatible and synchronized with the function under test. Simultaneously, the test network is modeled using VL between VNFCs, and the test topology is automatically completed through VNF instantiation, simplifying the manual construction process of the test topology. Furthermore, the solution of this embodiment of the invention can flexibly support the identification of test functions and the filtering of test function deployment, enabling automatic chaining of the test deployment process. It is also flexible and compatible with existing VNF deployment operations, making the entire test deployment process more flexible.
[0258] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A method for testing Virtual Network Functions (VNFs), characterized in that, The method includes: Generate the VNF packet corresponding to the VNF under test; The VNF packet is sent to the Virtual Network Function Manager (VNFM) for instantiation; The VNF packet includes: at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC; the first indication information includes: DeploymentFlavour, which indicates the required list of VDUs, and the maximum and minimum number of instances that can be instantiated for each VDU; the instantiationLevel corresponding to the DeploymentFlavour, which indicates the list of VDUs included in the deployment at this instantiation Level, and the number of instantiations for each VDU; the instantiationLevel includes: non-test mode and test mode.
2. The method according to claim 1, characterized in that, The connection point of the first VNFC and the connection point of the VNFC of the VNF under test are connected through a virtual network (VL) to form a test topology.
3. The method according to claim 1, characterized in that, When generating the VNF packet corresponding to the VNF under test, the method includes: The resource parameters required for testing and the test case execution scripts are encapsulated in the first VNFC.
4. The method according to claim 1, characterized in that, The first indication information includes: VNF template extended field: VDU test resource testVduResouce, used to indicate that the VNF template contains a virtual deployment unit (VDU) corresponding to the first VNFC; VNF Instantiation Interface Extended Field: InstantiationMode, used to indicate whether the first VNFC is started during instantiation.
5. The method according to claim 4, characterized in that, When instantiating the VNF package, the method includes: It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates the start of the first VNFC; The VNF packet is parsed, and all VNFCs in the VNF packet, including the first VNFC, are instantiated and deployed.
6. The method according to claim 5, characterized in that, When instantiating the VNF package, the method further includes: It is determined that the VNF packet carries the VNF instantiation interface extension field InstantiationMode, and that this field indicates that the first VNFC should not be started; Filter out the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU; Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
7. The method according to claim 4, characterized in that, When instantiating the VNF package, the method further includes: If it is determined that the VNF packet does not carry the VNF instantiation interface extension field InstantiationMode, then parse the VNF packet. When it is determined that the VNF packet carries the VNF template extension field testVduResouce, the VDU corresponding to the first VNFC, as well as the connection point and virtual network bound to the VDU, are filtered out. Instantiate and deploy all VNFCs in the VNF package except for the first VNFC.
8. The method according to claim 7, characterized in that, When it is determined that the VNF package does not carry the VNF template extension field testVduResouce, the method further includes: Instantiate and deploy all VNFCs in the VNF package, excluding the first VNFC.
9. The method according to claim 1, characterized in that, When it is determined that VNF needs to be tested, the VNF package is instantiated, including: Receive an instantiation request message for the test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level of the test mode; Deploy the VNF based on the instantiation request message of the test deployment mode, and instantiate all VNFCs in the VNF packet, including the first VNFC.
10. The method according to claim 1, characterized in that, Upon confirming the completion of the VNF test, the VNF package is instantiated, including: Delete the deployed VNF; Receive an instantiation request message for a non-test deployment mode; the instantiation request message carries the deployment specification DeploymentFlavour and the instantiation level for the non-test mode. Deploy the VNF based on the instantiation request message in the non-test deployment mode, and instantiate all VNFCs in the VNF packet except for the first VNFC.
11. The method according to claim 1, characterized in that, Upon confirming the completion of the VNF test, the VNF package is instantiated, including: Receive VNF specification change request message; The first VNFC was removed by changing the specification flavor.
12. A Virtual Network Function (VNF) testing device, characterized in that, The device includes: The configuration module is used to generate the VNF packet corresponding to the VNF under test; The processing module is used to send the VNF packet to the Virtual Network Function Manager (VNFM) for instantiation; The VNF packet includes: at least one first Virtual Network Function Component (VNFC) and first indication information; the first VNFC is used to test the VNF under test; the first indication information is used to indicate whether to instantiate the test mode corresponding to the first VNFC; the first indication information includes: DeploymentFlavour, which indicates the required list of VDUs, and the maximum and minimum number of instances that can be instantiated for each VDU; the instantiationLevel corresponding to the DeploymentFlavour, which indicates the list of VDUs included in the deployment at this instantiation Level, and the number of instantiations for each VDU; the instantiationLevel includes: non-test mode and test mode.
13. A Virtual Network Function (VNF) testing device, characterized in that, The device includes: a processor and a memory for storing computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program performs the steps of the method described in any one of claims 1-11.
Citation Information
Patent Citations
Template processing method, device and equipment and computer readable storage medium
CN112953751A