blob: 4cfd3ad5b0e372ffab951094819b58a65f238001 [file] [log] [blame]
Chetan Gaonkercfcce782016-05-10 10:10:42 -07001#
2# Copyright 2016-present Ciena Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
Chetan Gaonkercbe79642016-03-09 17:45:58 -080016import unittest
17from nose.tools import *
18from nose.twistedtools import reactor, deferred
19from twisted.internet import defer
20from scapy.all import *
21import time, monotonic
22import os, sys
23import tempfile
24import random
25import threading
26from Stats import Stats
27from OnosCtrl import OnosCtrl
28from DHCP import DHCPTest
29from EapTLS import TLSAuthTest
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -070030from Channels import Channels, IgmpChannel
Chetan Gaonker41d2e072016-03-15 16:41:31 -070031from subscriberDb import SubscriberDB
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -070032from threadPool import ThreadPool
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -070033from portmaps import g_subscriber_port_map
Chetan Gaonker7997bb42016-03-28 09:46:15 -070034from OltConfig import *
Chetan Gaonkercbe79642016-03-09 17:45:58 -080035log.setLevel('INFO')
36
37class Subscriber(Channels):
Chetan Gaonker7997bb42016-03-28 09:46:15 -070038 PORT_TX_DEFAULT = 2
39 PORT_RX_DEFAULT = 1
40 INTF_TX_DEFAULT = 'veth2'
41 INTF_RX_DEFAULT = 'veth0'
Chetan Gaonkercbe79642016-03-09 17:45:58 -080042 STATS_RX = 0
43 STATS_TX = 1
44 STATS_JOIN = 2
45 STATS_LEAVE = 3
Chetan Gaonker41d2e072016-03-15 16:41:31 -070046 SUBSCRIBER_SERVICES = 'DHCP IGMP TLS'
Chetan Gaonker7997bb42016-03-28 09:46:15 -070047 def __init__(self, name = 'sub', service = SUBSCRIBER_SERVICES, port_map = None,
48 num = 1, channel_start = 0,
49 tx_port = PORT_TX_DEFAULT, rx_port = PORT_RX_DEFAULT,
50 iface = INTF_RX_DEFAULT, iface_mcast = INTF_TX_DEFAULT,
Chetan Gaonkercbe79642016-03-09 17:45:58 -080051 mcast_cb = None, loginType = 'wireless'):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -070052 self.tx_port = tx_port
53 self.rx_port = rx_port
Chetan Gaonker7997bb42016-03-28 09:46:15 -070054 self.port_map = port_map or g_subscriber_port_map
55 try:
56 self.tx_intf = self.port_map[tx_port]
57 self.rx_intf = self.port_map[rx_port]
58 except:
Chetan Gaonker3d163852016-03-28 12:20:25 -070059 self.tx_intf = self.port_map[self.PORT_TX_DEFAULT]
60 self.rx_intf = self.port_map[self.PORT_RX_DEFAULT]
Chetan Gaonker7997bb42016-03-28 09:46:15 -070061
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -070062 Channels.__init__(self, num, channel_start = channel_start,
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -070063 iface = self.rx_intf, iface_mcast = self.tx_intf, mcast_cb = mcast_cb)
Chetan Gaonker41d2e072016-03-15 16:41:31 -070064 self.name = name
65 self.service = service
66 self.service_map = {}
67 services = self.service.strip().split(' ')
68 for s in services:
69 self.service_map[s] = True
Chetan Gaonkercbe79642016-03-09 17:45:58 -080070 self.loginType = loginType
71 ##start streaming channels
72 self.join_map = {}
73 ##accumulated join recv stats
74 self.join_rx_stats = Stats()
75
Chetan Gaonker41d2e072016-03-15 16:41:31 -070076 def has_service(self, service):
77 if self.service_map.has_key(service):
78 return self.service_map[service]
79 if self.service_map.has_key(service.upper()):
80 return self.service_map[service.upper()]
81 return False
82
Chetan Gaonkercbe79642016-03-09 17:45:58 -080083 def channel_join_update(self, chan, join_time):
84 self.join_map[chan] = ( Stats(), Stats(), Stats(), Stats() )
85 self.channel_update(chan, self.STATS_JOIN, 1, t = join_time)
86
87 def channel_join(self, chan = 0, delay = 2):
88 '''Join a channel and create a send/recv stats map'''
89 if self.join_map.has_key(chan):
90 del self.join_map[chan]
91 self.delay = delay
92 chan, join_time = self.join(chan)
93 self.channel_join_update(chan, join_time)
94 return chan
95
96 def channel_join_next(self, delay = 2):
97 '''Joins the next channel leaving the last channel'''
98 if self.last_chan:
99 if self.join_map.has_key(self.last_chan):
100 del self.join_map[self.last_chan]
101 self.delay = delay
102 chan, join_time = self.join_next()
103 self.channel_join_update(chan, join_time)
104 return chan
105
106 def channel_jump(self, delay = 2):
107 '''Jumps randomly to the next channel leaving the last channel'''
Chetan Gaonker4a82bae2016-05-19 17:35:30 -0700108 log.info("Jumps randomly to the next channel leaving the last channel")
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800109 if self.last_chan is not None:
110 if self.join_map.has_key(self.last_chan):
111 del self.join_map[self.last_chan]
112 self.delay = delay
113 chan, join_time = self.jump()
114 self.channel_join_update(chan, join_time)
115 return chan
116
117 def channel_leave(self, chan = 0):
118 if self.join_map.has_key(chan):
119 del self.join_map[chan]
120 self.leave(chan)
121
122 def channel_update(self, chan, stats_type, packets, t=0):
123 if type(chan) == type(0):
124 chan_list = (chan,)
125 else:
126 chan_list = chan
127 for c in chan_list:
128 if self.join_map.has_key(c):
129 self.join_map[c][stats_type].update(packets = packets, t = t)
130
131 def channel_receive(self, chan, cb = None, count = 1):
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700132 log.info('Subscriber %s receiving from group %s, channel %d' %(self.name, self.gaddr(chan), chan))
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800133 self.recv(chan, cb = cb, count = count)
134
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700135 def recv_channel_cb(self, pkt):
136 ##First verify that we have received the packet for the joined instance
137 log.debug('Packet received for group %s, subscriber %s' %(pkt[IP].dst, self.name))
138 chan = self.caddr(pkt[IP].dst)
139 assert_equal(chan in self.join_map.keys(), True)
140 recv_time = monotonic.monotonic() * 1000000
141 join_time = self.join_map[chan][self.STATS_JOIN].start
142 delta = recv_time - join_time
143 self.join_rx_stats.update(packets=1, t = delta, usecs = True)
144 self.channel_update(chan, self.STATS_RX, 1, t = delta)
145 log.debug('Packet received in %.3f usecs for group %s after join' %(delta, pkt[IP].dst))
146
147class subscriber_pool:
148
149 def __init__(self, subscriber, test_cbs):
150 self.subscriber = subscriber
151 self.test_cbs = test_cbs
152
153 def pool_cb(self):
154 for cb in self.test_cbs:
155 if cb:
156 cb(self.subscriber)
157
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800158class subscriber_exchange(unittest.TestCase):
159
160 apps = [ 'org.onosproject.aaa', 'org.onosproject.dhcp' ]
Chetan Gaonkera2b87df2016-03-31 15:41:31 -0700161 olt_apps = [ 'org.onosproject.igmp', 'org.onosproject.cordmcast' ]
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800162 dhcp_server_config = {
163 "ip": "10.1.11.50",
164 "mac": "ca:fe:ca:fe:ca:fe",
165 "subnet": "255.255.252.0",
166 "broadcast": "10.1.11.255",
167 "router": "10.1.8.1",
168 "domain": "8.8.8.8",
169 "ttl": "63",
170 "delay": "2",
171 "startip": "10.1.11.51",
172 "endip": "10.1.11.100"
173 }
174
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700175 aaa_loaded = False
176
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800177 def setUp(self):
Chetan Gaonker7997bb42016-03-28 09:46:15 -0700178 '''Load the OLT config and activate relevant apps'''
179 self.olt = OltConfig()
180 self.port_map = self.olt.olt_port_map()
181 ##if no olt config, fall back to ovs port map
182 if not self.port_map:
183 self.port_map = g_subscriber_port_map
184 else:
185 log.info('Using OLT Port configuration for test setup')
Chetan Gaonkera2b87df2016-03-31 15:41:31 -0700186 log.info('Configuring CORD OLT access device information')
187 OnosCtrl.cord_olt_config(self.olt.olt_device_data())
188 self.activate_apps(self.olt_apps)
189
190 self.activate_apps(self.apps)
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800191
192 def teardown(self):
193 '''Deactivate the dhcp app'''
194 for app in self.apps:
195 onos_ctrl = OnosCtrl(app)
196 onos_ctrl.deactivate()
197
Chetan Gaonkera2b87df2016-03-31 15:41:31 -0700198 def activate_apps(self, apps):
Chetan Gaonker735495f2016-05-10 14:51:16 -0700199 for app in apps:
Chetan Gaonkera2b87df2016-03-31 15:41:31 -0700200 onos_ctrl = OnosCtrl(app)
201 status, _ = onos_ctrl.activate()
202 assert_equal(status, True)
203 time.sleep(2)
204
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800205 def onos_aaa_load(self):
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700206 if self.aaa_loaded:
207 return
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800208 aaa_dict = {'apps' : { 'org.onosproject.aaa' : { 'AAA' : { 'radiusSecret': 'radius_password',
209 'radiusIp': '172.17.0.2' } } } }
210 radius_ip = os.getenv('ONOS_AAA_IP') or '172.17.0.2'
211 aaa_dict['apps']['org.onosproject.aaa']['AAA']['radiusIp'] = radius_ip
212 self.onos_load_config('org.onosproject.aaa', aaa_dict)
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700213 self.aaa_loaded = True
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800214
215 def onos_dhcp_table_load(self, config = None):
216 dhcp_dict = {'apps' : { 'org.onosproject.dhcp' : { 'dhcp' : copy.copy(self.dhcp_server_config) } } }
217 dhcp_config = dhcp_dict['apps']['org.onosproject.dhcp']['dhcp']
218 if config:
219 for k in config.keys():
220 if dhcp_config.has_key(k):
221 dhcp_config[k] = config[k]
222 self.onos_load_config('org.onosproject.dhcp', dhcp_dict)
223
224 def onos_load_config(self, app, config):
Chetan Gaonkera2b87df2016-03-31 15:41:31 -0700225 status, code = OnosCtrl.config(config)
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800226 if status is False:
227 log.info('JSON config request for app %s returned status %d' %(app, code))
228 assert_equal(status, True)
229 time.sleep(2)
230
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700231 def dhcp_sndrcv(self, dhcp, update_seed = False):
232 cip, sip = dhcp.discover(update_seed = update_seed)
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800233 assert_not_equal(cip, None)
234 assert_not_equal(sip, None)
235 log.info('Got dhcp client IP %s from server %s for mac %s' %
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700236 (cip, sip, dhcp.get_mac(cip)[0]))
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800237 return cip,sip
238
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700239 def dhcp_request(self, subscriber, seed_ip = '10.10.10.1', update_seed = False):
Chetan Gaonker00971202016-03-23 15:11:12 -0700240 config = {'startip':'10.10.10.20', 'endip':'10.10.10.200',
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800241 'ip':'10.10.10.2', 'mac': "ca:fe:ca:fe:ca:fe",
242 'subnet': '255.255.255.0', 'broadcast':'10.10.10.255', 'router':'10.10.10.1'}
243 self.onos_dhcp_table_load(config)
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700244 dhcp = DHCPTest(seed_ip = seed_ip, iface = subscriber.iface)
245 cip, sip = self.dhcp_sndrcv(dhcp, update_seed = update_seed)
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800246 return cip, sip
247
248 def recv_channel_cb(self, pkt):
249 ##First verify that we have received the packet for the joined instance
250 chan = self.subscriber.caddr(pkt[IP].dst)
251 assert_equal(chan in self.subscriber.join_map.keys(), True)
252 recv_time = monotonic.monotonic() * 1000000
253 join_time = self.subscriber.join_map[chan][self.subscriber.STATS_JOIN].start
254 delta = recv_time - join_time
255 self.subscriber.join_rx_stats.update(packets=1, t = delta, usecs = True)
256 self.subscriber.channel_update(chan, self.subscriber.STATS_RX, 1, t = delta)
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700257 log.debug('Packet received in %.3f usecs for group %s after join' %(delta, pkt[IP].dst))
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800258 self.test_status = True
259
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700260 def tls_verify(self, subscriber):
261 if subscriber.has_service('TLS'):
262 time.sleep(2)
263 tls = TLSAuthTest()
264 log.info('Running subscriber %s tls auth test' %subscriber.name)
265 tls.runTest()
266 self.test_status = True
267
268 def dhcp_verify(self, subscriber):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700269 cip, sip = self.dhcp_request(subscriber, update_seed = True)
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700270 log.info('Subscriber %s got client ip %s from server %s' %(subscriber.name, cip, sip))
271 subscriber.src_list = [cip]
272 self.test_status = True
273
274 def dhcp_jump_verify(self, subscriber):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700275 cip, sip = self.dhcp_request(subscriber, seed_ip = '10.10.200.1')
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700276 log.info('Subscriber %s got client ip %s from server %s' %(subscriber.name, cip, sip))
277 subscriber.src_list = [cip]
278 self.test_status = True
279
280 def dhcp_next_verify(self, subscriber):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700281 cip, sip = self.dhcp_request(subscriber, seed_ip = '10.10.150.1')
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700282 log.info('Subscriber %s got client ip %s from server %s' %(subscriber.name, cip, sip))
283 subscriber.src_list = [cip]
284 self.test_status = True
285
286 def igmp_verify(self, subscriber):
287 chan = 0
288 if subscriber.has_service('IGMP'):
289 for i in range(5):
290 log.info('Joining channel %d for subscriber %s' %(chan, subscriber.name))
291 subscriber.channel_join(chan, delay = 0)
292 subscriber.channel_receive(chan, cb = subscriber.recv_channel_cb, count = 1)
293 log.info('Leaving channel %d for subscriber %s' %(chan, subscriber.name))
294 subscriber.channel_leave(chan)
295 time.sleep(3)
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700296 log.info('Interface %s Join RX stats for subscriber %s, %s' %(subscriber.iface, subscriber.name,subscriber.join_rx_stats))
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700297 self.test_status = True
298
299 def igmp_jump_verify(self, subscriber):
300 if subscriber.has_service('IGMP'):
301 for i in xrange(subscriber.num):
302 log.info('Subscriber %s jumping channel' %subscriber.name)
303 chan = subscriber.channel_jump(delay=0)
304 subscriber.channel_receive(chan, cb = subscriber.recv_channel_cb, count = 1)
305 log.info('Verified receive for channel %d, subscriber %s' %(chan, subscriber.name))
306 time.sleep(3)
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700307 log.info('Interface %s Jump RX stats for subscriber %s, %s' %(subscriber.iface, subscriber.name, subscriber.join_rx_stats))
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700308 self.test_status = True
309
310 def igmp_next_verify(self, subscriber):
311 if subscriber.has_service('IGMP'):
312 for i in xrange(subscriber.num):
313 if i:
314 chan = subscriber.channel_join_next(delay=0)
315 else:
316 chan = subscriber.channel_join(i, delay=0)
317 log.info('Joined next channel %d for subscriber %s' %(chan, subscriber.name))
318 subscriber.channel_receive(chan, cb = subscriber.recv_channel_cb, count=1)
319 log.info('Verified receive for channel %d, subscriber %s' %(chan, subscriber.name))
320 time.sleep(3)
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700321 log.info('Interface %s Join Next RX stats for subscriber %s, %s' %(subscriber.iface, subscriber.name, subscriber.join_rx_stats))
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700322 self.test_status = True
323
Chetan Gaonker3d163852016-03-28 12:20:25 -0700324 def generate_port_list(self, subscribers, channels):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700325 port_list = []
Chetan Gaonker3d163852016-03-28 12:20:25 -0700326 for i in xrange(subscribers):
327 if channels > 1:
328 rx_port = 2*i+1
329 tx_port = 2*i+2
330 else:
331 rx_port = Subscriber.PORT_RX_DEFAULT
332 tx_port = Subscriber.PORT_TX_DEFAULT
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700333 port_list.append((tx_port, rx_port))
334 return port_list
335
336 def subscriber_load(self, create = True, num = 10, num_channels = 1, channel_start = 0, port_list = []):
Chetan Gaonker41d2e072016-03-15 16:41:31 -0700337 '''Load the subscriber from the database'''
338 self.subscriber_db = SubscriberDB(create = create)
339 if create is True:
340 self.subscriber_db.generate(num)
341 self.subscriber_info = self.subscriber_db.read(num)
342 self.subscriber_list = []
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700343 if not port_list:
Chetan Gaonker3d163852016-03-28 12:20:25 -0700344 port_list = self.generate_port_list(num, num_channels)
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700345
346 index = 0
Chetan Gaonker41d2e072016-03-15 16:41:31 -0700347 for info in self.subscriber_info:
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700348 self.subscriber_list.append(Subscriber(name=info['Name'],
349 service=info['Service'],
Chetan Gaonker7997bb42016-03-28 09:46:15 -0700350 port_map = self.port_map,
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700351 num=num_channels,
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700352 channel_start = channel_start,
353 tx_port = port_list[index][0],
354 rx_port = port_list[index][1]))
Chetan Gaonker3d163852016-03-28 12:20:25 -0700355 if num_channels > 1:
356 channel_start += num_channels
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700357 index += 1
358
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700359 #load the ssm list for all subscriber channels
360 igmpChannel = IgmpChannel()
361 ssm_groups = map(lambda sub: sub.channels, self.subscriber_list)
362 ssm_list = reduce(lambda ssm1, ssm2: ssm1+ssm2, ssm_groups)
363 igmpChannel.igmp_load_ssm_config(ssm_list)
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700364 #load the subscriber to mcast port map for cord
365 cord_port_map = {}
366 for sub in self.subscriber_list:
367 for chan in sub.channels:
368 cord_port_map[chan] = (sub.tx_port, sub.rx_port)
369
370 igmpChannel.cord_port_table_load(cord_port_map)
Chetan Gaonker41d2e072016-03-15 16:41:31 -0700371
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700372 def subscriber_join_verify( self, num_subscribers = 10, num_channels = 1,
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700373 channel_start = 0, cbs = None, port_list = []):
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800374 self.test_status = False
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700375 self.num_subscribers = num_subscribers
Chetan Gaonker7997bb42016-03-28 09:46:15 -0700376 self.subscriber_load(create = True, num = num_subscribers,
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700377 num_channels = num_channels, channel_start = channel_start, port_list = port_list)
Chetan Gaonker55fc7882016-03-15 17:46:47 -0700378 self.onos_aaa_load()
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700379 self.thread_pool = ThreadPool(min(100, self.num_subscribers), queue_size=1, wait_timeout=1)
380 if cbs is None:
381 cbs = (self.tls_verify, self.dhcp_verify, self.igmp_verify)
Chetan Gaonker41d2e072016-03-15 16:41:31 -0700382 for subscriber in self.subscriber_list:
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700383 subscriber.start()
384 pool_object = subscriber_pool(subscriber, cbs)
385 self.thread_pool.addTask(pool_object.pool_cb)
386 self.thread_pool.cleanUpThreads()
387 for subscriber in self.subscriber_list:
388 subscriber.stop()
389 return self.test_status
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800390
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700391 def test_subscriber_join_recv(self):
Chetan Gaonker717b2942016-05-13 17:42:59 -0700392 num_subscribers = 10
Chetan Gaonker3d163852016-03-28 12:20:25 -0700393 num_channels = 1
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700394 test_status = self.subscriber_join_verify(num_subscribers = num_subscribers,
Chetan Gaonker3d163852016-03-28 12:20:25 -0700395 num_channels = num_channels,
396 port_list = self.generate_port_list(num_subscribers, num_channels))
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700397 assert_equal(test_status, True)
Chetan Gaonkercbe79642016-03-09 17:45:58 -0800398
399 def test_subscriber_join_jump(self):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700400 num_subscribers = 5
Chetan Gaonker3d163852016-03-28 12:20:25 -0700401 num_channels = 50
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700402 test_status = self.subscriber_join_verify(num_subscribers = num_subscribers,
Chetan Gaonker3d163852016-03-28 12:20:25 -0700403 num_channels = num_channels,
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700404 cbs = (self.tls_verify, self.dhcp_jump_verify, self.igmp_jump_verify),
Chetan Gaonker3d163852016-03-28 12:20:25 -0700405 port_list = self.generate_port_list(num_subscribers, num_channels))
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700406 assert_equal(test_status, True)
Chetan Gaonker4b959fc2016-03-09 19:20:16 -0800407
408 def test_subscriber_join_next(self):
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700409 num_subscribers = 5
Chetan Gaonker3d163852016-03-28 12:20:25 -0700410 num_channels = 50
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700411 test_status = self.subscriber_join_verify(num_subscribers = num_subscribers,
Chetan Gaonker3d163852016-03-28 12:20:25 -0700412 num_channels = num_channels,
Chetan Gaonkera58ab6e2016-03-23 15:04:20 -0700413 cbs = (self.tls_verify, self.dhcp_next_verify, self.igmp_next_verify),
Chetan Gaonker3d163852016-03-28 12:20:25 -0700414 port_list = self.generate_port_list(num_subscribers, num_channels))
Chetan Gaonkercd86bdd2016-03-17 00:08:12 -0700415 assert_equal(test_status, True)