|
9 | 9 | {"params": {"mode": "all-same", "operator_data": True}}, |
10 | 10 | "result[0].vrfs.default.peerList[*].[$peerAddress$,peerGroup,vrf,state]", |
11 | 11 | ( |
12 | | - ( |
13 | | - False, |
14 | | - [ |
15 | | - { |
16 | | - "7.7.7.7": { |
17 | | - "peerGroup": "EVPN-OVERLAY-SPINE", |
18 | | - "state": "Idle", |
19 | | - "vrf": "default", |
20 | | - } |
21 | | - }, |
22 | | - { |
23 | | - "10.1.0.0": { |
24 | | - "peerGroup": "IPv4-UNDERLAY-SPINE", |
25 | | - "state": "Idle", |
26 | | - "vrf": "default", |
27 | | - } |
28 | | - }, |
29 | | - { |
30 | | - "10.2.0.0": { |
31 | | - "peerGroup": "IPv4-UNDERLAY-SPINE", |
32 | | - "state": "Idle", |
33 | | - "vrf": "default", |
34 | | - } |
35 | | - }, |
36 | | - { |
37 | | - "10.64.207.255": { |
38 | | - "peerGroup": "IPv4-UNDERLAY-MLAG-PEER", |
39 | | - "state": "Idle", |
40 | | - "vrf": "default", |
41 | | - } |
42 | | - }, |
43 | | - ], |
44 | | - ), |
| 12 | + [ |
| 13 | + { |
| 14 | + "7.7.7.7": { |
| 15 | + "peerGroup": "EVPN-OVERLAY-SPINE", |
| 16 | + "state": "Idle", |
| 17 | + "vrf": "default", |
| 18 | + } |
| 19 | + }, |
| 20 | + { |
| 21 | + "10.1.0.0": { |
| 22 | + "peerGroup": "IPv4-UNDERLAY-SPINE", |
| 23 | + "state": "Idle", |
| 24 | + "vrf": "default", |
| 25 | + } |
| 26 | + }, |
| 27 | + { |
| 28 | + "10.2.0.0": { |
| 29 | + "peerGroup": "IPv4-UNDERLAY-SPINE", |
| 30 | + "state": "Idle", |
| 31 | + "vrf": "default", |
| 32 | + } |
| 33 | + }, |
| 34 | + { |
| 35 | + "10.64.207.255": { |
| 36 | + "peerGroup": "IPv4-UNDERLAY-MLAG-PEER", |
| 37 | + "state": "Idle", |
| 38 | + "vrf": "default", |
| 39 | + } |
| 40 | + }, |
| 41 | + ], |
45 | 42 | False, |
46 | 43 | ), |
47 | 44 | ) |
|
50 | 47 | "operator", |
51 | 48 | {"params": {"mode": "contains", "operator_data": "EVPN"}}, |
52 | 49 | "result[0].vrfs.default.peerList[*].[$peerAddress$,peerGroup]", |
53 | | - ((True, [{"7.7.7.7": {"peerGroup": "EVPN-OVERLAY-SPINE"}}]), False), |
| 50 | + ([{"7.7.7.7": {"peerGroup": "EVPN-OVERLAY-SPINE"}}], True), |
54 | 51 | ) |
55 | 52 | operator_not_contains = ( |
56 | 53 | "pre.json", |
57 | 54 | "operator", |
58 | 55 | {"params": {"mode": "not-contains", "operator_data": "EVPN"}}, |
59 | 56 | "result[0].vrfs.default.peerList[*].[$peerAddress$,peerGroup]", |
60 | 57 | ( |
61 | | - ( |
62 | | - True, |
63 | | - [ |
64 | | - {"10.1.0.0": {"peerGroup": "IPv4-UNDERLAY-SPINE"}}, |
65 | | - {"10.2.0.0": {"peerGroup": "IPv4-UNDERLAY-SPINE"}}, |
66 | | - {"10.64.207.255": {"peerGroup": "IPv4-UNDERLAY-MLAG-PEER"}}, |
67 | | - ], |
68 | | - ), |
69 | | - False, |
| 58 | + [ |
| 59 | + {"10.1.0.0": {"peerGroup": "IPv4-UNDERLAY-SPINE"}}, |
| 60 | + {"10.2.0.0": {"peerGroup": "IPv4-UNDERLAY-SPINE"}}, |
| 61 | + {"10.64.207.255": {"peerGroup": "IPv4-UNDERLAY-MLAG-PEER"}}, |
| 62 | + ], |
| 63 | + True, |
70 | 64 | ), |
71 | 65 | ) |
72 | 66 | operator_is_gt = ( |
|
75 | 69 | {"params": {"mode": "is-gt", "operator_data": 20}}, |
76 | 70 | "result[0].vrfs.default.peerList[*].[$peerAddress$,prefixesSent]", |
77 | 71 | ( |
78 | | - ( |
79 | | - True, |
80 | | - [ |
81 | | - {"7.7.7.7": {"prefixesSent": 50}}, |
82 | | - {"10.1.0.0": {"prefixesSent": 50}}, |
83 | | - {"10.2.0.0": {"prefixesSent": 50}}, |
84 | | - {"10.64.207.255": {"prefixesSent": 50}}, |
85 | | - ], |
86 | | - ), |
87 | | - False, |
| 72 | + [ |
| 73 | + {"7.7.7.7": {"prefixesSent": 50}}, |
| 74 | + {"10.1.0.0": {"prefixesSent": 50}}, |
| 75 | + {"10.2.0.0": {"prefixesSent": 50}}, |
| 76 | + {"10.64.207.255": {"prefixesSent": 50}}, |
| 77 | + ], |
| 78 | + True, |
88 | 79 | ), |
89 | 80 | ) |
90 | 81 | operator_is_lt = ( |
|
93 | 84 | {"params": {"mode": "is-lt", "operator_data": 60}}, |
94 | 85 | "result[0].vrfs.default.peerList[*].[$peerAddress$,prefixesSent]", |
95 | 86 | ( |
96 | | - ( |
97 | | - True, |
98 | | - [ |
99 | | - {"7.7.7.7": {"prefixesSent": 50}}, |
100 | | - {"10.1.0.0": {"prefixesSent": 50}}, |
101 | | - {"10.2.0.0": {"prefixesSent": 50}}, |
102 | | - {"10.64.207.255": {"prefixesSent": 50}}, |
103 | | - ], |
104 | | - ), |
105 | | - False, |
| 87 | + [ |
| 88 | + {"7.7.7.7": {"prefixesSent": 50}}, |
| 89 | + {"10.1.0.0": {"prefixesSent": 50}}, |
| 90 | + {"10.2.0.0": {"prefixesSent": 50}}, |
| 91 | + {"10.64.207.255": {"prefixesSent": 50}}, |
| 92 | + ], |
| 93 | + True, |
106 | 94 | ), |
107 | 95 | ) |
108 | 96 | operator_is_in = ( |
|
111 | 99 | {"params": {"mode": "is-in", "operator_data": [20, 40, 50]}}, |
112 | 100 | "result[0].vrfs.default.peerList[*].[$peerAddress$,prefixesSent]", |
113 | 101 | ( |
114 | | - ( |
115 | | - True, |
116 | | - [ |
117 | | - {"7.7.7.7": {"prefixesSent": 50}}, |
118 | | - {"10.1.0.0": {"prefixesSent": 50}}, |
119 | | - {"10.2.0.0": {"prefixesSent": 50}}, |
120 | | - {"10.64.207.255": {"prefixesSent": 50}}, |
121 | | - ], |
122 | | - ), |
123 | | - False, |
| 102 | + [ |
| 103 | + {"7.7.7.7": {"prefixesSent": 50}}, |
| 104 | + {"10.1.0.0": {"prefixesSent": 50}}, |
| 105 | + {"10.2.0.0": {"prefixesSent": 50}}, |
| 106 | + {"10.64.207.255": {"prefixesSent": 50}}, |
| 107 | + ], |
| 108 | + True, |
124 | 109 | ), |
125 | 110 | ) |
126 | 111 | operator_not_in = ( |
|
129 | 114 | {"params": {"mode": "not-in", "operator_data": [20, 40, 60]}}, |
130 | 115 | "result[0].vrfs.default.peerList[*].[$peerAddress$,prefixesSent]", |
131 | 116 | ( |
132 | | - ( |
133 | | - True, |
134 | | - [ |
135 | | - {"7.7.7.7": {"prefixesSent": 50}}, |
136 | | - {"10.1.0.0": {"prefixesSent": 50}}, |
137 | | - {"10.2.0.0": {"prefixesSent": 50}}, |
138 | | - {"10.64.207.255": {"prefixesSent": 50}}, |
139 | | - ], |
140 | | - ), |
141 | | - False, |
| 117 | + [ |
| 118 | + {"7.7.7.7": {"prefixesSent": 50}}, |
| 119 | + {"10.1.0.0": {"prefixesSent": 50}}, |
| 120 | + {"10.2.0.0": {"prefixesSent": 50}}, |
| 121 | + {"10.64.207.255": {"prefixesSent": 50}}, |
| 122 | + ], |
| 123 | + True, |
142 | 124 | ), |
143 | 125 | ) |
144 | 126 | operator_in_range = ( |
|
147 | 129 | {"params": {"mode": "in-range", "operator_data": (20, 60)}}, |
148 | 130 | "result[0].vrfs.default.peerList[*].[$peerAddress$,prefixesSent]", |
149 | 131 | ( |
150 | | - ( |
151 | | - True, |
152 | | - [ |
153 | | - {"7.7.7.7": {"prefixesSent": 50}}, |
154 | | - {"10.1.0.0": {"prefixesSent": 50}}, |
155 | | - {"10.2.0.0": {"prefixesSent": 50}}, |
156 | | - {"10.64.207.255": {"prefixesSent": 50}}, |
157 | | - ], |
158 | | - ), |
159 | | - False, |
| 132 | + [ |
| 133 | + {"7.7.7.7": {"prefixesSent": 50}}, |
| 134 | + {"10.1.0.0": {"prefixesSent": 50}}, |
| 135 | + {"10.2.0.0": {"prefixesSent": 50}}, |
| 136 | + {"10.64.207.255": {"prefixesSent": 50}}, |
| 137 | + ], |
| 138 | + True, |
160 | 139 | ), |
161 | 140 | ) |
162 | 141 | operator_not_in_range = ( |
|
165 | 144 | {"params": {"mode": "not-range", "operator_data": (20, 40)}}, |
166 | 145 | "result[0].vrfs.default.peerList[*].[$peerAddress$,prefixesSent]", |
167 | 146 | ( |
168 | | - ( |
169 | | - True, |
170 | | - [ |
171 | | - {"7.7.7.7": {"prefixesSent": 50}}, |
172 | | - {"10.1.0.0": {"prefixesSent": 50}}, |
173 | | - {"10.2.0.0": {"prefixesSent": 50}}, |
174 | | - {"10.64.207.255": {"prefixesSent": 50}}, |
175 | | - ], |
176 | | - ), |
177 | | - False, |
| 147 | + [ |
| 148 | + {"7.7.7.7": {"prefixesSent": 50}}, |
| 149 | + {"10.1.0.0": {"prefixesSent": 50}}, |
| 150 | + {"10.2.0.0": {"prefixesSent": 50}}, |
| 151 | + {"10.64.207.255": {"prefixesSent": 50}}, |
| 152 | + ], |
| 153 | + True, |
178 | 154 | ), |
179 | 155 | ) |
180 | 156 |
|
|
0 commit comments