Test Failed
Pull Request — master (#68)
by Arturo
01:58
created

build.tests.integration.test_results_edges   F

Complexity

Total Complexity 160

Size/Duplication

Total Lines 1647
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 717
dl 0
loc 1647
rs 1.883
c 0
b 0
f 0
wmc 160

130 Methods

Rating   Name   Duplication   Size   Complexity  
A TestResultsEdges.test_path1() 0 13 3
A TestResultsEdges.test_path2() 0 10 2
A TestResultsEdges.test_path12() 0 13 3
A TestResultsEdges.test_path6_1() 0 5 1
A TestResultsEdges.test_path6_1_7() 0 5 1
A TestResultsEdges.test_path7_7() 0 10 1
A TestResultsEdges.test_path6_7() 0 5 1
A TestResultsEdges.test_path7_8() 0 10 1
A TestResultsEdges.test_path8_1_8() 0 14 1
A TestResultsEdges.test_path7_5() 0 10 1
A TestResultsEdges.test_path7_2() 0 10 1
A TestResultsEdges.test_path8_7() 0 14 1
A TestResultsEdges.test_path7_3_0() 0 10 1
A TestResultsEdges.test_path8_8() 0 14 1
A TestResultsEdges.test_path8_2_8() 0 14 1
A TestResultsEdges.test_path6_8() 0 5 1
A TestResultsEdges.test_path8_1_7() 0 14 1
A TestResultsEdges.test_path7_1_4() 0 10 1
A TestResultsEdges.test_path8_1_2() 0 14 1
A TestResultsEdges.test_path8_3_5() 0 13 1
A TestResultsEdges.test_path3_5() 0 5 1
A TestResultsEdges.test_path8_1_4() 0 14 1
A TestResultsEdges.test_path10() 0 10 2
A TestResultsEdges.test_path6_1_5() 0 5 1
A TestResultsEdges.test_path3_6() 0 5 1
A TestResultsEdges.test_path3_2() 0 5 1
A TestResultsEdges.test_path6_2_1() 0 5 1
A TestResultsEdges.test_path7_2_1() 0 10 1
A TestResultsEdges.test_path3_9() 0 5 1
A TestResultsEdges.test_path3_1() 0 5 1
A TestResultsEdges.test_path8_1_3() 0 14 1
A TestResultsEdges.test_path7_3() 0 10 1
A TestResultsEdges.test_path7_1_5() 0 10 1
A TestResultsEdges.test_path6_1_8() 0 5 1
A TestResultsEdges.test_path8_6() 0 14 1
A TestResultsEdges.test_path8_2_3() 0 14 1
A TestResultsEdges.test_path8_4_0() 0 13 1
A TestResultsEdges.test_path4_3() 0 5 1
A TestResultsEdges.test_path5_2() 0 5 1
A TestResultsEdges.test_path7_3_9() 0 10 1
A TestResultsEdges.test_path8_3_7() 0 13 1
A TestResultsEdges.test_path6_1_3() 0 5 1
A TestResultsEdges.test_path7_1_1() 0 10 1
A TestResultsEdges.test_path7_3_3() 0 10 1
A TestResultsEdges.test_path6_1_1() 0 5 1
A TestResultsEdges.test_path8_9() 0 14 1
A TestResultsEdges.test_path3_3() 0 5 1
A TestResultsEdges.test_path7_2_2() 0 10 1
B TestResultsEdges.generate_topology() 0 57 1
C TestResultsEdges.test_path9() 0 73 10
A TestResultsEdges.test_path7_2_6() 0 10 1
A TestResultsEdges.test_path7_2_8() 0 10 1
A TestResultsEdges.test_path3_1_1() 0 5 1
A TestResultsEdges.test_path6_6() 0 5 1
A TestResultsEdges.test_path6_2() 0 5 1
A TestResultsEdges.test_path7_3_4() 0 10 1
A TestResultsEdges.test_path7_1_7() 0 10 1
A TestResultsEdges.test_path5_3() 0 5 1
A TestResultsEdges.test_path7_9() 0 10 1
A TestResultsEdges.test_path3_4() 0 5 1
A TestResultsEdges.test_path8_2_4() 0 14 1
A TestResultsEdges.test_path7_3_1() 0 10 1
A TestResultsEdges.test_path3_8() 0 5 1
A TestResultsEdges.test_path6_5() 0 5 1
A TestResultsEdges.test_path6_1_0() 0 5 1
A TestResultsEdges.test_path7_2_9() 0 10 1
A TestResultsEdges.test_path7_4() 0 10 1
A TestResultsEdges.test_path5_4() 0 5 1
A TestResultsEdges.test_path3_1_0() 0 5 1
A TestResultsEdges.test_path7_2_4() 0 10 1
A TestResultsEdges.test_path8_2_5() 0 14 1
A TestResultsEdges.test_path7_1_2() 0 10 1
A TestResultsEdges.test_path7_3_7() 0 10 1
A TestResultsEdges.test_path8_3_8() 0 13 1
A TestResultsEdges.test_path8_1_5() 0 14 1
A TestResultsEdges.test_path6_3() 0 5 1
A TestResultsEdges.test_path7_2_5() 0 10 1
A TestResultsEdges.test_path7_4_0() 0 10 1
A TestResultsEdges.test_path7_1_3() 0 10 1
A TestResultsEdges.test_path7_1_8() 0 10 1
A TestResultsEdges.test_path8_2_6() 0 14 1
A TestResultsEdges.test_path8_3_2() 0 13 1
A TestResultsEdges.test_path6_1_6() 0 5 1
A TestResultsEdges.test_path8_2_1() 0 14 1
A TestResultsEdges.test_path6_4() 0 5 1
A TestResultsEdges.test_path8_1_0() 0 14 1
A TestResultsEdges.test_path6_2_0() 0 5 1
A TestResultsEdges.test_path8_1_9() 0 14 1
A TestResultsEdges.test_path8_2_2() 0 14 1
A TestResultsEdges.test_path7_3_5() 0 10 1
A TestResultsEdges.test_path5_1() 0 5 1
A TestResultsEdges.test_path8_3() 0 14 1
A TestResultsEdges.test_path8_5() 0 14 1
A TestResultsEdges.test_path4_2() 0 5 1
B TestResultsEdges._add_metadata_to_links() 0 86 1
A TestResultsEdges.test_path8_4() 0 14 1
A TestResultsEdges.test_path6_1_2() 0 5 1
A TestResultsEdges.test_path7_2_7() 0 10 1
A TestResultsEdges.test_path4_1() 0 5 1
A TestResultsEdges.test_path7_2_3() 0 10 1
A TestResultsEdges.test_path7_3_8() 0 10 1
A TestResultsEdges._fill_links() 0 55 1
A TestResultsEdges.test_path8_3_0() 0 13 1
A TestResultsEdges.test_path3_7() 0 5 1
A TestResultsEdges.test_path7_1_9() 0 10 1
A TestResultsEdges.test_path8_2_7() 0 14 1
A TestResultsEdges.test_path7_3_6() 0 10 1
A TestResultsEdges.test_path8_3_9() 0 13 1
A TestResultsEdges.test_path8_1_6() 0 14 1
A TestResultsEdges.test_path7_1_6() 0 10 1
A TestResultsEdges.test_path8_2_0() 0 14 1
A TestResultsEdges.test_path3_1_2() 0 5 1
F TestResultsEdges.paths_between_all_users() 0 30 16
A TestResultsEdges.test_path8_2() 0 14 1
A TestResultsEdges.test_path6_1_4() 0 5 1
A TestResultsEdges.test_path8_1_1() 0 14 1
A TestResultsEdges.test_path7_1_0() 0 10 1
A TestResultsEdges.test_path7_6() 0 10 1
A TestResultsEdges.test_path6_1_9() 0 5 1
A TestResultsEdges.test_path8_1() 0 14 1
A TestResultsEdges.test_path8_3_3() 0 13 1
A TestResultsEdges.test_path7_2_0() 0 10 1
A TestResultsEdges.test_path4_4() 0 5 1
A TestResultsEdges.test_path7_3_2() 0 10 1
A TestResultsEdges.test_path6_9() 0 5 1
A TestResultsEdges.test_path8_3_4() 0 13 1
A TestResultsEdges.test_path7_1() 0 10 1
A TestResultsEdges.test_path8_3_6() 0 13 1
A TestResultsEdges.test_path8_2_9() 0 13 1
A TestResultsEdges.test_path8_3_1() 0 13 1

How to fix   Complexity   

Complexity

Complex classes like build.tests.integration.test_results_edges often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

1
"""Module to test the KytosGraph in graph.py."""
2
from itertools import combinations
3
4
# Core modules to import
5
from kytos.core.link import Link
6
7
# module under test
8
from tests.integration.test_results import TestResults
9
10
11
class TestResultsEdges(TestResults):
12
    """Tests for the graph class.
13
14
    Tests to see if reflexive searches and impossible searches
15
    show correct results.
16
    """
17
18
    def test_path1(self):
19
        """Tests paths between all users using unconstrained path algorithm."""
20
        combos = combinations(["User1", "User2", "User3", "User4"], 2)
21
        self.initializer()
22
23
        valid = True
24
        for point_a, point_b in combos:
25
            results = self.get_path(point_a, point_b)
26
            if not results:
27
                valid = False
28
                break
29
30
        self.assertNotEqual(valid, False)
31
32
    def test_path12(self):
33
        """Tests paths between all users using unconstrained path algorithm."""
34
        combos = combinations(["User1", "User2", "User3", "User4", "User5"], 2)
35
        self.initializer()
36
37
        valid = True
38
        for point_a, point_b in combos:
39
            results = self.get_path(point_a, point_b)
40
            if not results:
41
                valid = False
42
                break
43
44
        self.assertEqual(valid, False)
45
46
    def test_path2(self):
47
        """Tests paths between all users using constrained path algorithm,
48
        with no constraints set.
49
        """
50
        combos = combinations(["User1", "User2", "User3", "User4"], 2)
51
        self.initializer()
52
53
        for point_a, point_b in combos:
54
            results = self.get_path_constrained(point_a, point_b)
55
            self.assertNotEqual(results, [])
56
57
    def paths_between_all_users(self, item, base=None, flexible=None, metrics=None):
58
        """Method to verify the existence of a path between
59
        a set of points given different constrains"""
60
        combos = combinations(["User1", "User2", "User3", "User4"], 2)
61
        self.initializer()
62
63
        valid = True
64
        for point_a, point_b in combos:
65
            if base is not None and flexible is None:
66
                results = self.get_path_constrained(
67
                    point_a, point_b, base=base)
68
                for result in results:
69
                    for path in result["paths"]:
70
                        if item in path:
71
                            valid = False
72
73
            elif base is None and flexible is not None:
74
                results = self.get_path_constrained(
75
                    point_a, point_b, flexible=flexible)
76
                for result in results:
77
                    if metrics is not None:
78
                        if metrics in result["metrics"]:
79
                            for path in result["paths"]:
80
                                if item in path:
81
                                    valid = False
82
                    else:
83
                        for path in result["paths"]:
84
                            if item in path:
85
                                valid = False
86
        return valid
87
88
    def test_path3_1(self):
89
        """Tests paths between all users using constrained path algorithm,
90
        with the ownership constraint set to B.
91
        """
92
        self.assertTrue(self.paths_between_all_users("S4:1", {'ownership': "B"}))
93
94
    def test_path3_2(self):
95
        """Tests paths between all users using constrained path algorithm,
96
        with the ownership constraint set to B.
97
        """
98
        self.assertTrue(self.paths_between_all_users("S5:2", {'ownership': "B"}))
99
100
    def test_path3_3(self):
101
        """Tests paths between all users using constrained path algorithm,
102
        with the ownership constraint set to B.
103
        """
104
        self.assertTrue(self.paths_between_all_users("S4:2", {'ownership': "B"}))
105
106
    def test_path3_4(self):
107
        """Tests paths between all users using constrained path algorithm,
108
        with the ownership constraint set to B.
109
        """
110
        self.assertTrue(self.paths_between_all_users("User1:2", {'ownership': "B"}))
111
112
    def test_path3_5(self):
113
        """Tests paths between all users using constrained path algorithm,
114
        with the ownership constraint set to B.
115
        """
116
        self.assertTrue(self.paths_between_all_users("S5:4", {'ownership': "B"}))
117
118
    def test_path3_6(self):
119
        """Tests paths between all users using constrained path algorithm,
120
        with the ownership constraint set to B.
121
        """
122
        self.assertTrue(self.paths_between_all_users("S6:2", {'ownership': "B"}))
123
124
    def test_path3_7(self):
125
        """Tests paths between all users using constrained path algorithm,
126
        with the ownership constraint set to B.
127
        """
128
        self.assertTrue(self.paths_between_all_users("S6:5", {'ownership': "B"}))
129
130
    def test_path3_8(self):
131
        """Tests paths between all users using constrained path algorithm,
132
        with the ownership constraint set to B.
133
        """
134
        self.assertTrue(self.paths_between_all_users("S10:1", {'ownership': "B"}))
135
136
    def test_path3_9(self):
137
        """Tests paths between all users using constrained path algorithm,
138
        with the ownership constraint set to B.
139
        """
140
        self.assertTrue(self.paths_between_all_users("S8:6", {'ownership': "B"}))
141
142
    def test_path3_1_0(self):
143
        """Tests paths between all users using constrained path algorithm,
144
        with the ownership constraint set to B.
145
        """
146
        self.assertTrue(self.paths_between_all_users("S10:2", {'ownership': "B"}))
147
148
    def test_path3_1_1(self):
149
        """Tests paths between all users using constrained path algorithm,
150
        with the ownership constraint set to B.
151
        """
152
        self.assertTrue(self.paths_between_all_users("S10:3", {'ownership': "B"}))
153
154
    def test_path3_1_2(self):
155
        """Tests paths between all users using constrained path algorithm,
156
        with the ownership constraint set to B.
157
        """
158
        self.assertTrue(self.paths_between_all_users("User2:1", {'ownership': "B"}))
159
160
    def test_path4_1(self):
161
        """Tests paths between all users using constrained path algorithm,
162
        with the reliability constraint set to 3.
163
        """
164
        self.assertTrue(self.paths_between_all_users("S4:1", {'reliability': 3}))
165
166
    def test_path4_2(self):
167
        """Tests paths between all users using constrained path algorithm,
168
        with the reliability constraint set to 3.
169
        """
170
        self.assertTrue(self.paths_between_all_users("S5:2", {'reliability': 3}))
171
172
    def test_path4_3(self):
173
        """Tests paths between all users using constrained path algorithm,
174
        with the reliability constraint set to 3.
175
        """
176
        self.assertTrue(self.paths_between_all_users("S5:3", {'reliability': 3}))
177
178
    def test_path4_4(self):
179
        """Tests paths between all users using constrained path algorithm,
180
        with the reliability constraint set to 3.
181
        """
182
        self.assertTrue(self.paths_between_all_users("S6:1", {'reliability': 3}))
183
184
    def test_path5_1(self):
185
        """Tests paths between all users using constrained path algorithm,
186
        with the reliability constraint set to 3.
187
        """
188
        self.assertTrue(self.paths_between_all_users("S3:1", {'bandwidth': 100}))
189
190
    def test_path5_2(self):
191
        """Tests paths between all users using constrained path algorithm,
192
        with the reliability constraint set to 3.
193
        """
194
        self.assertTrue(self.paths_between_all_users("S5:1", {'bandwidth': 100}))
195
196
    def test_path5_3(self):
197
        """Tests paths between all users using constrained path algorithm,
198
        with the reliability constraint set to 3.
199
        """
200
        self.assertTrue(self.paths_between_all_users("User1:4", {'bandwidth': 100}))
201
202
    def test_path5_4(self):
203
        """Tests paths between all users using constrained path algorithm,
204
        with the reliability constraint set to 3.
205
        """
206
        self.assertTrue(self.paths_between_all_users("User4:3", {'bandwidth': 100}))
207
208
    def test_path6_1(self):
209
        """Tests paths between all users using constrained path algorithm,
210
        with the delay constraint set to 50.
211
        """
212
        self.assertTrue(self.paths_between_all_users("S1:1", {'delay': 50}))
213
214
    def test_path6_2(self):
215
        """Tests paths between all users using constrained path algorithm,
216
        with the delay constraint set to 50.
217
        """
218
        self.assertTrue(self.paths_between_all_users("S2:1", {'delay': 50}))
219
220
    def test_path6_3(self):
221
        """Tests paths between all users using constrained path algorithm,
222
        with the delay constraint set to 50.
223
        """
224
        self.assertTrue(self.paths_between_all_users("S3:1", {'delay': 50}))
225
226
    def test_path6_4(self):
227
        """Tests paths between all users using constrained path algorithm,
228
        with the delay constraint set to 50.
229
        """
230
        self.assertTrue(self.paths_between_all_users("S5:1", {'delay': 50}))
231
232
    def test_path6_5(self):
233
        """Tests paths between all users using constrained path algorithm,
234
        with the delay constraint set to 50.
235
        """
236
        self.assertTrue(self.paths_between_all_users("S4:2", {'delay': 50}))
237
238
    def test_path6_6(self):
239
        """Tests paths between all users using constrained path algorithm,
240
        with the delay constraint set to 50.
241
        """
242
        self.assertTrue(self.paths_between_all_users("User1:2", {'delay': 50}))
243
244
    def test_path6_7(self):
245
        """Tests paths between all users using constrained path algorithm,
246
        with the delay constraint set to 50.
247
        """
248
        self.assertTrue(self.paths_between_all_users("S5:5", {'delay': 50}))
249
250
    def test_path6_8(self):
251
        """Tests paths between all users using constrained path algorithm,
252
        with the delay constraint set to 50.
253
        """
254
        self.assertTrue(self.paths_between_all_users("S8:2", {'delay': 50}))
255
256
    def test_path6_9(self):
257
        """Tests paths between all users using constrained path algorithm,
258
        with the delay constraint set to 50.
259
        """
260
        self.assertTrue(self.paths_between_all_users("S5:6", {'delay': 50}))
261
262
    def test_path6_1_0(self):
263
        """Tests paths between all users using constrained path algorithm,
264
        with the delay constraint set to 50.
265
        """
266
        self.assertTrue(self.paths_between_all_users("User1:3", {'delay': 50}))
267
268
    def test_path6_1_1(self):
269
        """Tests paths between all users using constrained path algorithm,
270
        with the delay constraint set to 50.
271
        """
272
        self.assertTrue(self.paths_between_all_users("S6:3", {'delay': 50}))
273
274
    def test_path6_1_2(self):
275
        """Tests paths between all users using constrained path algorithm,
276
        with the delay constraint set to 50.
277
        """
278
        self.assertTrue(self.paths_between_all_users("S9:1", {'delay': 50}))
279
280
    def test_path6_1_3(self):
281
        """Tests paths between all users using constrained path algorithm,
282
        with the delay constraint set to 50.
283
        """
284
        self.assertTrue(self.paths_between_all_users("S6:4", {'delay': 50}))
285
286
    def test_path6_1_4(self):
287
        """Tests paths between all users using constrained path algorithm,
288
        with the delay constraint set to 50.
289
        """
290
        self.assertTrue(self.paths_between_all_users("S9:2", {'delay': 50}))
291
292
    def test_path6_1_5(self):
293
        """Tests paths between all users using constrained path algorithm,
294
        with the delay constraint set to 50.
295
        """
296
        self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50}))
