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