Merge "Test case spec for SDN Virtual Switch resilience."
[yardstick.git] / yardstick / tests / unit / network_services / traffic_profile / test_ixia_rfc2544.py
1 # Copyright (c) 2016-2017 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15
16 import unittest
17 import mock
18
19 from copy import deepcopy
20
21 from yardstick.tests import STL_MOCKS
22
23 STLClient = mock.MagicMock()
24 stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
25 stl_patch.start()
26
27 if stl_patch:
28     from yardstick.network_services.traffic_profile.trex_traffic_profile \
29         import TrexProfile
30     from yardstick.network_services.traffic_profile.ixia_rfc2544 import \
31         IXIARFC2544Profile
32     from yardstick.network_services.traffic_profile import ixia_rfc2544
33
34
35 class TestIXIARFC2544Profile(unittest.TestCase):
36
37     TRAFFIC_PROFILE = {
38         "schema": "isb:traffic_profile:0.1",
39         "name": "fixed",
40         "description": "Fixed traffic profile to run UDP traffic",
41         "traffic_profile": {
42             "traffic_type": "FixedTraffic",
43             "frame_rate": 100,  # pps
44             "flow_number": 10,
45             "frame_size": 64,
46         },
47     }
48
49     PROFILE = {
50         'description': 'Traffic profile to run RFC2544 latency',
51         'name': 'rfc2544',
52         'traffic_profile': {
53             'traffic_type': 'IXIARFC2544Profile',
54             'frame_rate': 100},
55         IXIARFC2544Profile.DOWNLINK: {
56             'ipv4': {
57                 'outer_l2': {
58                     'framesize': {
59                         '64B': '100',
60                         '1518B': '0',
61                         '128B': '0',
62                         '1400B': '0',
63                         '256B': '0',
64                         '373b': '0',
65                         '570B': '0'}},
66                 'outer_l3v4': {
67                     'dstip4': '1.1.1.1-1.15.255.255',
68                     'proto': 'udp',
69                     'count': '1',
70                     'srcip4': '90.90.1.1-90.105.255.255',
71                     'dscp': 0,
72                     'ttl': 32},
73                 'outer_l4': {
74                     'srcport': '2001',
75                     'dsrport': '1234'}}},
76         IXIARFC2544Profile.UPLINK: {
77             'ipv4': {
78                 'outer_l2': {
79                     'framesize': {
80                         '64B': '100',
81                         '1518B': '0',
82                         '128B': '0',
83                         '1400B': '0',
84                         '256B': '0',
85                         '373b': '0',
86                         '570B': '0'}},
87                 'outer_l3v4': {
88                     'dstip4': '9.9.1.1-90.105.255.255',
89                     'proto': 'udp',
90                     'count': '1',
91                     'srcip4': '1.1.1.1-1.15.255.255',
92                     'dscp': 0,
93                     'ttl': 32},
94                 'outer_l4': {
95                     'dstport': '2001',
96                     'srcport': '1234'}}},
97         'schema': 'isb:traffic_profile:0.1'}
98
99     def test_get_ixia_traffic_profile_error(self):
100         traffic_generator = mock.Mock(autospec=TrexProfile)
101         traffic_generator.my_ports = [0, 1]
102         traffic_generator.uplink_ports = [-1]
103         traffic_generator.downlink_ports = [1]
104         traffic_generator.client = \
105             mock.Mock(return_value=True)
106         STATIC_TRAFFIC = {
107             IXIARFC2544Profile.UPLINK: {
108                 "id": 1,
109                 "bidir": "False",
110                 "duration": 60,
111                 "iload": "100",
112                 "outer_l2": {
113                     "dstmac": "00:00:00:00:00:03",
114                     "framesPerSecond": True,
115                     "framesize": 64,
116                     "srcmac": "00:00:00:00:00:01"
117                 },
118                 "outer_l3": {
119                     "dscp": 0,
120                     "dstip4": "152.16.40.20",
121                     "proto": "udp",
122                     "srcip4": "152.16.100.20",
123                     "ttl": 32
124                 },
125                 "outer_l3v4": {
126                     "dscp": 0,
127                     "dstip4": "152.16.40.20",
128                     "proto": "udp",
129                     "srcip4": "152.16.100.20",
130                     "ttl": 32
131                 },
132                 "outer_l3v6": {
133                     "count": 1024,
134                     "dscp": 0,
135                     "dstip4": "152.16.100.20",
136                     "proto": "udp",
137                     "srcip4": "152.16.40.20",
138                     "ttl": 32
139                 },
140                 "outer_l4": {
141                     "dstport": "2001",
142                     "srcport": "1234"
143                 },
144                 "traffic_type": "continuous"
145             },
146             IXIARFC2544Profile.DOWNLINK: {
147                 "id": 2,
148                 "bidir": "False",
149                 "duration": 60,
150                 "iload": "100",
151                 "outer_l2": {
152                     "dstmac": "00:00:00:00:00:04",
153                     "framesPerSecond": True,
154                     "framesize": 64,
155                     "srcmac": "00:00:00:00:00:01"
156                 },
157                 "outer_l3": {
158                     "count": 1024,
159                     "dscp": 0,
160                     "dstip4": "152.16.100.20",
161                     "proto": "udp",
162                     "srcip4": "152.16.40.20",
163                     "ttl": 32
164                 },
165                 "outer_l3v4": {
166                     "count": 1024,
167                     "dscp": 0,
168                     "dstip4": "152.16.100.20",
169                     "proto": "udp",
170                     "srcip4": "152.16.40.20",
171                     "ttl": 32
172                 },
173                 "outer_l3v6": {
174                     "count": 1024,
175                     "dscp": 0,
176                     "dstip4": "152.16.100.20",
177                     "proto": "udp",
178                     "srcip4": "152.16.40.20",
179                     "ttl": 32
180                 },
181                 "outer_l4": {
182                     "dstport": "1234",
183                     "srcport": "2001"
184                 },
185                 "traffic_type": "continuous"
186             }
187         }
188         ixia_rfc2544.STATIC_TRAFFIC = STATIC_TRAFFIC
189
190         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
191         r_f_c2544_profile.rate = 100
192         mac = {"src_mac_0": "00:00:00:00:00:01",
193                "src_mac_1": "00:00:00:00:00:02",
194                "src_mac_2": "00:00:00:00:00:02",
195                "dst_mac_0": "00:00:00:00:00:03",
196                "dst_mac_1": "00:00:00:00:00:04",
197                "dst_mac_2": "00:00:00:00:00:04"}
198         result = r_f_c2544_profile._get_ixia_traffic_profile(self.PROFILE, mac)
199         self.assertIsNotNone(result)
200
201     def test_get_ixia_traffic_profile(self):
202         traffic_generator = mock.Mock(autospec=TrexProfile)
203         traffic_generator.my_ports = [0, 1]
204         traffic_generator.uplink_ports = [-1]
205         traffic_generator.downlink_ports = [1]
206         traffic_generator.client = \
207             mock.Mock(return_value=True)
208         STATIC_TRAFFIC = {
209             IXIARFC2544Profile.UPLINK: {
210                 "id": 1,
211                 "bidir": "False",
212                 "duration": 60,
213                 "iload": "100",
214                 "outer_l2": {
215                     "dstmac": "00:00:00:00:00:03",
216                     "framesPerSecond": True,
217                     "framesize": 64,
218                     "srcmac": "00:00:00:00:00:01"
219                 },
220                 "outer_l3": {
221                     "dscp": 0,
222                     "dstip4": "152.16.40.20",
223                     "proto": "udp",
224                     "srcip4": "152.16.100.20",
225                     "ttl": 32
226                 },
227                 "outer_l3v4": {
228                     "dscp": 0,
229                     "dstip4": "152.16.40.20",
230                     "proto": "udp",
231                     "srcip4": "152.16.100.20",
232                     "ttl": 32,
233                     "count": "1"
234                 },
235                 "outer_l3v6": {
236                     "dscp": 0,
237                     "dstip4": "152.16.100.20",
238                     "proto": "udp",
239                     "srcip4": "152.16.40.20",
240                     "ttl": 32,
241                 },
242                 "outer_l4": {
243                     "dstport": "2001",
244                     "srcport": "1234",
245                     "count": "1"
246                 },
247                 "traffic_type": "continuous"
248             },
249             IXIARFC2544Profile.DOWNLINK: {
250                 "id": 2,
251                 "bidir": "False",
252                 "duration": 60,
253                 "iload": "100",
254                 "outer_l2": {
255                     "dstmac": "00:00:00:00:00:04",
256                     "framesPerSecond": True,
257                     "framesize": 64,
258                     "srcmac": "00:00:00:00:00:01"
259                 },
260                 "outer_l3": {
261                     "count": 1024,
262                     "dscp": 0,
263                     "dstip4": "152.16.100.20",
264                     "proto": "udp",
265                     "srcip4": "152.16.40.20",
266                     "ttl": 32
267                 },
268                 "outer_l3v4": {
269                     "dscp": 0,
270                     "dstip4": "152.16.100.20",
271                     "proto": "udp",
272                     "srcip4": "152.16.40.20",
273                     "ttl": 32,
274                 },
275                 "outer_l3v6": {
276                     "dscp": 0,
277                     "dstip4": "152.16.100.20",
278                     "proto": "udp",
279                     "srcip4": "152.16.40.20",
280                     "ttl": 32,
281                 },
282                 "outer_l4": {
283                     "dstport": "1234",
284                     "srcport": "2001",
285                     "count": "1"
286                 },
287                 "traffic_type": "continuous"
288             }
289         }
290         ixia_rfc2544.STATIC_TRAFFIC = STATIC_TRAFFIC
291
292         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
293         r_f_c2544_profile.rate = 100
294         mac = {"src_mac_0": "00:00:00:00:00:01",
295                "src_mac_1": "00:00:00:00:00:02",
296                "src_mac_2": "00:00:00:00:00:02",
297                "dst_mac_0": "00:00:00:00:00:03",
298                "dst_mac_1": "00:00:00:00:00:04",
299                "dst_mac_2": "00:00:00:00:00:04"}
300         result = r_f_c2544_profile._get_ixia_traffic_profile(self.PROFILE, mac)
301         self.assertIsNotNone(result)
302
303     @mock.patch("yardstick.network_services.traffic_profile.ixia_rfc2544.open")
304     def test_get_ixia_traffic_profile_v6(self, *args):
305         traffic_generator = mock.Mock(autospec=TrexProfile)
306         traffic_generator.my_ports = [0, 1]
307         traffic_generator.uplink_ports = [-1]
308         traffic_generator.downlink_ports = [1]
309         traffic_generator.client = \
310             mock.Mock(return_value=True)
311         STATIC_TRAFFIC = {
312             IXIARFC2544Profile.UPLINK: {
313                 "id": 1,
314                 "bidir": "False",
315                 "duration": 60,
316                 "iload": "100",
317                 "outer_l2": {
318                     "dstmac": "00:00:00:00:00:03",
319                     "framesPerSecond": True,
320                     "framesize": 64,
321                     "srcmac": "00:00:00:00:00:01"
322                 },
323                 "outer_l3": {
324                     "dscp": 0,
325                     "dstip4": "152.16.40.20",
326                     "proto": "udp",
327                     "srcip4": "152.16.100.20",
328                     "ttl": 32
329                 },
330                 "outer_l3v4": {
331                     "dscp": 0,
332                     "dstip4": "152.16.40.20",
333                     "proto": "udp",
334                     "srcip4": "152.16.100.20",
335                     "ttl": 32
336                 },
337                 "outer_l3v6": {
338                     "count": 1024,
339                     "dscp": 0,
340                     "dstip4": "152.16.100.20",
341                     "proto": "udp",
342                     "srcip4": "152.16.40.20",
343                     "ttl": 32
344                 },
345                 "outer_l4": {
346                     "dstport": "2001",
347                     "srcport": "1234"
348                 },
349                 "traffic_type": "continuous"
350             },
351             IXIARFC2544Profile.DOWNLINK: {
352                 "id": 2,
353                 "bidir": "False",
354                 "duration": 60,
355                 "iload": "100",
356                 "outer_l2": {
357                     "dstmac": "00:00:00:00:00:04",
358                     "framesPerSecond": True,
359                     "framesize": 64,
360                     "srcmac": "00:00:00:00:00:01"
361                 },
362                 "outer_l3": {
363                     "count": 1024,
364                     "dscp": 0,
365                     "dstip4": "152.16.100.20",
366                     "proto": "udp",
367                     "srcip4": "152.16.40.20",
368                     "ttl": 32
369                 },
370                 "outer_l3v4": {
371                     "count": 1024,
372                     "dscp": 0,
373                     "dstip4": "152.16.100.20",
374                     "proto": "udp",
375                     "srcip4": "152.16.40.20",
376                     "ttl": 32
377                 },
378                 "outer_l3v6": {
379                     "count": 1024,
380                     "dscp": 0,
381                     "dstip4": "152.16.100.20",
382                     "proto": "udp",
383                     "srcip4": "152.16.40.20",
384                     "ttl": 32
385                 },
386                 "outer_l4": {
387                     "dstport": "1234",
388                     "srcport": "2001"
389                 },
390                 "traffic_type": "continuous"
391             }
392         }
393         ixia_rfc2544.STATIC_TRAFFIC = STATIC_TRAFFIC
394
395         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
396         r_f_c2544_profile.rate = 100
397         mac = {"src_mac_0": "00:00:00:00:00:01",
398                "src_mac_1": "00:00:00:00:00:02",
399                "src_mac_2": "00:00:00:00:00:02",
400                "dst_mac_0": "00:00:00:00:00:03",
401                "dst_mac_1": "00:00:00:00:00:04",
402                "dst_mac_2": "00:00:00:00:00:04"}
403         profile_data = {'description': 'Traffic profile to run RFC2544',
404                         'name': 'rfc2544',
405                         'traffic_profile':
406                         {'traffic_type': 'IXIARFC2544Profile',
407                          'frame_rate': 100},
408                         IXIARFC2544Profile.DOWNLINK:
409                         {'ipv4':
410                          {'outer_l2': {'framesize':
411                                        {'64B': '100', '1518B': '0',
412                                         '128B': '0', '1400B': '0',
413                                         '256B': '0', '373b': '0',
414                                         '570B': '0'}},
415                           'outer_l3v4': {'dstip4': '1.1.1.1-1.15.255.255',
416                                          'proto': 'udp', 'count': '1',
417                                          'srcip4': '90.90.1.1-90.105.255.255',
418                                          'dscp': 0, 'ttl': 32},
419                           'outer_l3v6': {'dstip6': '1.1.1.1-1.15.255.255',
420                                          'proto': 'udp', 'count': '1',
421                                          'srcip6': '90.90.1.1-90.105.255.255',
422                                          'dscp': 0, 'ttl': 32},
423                           'outer_l4': {'srcport': '2001',
424                                        'dsrport': '1234'}}},
425                         IXIARFC2544Profile.UPLINK: {'ipv4':
426                                                     {'outer_l2': {'framesize':
427                                                                   {'64B': '100', '1518B': '0',
428                                                                    '128B': '0', '1400B': '0',
429                                                                    '256B': '0', '373b': '0',
430                                                                    '570B': '0'}},
431                                                         'outer_l3v4':
432                                                         {'dstip4': '9.9.1.1-90.105.255.255',
433                                                          'proto': 'udp', 'count': '1',
434                                                          'srcip4': '1.1.1.1-1.15.255.255',
435                                                          'dscp': 0, 'ttl': 32},
436                                                         'outer_l3v6':
437                                                         {'dstip6': '9.9.1.1-90.105.255.255',
438                                                          'proto': 'udp', 'count': '1',
439                                                          'srcip6': '1.1.1.1-1.15.255.255',
440                                                          'dscp': 0, 'ttl': 32},
441
442                                                         'outer_l4': {'dstport': '2001',
443                                                                      'srcport': '1234'}}},
444                         'schema': 'isb:traffic_profile:0.1'}
445         result = r_f_c2544_profile._get_ixia_traffic_profile(profile_data, mac)
446         self.assertIsNotNone(result)
447
448     def test__get_ixia_traffic_profile_default_args(self):
449         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
450
451         expected = {}
452         result = r_f_c2544_profile._get_ixia_traffic_profile({})
453         self.assertDictEqual(result, expected)
454
455     def test__ixia_traffic_generate(self):
456         traffic_generator = mock.Mock(autospec=TrexProfile)
457         traffic_generator.networks = {
458             "uplink_0": ["xe0"],
459             "downlink_0": ["xe1"],
460         }
461         traffic_generator.client = \
462             mock.Mock(return_value=True)
463         traffic = {IXIARFC2544Profile.DOWNLINK: {'iload': 10},
464                    IXIARFC2544Profile.UPLINK: {'iload': 10}}
465         ixia_obj = mock.MagicMock()
466         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
467         r_f_c2544_profile.rate = 100
468         result = r_f_c2544_profile._ixia_traffic_generate(traffic, ixia_obj)
469         self.assertIsNone(result)
470
471     def test_execute(self):
472         traffic_generator = mock.Mock(autospec=TrexProfile)
473         traffic_generator.networks = {
474             "uplink_0": ["xe0"],
475             "downlink_0": ["xe1"],
476         }
477         traffic_generator.client = \
478             mock.Mock(return_value=True)
479         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
480         r_f_c2544_profile.first_run = True
481         r_f_c2544_profile.params = {IXIARFC2544Profile.DOWNLINK: {'iload': 10},
482                                     IXIARFC2544Profile.UPLINK: {'iload': 10}}
483
484         r_f_c2544_profile.get_streams = mock.Mock()
485         r_f_c2544_profile.full_profile = {}
486         r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock()
487         r_f_c2544_profile.get_multiplier = mock.Mock()
488         r_f_c2544_profile._ixia_traffic_generate = mock.Mock()
489         ixia_obj = mock.MagicMock()
490         self.assertIsNone(r_f_c2544_profile.execute_traffic(traffic_generator, ixia_obj))
491
492     def test_update_traffic_profile(self):
493         traffic_generator = mock.Mock(autospec=TrexProfile)
494         traffic_generator.networks = {
495             "uplink_0": ["xe0"],  # private, one value for intfs
496             "downlink_0": ["xe1", "xe2"],  # public, two values for intfs
497             "downlink_1": ["xe3"],  # not in TRAFFIC PROFILE
498             "tenant_0": ["xe4"],  # not public or private
499         }
500
501         ports_expected = [8, 3, 5]
502         traffic_generator.vnfd_helper.port_num.side_effect = ports_expected
503         traffic_generator.client.return_value = True
504
505         traffic_profile = deepcopy(self.TRAFFIC_PROFILE)
506         traffic_profile.update({
507             "uplink_0": ["xe0"],
508             "downlink_0": ["xe1", "xe2"],
509         })
510
511         r_f_c2544_profile = IXIARFC2544Profile(traffic_profile)
512         r_f_c2544_profile.full_profile = {}
513         r_f_c2544_profile.get_streams = mock.Mock()
514
515         self.assertIsNone(
516             r_f_c2544_profile.update_traffic_profile(traffic_generator))
517         self.assertEqual(r_f_c2544_profile.ports, ports_expected)
518
519     def test_get_drop_percentage(self):
520         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
521         r_f_c2544_profile.params = self.PROFILE
522         ixia_obj = mock.MagicMock()
523         r_f_c2544_profile.execute = mock.Mock()
524         r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock()
525         r_f_c2544_profile._ixia_traffic_generate = mock.Mock()
526         r_f_c2544_profile.get_multiplier = mock.Mock()
527         r_f_c2544_profile.tmp_throughput = 0
528         r_f_c2544_profile.tmp_drop = 0
529         r_f_c2544_profile.full_profile = {}
530         samples = {}
531         for ifname in range(1):
532             name = "xe{}".format(ifname)
533             samples[name] = {"rx_throughput_fps": 20,
534                              "tx_throughput_fps": 20,
535                              "rx_throughput_mbps": 10,
536                              "tx_throughput_mbps": 10,
537                              "RxThroughput": 10,
538                              "TxThroughput": 10,
539                              "in_packets": 1000,
540                              "out_packets": 1000}
541         tol_min = 100.0
542         tolerance = 0.0
543         self.assertIsNotNone(
544             r_f_c2544_profile.get_drop_percentage(samples, tol_min, tolerance,
545                                                   ixia_obj))
546
547     def test_get_drop_percentage_update(self):
548         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
549         r_f_c2544_profile.params = self.PROFILE
550         ixia_obj = mock.MagicMock()
551         r_f_c2544_profile.execute = mock.Mock()
552         r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock()
553         r_f_c2544_profile._ixia_traffic_generate = mock.Mock()
554         r_f_c2544_profile.get_multiplier = mock.Mock()
555         r_f_c2544_profile.tmp_throughput = 0
556         r_f_c2544_profile.tmp_drop = 0
557         r_f_c2544_profile.full_profile = {}
558         samples = {}
559         for ifname in range(1):
560             name = "xe{}".format(ifname)
561             samples[name] = {"rx_throughput_fps": 20,
562                              "tx_throughput_fps": 20,
563                              "rx_throughput_mbps": 10,
564                              "tx_throughput_mbps": 10,
565                              "RxThroughput": 10,
566                              "TxThroughput": 10,
567                              "in_packets": 1000,
568                              "out_packets": 1002}
569         tol_min = 0.0
570         tolerance = 1.0
571         self.assertIsNotNone(
572             r_f_c2544_profile.get_drop_percentage(samples, tol_min, tolerance,
573                                                   ixia_obj))
574
575     def test_get_drop_percentage_div_zero(self):
576         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
577         r_f_c2544_profile.params = self.PROFILE
578         ixia_obj = mock.MagicMock()
579         r_f_c2544_profile.execute = mock.Mock()
580         r_f_c2544_profile._get_ixia_traffic_profile = mock.Mock()
581         r_f_c2544_profile._ixia_traffic_generate = mock.Mock()
582         r_f_c2544_profile.get_multiplier = mock.Mock()
583         r_f_c2544_profile.tmp_throughput = 0
584         r_f_c2544_profile.tmp_drop = 0
585         r_f_c2544_profile.full_profile = {}
586         samples = {}
587         for ifname in range(1):
588             name = "xe{}".format(ifname)
589             samples[name] = {"rx_throughput_fps": 20,
590                              "tx_throughput_fps": 20,
591                              "rx_throughput_mbps": 10,
592                              "tx_throughput_mbps": 10,
593                              "RxThroughput": 10,
594                              "TxThroughput": 10,
595                              "in_packets": 1000,
596                              "out_packets": 0}
597         tol_min = 0.0
598         tolerance = 0.0
599         r_f_c2544_profile.tmp_throughput = 0
600         self.assertIsNotNone(
601             r_f_c2544_profile.get_drop_percentage(samples, tol_min, tolerance,
602                                                   ixia_obj))
603
604     def test_get_multiplier(self):
605         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
606         r_f_c2544_profile.max_rate = 100
607         r_f_c2544_profile.min_rate = 100
608         self.assertEqual("1.0", r_f_c2544_profile.get_multiplier())
609
610     def test_start_ixia_latency(self):
611         traffic_generator = mock.Mock(autospec=TrexProfile)
612         traffic_generator.networks = {
613             "uplink_0": ["xe0"],
614             "downlink_0": ["xe1"],
615         }
616         traffic_generator.client = \
617             mock.Mock(return_value=True)
618         r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE)
619         r_f_c2544_profile.max_rate = 100
620         r_f_c2544_profile.min_rate = 100
621         ixia_obj = mock.MagicMock()
622         r_f_c2544_profile._get_ixia_traffic_profile = \
623             mock.Mock(return_value={})
624         r_f_c2544_profile.full_profile = {}
625         r_f_c2544_profile._ixia_traffic_generate = mock.Mock()
626         self.assertIsNone(
627             r_f_c2544_profile.start_ixia_latency(traffic_generator, ixia_obj))