297
298
    def test_path6_1_6(self):
299
        """Tests paths between all users using constrained path algorithm,
300
        with the delay constraint set to 50.
301
        """
302
        self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50}))
303
304
    def test_path6_1_7(self):
305
        """Tests paths between all users using constrained path algorithm,
306
        with the delay constraint set to 50.
307
        """
308
        self.assertTrue(self.paths_between_all_users("S10:1", {'delay': 50}))
309
310
    def test_path6_1_8(self):
311
        """Tests paths between all users using constrained path algorithm,
312
        with the delay constraint set to 50.
313
        """
314
        self.assertTrue(self.paths_between_all_users("S8:5", {'delay': 50}))
315
316
    def test_path6_1_9(self):
317
        """Tests paths between all users using constrained path algorithm,
318
        with the delay constraint set to 50.
319
        """
320
        self.assertTrue(self.paths_between_all_users("S9:4", {'delay': 50}))
321
322
    def test_path6_2_0(self):
323
        """Tests paths between all users using constrained path algorithm,
324
        with the delay constraint set to 50.
325
        """
326
        self.assertTrue(self.paths_between_all_users("User1:4", {'delay': 50}))
327
328
    def test_path6_2_1(self):
329
        """Tests paths between all users using constrained path algorithm,
330
        with the delay constraint set to 50.
331
        """
