|
9 | 9 | log = logging.getLogger(__name__) |
10 | 10 | dir = os.path.dirname(os.path.abspath(__file__)) |
11 | 11 |
|
12 | | -test_function = "c9408_lem_count_check" |
| 12 | +test_function = "n9k_c9408_model_lem_count_check" |
13 | 13 |
|
14 | 14 |
|
15 | 15 | eqptLC_api = 'eqptLC.json?query-target-filter=eq(eqptLC.model,"N9K-X9400-16W")' |
|
22 | 22 | ( |
23 | 23 | {eqptLC_api: read_data(dir, "eqptLC_empty.json")}, |
24 | 24 | "6.1(2e)", |
25 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 25 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
26 | 26 | script.NA, |
27 | 27 | [], |
28 | 28 | script.VER_NOT_AFFECTED, |
|
31 | 31 | ( |
32 | 32 | {eqptLC_api: read_data(dir, "eqptLC_empty.json")}, |
33 | 33 | "6.2(1h)", |
34 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 34 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
35 | 35 | script.NA, |
36 | 36 | [], |
37 | 37 | script.VER_NOT_AFFECTED, |
38 | 38 | ), |
39 | | - # Applicable version but no C9408 node |
| 39 | + # Version not affected (higher than 6.2(1g)) |
40 | 40 | ( |
41 | | - {eqptLC_api: read_data(dir, "eqptLC_6_node101.json")}, |
| 41 | + {eqptLC_api: read_data(dir, "eqptLC_6_node.json")}, |
42 | 42 | "6.1(2f)", |
43 | | - read_data(dir, "fabric_nodes_no_c9408.json"), |
| 43 | + read_data(dir, "fabricNode_no_n9k_c9408.json"), |
44 | 44 | script.NA, |
45 | 45 | [], |
46 | 46 | "No N9K-C9408 nodes found. Skipping.", |
|
49 | 49 | ( |
50 | 50 | {eqptLC_api: read_data(dir, "eqptLC_empty.json")}, |
51 | 51 | "6.1(2f)", |
52 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 52 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
53 | 53 | script.PASS, |
54 | 54 | [], |
55 | 55 | "", |
56 | 56 | ), |
57 | 57 | # Applicable version, exactly 5 LEMs -> PASS |
58 | 58 | ( |
59 | | - {eqptLC_api: read_data(dir, "eqptLC_5_node101.json")}, |
| 59 | + {eqptLC_api: read_data(dir, "eqptLC_5_node.json")}, |
60 | 60 | "6.2(1g)", |
61 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 61 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
62 | 62 | script.PASS, |
63 | 63 | [], |
64 | 64 | "", |
65 | 65 | ), |
66 | 66 | # Applicable mid-train version 6.1(5e), less than 6 LEMs on C9408 -> PASS |
67 | 67 | ( |
68 | | - {eqptLC_api: read_data(dir, "eqptLC_5_node101.json")}, |
| 68 | + {eqptLC_api: read_data(dir, "eqptLC_5_node.json")}, |
69 | 69 | "6.1(5e)", |
70 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 70 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
71 | 71 | script.PASS, |
72 | 72 | [], |
73 | 73 | "", |
74 | 74 | ), |
75 | 75 | # Applicable mid-train version 6.1(5e), 6 LEMs on C9408 -> FAIL_O |
76 | 76 | ( |
77 | | - {eqptLC_api: read_data(dir, "eqptLC_6_node101.json")}, |
| 77 | + {eqptLC_api: read_data(dir, "eqptLC_6_node.json")}, |
78 | 78 | "6.1(5e)", |
79 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 79 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
80 | 80 | script.FAIL_O, |
81 | 81 | [["101", "N9K-C9408", "N9K-X9400-16W", 6]], |
82 | 82 | "", |
83 | 83 | ), |
84 | 84 | # Applicable mid-train version 6.1(5e), more than 6 LEMs on C9408 -> FAIL_O |
85 | 85 | ( |
86 | | - {eqptLC_api: read_data(dir, "eqptLC_7_node101.json")}, |
| 86 | + {eqptLC_api: read_data(dir, "eqptLC_7_node.json")}, |
87 | 87 | "6.1(5e)", |
88 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 88 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
89 | 89 | script.FAIL_O, |
90 | 90 | [["101", "N9K-C9408", "N9K-X9400-16W", 7]], |
91 | 91 | "", |
92 | 92 | ), |
93 | 93 | # Applicable version, 6 LEMs on C9408 -> FAIL_O |
94 | 94 | ( |
95 | | - {eqptLC_api: read_data(dir, "eqptLC_6_node101.json")}, |
| 95 | + {eqptLC_api: read_data(dir, "eqptLC_6_node.json")}, |
96 | 96 | "6.1(2f)", |
97 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 97 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
98 | 98 | script.FAIL_O, |
99 | 99 | [["101", "N9K-C9408", "N9K-X9400-16W", 6]], |
100 | 100 | "", |
101 | 101 | ), |
102 | 102 | # Applicable version, more than 6 LEMs on C9408 -> FAIL_O |
103 | 103 | ( |
104 | | - {eqptLC_api: read_data(dir, "eqptLC_7_node101.json")}, |
| 104 | + {eqptLC_api: read_data(dir, "eqptLC_7_node.json")}, |
105 | 105 | "6.1(2f)", |
106 | | - read_data(dir, "fabric_nodes_c9408_101.json"), |
| 106 | + read_data(dir, "fabricNode_n9k_c9408.json"), |
107 | 107 | script.FAIL_O, |
108 | 108 | [["101", "N9K-C9408", "N9K-X9400-16W", 7]], |
109 | 109 | "", |
110 | 110 | ), |
111 | 111 | # Count only C9408 nodes and only matching LEM model |
112 | 112 | ( |
113 | | - {eqptLC_api: read_data(dir, "eqptLC_mixed_101_102_201.json")}, |
| 113 | + {eqptLC_api: read_data(dir, "eqptLC_mixed.json")}, |
114 | 114 | "6.1(3a)", |
115 | | - read_data(dir, "fabric_nodes_mixed.json"), |
| 115 | + read_data(dir, "fabricNode_mixed.json"), |
116 | 116 | script.FAIL_O, |
117 | 117 | [ |
118 | 118 | ["101", "N9K-C9408", "N9K-X9400-16W", 6], |
|
0 commit comments