Method and device for testing get method and telemetry mode of network management
By simulating the obtaining of attribute information of the get method and telemetry method in the network management through the simulation equipment, the problem of lack of testing methods in the existing technology is solved, and the accuracy and stability of the device information is verified, ensuring effective monitoring and control of the network management.
Patent Information
- Application Number
- CN202410008843.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art lacks a test method that perfects the accuracy of obtaining device information and the accuracy of the acquisition cycle in the network management.
Provide a method and device to verify the accuracy of obtaining attribute information and the accuracy of the acquisition cycle through the simulation device, and verify the stability of the two after they are connected to the network management together, including using the NETCONF protocol for data exchange and simulation of attribute information.
Complete testing of the get method and telemetry method is realized, its accuracy and stability of the acquisition cycle are verified, and the network management is able to accurately monitor and control device information.
Smart Images

Figure CN120263683A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a method and device for testing the get method and telemetry method of network management. Background Art
[0002] The Network Configuration (NETCONF) protocol is a network management protocol based on the Extensible Markup Language (XML). It provides a programmable method for configuring and managing network devices. It uses a simple Remote Procedure Call (RPC) mechanism to implement communication between the client and the server. The client can be a script or an application running on the network management. The server is a typical network device.
[0003] NETCONF messages use the XML format, have powerful filtering capabilities, and each data item has a fixed element name and position, so they have strong compatibility. Different devices from different manufacturers can obtain the same results through XML, which facilitates the mixing of different devices from different manufacturers and provides support for software development of hot and cold. Therefore, more and more manufacturer devices and network management support this protocol.
[0004] When the network management manages the device, it uses the get method to obtain the information of the corresponding node on the device. The amount of data information of the corresponding node obtained through the get method is large, and the time interval for periodic acquisition is also large, such as 30 seconds, 1 minute, etc.; the amount of device data information obtained by using the telemetry method is small, but it is key information (all this data information exists in the data information obtained by the get method) and the acquisition time period is extremely short, such as the periodic acquisition time is 1 second, 2 seconds, etc.
[0005] The network management of industry device manufacturers has two deployment methods for jointly obtaining device information, namely, the get method for periodically obtaining information from the device and the telemetry method. At present, there is no perfect test method for the accuracy of attribute information acquisition and the accuracy of acquisition period for these two methods.
[0006] In view of this, overcoming the defects of the existing technology is an urgent problem to be solved in this technical field. Summary of the Invention
[0007] The technical problem to be solved by the present invention is: how to test the accuracy of the data obtained by the get method and the telemetry method and the accuracy of the acquisition period.
[0008] The present invention adopts the following technical solutions:
[0009] In a first aspect, a method for testing the get method and the telemetry method of a network management system is provided, including:
[0010] The network management system obtains the attribute information of the simulation device through the get method and the telemetry method respectively;
[0011] Verify the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period;
[0012] Verify the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period;
[0013] Verify the stability after the get method and the telemetry method are jointly connected to the network management system.
[0014] Preferably, verifying the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period includes:
[0015] Communicate between the simulation device and the network management system, and do not subscribe to telemetry in the network management system;
[0016] Obtain the attribute information of the simulation device through the get method, and preset a first acquisition period for the network management system to obtain the attribute information from the simulation device;
[0017] The network management system receives and displays the first attribute value of the attribute information obtained from the simulation device, and records the first time point when the network management system obtains the first attribute value;
[0018] The network management system receives and displays the second attribute value of the attribute information obtained from the simulation device, and records the second time point when the network management system obtains the second attribute value;
[0019] Wherein, the first attribute value and the second attribute value are attribute values reported by the simulation device in sequence;
[0020] Obtain the first interval time between the first time point and the second time point, and verify the accuracy of the acquisition period of the get method by comparing whether the first interval time matches the first acquisition period.
[0021] Preferably, verifying the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period further includes:
[0022] Do not subscribe to telemetry in the network management system, obtain the attribute information of the simulation device through the get method, and there is first preset attribute information of this attribute information in both the network management system and the simulation device;
[0023] After the network management system obtains the attribute information through the get method, it compares the attribute information with the first preset attribute information to determine whether the attribute information is consistent with the first preset attribute information, so as to verify the accuracy of the attribute information obtained by the get method.
[0024] Preferably, verifying the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period includes:
[0025] Communicate between the simulation device and the network management system, and subscribe to telemetry in the network management system; turn off the get method or set the acquisition period of the get method to infinity, obtain the attribute information of the simulation device through the telemetry method, and preset the second acquisition period for the network management system to obtain the attribute information from the simulation device;
[0026] The network management system receives and displays the third attribute value of the attribute information obtained from the simulation device, and records the third time point when the network management system obtains the third attribute value; the network management system receives and displays the fourth attribute value of the attribute information obtained from the simulation device, and records the fourth time point when the network management system obtains the fourth attribute value;
[0027] Wherein, the third attribute value and the fourth attribute value are reported by the simulation device in sequence;
[0028] Obtain the second interval time between the third time point and the fourth time point, and verify the accuracy of the acquisition period of the telemetry method by comparing whether the second interval time matches the second acquisition period.
[0029] Preferably, verifying the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period further includes:
[0030] Turn off the get method or set the acquisition period of the get method to infinity, obtain the attribute information of the simulation device through the telemetry method, and there is second preset attribute information of this attribute information in both the network management system and the simulation device;
[0031] After the network management system obtains the attribute information through the telemetry method, it compares the attribute information with the second preset attribute information to determine whether the attribute information is consistent with the second preset attribute information, so as to verify the accuracy of the attribute information obtained by the telemetry method.
[0032] Preferably, verifying the stability after the get method and the telemetry method are jointly connected to the network management system includes:
[0033] Select the node with the most attribute information and the greatest performance pressure in the NETCONF protocol, select a test attribute from the selected nodes, and simulate the test attribute values of the test attribute through multiple simulation devices;
[0034] Set the first value range of the test attribute value for the get method on the network management side, and set the second value range of the test attribute value for the telemetry method on the network management side;
[0035] After the network management obtains the test attribute value through the get method and / or the telemetry method, match the test attribute value with the first value range and / or the second value range respectively to obtain a comparison result, and judge the stability of the two paths of obtaining attribute information by the get method and / or obtaining attribute information by the telemetry method in the network management according to the comparison result.
[0036] Preferably, the matching the test attribute value with the first value range and / or the second value range respectively to obtain a comparison result specifically includes:
[0037] When the test attribute value is within the first value range, it is determined that the network management obtains the test attribute value through the get method;
[0038] When the test attribute value is within the second value range, it is determined that the network management obtains the test attribute value through the telemetry method.
[0039] Preferably, the verification of the stability after the get method and the telemetry method are jointly connected to the network management further includes:
[0040] Simulate different test attribute values through the simulation device, and set the first period for the get method;
[0041] Simulate the first test attribute value and the second test attribute value through the simulation device;
[0042] After the network management obtains the first test attribute value and the second test attribute value in sequence through the get method and / or the telemetry method, compare the first test attribute value and the second test attribute value with the first value range and the second value range respectively;
[0043] When the first test attribute value and the second test attribute value belong to the first value range, it is determined that the network management obtains the first test attribute value and the second test attribute value respectively through the get method;
[0044] By comparing the time points of obtaining the first test attribute value and the second test attribute value, and verifying whether the time interval matches the first period, to determine the stability of the acquisition period of the get method.
[0045] Preferably, verifying the stability after the get method and the telemetry method are jointly connected to the network management also includes:
[0046] When the first test attribute value and the second test attribute value belong to the second value range, it is determined that the network management obtains the first test attribute value and the second test attribute value respectively through the telemetry method;
[0047] By comparing the time points of obtaining the first test attribute value and the second test attribute value, and verifying whether the time interval matches the second period, to determine the stability of the acquisition period of the telemetry method.
[0048] In a second aspect, a device for testing the get method and the telemetry method of a network management is provided. The device includes: a first verification module, a second verification module, and a third verification module;
[0049] The first verification module is used to verify the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period;
[0050] The second verification module is used to verify the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period;
[0051] The third verification module is used to verify the stability after the get method and the telemetry method are jointly connected to the network management.
[0052] The beneficial effects of the present invention are:
[0053] The present invention verifies the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period, verifies the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period, and verifies the stability after the attribute information obtained by the get method and the attribute information obtained by the telemetry method are jointly connected to the network management. By separately testing the accuracy of the attribute information and the acquisition period of the get method and the telemetry method, and testing the accuracy of the attribute information and the acquisition period obtained when the two methods work together, a complete test of the get method and the telemetry method is realized, and the accuracy and the stability of the acquisition period of the two methods are respectively verified. Description of the Drawings
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0055] Figure 1 It is a schematic flowchart of a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0056] Figure 2 It is a schematic diagram of data transmission of two methods, namely the get method and the telemetry method, in a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0057] Figure 3 It is a schematic flowchart of verifying the accuracy of the acquisition period of the get method in a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0058] Figure 4 It is a schematic flowchart of verifying the accuracy of the attribute information obtained by the get method in a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0059] Figure 5 It is a schematic flowchart of verifying the accuracy of the acquisition period of the telemetry method in a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0060] Figure 6 It is a schematic flowchart of verifying the accuracy of the attribute information obtained by the telemetry method in a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0061] Figure 7 It is a schematic flowchart of verifying the stability after the get method and the telemetry method are jointly connected to the network management in a method for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention;
[0062] Figure 8 It is a schematic structural diagram of a device for testing the get method and the telemetry method of the network management provided by the embodiments of the present invention. Detailed implementation manners
[0063] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0064] In the present invention, terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", etc. may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise stated, the meaning of "a plurality" is two or more.
[0065] In the present invention, unless otherwise clearly defined and limited, the term "connection" should be understood in a broad sense. For example, "connection" may be a fixed connection, a detachable connection, or integrated; it may be directly connected or indirectly connected through an intermediate medium. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0066] Embodiment 1
[0067] In the prior art, there is no test method for the stability of obtaining the attribute information on the device side by the two methods of the get method and the telemetry method. In this embodiment, the accuracy of obtaining the device attribute information by the two methods of the get method and the telemetry method respectively, and the accuracy of the acquisition period of obtaining the attribute information can be tested, and then when the two methods of the get method and the telemetry method work together, the accuracy of the obtained attribute information and the accuracy of the acquisition period are tested to complete the test of the two methods of the get method and the telemetry method, realize the real-time monitoring and control of the device by the network management, and ensure the stability of the system.
[0068] Embodiment 1 of the present invention provides a method for testing the get method and the telemetry method of the network management, as Figure 1 shown, including:
[0069] Step 101: The network management obtains the attribute information of the simulation device through the get method and the telemetry method respectively.
[0070] Among them, as Figure 2As shown, the specific implementation of the get method is that the network management system under test (hereinafter referred to as the network management system) can obtain the attribute information of the device through the get request of the NETCONF protocol. For example, by sending a get request to the device, the device returns a list of all supported attributes; the telemetry method refers to the mechanism by which the device periodically reports its operating status and attribute information. The network management system can subscribe to the telemetry topic of a certain device to receive the attribute change events reported by the device in real time. Through the get method and the telemetry method, the network management system can conveniently and efficiently obtain and monitor various operating attribute information of the device. The get method is used for one-time query, and the telemetry method is used for real-time subscription of the change events of attribute information.
[0071] The specific application scenario can be as follows: The network management system simultaneously accesses the get method data and telemetry method data of one or more devices through the NETCONF protocol. Among them, the data volume of the get method data accessed by the network management system is comprehensive, such as containing multiple attributes such as aBcD, and the reporting period of the get method data is relatively long, such as 30 seconds, 1 minute, etc. The data volume of the data obtained by the telemetry method accessed by the network management system is relatively small (key information data), such as containing multiple attributes such as BD. These attributes all exist in the get method data, and the reporting period of the telemetry method data is extremely short, such as 1 second, 2 seconds, etc.
[0072] When the network management system obtains the attribute information of the simulation device through the get method and / or the telemetry method, it is very difficult to change the value of many attribute information within a period. For example, the temperature of the device, the input voltage of the device, etc., will cause many attribute information to be unable to test whether they are reported and refreshed within the period. For example, the temperature of the device may not change within a short period of time. When the temperature of the device is the same within a period, it is impossible to judge the accuracy of the acquisition period and the attribute information. In view of this, in a preferred embodiment, a simulation device can be selected to simulate these attribute information so that the device temperature is different within different periods. For example, change the device temperature for the first time, and change the device temperature on the simulation device side for the second time within a certain period. The change of the device temperature is reported through the get method and / or the telemetry method, which is convenient for subsequent testing.
[0073] Step 102: Verify the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period.
[0074] In a preferred embodiment, as Figure 3 shown, first verify the accuracy of the acquisition period of the attribute information obtained by the get method. Step 102 specifically includes:
[0075] Step 1021: Communicate with the network management system through the simulation device. Do not subscribe to telemetry in the network management system. Obtain the attribute information of the simulation device through the get method, and preset the first acquisition period for the network management system to obtain the attribute information from the simulation device.
[0076] The network management system does not subscribe to any telemetry topics of this simulation device and only obtains the attribute information from the simulation device side through the get method. Preset the first acquisition period for the network management system to obtain the attribute information from the device, for example, obtain it once every 10 seconds.
[0077] Step 1022: The network management system receives and displays the first attribute value of the attribute information obtained from the simulation device, records the first time point when the network management system obtains the first attribute value, the network management system receives and displays the second attribute value of the attribute information obtained from the simulation device, and records the second time point when the network management system obtains the second attribute value, where the first attribute value and the second attribute value are the attribute values reported in sequence by the simulation device.
[0078] That is, after obtaining the attribute information using the get method for the first time, record the time point when the network management system obtains the attribute value 1 at this time as T1; after obtaining the attribute information using the get method for the second time, record the time point when the network management system obtains the attribute value 2 at this time as T2.
[0079] Step 1023: Obtain the first interval time between the first time point and the second time point, and verify the accuracy of the acquisition period of the get method by comparing whether the first interval time matches the first acquisition period.
[0080] Calculate T2 - T1 to obtain the first interval time Interval1; compare whether Interval1 matches the preset first acquisition period. If it matches, it indicates that the get method has obtained the attribute value according to the preset first acquisition period, and the verification passes; if it does not match, it may be that the acquisition period of the get method is inaccurate and the verification fails. In a preferred embodiment, the test can be repeated multiple times, and the test results can be statistically analyzed. If most of the test Interval1 values match the preset first acquisition period, it can be confirmed that the acquisition period of the get method is accurate. Among them, the foregoing match can be that the first interval time is equal to the first acquisition period, or the difference between the two is within a preset range. The preset range is determined according to actual requirements and is not specifically limited here. The preset range is 0 - 1s.
[0081] Taking a certain optical communication netconf product protocol as an example, let the acquisition period be 30 seconds. Each attribute value reported by the simulation device in each period changes and is reported within its respective set range. The network management interface can see that the values of each attribute change every 30 seconds, and then the tester will judge that the acquisition period of all attributes being 30 seconds is correct. For example, the voltage range of a single disk in the platform node of the input netconf protocol reported by the get method set by the simulation device is [115, 225]V, with an accuracy of 0.01V. The value reported in the first period is 116.23V (i.e., the first attribute value), and the value reported in the next 30 - second period may be a different value, such as 223.65V (i.e., the second attribute value); another example is that the temperature range of a single disk reported by the get method set by the simulation device is [25, 50] degrees, with an accuracy of 0.01 degrees. The value reported in the first period is 30.43 degrees (i.e., the first attribute value), and the value reported in the next 30 - second period may be a different value, such as 28.86 degrees (i.e., the second attribute value). Using the simulation device, it is possible to simply simulate the periodic reporting value changes of all attribute values in the data reported by all get methods through software, meeting the test requirements.
[0082] Through this test process, it can be effectively verified whether the get method obtains attribute information according to the preset first acquisition period. Moreover, through the simulation device, the attribute information of all physical devices can be simulated to improve the correctness of the test results, which is very helpful for verifying the accuracy of its acquisition period. At the same time, it can also test other aspects of accuracy, such as whether the attribute values are reported in sequence.
[0083] In a preferred embodiment, after verifying whether the get method obtains attribute information according to the preset first acquisition period, it is also necessary to verify the accuracy of the attribute information obtained by the get method;
[0084] In a preferred embodiment, as Figure 4 shown, step 102 specifically includes:
[0085] Step 1024: Do not subscribe to telemetry in the network management, obtain the attribute information of the simulation device through the get method, and a first preset attribute information of this attribute information is stored in both the network management and the simulation device.
[0086] The network management does not subscribe to any telemetry topics and only obtains attribute information from the simulation device through the get method; a known attribute value is preset in both the network management and the simulation device as the first preset attribute information.
[0087] Step 1025: After the network management system obtains the attribute information through the get method, it compares the attribute information with the first preset attribute information to determine whether the attribute information is consistent with the first preset attribute information, so as to verify the accuracy of the attribute information obtained by the get method.
[0088] The network management system uses the get method to obtain the information of this attribute from the simulation device. The network management system compares the attribute information obtained through the get method with the first preset attribute information preset by the simulation device. If the two attribute information values are exactly the same, it indicates that the attribute information obtained by the network management system through the get method is accurate; if the two attribute information values are inconsistent, it means that the attribute information obtained by the network management system through the get method is inaccurate and there is an error. The above test process can be repeated multiple times, and the number of accurate and inaccurate times of obtaining attribute information can be counted. If most of the test results show that the attribute information is consistent, it can be basically judged that the get method for obtaining a single attribute information is accurate. By directly comparing with the known attribute value preset by the simulation device, it can be intuitively verified whether the obtained attribute information is accurate, which is an important aspect of verifying the performance of the get method, and this test method is simple and clear, and can effectively evaluate the accuracy of the get method at the single attribute level.
[0089] Step 103: Verify the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period.
[0090] In a preferred embodiment, verify the accuracy of the acquisition period of the attribute information obtained by the telemetry method. As Figure 5 shown, through the communication between the simulation device and the network management system, Step 103 specifically includes:
[0091] Step 1031: Through the communication between the simulation device and the network management system, subscribe to telemetry in the network management system, close the get method or set the acquisition period of the get method to infinity, obtain the attribute information of the simulation device through the telemetry method, and preset the second acquisition period for the network management system to obtain the attribute information from the simulation device.
[0092] Step 1032: The network management system receives and displays the third attribute value of the attribute information obtained from the simulation device, records the third time point when the network management system obtains the third attribute value, the network management system receives and displays the fourth attribute value of the attribute information obtained from the simulation device, and records the fourth time point when the network management system obtains the fourth attribute value, where the third attribute value and the fourth attribute value are reported by the simulation device in sequence.
[0093] Step 1033: Obtain the second interval time between the third time point and the fourth time point, and verify the accuracy of the acquisition period of the telemetry method by comparing the second interval time with the second acquisition period.
[0094] The specific implementation method for verifying the accuracy of the acquisition period of the attribute information obtained by the telemetry method is similar to that for verifying the accuracy of the acquisition period of the attribute information obtained by the get method. In a preferred embodiment, the specific steps for verifying the accuracy of the acquisition period of the attribute information obtained by the telemetry method are as follows: Build a simulation device that can periodically report attribute values; build a network management system that can subscribe to the telemetry topic of the simulation device. Set the attribute reporting period at the simulation device end to the preset second acquisition period, such as every 5 seconds. The network management system subscribes to the telemetry topic of the attribute. When receiving the attribute for the first time, the network management system records the received third attribute value and its third time point, and continues to receive the attribute until the next attribute value is received. When receiving the attribute for the second time, the network management system records the received fourth attribute value and its fourth time point, calculates the second interval time between the third time point and the fourth time point, and then compares the second interval time with the preset second acquisition period (such as 5 seconds). If they match, the verification passes; if they do not match, the verification fails. Repeat the above steps, change the preset period each time, and count the verification results. By continuously receiving two attribute values and comparing the time intervals, the accuracy of the attribute acquisition period in the telemetry method can be effectively verified.
[0095] Taking a certain optical communication product's netconf protocol as an example, let the acquisition period be 1 second. Each attribute value reported by the simulation device in each period changes and is reported within its respective set range. The tester can judge that the acquisition period of all attributes is 1 second correctly only when seeing the values of each attribute changing every 1 second on the network management interface. For example, the input voltage range of a certain single board reported by the simulation device through the telemetry method is [115, 225]V, with an accuracy of 0.01V. The value reported in the first period is 116.23V (i.e., the third attribute value), and the value reported in the next 1-second period may be a different value, such as 223.65V (i.e., the fourth attribute value); another example is that the temperature range of a certain single board reported by the simulation device's telemetry subscription data is [25, 50] degrees, with an accuracy of 0.01 degrees. The value reported in the first period is 30.43 degrees (i.e., the third attribute value), and the value reported in the next 1-second period may be a different value, such as 28.86 degrees (i.e., the fourth attribute value). Using the simulation device, the periodic reporting and value changes of all attribute values in all telemetry subscription reported data can be simply simulated by software, meeting the test requirements.
[0096] Through this test process, it can be effectively verified whether the telemetry method obtains attribute information according to the preset second acquisition period. Moreover, through the simulation device, the attribute information of all physical devices can be simulated to improve the correctness of the test results, which is very helpful for verifying the accuracy of its acquisition period. At the same time, it can also test the accuracy of other aspects such as whether the attribute values are reported in sequence.
[0097] In a preferred embodiment, after verifying whether the telemetry method obtains attribute information according to the preset acquisition period, it is also necessary to verify the accuracy of the attribute information obtained by the telemetry method.
[0098] As Figure 6 shown, step 103 specifically includes:
[0099] Step 1034: Close the get method or set the acquisition period of the get method to infinity, and obtain the attribute information of the simulation device through the telemetry method. The second preset attribute information of this attribute information is stored in both the network management system and the simulation device.
[0100] For the network management telemetry method topic, close the get method to obtain attribute information from the simulation device; preset a known attribute value in the simulation device as the second preset attribute information.
[0101] Step 1035: After the network management system obtains the attribute information through the telemetry method, compare the attribute information with the second preset attribute information to determine whether the attribute information is consistent with the second preset attribute information, so as to verify the accuracy of the attribute information obtained by the telemetry method.
[0102] The network management system uses the telemetry method to obtain the information of this attribute from the device. The network management system will compare the attribute information obtained through the telemetry method with the second preset attribute information preset in the device. If the two attribute information values are exactly the same, it indicates that the attribute information obtained by the network management system through the telemetry method is accurate; if the two attribute information values are inconsistent, it means that the attribute information obtained by the network management system through the telemetry method is inaccurate and there is an error. The above test process can be repeated multiple times, and the number of accurate and inaccurate times of obtaining attribute information can be counted. If most of the test results show that the attribute information is consistent, it can be basically judged that the telemetry method for obtaining a single attribute information is accurate.
[0103] By directly comparing with the known attribute values preset in the device, it is possible to intuitively verify whether the obtained attribute information is accurate, which is an important aspect of verifying the performance of the telemetry method. Moreover, this testing method is simple and clear, and can effectively evaluate the accuracy of the telemetry method at the single-attribute level. It should be noted that in this embodiment, when testing the accuracy of the attribute information obtained by the two methods, namely the get method and the telemetry method, a simulation device can be selected, or a corresponding physical device can be chosen, and no specific limitation is made in this embodiment.
[0104] Step 104: Verify the stability after the get method and the telemetry method are jointly connected to the network management system.
[0105] As Figure 7 shown, step 104 is specifically as follows:
[0106] Step 1041: Select the node with the most attribute information and the greatest performance pressure in the NETCONF protocol. Select a test attribute from the selected node, and simulate the test attribute values of the test attribute through multiple simulation devices.
[0107] Step 1042: Set the first value range of the test attribute value for the get method on the network management side, and set the second value range of the test attribute value for the telemetry method on the network management side.
[0108] Step 1043: After the network management system obtains the test attribute value through the get method and / or the telemetry method, match the test attribute value with the first value range and / or the second value range respectively to obtain a comparison result, and judge the stability of the two paths for the network management system to obtain attribute information through the get method and / or the telemetry method according to the comparison result.
[0109] Among them, when the test attribute value is within the first value range, it is judged that the network management system obtains the test attribute value through the get method; when the test attribute value is within the second value range, it is judged that the network management system obtains the test attribute value through the telemetry method.
[0110] Select a node with the most attribute information and the greatest performance pressure from the NETCONF protocol. Select an attribute to be tested in this node. Taking the node with the most attribute information and the greatest performance pressure as the test object, there are the following considerations:
[0111] 1. The node with the greatest performance pressure represents the highest access frequency and concurrency volume of the attributes under this node, and can more truly reflect the performance and stability of the attribute acquisition path in high-pressure scenarios.
[0112] 2. The node with the most attribute information represents the largest number of attributes that need to be acquired and processed under this node, and can more fully test the performance limit of the attribute acquisition method.
[0113] 3. High-pressure and large-scale nodes often involve the core functions and key data of the system. The quality and stability of their attribute access have the greatest impact on the system, and the test results have stronger reference value.
[0114] 4. If the test passes on nodes with high pressure and large scale, it indicates that the performance and stability of this attribute acquisition method will be better under other ordinary nodes.
[0115] 5. If the test fails on large nodes, further optimization is required, while passing the test on small nodes cannot explain the problem.
[0116] 6. The test results of large nodes can also reflect the overall performance bottleneck of the system and provide guidance for later optimization.
[0117] Therefore, selecting the nodes with the most attributes and the greatest pressure as the test objects can compare and evaluate the performance of different attribute acquisition methods under the harshest conditions, and the results will have more reference value and guiding significance.
[0118] Use multiple simulation devices to simulate the test attribute values. On the network management side, set the first value range and the second value range of the test attribute values for the get method and the telemetry method respectively. By executing the get method and / or the telemetry method, the network management can obtain the test attribute values, and compare the obtained test attribute values with the first value range and the second value range to obtain a comparison result. According to the comparison result, the stability of the network management to obtain attribute information through the get method or the telemetry method can be judged. When the test attribute value falls within the first value range, it is judged that the network management obtains the test attribute value through the get method; when the test attribute value falls within the second value range, it is judged that the network management obtains the test attribute value through the telemetry method.
[0119] In a preferred embodiment, different test attribute values are simulated by the simulation device, and a first period is set for the get method; the simulation device simulates a first test attribute value and a second test attribute value; after the network management device sequentially obtains the first test attribute value and the second test attribute value through the get method and / or the telemetry method, the first test attribute value and the second test attribute value are respectively compared with the first value range and the second value range; when the first test attribute value and the second test attribute value belong to the first value range, it is determined that the network management device obtains the first test attribute value and the second test attribute value respectively through the get method; by comparing the time point of obtaining the first test attribute value with the time point of obtaining the second test attribute value, and verifying whether the time interval matches the first period, to determine the stability of the get method acquisition period.
[0120] When the first test attribute value and the second test attribute value belong to the second value range, it is determined that the network management device obtains the first test attribute value and the second test attribute value respectively through the telemetry method; by comparing the time point of obtaining the first test attribute value with the time point of obtaining the second test attribute value, and verifying whether the time interval matches the second period, to determine the stability of the telemetry method acquisition period. Among them, the value ranges of the first test attribute value and the second test attribute value are controlled within the same value range, that is, both are within the first value range or the second value range at the same time.
[0121] Verifying the stability of the acquisition periods of the get method and the telemetry method is similar to the process of separately verifying the stability of the acquisition periods of the get method and the telemetry method. The difference is that when the network management device obtains the attribute information of the simulation device according to both the get method and the telemetry method at the same time, first determine which method the attribute information is obtained through, and then verify whether its acquisition period is accurate. It can be simply deduced according to step 102 and step 103, and will not be elaborated in this embodiment.
[0122] Taking the netconf protocol of a certain optical communication product as an example, it is analyzed and judged that the performance pressure of the platform node in the netconf protocol is the greatest. In this node, the input voltage of a certain single board is selected for simulated simulation jump. Taking the period of obtaining data by the get method and obtaining data by the telemetry method as 30 seconds (i.e., the first period) and 1 second (i.e., the second period) respectively as an example, the input voltage range reported by the get method set by the simulation device is [115, 220]V (i.e., the first value range), the accuracy is 0.01V, the value reported in the first 30s period is 116.23V (i.e., the first test attribute value), and the value reported in the next 30-second period may be a different value, such as 118.65V (i.e., the second test attribute value); Another example is that the input voltage range reported by the simulation device for obtaining data by the telemetry method is (220, 225]V (i.e., the second value range), the accuracy is 0.01V, the value reported in the first period is 222.23V (i.e., the first test attribute value), and the value reported in the next 1-second period may be a different value, such as 223.65V (i.e., the second test attribute value). It is possible to test in the network management system under test by checking the value range and reporting period of the input voltage of a certain single board from these two paths.
[0123] The present invention verifies the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period, verifies the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period, and verifies the stability after the attribute information obtained by the get method and the attribute information obtained by the telemetry method are jointly connected to the network management. By separately testing the accuracy of the attribute information and the acquisition period of the get method and the telemetry method, and testing the accuracy of the attribute information and the accuracy of the acquisition period obtained when the two methods work together, a complete test of the get method and the telemetry method is realized, and the accuracy and the stability of the acquisition period of the two methods are respectively verified.
[0124] Embodiment 2
[0125] In Embodiment 1, a method for testing the get method and the telemetry method of the network management is proposed. In this embodiment, a device for testing the get method and the telemetry method of the network management will be proposed, as Figure 8 shown, the device includes: a first verification module, a second verification module, and a third verification module;
[0126] The first verification module is used to verify the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period; the second verification module is used to verify the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period; the third verification module is used to verify the stability after the get method and the telemetry method are jointly connected to the network management system.
[0127] Among them, the specific steps of the method for testing the get method and the telemetry method of the network management system can be referred to in Embodiment 1, which will not be elaborated in this embodiment.
[0128] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for testing the get method and telemetry mode of network management, characterized in that, Including: The network management system obtains the attribute information of the simulation device through the get method and the telemetry method respectively; Verify the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period; Verify the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period; Verify the stability after the get method and the telemetry method are jointly connected to the network management system.
2. The method for testing the get method and telemetry mode of the network management system according to claim 1, characterized in that, The verification of the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period includes: Communicate between the simulation device and the network management system, and do not subscribe to telemetry in the network management system; Obtain the attribute information of the simulation device through the get method, and preset the first acquisition period for the network management system to obtain the attribute information from the simulation device; The network management system receives and displays the first attribute value of the attribute information obtained from the simulation device, and records the first time point when the network management system obtains the first attribute value; The network management system receives and displays the second attribute value of the attribute information obtained from the simulation device, and records the second time point when the network management system obtains the second attribute value; Wherein, the first attribute value and the second attribute value are attribute values reported by the simulation device in sequence; Obtain the first interval time between the first time point and the second time point, and verify the accuracy of the acquisition period of the get method by comparing whether the first interval time matches the first acquisition period.
3. The method for testing the get method and telemetry method of the network management system according to claim 2, wherein The verification of the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period further includes: Do not subscribe to telemetry in the network management system, obtain the attribute information of the simulation device through the get method, and there is the first preset attribute information of this attribute information in both the network management system and the simulation device; After the network management system obtains the attribute information through the get method, compare the attribute information with the first preset attribute information to determine whether the attribute information is consistent with the first preset attribute information, so as to verify the accuracy of the attribute information obtained by the get method.
4. The method for testing the get method and telemetry mode of the network management system according to claim 1, characterized in that, The verification of the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period includes: Communicate between the simulation device and the network management system, and subscribe to telemetry in the network management system; turn off the get method or set the acquisition period of the get method to infinity, obtain the attribute information of the simulation device through the telemetry method, and preset the second acquisition period for the network management system to obtain the attribute information from the simulation device; The network management system receives and displays the third attribute value of the attribute information obtained from the simulation device, and records the third time point when the network management system obtains the third attribute value; the network management system receives and displays the fourth attribute value of the attribute information obtained from the simulation device, and records the fourth time point when the network management system obtains the fourth attribute value; wherein, the third attribute value and the fourth attribute value are reported by the simulation device in sequence; Obtain the second interval time between the third time point and the fourth time point, and verify the accuracy of the acquisition period of the telemetry method by comparing whether the second interval time matches the second acquisition period.
5. The method for testing the get method and telemetry mode of the network management system according to claim 4, characterized in that The verification of the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period further includes: Close the get method or set the acquisition period of the get method to infinity, obtain the attribute information of the simulation device through the telemetry method, and there is second preset attribute information of this attribute information in both the network management and the simulation device; After the network management obtains the attribute information through the telemetry method, compare the attribute information with the second preset attribute information to determine whether the attribute information is consistent with the second preset attribute information, so as to verify the accuracy of the attribute information obtained by the telemetry method.
6. The method for testing the get method and telemetry mode of the network management system according to claim 1, characterized in that, The verification of the stability after the get method and the telemetry method are jointly connected to the network management includes: Select the node with the most attribute information and the greatest performance pressure in the NETCONF protocol, select a test attribute from the selected nodes, and simulate the test attribute values of the test attribute through multiple simulation devices; Set the first value range of the test attribute value for the get method on the network management side, and set the second value range of the test attribute value for the telemetry method on the network management side; After the network management obtains the test attribute value through the get method and / or the telemetry method, match the test attribute value with the first value range and / or the second value range respectively to obtain a comparison result, and judge the stability of the two paths of obtaining attribute information by the get method and / or obtaining attribute information by the telemetry method in the network management according to the comparison result.
7. The method for testing the get method and telemetry method of the network management system according to claim 6, characterized in that, The specific process of matching the test attribute value with the first value range and / or the second value range respectively to obtain a comparison result includes: When the test attribute value is within the first value range, it is determined that the network management obtains the test attribute value through the get method; When the test attribute value is within the second value range, it is determined that the network management obtains the test attribute value through the telemetry method.
8. The method for testing the get method and telemetry method of the network management system according to claim 6, characterized in that The verification of the stability after the get method and the telemetry method are jointly connected to the network management further includes: Simulate different test attribute values through the simulation device and set the first period for the get method; Simulate the first test attribute value and the second test attribute value through the simulation device; After the network management obtains the first test attribute value and the second test attribute value in sequence through the get method and / or the telemetry method, compare the first test attribute value and the second test attribute value with the first value range and the second value range respectively; When the first test attribute value and the second test attribute value belong to the first value range, it is determined that the network management system obtains the first test attribute value and the second test attribute value respectively through the get method; By comparing the time points of obtaining the first test attribute value and the second test attribute value, and verifying whether the time interval matches the first period, to determine the stability of the acquisition period of the get method.
9. The method for testing the get method and telemetry method of the network management system according to claim 8, wherein, The verification of the stability after the get method and the telemetry method are jointly connected to the network management system further includes: When the first test attribute value and the second test attribute value belong to the second value range, it is determined that the network management system obtains the first test attribute value and the second test attribute value respectively through the telemetry method; By comparing the time points of obtaining the first test attribute value and the second test attribute value, and verifying whether the time interval matches the second period, to determine the stability of the acquisition period of the telemetry method.
10. A device for testing the get method and telemetry mode of network management, characterized in that, The device is used to implement the method for testing the get method and the telemetry method of the network management system according to any one of claims 1-9. The device includes: a first verification module, a second verification module, and a third verification module; The first verification module is used to verify the accuracy of the attribute information obtained by the get method and the accuracy of the acquisition period; The second verification module is used to verify the accuracy of the attribute information obtained by the telemetry method and the accuracy of the acquisition period; The third verification module is used to verify the stability after the get method and the telemetry method are jointly connected to the network management system.