332
        self.assertTrue(self.paths_between_all_users("User4:3", {'delay': 50}))
333
334
    def test_path7_1(self):
335
        """Tests paths between all users using constrained path algorithm,
336
        with the delay constraint set to 50, the bandwidth constraint set
337
        to 100, the reliability constraint set to 3, and the ownership
338
        constraint set to 'B'
339
        """
340
        # delay = 50
341
        self.assertTrue(self.paths_between_all_users("S1:1", {'delay': 50,
342
                                                              'bandwidth': 100,
343
                                                              'ownership': "B"}))
344
345
    def test_path7_2(self):
346
        """Tests paths between all users using constrained path algorithm,
347
        with the delay constraint set to 50, the bandwidth constraint set
348
        to 100, the reliability constraint set to 3, and the ownership
349
        constraint set to 'B'
350
        """
351
        # delay = 50
352
        self.assertTrue(self.paths_between_all_users("S2:1", {'delay': 50,
353
                                                              'bandwidth': 100,
354
                                                              'ownership': "B"}))
355
356
    def test_path7_3(self):
357
        """Tests paths between all users using constrained path algorithm,
358
        with the delay constraint set to 50, the bandwidth constraint set
359
        to 100, the reliability constraint set to 3, and the ownership
360
        constraint set to 'B'
361
        """
362
        # delay = 50
363
        self.assertTrue(self.paths_between_all_users("S3:1", {'delay': 50,
364
                                                              'bandwidth': 100,
365
                                                              'ownership': "B"}))
366
367
    def test_path7_4(self):
368
        """Tests paths between all users using constrained path algorithm,
369
        with the delay constraint set to 50, the bandwidth constraint set
370
        to 100, the reliability constraint set to 3, and the ownership
371
        constraint set to 'B'
372
        """
373
        # delay = 50
374
        self.assertTrue(self.paths_between_all_users("S5:1", {'delay': 50,
375
                                                              'bandwidth': 100,
376
                                                              'ownership': "B"}))
377
378
    def test_path7_5(self):
379
        """Tests paths between all users using constrained path algorithm,
380
        with the delay constraint set to 50, the bandwidth constraint set
381
        to 100, the reliability constraint set to 3, and the ownership
382
        constraint set to 'B'
383
        """
384
        # delay = 50
385
        self.assertTrue(self.paths_between_all_users("S4:2", {'delay': 50,
386
                                                              'bandwidth': 100,
387
                                                              'ownership': "B"}))
388
389
    def test_path7_6(self):
390
        """Tests paths between all users using constrained path algorithm,
391
        with the delay constraint set to 50, the bandwidth constraint set
392
        to 100, the reliability constraint set to 3, and the ownership
393
        constraint set to 'B'
394
        """
395
        # delay = 50
396
        self.assertTrue(self.paths_between_all_users("User1:2", {'delay': 50,
397
                                                                 'bandwidth': 100,
398
                                                                 'ownership': "B"}))
399
400
    def test_path7_7(self):
401
        """Tests paths between all users using constrained path algorithm,
402
        with the delay constraint set to 50, the bandwidth constraint set
403
        to 100, the reliability constraint set to 3, and the ownership
404
        constraint set to 'B'
405
        """
406
        # delay = 50
407
        self.assertTrue(self.paths_between_all_users("S5:5", {'delay': 50,
408
                                                              'bandwidth': 100,
409
                                                              'ownership': "B"}))
410
411
    def test_path7_8(self):
412
        """Tests paths between all users using constrained path algorithm,
413
        with the delay constraint set to 50, the bandwidth constraint set
414
        to 100, the reliability constraint set to 3, and the ownership
415
        constraint set to 'B'
416
        """
417
        # delay = 50
418
        self.assertTrue(self.paths_between_all_users("S8:2", {'delay': 50,
419
                                                              'bandwidth': 100,
420
                                                              'ownership': "B"}))
421
422
    def test_path7_9(self):
423
        """Tests paths between all users using constrained path algorithm,
424
        with the delay constraint set to 50, the bandwidth constraint set
425
        to 100, the reliability constraint set to 3, and the ownership
426
        constraint set to 'B'
427
        """
428
        # delay = 50
429
        self.assertTrue(self.paths_between_all_users("S5:6", {'delay': 50,
430
                                                              'bandwidth': 100,
431
                                                              'ownership': "B"}))
432
433
    def test_path7_1_0(self):
434
        """Tests paths between all users using constrained path algorithm,
435
        with the delay constraint set to 50, the bandwidth constraint set
436
        to 100, the reliability constraint set to 3, and the ownership
437
        constraint set to 'B'
438
        """
439
        # delay = 50
440
        self.assertTrue(self.paths_between_all_users("User1:3", {'delay': 50,
441
                                                                 'bandwidth': 100,
442
                                                                 'ownership': "B"}))
443
444
    def test_path7_1_1(self):
445
        """Tests paths between all users using constrained path algorithm,
446
        with the delay constraint set to 50, the bandwidth constraint set
447
        to 100, the reliability constraint set to 3, and the ownership
448
        constraint set to 'B'
449
        """
450
        # delay = 50
451
        self.assertTrue(self.paths_between_all_users("S6:3", {'delay': 50,
452
                                                              'bandwidth': 100,
453
                                                              'ownership': "B"}))
454
455
    def test_path7_1_2(self):
456
        """Tests paths between all users using constrained path algorithm,
457
        with the delay constraint set to 50, the bandwidth constraint set
458
        to 100, the reliability constraint set to 3, and the ownership
459
        constraint set to 'B'
460
        """
461
        # delay = 50
462
        self.assertTrue(self.paths_between_all_users("S9:1", {'delay': 50,
463
                                                              'bandwidth': 100,
464
                                                              'ownership': "B"}))
465
466
    def test_path7_1_3(self):
467
        """Tests paths between all users using constrained path algorithm,
468
        with the delay constraint set to 50, the bandwidth constraint set
469
        to 100, the reliability constraint set to 3, and the ownership
470
        constraint set to 'B'
471
        """
472
        # delay = 50
473
        self.assertTrue(self.paths_between_all_users("S6:4", {'delay': 50,
474
                                                              'bandwidth': 100,
475
                                                              'ownership': "B"}))
476
477
    def test_path7_1_4(self):
478
        """Tests paths between all users using constrained path algorithm,
479
        with the delay constraint set to 50, the bandwidth constraint set
480
        to 100, the reliability constraint set to 3, and the ownership
481
        constraint set to 'B'
482
        """
483
        # delay = 50
484
        self.assertTrue(self.paths_between_all_users("S9:2", {'delay': 50,
485
                                                              'bandwidth': 100,
486
                                                              'ownership': "B"}))
487
488
    def test_path7_1_5(self):
489
        """Tests paths between all users using constrained path algorithm,
490
        with the delay constraint set to 50, the bandwidth constraint set
491
        to 100, the reliability constraint set to 3, and the ownership
492
        constraint set to 'B'
493
        """
494
        # delay = 50
495
        self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50,
496
                                                              'bandwidth': 100,
497
                                                              'ownership': "B"}))
498
499
    def test_path7_1_6(self):
500
        """Tests paths between all users using constrained path algorithm,
501
        with the delay constraint set to 50, the bandwidth constraint set
502
        to 100, the reliability constraint set to 3, and the ownership
503
        constraint set to 'B'
504
        """
505
        # delay = 50
506
        self.assertTrue(self.paths_between_all_users("S10:1", {'delay': 50,
507
                                                               'bandwidth': 100,
508
                                                               'ownership': "B"}))
509
510
    def test_path7_1_7(self):
511
        """Tests paths between all users using constrained path algorithm,
512
        with the delay constraint set to 50, the bandwidth constraint set
513
        to 100, the reliability constraint set to 3, and the ownership
514
        constraint set to 'B'
515
        """
516
        # delay = 50
517
        self.assertTrue(self.paths_between_all_users("S8:5", {'delay': 50,
518
                                                              'bandwidth': 100,
519
                                                              'ownership': "B"}))
520
521
    def test_path7_1_8(self):
522
        """Tests paths between all users using constrained path algorithm,
523
        with the delay constraint set to 50, the bandwidth constraint set
524
        to 100, the reliability constraint set to 3, and the ownership
525
        constraint set to 'B'
526
        """
527
        # delay = 50
528
        self.assertTrue(self.paths_between_all_users("S9:4", {'delay': 50,
529
                                                              'bandwidth': 100,
530
                                                              'ownership': "B"}))
531
532
    def test_path7_1_9(self):
533
        """Tests paths between all users using constrained path algorithm,
534
        with the delay constraint set to 50, the bandwidth constraint set
535
        to 100, the reliability constraint set to 3, and the ownership
536
        constraint set to 'B'
537
        """
538
        # delay = 50
539
        self.assertTrue(self.paths_between_all_users("User1:4", {'delay': 50,
540
                                                                 'bandwidth': 100,
541
                                                                 'ownership': "B"}))
542
543
    def test_path7_2_0(self):
544
        """Tests paths between all users using constrained path algorithm,
545
        with the delay constraint set to 50, the bandwidth constraint set
546
        to 100, the reliability constraint set to 3, and the ownership
547
        constraint set to 'B'
548
        """
549
        # delay = 50
550
        self.assertTrue(self.paths_between_all_users("User4:3", {'delay': 50,
551
                                                                 'bandwidth': 100,
552
                                                                 'ownership': "B"}))
553
554
    def test_path7_2_1(self):
555
        """Tests paths between all users using constrained path algorithm,
556
        with the delay constraint set to 50, the bandwidth constraint set
557
        to 100, the reliability constraint set to 3, and the ownership
558
        constraint set to 'B'
559
        """
560
        # bandwidth = 100
561
        self.assertTrue(self.paths_between_all_users("S3:1", {'delay': 50,
562
                                                              'bandwidth': 100,
563
                                                              'ownership': "B"}))
564
565
    def test_path7_2_2(self):
566
        """Tests paths between all users using constrained path algorithm,
567
        with the delay constraint set to 50, the bandwidth constraint set
568
        to 100, the reliability constraint set to 3, and the ownership
569
        constraint set to 'B'
570
        """
571
        # bandwidth = 100
572
        self.assertTrue(self.paths_between_all_users("S5:1", {'delay': 50,
573
                                                              'bandwidth': 100,
574
                                                              'ownership': "B"}))
575
576
    def test_path7_2_3(self):
577
        """Tests paths between all users using constrained path algorithm,
578
        with the delay constraint set to 50, the bandwidth constraint set
579
        to 100, the reliability constraint set to 3, and the ownership
580
        constraint set to 'B'
581
        """
582
        # bandwidth = 100
583
        self.assertTrue(self.paths_between_all_users("User1:4", {'delay': 50,
584
                                                                 'bandwidth': 100,
585
                                                                 'ownership': "B"}))
586
587
    def test_path7_2_4(self):
588
        """Tests paths between all users using constrained path algorithm,
589
        with the delay constraint set to 50, the bandwidth constraint set
590
        to 100, the reliability constraint set to 3, and the ownership
591
        constraint set to 'B'
592
        """
593
        # bandwidth = 100
594
        self.assertTrue(self.paths_between_all_users("User4:3", {'delay': 50,
595
                                                                 'bandwidth': 100,
596
                                                                 'ownership': "B"}))
597
598
    def test_path7_2_5(self):
599
        """Tests paths between all users using constrained path algorithm,
600
        with the delay constraint set to 50, the bandwidth constraint set
601
        to 100, the reliability constraint set to 3, and the ownership
602
        constraint set to 'B'
603
        """
604
        # reliability = 3
605
        self.assertTrue(self.paths_between_all_users("S4:1", {'delay': 50,
606
                                                              'bandwidth': 100,
607
                                                              'ownership': "B"}))
608
609
    def test_path7_2_6(self):
610
        """Tests paths between all users using constrained path algorithm,
611
        with the delay constraint set to 50, the bandwidth constraint set
612
        to 100, the reliability constraint set to 3, and the ownership
613
        constraint set to 'B'
614
        """
615
        # reliability = 3
616
        self.assertTrue(self.paths_between_all_users("S5:2", {'delay': 50,
617
                                                              'bandwidth': 100,
618
                                                              'ownership': "B"}))
619
620
    def test_path7_2_7(self):
621
        """Tests paths between all users using constrained path algorithm,
622
        with the delay constraint set to 50, the bandwidth constraint set
623
        to 100, the reliability constraint set to 3, and the ownership
624
        constraint set to 'B'
625
        """
626
        # reliability = 3
627
        self.assertTrue(self.paths_between_all_users("S5:3", {'delay': 50,
628
                                                              'bandwidth': 100,
629
                                                              'ownership': "B"}))
630
631
    def test_path7_2_8(self):
632
        """Tests paths between all users using constrained path algorithm,
633
        with the delay constraint set to 50, the bandwidth constraint set
634
        to 100, the reliability constraint set to 3, and the ownership
635
        constraint set to 'B'
636
        """
637
        # reliability = 3
638
        self.assertTrue(self.paths_between_all_users("S6:1", {'delay': 50,
639
                                                              'bandwidth': 100,
640
                                                              'ownership': "B"}))
641
642
    def test_path7_2_9(self):
643
        """Tests paths between all users using constrained path algorithm,
644
        with the delay constraint set to 50, the bandwidth constraint set
645
        to 100, the reliability constraint set to 3, and the ownership
646
        constraint set to 'B'
647
        """
648
        # ownership = "B"
649
        self.assertTrue(self.paths_between_all_users("S4:1", {'delay': 50,
650
                                                              'bandwidth': 100,
651
                                                              'ownership': "B"}))
652
653
    def test_path7_3_0(self):
654
        """Tests paths between all users using constrained path algorithm,
655
        with the delay constraint set to 50, the bandwidth constraint set
656
        to 100, the reliability constraint set to 3, and the ownership
657
        constraint set to 'B'
658
        """
659
        # ownership = "B"
660
        self.assertTrue(self.paths_between_all_users("S5:2", {'delay': 50,
661
                                                              'bandwidth': 100,
662
                                                              'ownership': "B"}))
663
664
    def test_path7_3_1(self):
665
        """Tests paths between all users using constrained path algorithm,
666
        with the delay constraint set to 50, the bandwidth constraint set
667
        to 100, the reliability constraint set to 3, and the ownership
668
        constraint set to 'B'
669
        """
670
        # ownership = "B"
671
        self.assertTrue(self.paths_between_all_users("S4:2", {'delay': 50,
672
                                                              'bandwidth': 100,
673
                                                              'ownership': "B"}))
674
675
    def test_path7_3_2(self):
676
        """Tests paths between all users using constrained path algorithm,
677
        with the delay constraint set to 50, the bandwidth constraint set
678
        to 100, the reliability constraint set to 3, and the ownership
679
        constraint set to 'B'
680
        """
681
        # ownership = "B"
682
        self.assertTrue(self.paths_between_all_users("User1:2", {'delay': 50,
683
                                                                 'bandwidth': 100,
684
                                                                 'ownership': "B"}))
685
686
    def test_path7_3_3(self):
687
        """Tests paths between all users using constrained path algorithm,
688
        with the delay constraint set to 50, the bandwidth constraint set
689
        to 100, the reliability constraint set to 3, and the ownership
690
        constraint set to 'B'
691
        """
692
        # ownership = "B"
693
        self.assertTrue(self.paths_between_all_users("S5:4", {'delay': 50,
694
                                                              'bandwidth': 100,
695
                                                              'ownership': "B"}))
696
697
    def test_path7_3_4(self):
698
        """Tests paths between all users using constrained path algorithm,
699
        with the delay constraint set to 50, the bandwidth constraint set
700
        to 100, the reliability constraint set to 3, and the ownership
701
        constraint set to 'B'
702
        """
703
        # ownership = "B"
704
        self.assertTrue(self.paths_between_all_users("S6:2", {'delay': 50,
705
                                                              'bandwidth': 100,
706
                                                              'ownership': "B"}))
707
708
    def test_path7_3_5(self):
709
        """Tests paths between all users using constrained path algorithm,
710
        with the delay constraint set to 50, the bandwidth constraint set
711
        to 100, the reliability constraint set to 3, and the ownership
712
        constraint set to 'B'
713
        """
714
        # ownership = "B"
715
        self.assertTrue(self.paths_between_all_users("S6:5", {'delay': 50,
716
                                                              'bandwidth': 100,
717
                                                              'ownership': "B"}))
718
719
    def test_path7_3_6(self):
720
        """Tests paths between all users using constrained path algorithm,
721
        with the delay constraint set to 50, the bandwidth constraint set
722
        to 100, the reliability constraint set to 3, and the ownership
723
        constraint set to 'B'
724
        """
725
        # ownership = "B"
726
        self.assertTrue(self.paths_between_all_users("S10:1", {'delay': 50,
727
                                                               'bandwidth': 100,
728
                                                               'ownership': "B"}))
729
730
    def test_path7_3_7(self):
731
        """Tests paths between all users using constrained path algorithm,
732
        with the delay constraint set to 50, the bandwidth constraint set
733
        to 100, the reliability constraint set to 3, and the ownership
734
        constraint set to 'B'
735
        """
736
        # ownership = "B"
737
        self.assertTrue(self.paths_between_all_users("S8:6", {'delay': 50,
738
                                                              'bandwidth': 100,
739
                                                              'ownership': "B"}))
740
741
    def test_path7_3_8(self):
742
        """Tests paths between all users using constrained path algorithm,
743
        with the delay constraint set to 50, the bandwidth constraint set
744
        to 100, the reliability constraint set to 3, and the ownership
745
        constraint set to 'B'
746
        """
747
        # ownership = "B"
748
        self.assertTrue(self.paths_between_all_users("S10:2", {'delay': 50,
749
                                                               'bandwidth': 100,
750
                                                               'ownership': "B"}))
751
752
    def test_path7_3_9(self):
753
        """Tests paths between all users using constrained path algorithm,
754
        with the delay constraint set to 50, the bandwidth constraint set
755
        to 100, the reliability constraint set to 3, and the ownership
756
        constraint set to 'B'
757
        """
758
        # ownership = "B"
759
        self.assertTrue(self.paths_between_all_users("S10:3", {'delay': 50,
760
                                                               'bandwidth': 100,
761
                                                               'ownership': "B"}))
762
763
    def test_path7_4_0(self):
764
        """Tests paths between all users using constrained path algorithm,
765
        with the delay constraint set to 50, the bandwidth constraint set
766
        to 100, the reliability constraint set to 3, and the ownership
767
        constraint set to 'B'
768
        """
769
        # ownership = "B"
770
        self.assertTrue(self.paths_between_all_users("User2:1", {'delay': 50,
771
                                                                 'bandwidth': 100,
772
                                                                 'ownership': "B"}))
773
774
    def test_path8_1(self):
775
        """Tests paths between all users using constrained path algorithm,
776
        with the delay constraint set to 50, the bandwidth constraint
777
        set to 100, the reliability constraint set to 3, and the ownership
778
        constraint set to 'B'
779
780
        Tests conducted with flexibility enabled
781
        """
782
        # delay = 50
783
        self.assertTrue(self.paths_between_all_users("S1:1", flexible={'delay': 50,
784
                                                                       'bandwidth': 100,
785
                                                                       'reliability': 3,
786
                                                                       'ownership': "B"},
787
                                                     metrics='delay'))
788
789
    def test_path8_2(self):
790
        """Tests paths between all users using constrained path algorithm,
791
        with the delay constraint set to 50, the bandwidth constraint
792
        set to 100, the reliability constraint set to 3, and the ownership
793
        constraint set to 'B'
794
795
        Tests conducted with flexibility enabled
796
        """
797
        # delay = 50
798
        self.assertTrue(self.paths_between_all_users("S2:1", flexible={'delay': 50,
799
                                                                       'bandwidth': 100,
800
                                                                       'reliability': 3,
801
                                                                       'ownership': "B"},
802
                                                     metrics='delay'))
803
804
    def test_path8_3(self):
805
        """Tests paths between all users using constrained path algorithm,
806
        with the delay constraint set to 50, the bandwidth constraint
807
        set to 100, the reliability constraint set to 3, and the ownership
808
        constraint set to 'B'
809
810
        Tests conducted with flexibility enabled
811
        """
812
        # delay = 50
813
        self.assertTrue(self.paths_between_all_users("S3:1", flexible={'delay': 50,
814
                                                                       'bandwidth': 100,
815
                                                                       'reliability': 3,
816
                                                                       'ownership': "B"},
817
                                                     metrics='delay'))
818
819
    def test_path8_4(self):
820
        """Tests paths between all users using constrained path algorithm,
821
        with the delay constraint set to 50, the bandwidth constraint
822
        set to 100, the reliability constraint set to 3, and the ownership
823
        constraint set to 'B'
824
825
        Tests conducted with flexibility enabled
826
        """
827
        # delay = 50
828
        self.assertTrue(self.paths_between_all_users("S5:1", flexible={'delay': 50,
829
                                                                       'bandwidth': 100,
830
                                                                       'reliability': 3,
831
                                                                       'ownership': "B"},
832
                                                     metrics='delay'))
833
834
    def test_path8_5(self):
835
        """Tests paths between all users using constrained path algorithm,
836
        with the delay constraint set to 50, the bandwidth constraint
837
        set to 100, the reliability constraint set to 3, and the ownership
838
        constraint set to 'B'
839
840
        Tests conducted with flexibility enabled
841
        """
842
        # delay = 50
843
        self.assertTrue(self.paths_between_all_users("S4:2", flexible={'delay': 50,
844
                                                                       'bandwidth': 100,
845
                                                                       'reliability': 3,
846
                                                                       'ownership': "B"},
847
                                                     metrics='delay'))
848
849
    def test_path8_6(self):
850
        """Tests paths between all users using constrained path algorithm,
851
        with the delay constraint set to 50, the bandwidth constraint
852
        set to 100, the reliability constraint set to 3, and the ownership
853
        constraint set to 'B'
854
855
        Tests conducted with flexibility enabled
856
        """
857
        # delay = 50
858
        self.assertTrue(self.paths_between_all_users("User1:2", flexible={'delay': 50,
859
                                                                          'bandwidth': 100,
860
                                                                          'reliability': 3,
861
                                                                          'ownership': "B"},
862
                                                     metrics='delay'))
863
864
    def test_path8_7(self):
865
        """Tests paths between all users using constrained path algorithm,
866
        with the delay constraint set to 50, the bandwidth constraint
867
        set to 100, the reliability constraint set to 3, and the ownership
868
        constraint set to 'B'
869
870
        Tests conducted with flexibility enabled
871
        """
872
        # delay = 50
873
        self.assertTrue(self.paths_between_all_users("S5:5", flexible={'delay': 50,
874
                                                                       'bandwidth': 100,
875
                                                                       'reliability': 3,
876
                                                                       'ownership': "B"},
877
                                                     metrics='delay'))
878
879
    def test_path8_8(self):
880
        """Tests paths between all users using constrained path algorithm,
881
        with the delay constraint set to 50, the bandwidth constraint
882
        set to 100, the reliability constraint set to 3, and the ownership
883
        constraint set to 'B'
884
885
        Tests conducted with flexibility enabled
886
        """
887
        # delay = 50
888
        self.assertTrue(self.paths_between_all_users("S8:2", flexible={'delay': 50,
889
                                                                       'bandwidth': 100,
890
                                                                       'reliability': 3,
891
                                                                       'ownership': "B"},
892
                                                     metrics='delay'))
893
894
    def test_path8_9(self):
895
        """Tests paths between all users using constrained path algorithm,
896
        with the delay constraint set to 50, the bandwidth constraint
897
        set to 100, the reliability constraint set to 3, and the ownership
898
        constraint set to 'B'
899
900
        Tests conducted with flexibility enabled
901
        """
902
        # delay = 50
903
        self.assertTrue(self.paths_between_all_users("S5:6", flexible={'delay': 50,
904
                                                                       'bandwidth': 100,
905
                                                                       'reliability': 3,
906
                                                                       'ownership': "B"},
907
                                                     metrics='delay'))
908
909
    def test_path8_1_0(self):
910
        """Tests paths between all users using constrained path algorithm,
911
        with the delay constraint set to 50, the bandwidth constraint
912
        set to 100, the reliability constraint set to 3, and the ownership
913
        constraint set to 'B'
914
915
        Tests conducted with flexibility enabled
916
        """
917
        # delay = 50
918
        self.assertTrue(self.paths_between_all_users("User1:3", flexible={'delay': 50,
919
                                                                          'bandwidth': 100,
920
                                                                          'reliability': 3,
921
                                                                          'ownership': "B"},
922
                                                     metrics='delay'))
923
924
    def test_path8_1_1(self):
925
        """Tests paths between all users using constrained path algorithm,
926
        with the delay constraint set to 50, the bandwidth constraint
927
        set to 100, the reliability constraint set to 3, and the ownership
928
        constraint set to 'B'
929
930
        Tests conducted with flexibility enabled
931
        """
932
        # delay = 50
933
        self.assertTrue(self.paths_between_all_users("S6:3", flexible={'delay': 50,
934
                                                                       'bandwidth': 100,
935
                                                                       'reliability': 3,
936
                                                                       'ownership': "B"},
937
                                                     metrics='delay'))
938
939
    def test_path8_1_2(self):
940
        """Tests paths between all users using constrained path algorithm,
941
        with the delay constraint set to 50, the bandwidth constraint
942
        set to 100, the reliability constraint set to 3, and the ownership
943
        constraint set to 'B'
944
945
        Tests conducted with flexibility enabled
946
        """
947
        # delay = 50
948
        self.assertTrue(self.paths_between_all_users("S9:1", flexible={'delay': 50,
949
                                                                       'bandwidth': 100,
950
                                                                       'reliability': 3,
951
                                                                       'ownership': "B"},
952
                                                     metrics='delay'))
953
954
    def test_path8_1_3(self):
955
        """Tests paths between all users using constrained path algorithm,
956
        with the delay constraint set to 50, the bandwidth constraint
957
        set to 100, the reliability constraint set to 3, and the ownership
958
        constraint set to 'B'
959
960
        Tests conducted with flexibility enabled
961
        """
962
        # delay = 50
963
        self.assertTrue(self.paths_between_all_users("S6:4", flexible={'delay': 50,
964
                                                                       'bandwidth': 100,
965
                                                                       'reliability': 3,
966
                                                                       'ownership': "B"},
967
                                                     metrics='delay'))
968
969
    def test_path8_1_4(self):
970
        """Tests paths between all users using constrained path algorithm,
971
        with the delay constraint set to 50, the bandwidth constraint
972
        set to 100, the reliability constraint set to 3, and the ownership
973
        constraint set to 'B'
974
975
        Tests conducted with flexibility enabled
976
        """
977
        # delay = 50
978
        self.assertTrue(self.paths_between_all_users("S9:2", flexible={'delay': 50,
979
                                                                       'bandwidth': 100,
980
                                                                       'reliability': 3,
981
                                                                       'ownership': "B"},
982
                                                     metrics='delay'))
983
984
    def test_path8_1_5(self):
985
        """Tests paths between all users using constrained path algorithm,
986
        with the delay constraint set to 50, the bandwidth constraint
987
        set to 100, the reliability constraint set to 3, and the ownership
988
        constraint set to 'B'
989
990
        Tests conducted with flexibility enabled
991
        """
992
        # delay = 50
993
        self.assertTrue(self.paths_between_all_users("S6:5", flexible={'delay': 50,
994
                                                                       'bandwidth': 100,
995
                                                                       'reliability': 3,
996
                                                                       'ownership': "B"},
997
                                                     metrics='delay'))
998
999
    def test_path8_1_6(self):
1000
        """Tests paths between all users using constrained path algorithm,
1001
        with the delay constraint set to 50, the bandwidth constraint
1002
        set to 100, the reliability constraint set to 3, and the ownership
1003
        constraint set to 'B'
1004
1005
        Tests conducted with flexibility enabled
1006
        """
1007
        # delay = 50
1008
        self.assertTrue(self.paths_between_all_users("S10:1", flexible={'delay': 50,
1009
                                                                        'bandwidth': 100,
1010
                                                                        'reliability': 3,
1011
                                                                        'ownership': "B"},
1012
                                                     metrics='delay'))
1013
1014
    def test_path8_1_7(self):
1015
        """Tests paths between all users using constrained path algorithm,
1016
        with the delay constraint set to 50, the bandwidth constraint
1017
        set to 100, the reliability constraint set to 3, and the ownership
1018
        constraint set to 'B'
1019
1020
        Tests conducted with flexibility enabled
1021
        """
1022
        # delay = 50
1023
        self.assertTrue(self.paths_between_all_users("S8:5", flexible={'delay': 50,
1024
                                                                       'bandwidth': 100,
1025
                                                                       'reliability': 3,
1026
                                                                       'ownership': "B"},
1027
                                                     metrics='delay'))
1028
1029
    def test_path8_1_8(self):
1030
        """Tests paths between all users using constrained path algorithm,
1031
        with the delay constraint set to 50, the bandwidth constraint
1032
        set to 100, the reliability constraint set to 3, and the ownership
1033
        constraint set to 'B'
1034
1035
        Tests conducted with flexibility enabled
1036
        """
1037
        # delay = 50
1038
        self.assertTrue(self.paths_between_all_users("S9:4", flexible={'delay': 50,
1039
                                                                       'bandwidth': 100,
1040
                                                                       'reliability': 3,
1041
                                                                       'ownership': "B"},
1042
                                                     metrics='delay'))
1043
1044
    def test_path8_1_9(self):
1045
        """Tests paths between all users using constrained path algorithm,
1046
        with the delay constraint set to 50, the bandwidth constraint
1047
        set to 100, the reliability constraint set to 3, and the ownership
1048
        constraint set to 'B'
1049
1050
        Tests conducted with flexibility enabled
1051
        """
1052
        # delay = 50
1053
        self.assertTrue(self.paths_between_all_users("User1:4", flexible={'delay': 50,
1054
                                                                          'bandwidth': 100,
1055
                                                                          'reliability': 3,
1056
                                                                          'ownership': "B"},
1057
                                                     metrics='delay'))
1058
1059
    def test_path8_2_0(self):
1060
        """Tests paths between all users using constrained path algorithm,
1061
        with the delay constraint set to 50, the bandwidth constraint
1062
        set to 100, the reliability constraint set to 3, and the ownership
1063
        constraint set to 'B'
1064
1065
        Tests conducted with flexibility enabled
1066
        """
1067
        # delay = 50
1068
        self.assertTrue(self.paths_between_all_users("User4:3", flexible={'delay': 50,
1069
                                                                          'bandwidth': 100,
1070
                                                                          'reliability': 3,
1071
                                                                          'ownership': "B"},
1072
                                                     metrics='delay'))
1073
1074
    def test_path8_2_1(self):
1075
        """Tests paths between all users using constrained path algorithm,
1076
        with the delay constraint set to 50, the bandwidth constraint
1077
        set to 100, the reliability constraint set to 3, and the ownership
1078
        constraint set to 'B'
1079
1080
        Tests conducted with flexibility enabled
1081
        """
1082
        # bandwidth = 100
1083
        self.assertTrue(self.paths_between_all_users("S3:1", flexible={'delay': 50,
1084
                                                                       'bandwidth': 100,
1085
                                                                       'reliability': 3,
1086
                                                                       'ownership': "B"},
1087
                                                     metrics='bandwidth'))
1088
1089
    def test_path8_2_2(self):
1090
        """Tests paths between all users using constrained path algorithm,
1091
        with the delay constraint set to 50, the bandwidth constraint
1092
        set to 100, the reliability constraint set to 3, and the ownership
1093
        constraint set to 'B'
1094
1095
        Tests conducted with flexibility enabled
1096
        """
1097
        # bandwidth = 100
1098
        self.assertTrue(self.paths_between_all_users("S5:1", flexible={'delay': 50,
1099
                                                                       'bandwidth': 100,
1100
                                                                       'reliability': 3,
1101
                                                                       'ownership': "B"},
1102
                                                     metrics='bandwidth'))
1103
1104
    def test_path8_2_3(self):
1105
        """Tests paths between all users using constrained path algorithm,
1106
        with the delay constraint set to 50, the bandwidth constraint
1107
        set to 100, the reliability constraint set to 3, and the ownership
1108
        constraint set to 'B'
1109
1110
        Tests conducted with flexibility enabled
1111
        """
1112
        # bandwidth = 100
1113
        self.assertTrue(self.paths_between_all_users("User1:4", flexible={'delay': 50,
1114
                                                                          'bandwidth': 100,
1115
                                                                          'reliability': 3,
1116
                                                                          'ownership': "B"},
1117
                                                     metrics='bandwidth'))
1118
1119
    def test_path8_2_4(self):
1120
        """Tests paths between all users using constrained path algorithm,
1121
        with the delay constraint set to 50, the bandwidth constraint
1122
        set to 100, the reliability constraint set to 3, and the ownership
1123
        constraint set to 'B'
1124
1125
        Tests conducted with flexibility enabled
1126
        """
1127
        # bandwidth = 100
1128
        self.assertTrue(self.paths_between_all_users("User4:3", flexible={'delay': 50,
1129
                                                                          'bandwidth': 100,
1130
                                                                          'reliability': 3,
1131
                                                                          'ownership': "B"},
1132
                                                     metrics='bandwidth'))
1133
1134
    def test_path8_2_5(self):
1135
        """Tests paths between all users using constrained path algorithm,
1136
        with the delay constraint set to 50, the bandwidth constraint
1137
        set to 100, the reliability constraint set to 3, and the ownership
1138
        constraint set to 'B'
1139
1140
        Tests conducted with flexibility enabled
1141
        """
1142
        # reliability = 3
1143
        self.assertTrue(self.paths_between_all_users("S4:1", flexible={'delay': 50,
1144
                                                                       'bandwidth': 100,
1145
                                                                       'reliability': 3,
1146
                                                                       'ownership': "B"},
1147
                                                     metrics='reliability'))
1148
1149
    def test_path8_2_6(self):
1150
        """Tests paths between all users using constrained path algorithm,
1151
        with the delay constraint set to 50, the bandwidth constraint
1152
        set to 100, the reliability constraint set to 3, and the ownership
1153
        constraint set to 'B'
1154
1155
        Tests conducted with flexibility enabled
1156
        """
1157
        # reliability = 3
1158
        self.assertTrue(self.paths_between_all_users("S5:2", flexible={'delay': 50,
1159
                                                                       'bandwidth': 100,
1160
                                                                       'reliability': 3,
1161
                                                                       'ownership': "B"},
1162
                                                     metrics='reliability'))
1163
1164
    def test_path8_2_7(self):
1165
        """Tests paths between all users using constrained path algorithm,
1166
        with the delay constraint set to 50, the bandwidth constraint
1167
        set to 100, the reliability constraint set to 3, and the ownership
1168
        constraint set to 'B'
1169
1170
        Tests conducted with flexibility enabled
1171
        """
1172
        # reliability = 3
1173
        self.assertTrue(self.paths_between_all_users("S5:3", flexible={'delay': 50,
1174
                                                                       'bandwidth': 100,
1175
                                                                       'reliability': 3,
1176
                                                                       'ownership': "B"},
1177
                                                     metrics='reliability'))
1178
1179
    def test_path8_2_8(self):
1180
        """Tests paths between all users using constrained path algorithm,
1181
        with the delay constraint set to 50, the bandwidth constraint
1182
        set to 100, the reliability constraint set to 3, and the ownership
1183
        constraint set to 'B'
1184
1185
        Tests conducted with flexibility enabled
1186
        """
1187
        # reliability = 3
1188
        self.assertTrue(self.paths_between_all_users("S6:1", flexible={'delay': 50,
1189
                                                                       'bandwidth': 100,
1190
                                                                       'reliability': 3,
1191
                                                                       'ownership': "B"},
1192
                                                     metrics='reliability'))
1193
1194
    def test_path8_2_9(self):
1195
        """Tests paths between all users using constrained path algorithm,
1196
        with the delay constraint set to 50, the bandwidth constraint
1197
        set to 100, the reliability constraint set to 3, and the ownership
1198
        constraint set to 'B'
1199
1200
        Tests conducted with flexibility enabled
1201
        """
1202
        # ownership = "B"
1203
        self.assertTrue(self.paths_between_all_users("S4:1", flexible={'delay': 50,
1204
                                                                       'bandwidth': 100,
1205
                                                                       'reliability': 3,
1206
                                                                       'ownership': "B"}))
1207
1208
    def test_path8_3_0(self):
1209
        """Tests paths between all users using constrained path algorithm,
1210
        with the delay constraint set to 50, the bandwidth constraint
1211
        set to 100, the reliability constraint set to 3, and the ownership
1212
        constraint set to 'B'
1213
1214
        Tests conducted with flexibility enabled
1215
        """
1216
        # ownership = "B"
1217
        self.assertTrue(self.paths_between_all_users("S5:2", flexible={'delay': 50,
1218
                                                                       'bandwidth': 100,
1219
                                                                       'reliability': 3,
1220
                                                                       'ownership': "B"}))
1221
1222
    def test_path8_3_1(self):
1223
        """Tests paths between all users using constrained path algorithm,
1224
        with the delay constraint set to 50, the bandwidth constraint
1225
        set to 100, the reliability constraint set to 3, and the ownership
1226
        constraint set to 'B'
1227
1228
        Tests conducted with flexibility enabled
1229
        """
1230
        # ownership = "B"
1231
        self.assertTrue(self.paths_between_all_users("S4:2", flexible={'delay': 50,
1232
                                                                       'bandwidth': 100,
1233
                                                                       'reliability': 3,
1234
                                                                       'ownership': "B"}))
1235
1236
    def test_path8_3_2(self):
1237
        """Tests paths between all users using constrained path algorithm,
1238
        with the delay constraint set to 50, the bandwidth constraint
1239
        set to 100, the reliability constraint set to 3, and the ownership
1240
        constraint set to 'B'
1241
1242
        Tests conducted with flexibility enabled
1243
        """
1244
        # ownership = "B"
1245
        self.assertTrue(self.paths_between_all_users("User1:2", flexible={'delay': 50,
1246
                                                                          'bandwidth': 100,
1247
                                                                          'reliability': 3,
1248
                                                                          'ownership': "B"}))
1249
1250
    def test_path8_3_3(self):
1251
        """Tests paths between all users using constrained path algorithm,
1252
        with the delay constraint set to 50, the bandwidth constraint
1253
        set to 100, the reliability constraint set to 3, and the ownership
1254
        constraint set to 'B'
1255
1256
        Tests conducted with flexibility enabled
1257
        """
1258
        # ownership = "B"
1259
        self.assertTrue(self.paths_between_all_users("S5:4", flexible={'delay': 50,
1260
                                                                       'bandwidth': 100,
1261
                                                                       'reliability': 3,
1262
                                                                       'ownership': "B"}))
1263
1264
    def test_path8_3_4(self):
1265
        """Tests paths between all users using constrained path algorithm,
1266
        with the delay constraint set to 50, the bandwidth constraint
1267
        set to 100, the reliability constraint set to 3, and the ownership
1268
        constraint set to 'B'
1269
1270
        Tests conducted with flexibility enabled
1271
        """
1272
        # ownership = "B"
1273
        self.assertTrue(self.paths_between_all_users("S6:2", flexible={'delay': 50,
1274
                                                                       'bandwidth': 100,
1275
                                                                       'reliability': 3,
1276
                                                                       'ownership': "B"}))
1277
1278
    def test_path8_3_5(self):
1279
        """Tests paths between all users using constrained path algorithm,
1280
        with the delay constraint set to 50, the bandwidth constraint
1281
        set to 100, the reliability constraint set to 3, and the ownership
1282
        constraint set to 'B'
1283
1284
        Tests conducted with flexibility enabled
1285
        """
1286
        # ownership = "B"
1287
        self.assertTrue(self.paths_between_all_users("S6:5", flexible={'delay': 50,
1288
                                                                       'bandwidth': 100,
1289
                                                                       'reliability': 3,
1290
                                                                       'ownership': "B"}))
1291
1292
    def test_path8_3_6(self):
1293
        """Tests paths between all users using constrained path algorithm,
1294
        with the delay constraint set to 50, the bandwidth constraint
1295
        set to 100, the reliability constraint set to 3, and the ownership
1296
        constraint set to 'B'
1297
1298
        Tests conducted with flexibility enabled
1299
        """
1300
        # ownership = "B"
1301
        self.assertTrue(self.paths_between_all_users("S10:1", flexible={'delay': 50,
1302
                                                                        'bandwidth': 100,
1303
                                                                        'reliability': 3,
1304
                                                                        'ownership': "B"}))
1305
1306
    def test_path8_3_7(self):
1307
        """Tests paths between all users using constrained path algorithm,
1308
        with the delay constraint set to 50, the bandwidth constraint
1309
        set to 100, the reliability constraint set to 3, and the ownership
1310
        constraint set to 'B'
1311
1312
        Tests conducted with flexibility enabled
1313
        """
1314
        # ownership = "B"
1315
        self.assertTrue(self.paths_between_all_users("S8:6", flexible={'delay': 50,
1316
                                                                       'bandwidth': 100,
1317
                                                                       'reliability': 3,
1318
                                                                       'ownership': "B"}))
1319
1320
    def test_path8_3_8(self):
1321
        """Tests paths between all users using constrained path algorithm,
1322
        with the delay constraint set to 50, the bandwidth constraint
1323
        set to 100, the reliability constraint set to 3, and the ownership
1324
        constraint set to 'B'
1325
1326
        Tests conducted with flexibility enabled
1327
        """
1328
        # ownership = "B"
1329
        self.assertTrue(self.paths_between_all_users("S10:2", flexible={'delay': 50,
1330
                                                                        'bandwidth': 100,
1331
                                                                        'reliability': 3,
1332
                                                                        'ownership': "B"}))
1333
1334
    def test_path8_3_9(self):
1335
        """Tests paths between all users using constrained path algorithm,
1336
        with the delay constraint set to 50, the bandwidth constraint
1337
        set to 100, the reliability constraint set to 3, and the ownership
1338
        constraint set to 'B'
1339
1340
        Tests conducted with flexibility enabled
1341
        """
1342
        # ownership = "B"
1343
        self.assertTrue(self.paths_between_all_users("S10:3", flexible={'delay': 50,
1344
                                                                        'bandwidth': 100,
1345
                                                                        'reliability': 3,
1346
                                                                        'ownership': "B"}))
1347
1348
    def test_path8_4_0(self):
1349
        """Tests paths between all users using constrained path algorithm,
1350
        with the delay constraint set to 50, the bandwidth constraint
1351
        set to 100, the reliability constraint set to 3, and the ownership
1352
        constraint set to 'B'
1353
1354
        Tests conducted with flexibility enabled
1355
        """
1356
        # ownership = "B"
1357
        self.assertTrue(self.paths_between_all_users("User2:1", flexible={'delay': 50,
1358
                                                                          'bandwidth': 100,
1359
                                                                          'reliability': 3,
1360
                                                                          'ownership': "B"}))
1361
1362
    def test_path9(self):
1363
        """Tests paths between all users using constrained path algorithm,
1364
        with the delay constraint set to 50, the bandwidth constraint
1365
        set to 100, the reliability constraint set to 3, and the ownership
1366
        constraint set to 'B'
1367
1368
        Tests conducted with all but ownership flexible
1369
        """
1370
        combos = combinations(["User1", "User2", "User3", "User4"], 2)
1371
        self.initializer()
1372
1373
        for point_a, point_b in combos:
1374
            results = self.get_path_constrained(point_a, point_b,
1375
                                                base={"ownership": "B"},
1376
                                                flexible={"delay": 50,
1377
                                                          "bandwidth": 100,
1378
                                                          "reliability": 3})
1379
            for result in results:
1380
                # delay = 50 checks
1381
                if "delay" in result["metrics"]:
1382
                    for path in result["paths"]:
1383
                        self.assertNotIn("S1:1", path)
1384
                        self.assertNotIn("S2:1", path)
1385
                        self.assertNotIn("S3:1", path)
1386
                        self.assertNotIn("S5:1", path)
1387
                        self.assertNotIn("S4:2", path)
1388
                        self.assertNotIn("User1:2", path)
1389
                        self.assertNotIn("S5:5", path)
1390
                        self.assertNotIn("S8:2", path)
1391
                        self.assertNotIn("S5:6", path)
1392
                        self.assertNotIn("User1:3", path)
1393
                        self.assertNotIn("S6:3", path)
1394
                        self.assertNotIn("S9:1", path)
1395
                        self.assertNotIn("S6:4", path)
1396
                        self.assertNotIn("S9:2", path)
1397
                        self.assertNotIn("S6:5", path)
1398
                        self.assertNotIn("S10:1", path)
1399
                        self.assertNotIn("S8:5", path)
1400
                        self.assertNotIn("S9:4", path)
1401
                        self.assertNotIn("User1:4", path)
1402
                        self.assertNotIn("User4:3", path)
1403
1404
                # bandwidth = 100 checks
1405
                if "bandwidth" in result["metrics"]:
1406
                    for path in result["paths"]:
1407
                        self.assertNotIn("S3:1", path)
1408
                        self.assertNotIn("S5:1", path)
1409
                        self.assertNotIn("User1:4", path)
1410
                        self.assertNotIn("User4:3", path)
1411
1412
                # reliability = 3 checks
1413
                if "reliability" in result["metrics"]:
1414
                    for path in result["paths"]:
1415
                        self.assertNotIn("S4:1", path)
1416
                        self.assertNotIn("S5:2", path)
1417
                        self.assertNotIn("S5:3", path)
1418
                        self.assertNotIn("S6:1", path)
1419
1420
                # ownership = "B" checks
1421
                self.assertIn("ownership", result["metrics"])
1422
                for path in result["paths"]:
1423
                    self.assertNotIn("S4:1", path)
1424
                    self.assertNotIn("S5:2", path)
1425
                    self.assertNotIn("S4:2", path)
1426
                    self.assertNotIn("User1:2", path)
1427
                    self.assertNotIn("S5:4", path)
1428
                    self.assertNotIn("S6:2", path)
1429
                    self.assertNotIn("S6:5", path)
1430
                    self.assertNotIn("S10:1", path)
1431
                    self.assertNotIn("S8:6", path)
1432
                    self.assertNotIn("S10:2", path)
1433
                    self.assertNotIn("S10:3", path)
1434
                    self.assertNotIn("User2:1", path)
1435
1436
    def test_path10(self):
1437
        """Tests that TypeError is generated by get_path_constrained
1438
1439
        Tests with ownership using an int type rather than string
1440
        """
1441
        self.initializer()
1442
1443
        with self.assertRaises(TypeError):
1444
            self.get_path_constrained(
1445
                "User1", "User2", base={"ownership": 1})
1446
1447
    @staticmethod
1448
    def generate_topology():
1449
        """Generates a predetermined topology"""
1450
        switches = {}
1451
        interfaces = {}
1452
        links = {}
1453
1454
        TestResults.create_switch("S1", switches)
1455
        TestResults.add_interfaces(2, switches["S1"], interfaces)
1456
1457
        TestResults.create_switch("S2", switches)
1458
        TestResults.add_interfaces(2, switches["S2"], interfaces)
1459
1460
        TestResults.create_switch("S3", switches)
1461
        TestResults.add_interfaces(6, switches["S3"], interfaces)
1462
1463
        TestResults.create_switch("S4", switches)
1464
        TestResults.add_interfaces(2, switches["S4"], interfaces)
1465
1466
        TestResults.create_switch("S5", switches)
1467
        TestResults.add_interfaces(6, switches["S5"], interfaces)
1468
1469
        TestResults.create_switch("S6", switches)
1470
        TestResults.add_interfaces(5, switches["S6"], interfaces)
1471
1472
        TestResults.create_switch("S7", switches)
1473
        TestResults.add_interfaces(2, switches["S7"], interfaces)
1474
1475
        TestResults.create_switch("S8", switches)
1476
        TestResults.add_interfaces(8, switches["S8"], interfaces)
1477
1478
        TestResults.create_switch("S9", switches)
1479
        TestResults.add_interfaces(4, switches["S9"], interfaces)
1480
1481
        TestResults.create_switch("S10", switches)
1482
        TestResults.add_interfaces(3, switches["S10"], interfaces)
1483
1484
        TestResults.create_switch("S11", switches)
1485
        TestResults.add_interfaces(3, switches["S11"], interfaces)
1486
1487
        TestResults.create_switch("User1", switches)
1488
        TestResults.add_interfaces(4, switches["User1"], interfaces)
1489
1490
        TestResults.create_switch("User2", switches)
1491
        TestResults.add_interfaces(2, switches["User2"], interfaces)
1492
1493
        TestResults.create_switch("User3", switches)
1494
        TestResults.add_interfaces(2, switches["User3"], interfaces)
1495
1496
        TestResults.create_switch("User4", switches)
1497
        TestResults.add_interfaces(3, switches["User4"], interfaces)
1498
1499
        TestResultsEdges._fill_links(links, interfaces)
1500
1501
        TestResultsEdges._add_metadata_to_links(links)
1502
1503
        return switches, links
1504
1505
    @staticmethod
1506
    def _add_metadata_to_links(links):
1507
        links["S1:1<->S2:1"].extend_metadata(
1508
            {"reliability": 5, "bandwidth": 100, "delay": 105})
1509
1510
        links["S1:2<->User1:1"].extend_metadata(
1511
            {"reliability": 5, "bandwidth": 100, "delay": 1})
1512
1513
        links["S2:2<->User4:1"].extend_metadata(
1514
            {"reliability": 5, "bandwidth": 100, "delay": 10})
1515
1516
        links["S3:1<->S5:1"].extend_metadata(
1517
            {"reliability": 5, "bandwidth": 10, "delay": 112})
1518
1519
        links["S3:2<->S7:1"].extend_metadata(
1520
            {"reliability": 5, "bandwidth": 100, "delay": 1})
1521
1522
        links["S3:3<->S8:1"].extend_metadata(
1523
            {"reliability": 5, "bandwidth": 100, "delay": 1})
1524
1525
        links["S3:4<->S11:1"].extend_metadata(
1526
            {"reliability": 3, "bandwidth": 100, "delay": 6})
1527
1528
        links["S3:5<->User3:1"].extend_metadata(
1529
            {"reliability": 5, "bandwidth": 100, "delay": 1})
1530
1531
        links["S3:6<->User4:2"].extend_metadata(
1532
            {"reliability": 5, "bandwidth": 100, "delay": 10})
1533
1534
        links["S4:1<->S5:2"].extend_metadata(
1535
            {"reliability": 1, "bandwidth": 100, "delay": 30,
1536
             "ownership": "A"})
1537
1538
        links["S4:2<->User1:2"].extend_metadata(
1539
            {"reliability": 3, "bandwidth": 100, "delay": 110,
1540
             "ownership": "A"})
1541
1542
        links["S5:3<->S6:1"].extend_metadata(
1543
            {"reliability": 1, "bandwidth": 100, "delay": 40})
1544
1545
        links["S5:4<->S6:2"].extend_metadata(
1546
            {"reliability": 3, "bandwidth": 100, "delay": 40,
1547
             "ownership": "A"})
1548
1549
        links["S5:5<->S8:2"].extend_metadata(
1550
            {"reliability": 5, "bandwidth": 100, "delay": 112})
1551
1552
        links["S5:6<->User1:3"].extend_metadata(
1553
            {"reliability": 3, "bandwidth": 100, "delay": 60})
1554
1555
        links["S6:3<->S9:1"].extend_metadata(
1556
            {"reliability": 3, "bandwidth": 100, "delay": 60})
1557
1558
        links["S6:4<->S9:2"].extend_metadata(
1559
            {"reliability": 5, "bandwidth": 100, "delay": 62})
1560
1561
        links["S6:5<->S10:1"].extend_metadata(
1562
            {"bandwidth": 100, "delay": 108, "ownership": "A"})
1563
1564
        links["S7:2<->S8:3"].extend_metadata(
1565
            {"reliability": 5, "bandwidth": 100, "delay": 1})
1566
1567
        links["S8:4<->S9:3"].extend_metadata(
1568
            {"reliability": 3, "bandwidth": 100, "delay": 32})
1569
1570
        links["S8:5<->S9:4"].extend_metadata(
1571
            {"reliability": 3, "bandwidth": 100, "delay": 110})
1572
1573
        links["S8:6<->S10:2"].extend_metadata(
1574
            {"reliability": 5, "bandwidth": 100, "ownership": "A"})
1575
1576
        links["S8:7<->S11:2"].extend_metadata(
1577
            {"reliability": 3, "bandwidth": 100, "delay": 7})
1578
1579
        links["S8:8<->User3:2"].extend_metadata(
1580
            {"reliability": 5, "bandwidth": 100, "delay": 1})
1581
1582
        links["S10:3<->User2:1"].extend_metadata(
1583
            {"reliability": 3, "bandwidth": 100, "delay": 10,
1584
             "ownership": "A"})
1585
1586
        links["S11:3<->User2:2"].extend_metadata(
1587
            {"reliability": 3, "bandwidth": 100, "delay": 6})
1588
1589
        links["User1:4<->User4:3"].extend_metadata(
1590
            {"reliability": 5, "bandwidth": 10, "delay": 105})
1591
1592
    @staticmethod
1593
    def _fill_links(links, interfaces):
1594
        links["S1:1<->S2:1"] = Link(interfaces["S1:1"], interfaces["S2:1"])
1595
1596
        links["S1:2<->User1:1"] = Link(interfaces["S1:2"], interfaces["User1:1"])
1597
1598
        links["S2:2<->User4:1"] = Link(interfaces["S2:2"], interfaces["User4:1"])
1599
1600
        links["S3:1<->S5:1"] = Link(interfaces["S3:1"], interfaces["S5:1"])
1601
1602
        links["S3:2<->S7:1"] = Link(interfaces["S3:2"], interfaces["S7:1"])
1603
1604
        links["S3:3<->S8:1"] = Link(interfaces["S3:3"], interfaces["S8:1"])
1605
1606
        links["S3:4<->S11:1"] = Link(interfaces["S3:4"], interfaces["S11:1"])
1607
1608
        links["S3:5<->User3:1"] = Link(interfaces["S3:5"], interfaces["User3:1"])
1609
1610
        links["S3:6<->User4:2"] = Link(interfaces["S3:6"], interfaces["User4:2"])
1611
1612
        links["S4:1<->S5:2"] = Link(interfaces["S4:1"], interfaces["S5:2"])
1613
1614
        links["S4:2<->User1:2"] = Link(interfaces["S4:2"], interfaces["User1:2"])
1615
1616
        links["S5:3<->S6:1"] = Link(interfaces["S5:3"], interfaces["S6:1"])
1617
1618
        links["S5:4<->S6:2"] = Link(interfaces["S5:4"], interfaces["S6:2"])
1619
1620
        links["S5:5<->S8:2"] = Link(interfaces["S5:5"], interfaces["S8:2"])
1621
1622
        links["S5:6<->User1:3"] = Link(interfaces["S5:6"], interfaces["User1:3"])
1623
1624
        links["S6:3<->S9:1"] = Link(interfaces["S6:3"], interfaces["S9:1"])
1625
1626
        links["S6:4<->S9:2"] = Link(interfaces["S6:4"], interfaces["S9:2"])
1627
1628
        links["S6:5<->S10:1"] = Link(interfaces["S6:5"], interfaces["S10:1"])
1629
1630
        links["S7:2<->S8:3"] = Link(interfaces["S7:2"], interfaces["S8:3"])
1631
1632
        links["S8:4<->S9:3"] = Link(interfaces["S8:4"], interfaces["S9:3"])
1633
1634
        links["S8:5<->S9:4"] = Link(interfaces["S8:5"], interfaces["S9:4"])
1635
1636
        links["S8:6<->S10:2"] = Link(interfaces["S8:6"], interfaces["S10:2"])
1637
1638
        links["S8:7<->S11:2"] = Link(interfaces["S8:7"], interfaces["S11:2"])
1639
1640
        links["S8:8<->User3:2"] = Link(interfaces["S8:8"], interfaces["User3:2"])
1641
1642
        links["S10:3<->User2:1"] = Link(interfaces["S10:3"], interfaces["User2:1"])
1643
1644
        links["S11:3<->User2:2"] = Link(interfaces["S11:3"], interfaces["User2:2"])
1645
1646
        links["User1:4<->User4:3"] = Link(interfaces["User1:4"], interfaces["User4:3"])
1647