blob: de599667fa5b33103f3262bc9421f52c6bc1e052 [file] [log] [blame]
Chetan Gaonker52418832017-01-26 23:03:13 +00001#copyright 2016-present Ciena 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#
A R Karthickd0fdf3b2017-03-21 16:54:22 -070015import time
16import os
A R Karthickf8e753c2017-03-22 11:50:38 -070017import warnings
Chetan Gaonker52418832017-01-26 23:03:13 +000018from nose.tools import *
19from scapy.all import *
A.R Karthick33cfdbe2017-03-17 18:03:48 -070020from CordTestUtils import *
Chetan Gaonker52418832017-01-26 23:03:13 +000021from OltConfig import OltConfig
Chetan Gaonker52418832017-01-26 23:03:13 +000022from onosclidriver import OnosCliDriver
A.R Karthick9ccd0d02017-03-16 17:11:08 -070023from SSHTestAgent import SSHTestAgent
Chetan Gaonker52418832017-01-26 23:03:13 +000024from CordLogger import CordLogger
A R Karthickd0fdf3b2017-03-21 16:54:22 -070025from VSGAccess import VSGAccess
26
Chetan Gaonker52418832017-01-26 23:03:13 +000027log.setLevel('INFO')
28
29class vsg_exchange(CordLogger):
30 ONOS_INSTANCES = 3
31 V_INF1 = 'veth0'
32 device_id = 'of:' + get_mac()
Chetan Gaonker52418832017-01-26 23:03:13 +000033 TEST_IP = '8.8.8.8'
34 HOST = "10.1.0.1"
35 USER = "vagrant"
36 PASS = "vagrant"
A R Karthick63751492017-03-22 09:28:01 -070037 head_node = os.getenv('HEAD_NODE', 'prod')
A.R Karthick9ccd0d02017-03-16 17:11:08 -070038 HEAD_NODE = head_node + '.cord.lab' if len(head_node.split('.')) == 1 else head_node
A R Karthick03f40aa2017-03-20 19:33:55 -070039 test_path = os.path.dirname(os.path.realpath(__file__))
40 olt_conf_file = os.path.join(test_path, '..', 'setup/olt_config.json')
Chetan Gaonker52418832017-01-26 23:03:13 +000041
A.R Karthick33cfdbe2017-03-17 18:03:48 -070042 @classmethod
43 def setUpClass(cls):
A R Karthickf8e753c2017-03-22 11:50:38 -070044 warnings.simplefilter('ignore')
A.R Karthick33cfdbe2017-03-17 18:03:48 -070045 cls.controllers = get_controllers()
46 cls.controller = cls.controllers[0]
47 cls.cli = None
A R Karthick03f40aa2017-03-20 19:33:55 -070048 cls.olt = OltConfig(olt_conf_file = cls.olt_conf_file)
49 cls.vcpes = cls.olt.get_vcpes()
50 cls.vcpes_dhcp = cls.olt.get_vcpes_by_type('dhcp')
51 vcpe_dhcp = None
52 vcpe_dhcp_stag = None
53 vcpe_container = None
54 #cache the first dhcp vcpe in the class for quick testing
55 if cls.vcpes_dhcp:
56 vcpe_container = 'vcpe-{}-{}'.format(cls.vcpes_dhcp[0]['s_tag'], cls.vcpes_dhcp[0]['c_tag'])
57 vcpe_dhcp = 'vcpe0.{}.{}'.format(cls.vcpes_dhcp[0]['s_tag'], cls.vcpes_dhcp[0]['c_tag'])
58 vcpe_dhcp_stag = 'vcpe0.{}'.format(cls.vcpes_dhcp[0]['s_tag'])
59 cls.vcpe_container = vcpe_container
60 cls.vcpe_dhcp = vcpe_dhcp
61 cls.vcpe_dhcp_stag = vcpe_dhcp_stag
A R Karthickd0fdf3b2017-03-21 16:54:22 -070062 VSGAccess.setUp()
Chetan Gaonker52418832017-01-26 23:03:13 +000063
A.R Karthick33cfdbe2017-03-17 18:03:48 -070064 @classmethod
65 def tearDownClass(cls):
A R Karthickd0fdf3b2017-03-21 16:54:22 -070066 VSGAccess.tearDown()
Chetan Gaonker52418832017-01-26 23:03:13 +000067
Chetan Gaonker52418832017-01-26 23:03:13 +000068 def cliEnter(self, controller = None):
69 retries = 0
70 while retries < 30:
71 self.cli = OnosCliDriver(controller = controller, connect = True)
72 if self.cli.handle:
73 break
74 else:
75 retries += 1
76 time.sleep(2)
77
78 def cliExit(self):
79 self.cli.disconnect()
80
81 def onos_shutdown(self, controller = None):
82 status = True
83 self.cliEnter(controller = controller)
84 try:
85 self.cli.shutdown(timeout = 10)
86 except:
87 log.info('Graceful shutdown of ONOS failed for controller: %s' %controller)
88 status = False
89
90 self.cliExit()
91 return status
92
A.R Karthick9ccd0d02017-03-16 17:11:08 -070093 def log_set(self, level = None, app = 'org.onosproject'):
94 CordLogger.logSet(level = level, app = app, controllers = self.controllers, forced = True)
Chetan Gaonker52418832017-01-26 23:03:13 +000095
A R Karthick63751492017-03-22 09:28:01 -070096 def test_vsg_health(self):
A R Karthickd0fdf3b2017-03-21 16:54:22 -070097 status = VSGAccess.health_check()
98 assert_equal(status, True)
Chetan Gaonker52418832017-01-26 23:03:13 +000099
A R Karthick63751492017-03-22 09:28:01 -0700100 def test_vsg_for_vcpe(self):
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700101 vsgs = VSGAccess.get_vsgs()
102 compute_nodes = VSGAccess.get_compute_nodes()
A.R Karthick9ccd0d02017-03-16 17:11:08 -0700103 assert_not_equal(len(vsgs), 0)
104 assert_not_equal(len(compute_nodes), 0)
Chetan Gaonker52418832017-01-26 23:03:13 +0000105
A R Karthick63751492017-03-22 09:28:01 -0700106 def test_vsg_for_login(self):
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700107 vsgs = VSGAccess.get_vsgs()
108 vsg_access_status = map(lambda vsg: vsg.check_access(), vsgs)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700109 status = filter(lambda st: st == False, vsg_access_status)
110 assert_equal(len(status), 0)
111
A R Karthick63751492017-03-22 09:28:01 -0700112 def test_vsg_for_default_route_through_testclient(self):
113 ssh_agent = SSHTestAgent(host = self.HEAD_NODE, user = self.USER, password = self.PASS)
114 cmd = "sudo lxc exec testclient -- route | grep default"
115 status, output = ssh_agent.run_cmd(cmd)
116 assert_equal(status, True)
117
118 def test_vsg_for_external_connectivity_through_testclient(self):
119 ssh_agent = SSHTestAgent(host = self.HEAD_NODE, user = self.USER, password = self.PASS)
120 cmd = "lxc exec testclient -- ping -c 3 8.8.8.8"
121 status, output = ssh_agent.run_cmd(cmd)
122 assert_equal( status, True)
123
124 def test_vsg_for_external_connectivity(self):
A R Karthick03f40aa2017-03-20 19:33:55 -0700125 vcpe = self.vcpe_dhcp
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700126 mgmt = 'eth0'
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000127 host = '8.8.8.8'
128 self.success = False
A R Karthick03f40aa2017-03-20 19:33:55 -0700129 assert_not_equal(vcpe, None)
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700130 vcpe_ip = VSGAccess.vcpe_get_dhcp(vcpe, mgmt = mgmt)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700131 assert_not_equal(vcpe_ip, None)
132 log.info('Got DHCP IP %s for %s' %(vcpe_ip, vcpe))
133 log.info('Sending icmp echo requests to external network 8.8.8.8')
134 st, _ = getstatusoutput('ping -c 3 8.8.8.8')
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700135 VSGAccess.restore_interface_config(mgmt, vcpe = vcpe)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700136 assert_equal(st, 0)
Chetan Gaonker52418832017-01-26 23:03:13 +0000137
A R Karthick63751492017-03-22 09:28:01 -0700138 def test_vsg_for_external_connectivity_to_google(self):
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000139 host = 'www.google.com'
A R Karthick03f40aa2017-03-20 19:33:55 -0700140 vcpe = self.vcpe_dhcp
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700141 mgmt = 'eth0'
A R Karthick03f40aa2017-03-20 19:33:55 -0700142 assert_not_equal(vcpe, None)
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700143 vcpe_ip = VSGAccess.vcpe_get_dhcp(vcpe, mgmt = mgmt)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700144 assert_not_equal(vcpe_ip, None)
145 log.info('Got DHCP IP %s for %s' %(vcpe_ip, vcpe))
146 log.info('Sending icmp ping requests to %s' %host)
147 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700148 VSGAccess.restore_interface_config(mgmt, vcpe = vcpe)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700149 assert_equal(st, 0)
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000150
A R Karthick63751492017-03-22 09:28:01 -0700151 def test_vsg_for_external_connectivity_to_invalid_host(self):
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000152 host = 'www.goglee.com'
A R Karthick03f40aa2017-03-20 19:33:55 -0700153 vcpe = self.vcpe_dhcp
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700154 mgmt = 'eth0'
A R Karthick03f40aa2017-03-20 19:33:55 -0700155 assert_not_equal(vcpe, None)
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700156 vcpe_ip = VSGAccess.vcpe_get_dhcp(vcpe, mgmt = mgmt)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700157 assert_not_equal(vcpe_ip, None)
158 log.info('Got DHCP IP %s for %s' %(vcpe_ip, vcpe))
159 log.info('Sending icmp ping requests to non existent host %s' %host)
160 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700161 VSGAccess.restore_interface_config(mgmt, vcpe = vcpe)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700162 assert_not_equal(st, 0)
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000163
A R Karthick63751492017-03-22 09:28:01 -0700164 def test_vsg_for_external_connectivity_with_ttl_1(self):
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000165 host = '8.8.8.8'
A R Karthick03f40aa2017-03-20 19:33:55 -0700166 vcpe = self.vcpe_dhcp
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700167 mgmt = 'eth0'
A R Karthick03f40aa2017-03-20 19:33:55 -0700168 assert_not_equal(vcpe, None)
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700169 vcpe_ip = VSGAccess.vcpe_get_dhcp(vcpe, mgmt = mgmt)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700170 assert_not_equal(vcpe_ip, None)
171 log.info('Got DHCP IP %s for %s' %(vcpe_ip, vcpe))
172 log.info('Sending icmp ping requests to host %s with ttl 1' %host)
173 st, _ = getstatusoutput('ping -c 1 -t 1 {}'.format(host))
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700174 VSGAccess.restore_interface_config(mgmt, vcpe = vcpe)
A.R Karthick33cfdbe2017-03-17 18:03:48 -0700175 assert_not_equal(st, 0)
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000176
A R Karthick63751492017-03-22 09:28:01 -0700177 def test_vsg_for_external_connectivity_with_wan_interface_toggle_in_vcpe(self):
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000178 host = '8.8.8.8'
A R Karthick03f40aa2017-03-20 19:33:55 -0700179 mgmt = 'eth0'
180 vcpe = self.vcpe_container
181 assert_not_equal(vcpe, None)
182 assert_not_equal(self.vcpe_dhcp, None)
183 #first get dhcp on the vcpe interface
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700184 vcpe_ip = VSGAccess.vcpe_get_dhcp(self.vcpe_dhcp, mgmt = mgmt)
A R Karthick03f40aa2017-03-20 19:33:55 -0700185 assert_not_equal(vcpe_ip, None)
186 log.info('Got DHCP IP %s for %s' %(vcpe_ip, self.vcpe_dhcp))
187 log.info('Sending ICMP pings to host %s' %(host))
188 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
189 if st != 0:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700190 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700191 assert_equal(st, 0)
192 #bring down the wan interface and check again
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700193 st = VSGAccess.vcpe_wan_down(vcpe)
A R Karthick03f40aa2017-03-20 19:33:55 -0700194 if st is False:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700195 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700196 assert_equal(st, True)
197 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
198 if st == 0:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700199 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700200 assert_not_equal(st, 0)
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700201 st = VSGAccess.vcpe_wan_up(vcpe)
A R Karthick03f40aa2017-03-20 19:33:55 -0700202 if st is False:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700203 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700204 assert_equal(st, True)
205 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700206 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700207 assert_equal(st, 0)
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000208
A R Karthick63751492017-03-22 09:28:01 -0700209 def test_vsg_for_external_connectivity_with_lan_interface_toggle_in_vcpe(self):
Anil Kumar Sanka87115b02017-03-14 17:46:47 +0000210 host = '8.8.8.8'
A R Karthick03f40aa2017-03-20 19:33:55 -0700211 mgmt = 'eth0'
212 vcpe = self.vcpe_container
213 assert_not_equal(vcpe, None)
214 assert_not_equal(self.vcpe_dhcp, None)
215 #first get dhcp on the vcpe interface
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700216 vcpe_ip = VSGAccess.vcpe_get_dhcp(self.vcpe_dhcp, mgmt = mgmt)
A R Karthick03f40aa2017-03-20 19:33:55 -0700217 assert_not_equal(vcpe_ip, None)
218 log.info('Got DHCP IP %s for %s' %(vcpe_ip, self.vcpe_dhcp))
219 log.info('Sending ICMP pings to host %s' %(host))
220 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
221 if st != 0:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700222 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700223 assert_equal(st, 0)
224 #bring down the lan interface and check again
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700225 st = VSGAccess.vcpe_lan_down(vcpe)
A R Karthick03f40aa2017-03-20 19:33:55 -0700226 if st is False:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700227 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700228 assert_equal(st, True)
229 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
230 if st == 0:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700231 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700232 assert_not_equal(st, 0)
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700233 st = VSGAccess.vcpe_lan_up(vcpe)
A R Karthick03f40aa2017-03-20 19:33:55 -0700234 if st is False:
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700235 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700236 assert_equal(st, True)
237 st, _ = getstatusoutput('ping -c 1 {}'.format(host))
A R Karthickd0fdf3b2017-03-21 16:54:22 -0700238 VSGAccess.restore_interface_config(mgmt, vcpe = self.vcpe_dhcp)
A R Karthick03f40aa2017-03-20 19:33:55 -0700239 assert_equal(st, 0)
Chetan Gaonker52418832017-01-26 23:03:13 +0000240
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000241 def test_vsg_for_ping_from_vsg_to_external_network(self):
242 """
243 Algo:
244 1.Create a vSG VM in compute node
245 2.Ensure VM created properly
246 3.Verify login to VM success
247 4.Do ping to external network from vSG VM
248 5.Verify that ping gets success
249 6.Verify ping success flows added in OvS
250 """
A R Karthick63751492017-03-22 09:28:01 -0700251
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000252 def test_vsg_for_ping_from_vcpe_to_external_network(self):
253 """
254 Algo:
255 1.Create a vSG VM in compute node
256 2.Create a vCPE container inside VM
257 3.Verify both VM and Container created properly
258 4.Verify login to vCPE container success
259 5.Do ping to external network from vCPE container
260 6.Verify that ping gets success
261 7.Verify ping success flows added in OvS
262 """
263
Chetan Gaonker52418832017-01-26 23:03:13 +0000264 def test_vsg_for_dns_service(self):
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000265 """
266 Algo:
267 1. Create a test client in Prod VM
268 2. Create a vCPE container in vSG VM inside compute Node
269 3. Ensure vSG VM and vCPE container created properly
270 4. Enable dns service in vCPE ( if not by default )
271 5. Send ping request from test client to valid domain address say, 'www.google'com
272 6. Verify that dns should resolve ping should success
273 7. Now send ping request to invalid domain address say 'www.invalidaddress'.com'
274 8. Verify that dns resolve should fail and hence ping
275 """
A R Karthick63751492017-03-22 09:28:01 -0700276
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000277 def test_vsg_for_10_subscribers_for_same_service(self):
278 """
279 Algo:
280 1.Create a vSG VM in compute node
281 2.Create 10 vCPE containers for 10 subscribers, in vSG VM
282 3.Ensure vSG VM and vCPE container created properly
283 4.From each of the subscriber, with same s-tag and different c-tag, send a ping to valid external public IP
284 5.Verify that ping success for all 10 subscribers
285 """
A R Karthick63751492017-03-22 09:28:01 -0700286
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000287 def test_vsg_for_10_subscribers_for_same_service_ping_invalid_ip(self):
288 """
289 Algo:
290 1.Create a vSG VM in compute Node
291 2.Create 10 vCPE containers for 10 subscribers, in vSG VM
292 3.Ensure vSG VM and vCPE container created properly
293 4.From each of the subscriber, with same s-tag and different c-tag, send a ping to invalid IP
294 5.Verify that ping fails for all 10 subscribers
295 """
A R Karthick63751492017-03-22 09:28:01 -0700296
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000297 def test_vsg_for_10_subscribers_for_same_service_ping_valid_and_invalid_ip(self):
298 """
299 Algo:
300 1.Create a vSG VM in VM
301 2.Create 10 vCPE containers for 10 subscribers, in vSG VM
302 3.Ensure vSG VM and vCPE container created properly
303 4.From first 5 subscribers, with same s-tag and different c-tag, send a ping to valid IP
304 5.Verify that ping success for all 5 subscribers
305 6.From next 5 subscribers, with same s-tag and different c-tag, send a ping to invalid IP
306 7.Verify that ping fails for all 5 subscribers
307 """
A R Karthick63751492017-03-22 09:28:01 -0700308
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000309 def test_vsg_for_100_subscribers_for_same_service(self):
310 """
311 Algo:
312 1.Create a vSG VM in compute node
313 2.Create 100 vCPE containers for 100 subscribers, in vSG VM
314 3.Ensure vSG VM and vCPE container created properly
315 4.From each of the subscriber, with same s-tag and different c-tag, send a ping to valid external public IP
316 5.Verify that ping success for all 100 subscribers
317 """
A R Karthick63751492017-03-22 09:28:01 -0700318
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000319 def test_vsg_for_100_subscribers_for_same_service_ping_invalid_ip(self):
320 """
321 Algo:
322 1.Create a vSG VM in compute Node
323 2.Create 10 vCPE containers for 100 subscribers, in vSG VM
324 3.Ensure vSG VM and vCPE container created properly
325 4.From each of the subscriber, with same s-tag and different c-tag, send a ping to invalid IP
326 5.Verify that ping fails for all 100 subscribers
327 """
A R Karthick63751492017-03-22 09:28:01 -0700328
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000329 def test_vsg_for_100_subscribers_for_same_service_ping_valid_and_invalid_ip(self):
330 """
331 Algo:
332 1.Create a vSG VM in VM
333 2.Create 10 vCPE containers for 100 subscribers, in vSG VM
334 3.Ensure vSG VM and vCPE container created properly
335 4.From first 5 subscribers, with same s-tag and different c-tag, send a ping to valid IP
336 5.Verify that ping success for all 5 subscribers
337 6.From next 5 subscribers, with same s-tag and different c-tag, send a ping to invalid IP
338 7.Verify that ping fails for all 5 subscribers
339 """
A R Karthick63751492017-03-22 09:28:01 -0700340
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000341 def test_vsg_for_packet_received_with_invalid_ip_fields(self):
342 """
343 Algo:
344 1.Create a vSG VM in compute node
345 2.Create a vCPE container in vSG VM
346 3.Ensure vSG VM and vCPE container created properly
347 4.From subscriber, send a ping packet with invalid ip fields
348 5.Verify that vSG drops the packet
349 6.Verify ping fails
350 """
A R Karthick63751492017-03-22 09:28:01 -0700351
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000352 def test_vsg_for_packet_received_with_invalid_mac_fields(self):
353 """
354 Algo:
355 1.Create a vSG VM in compute node
356 2.Create a vCPE container in vSG VM
357 3.Ensure vSG VM and vCPE container created properly
358 4.From subscriber, send a ping packet with invalid mac fields
359 5.Verify that vSG drops the packet
360 6.Verify ping fails
361 """
A R Karthick63751492017-03-22 09:28:01 -0700362
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000363 def test_vsg_for_vlan_id_mismatch_in_stag(self):
364 """
365 Algo:
366 1.Create a vSG VM in compute Node
367 2.Create a vCPE container in vSG VM
368 3.Ensure vSG VM and vCPE container created properly
369 4.Send a ping request to external valid IP from subscriber, with incorrect vlan id in s-tag and valid c-tag
370 5.Verify that ping fails as the packet drops at VM entry
371 6.Repeat step 4 with correct s-tag
372 7.Verify that ping success
373 """
A R Karthick63751492017-03-22 09:28:01 -0700374
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000375 def test_vsg_for_vlan_id_mismatch_in_ctag(self):
376 """
377 Algo:
378 1.Create a vSG VM in compute node
379 2.Create a vCPE container in vSG VM
380 3.Ensure vSG VM and vCPE container created properly
381 4.Send a ping request to external valid IP from subscriber, with valid s-tag and incorrect vlan id in c-tag
382 5.Verify that ping fails as the packet drops at vCPE container entry
383 6.Repeat step 4 with valid s-tag and c-tag
384 7.Verify that ping success
385 """
A R Karthick63751492017-03-22 09:28:01 -0700386
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000387 def test_vsg_for_matching_and_mismatching_vlan_id_in_stag(self):
388 """
389 Algo:
390 1.Create two vSG VMs in compute node
391 2.Create a vCPE container in each vSG VM
392 3.Ensure vSG VM and vCPE container created properly
393 4.From subscriber one, send ping request with valid s and c tags
394 5.From subscriber two, send ping request with vlan id mismatch in s-tag and valid c tags
395 6.Verify that ping success for only subscriber one and fails for two.
396 """
A R Karthick63751492017-03-22 09:28:01 -0700397
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000398 def test_vsg_for_matching_and_mismatching_vlan_id_in_ctag(self):
399 """
400 Algo:
401 1.Create a vSG VM in compute node
402 2.Create two vCPE containers in vSG VM
403 3.Ensure vSG VM and vCPE container created properly
404 4.From subscriber one, send ping request with valid s and c tags
405 5.From subscriber two, send ping request with valid s-tag and vlan id mismatch in c-tag
406 6.Verify that ping success for only subscriber one and fails for two
407 """
A R Karthick63751492017-03-22 09:28:01 -0700408
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000409 def test_vsg_for_out_of_range_vlanid_in_ctag(self):
410 """
411 Algo:
412 1.Create a vSG VM in compute node
413 2.Create a vCPE container in vSG VM
414 3.Ensure vSG VM and vCPE container created properly
415 4.From subscriber, send ping request with valid stag and vlan id in c-tag is an out of range value ( like 0,4097 )
416 4.Verify that ping fails as the ping packets drops at vCPE container entry
417 """
A R Karthick63751492017-03-22 09:28:01 -0700418
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000419 def test_vsg_for_out_of_range_vlanid_in_stag(self):
420 """
421 Algo:
422 1.Create a vSG VM in compute node
423 2.Create a vCPE container in vSG VM
424 3.Ensure vSG VM and vCPE container created properly
425 2.From subscriber, send ping request with vlan id in s-tag is an out of range value ( like 0,4097 ), with valid c-tag
426 4.Verify that ping fails as the ping packets drops at vSG VM entry
427 """
A R Karthick63751492017-03-22 09:28:01 -0700428
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000429 def test_vsg_without_creating_vcpe_instance(self):
430 """
431 Algo:
432 1.Create a vSG VM in compute Node
433 2.Ensure vSG VM created properly
434 3.Do not create vCPE container inside vSG VM
435 4.From a subscriber, send ping to external valid IP
436 5.Verify that ping fails as the ping packet drops at vSG VM entry itself.
437 """
A R Karthick63751492017-03-22 09:28:01 -0700438
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000439 def test_vsg_for_remove_vcpe_instance(self):
440 """
441 Algo:
442 1.Create a vSG VM in compute node
443 2.Create a vCPE container in vSG VM
444 3.Ensure vSG VM and vCPE container created properly
445 4.From subscriber, send ping request with valid s-tag and c-tag
446 5.Verify that ping success
447 6.Verify ping success flows in OvS switch in compute node
448 7.Now remove the vCPE container in vSG VM
449 8.Ensure that the container removed properly
450 9.Repeat step 4
451 10.Verify that now, ping fails
452 """
A R Karthick63751492017-03-22 09:28:01 -0700453
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000454 def test_vsg_for_restart_vcpe_instance(self):
455 """
456 Algo:
457 1.Create a vSG VM in compute node
458 2.Create a vCPE container in vSG VM
459 3.Ensure vSG VM and vCPE container created properly
460 4.From subscriber, send ping request with valid s-tag and c-tag
461 5.Verify that ping success
462 6.Verify ping success flows in OvS switch in compute node
463 7.Now restart the vCPE container in vSG VM
464 8.Ensure that the container came up after restart
465 9.Repeat step 4
466 10.Verify that now,ping gets success and flows added in OvS
467 """
A R Karthick63751492017-03-22 09:28:01 -0700468
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000469 def test_vsg_for_restart_vsg_vm(self):
470 """
471 Algo:
472 1.Create a vSG VM in compute node
473 2.Create a vCPE container in vSG VM
474 3.Ensure vSG VM and vCPE container created properly
475 4.From subscriber, send ping request with valid s-tag and c-tag
476 5.Verify that ping success
477 6.Verify ping success flows in OvS switch in compute node
478 7.Now restart the vSG VM
479 8.Ensure that the vSG comes up properly after restart
480 9.Verify that vCPE container comes up after vSG restart
481 10.Repeat step 4
482 11.Verify that now,ping gets success and flows added in OvS
483 """
A R Karthick63751492017-03-22 09:28:01 -0700484
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000485 def test_vsg_for_pause_vcpe_instance(self):
486 """
487 Algo:
488 1.Create a vSG VM in compute node
489 2.Create a vCPE container in vSG VM
490 3.Ensure vSG VM and vCPE container created properly
491 4.From subscriber, send ping request with valid s-tag and c-tag
492 5.Verify that ping success
493 6.Verify ping success flows in OvS switch in compute node
494 7.Now pause vCPE container in vSG VM for a while
495 8.Ensure that the container state is pause
496 9.Repeat step 4
497 10.Verify that now,ping fails now and verify flows in OvS
498 11.Now resume the container
499 12.Now repeat step 4 again
500 13.Verify that now, ping gets success
501 14.Verify ping success flows in OvS
502 """
A R Karthick63751492017-03-22 09:28:01 -0700503
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000504 def test_vsg_for_extract_all_compute_stats_from_all_vcpe_containers(self):
505 """
506 Algo:
507 1.Create a vSG VM in compute node
508 2.Create 10 vCPE containers in VM
509 3.Ensure vSG VM and vCPE containers created properly
510 4.Login to all vCPE containers
511 4.Get all compute stats from all vCPE containers
512 5.Verify the stats # verification method need to add
513 """
A R Karthick63751492017-03-22 09:28:01 -0700514
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000515 def test_vsg_for_extract_dns_stats_from_all_vcpe_containers(self):
516 """
517 Algo:
518 1.Create a vSG VM in compute node
519 2.Create 10 vCPE containers in VM
520 3.Ensure vSG VM and vCPE containers created properly
521 4.From 10 subscribers, send ping to valid and invalid dns hosts
522 5.Verify dns resolves and ping success for valid dns hosts
523 6.Verify ping fails for invalid dns hosts
524 7.Verify dns host name resolve flows in OvS
525 8.Login to all 10 vCPE containers
526 9.Extract all dns stats
527 10.Verify dns stats for queries sent, queries received for dns host resolve success and failed scenarios
528 """
A R Karthick63751492017-03-22 09:28:01 -0700529
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000530 def test_vsg_for_subscriber_access_two_vsg_services(self):
531 """
532 # Intention is to verify if subscriber can reach internet via two vSG VMs
533 Algo:
534 1.Create two vSG VMs for two services in compute node
535 2.Create one vCPE container in each VM for one subscriber
536 3.Ensure VMs and containers created properly
537 4.From subscriber end, send ping to public IP with stag corresponds to vSG-1 VM and ctag
538 5.Verify ping gets success
539 6.Verify ping success flows in OvS
540 7.Now repeat step 4 with stag corresponds to vSG-2 VM
541 8.Verify that ping again success
542 9.Verify ping success flows in OvS
543 """
A R Karthick63751492017-03-22 09:28:01 -0700544
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000545 def test_vsg_for_subscriber_access_service2_if_service1_goes_down(self):
546 """
547 # Intention is to verify if subscriber can reach internet via vSG2 if vSG1 goes down
548 Algo:
549 1.Create two vSG VMs for two services in compute node
550 2.Create one vCPE container in each VM for one subscriber
551 3.Ensure VMs and containers created properly
552 4.From subscriber end, send ping to public IP with stag corresponds to vSG-1 VM and ctag
553 5.Verify ping gets success
554 6.Verify ping success flows in OvS
555 7.Down the vSG-1 VM
556 8.Now repeat step 4
557 9.Verify that ping fails as vSG-1 is down
558 10.Repeat step 4 with stag corresponding to vSG-2
559 9.Verify ping success and flows added in OvS
560 """
A R Karthick63751492017-03-22 09:28:01 -0700561
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000562 def test_vsg_for_subscriber_access_service2_if_service1_goes_restart(self):
563 """
564 # Intention is to verify if subscriber can reach internet via vSG2 if vSG1 restarts
565 Algo:
566 1.Create two vSG VMs for two services in compute node
567 2.Create one vCPE container in each VM for one subscriber
568 3.Ensure VMs and containers created properly
569 4.From subscriber end, send ping to public IP with stag corresponds to vSG-1 VM and ctag
570 5.Verify ping gets success
571 6.Verify ping success flows added in OvS
572 7.Now restart vSG-1 VM
573 8.Now repeat step 4 while vSG-1 VM restarts
574 9.Verify that ping fails as vSG-1 is restarting
575 10.Repeat step 4 with stag corresponding to vSG-2 while vSG-1 VM restarts
576 11.Verify ping success and flows added in OvS
577 """
A R Karthick63751492017-03-22 09:28:01 -0700578
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000579 def test_vsg_for_multiple_vcpes_in_vsg_vm_with_one_vcpe_goes_down(self):
580 """
581 # Intention is to verify if subscriber can reach internet via vSG2 if vSG1 goes down
582 Algo:
583 1.Create a vSG VM in compute node
584 2.Create two vCPE containers corresponds to two subscribers in vSG VM
585 3.Ensure VM and containers created properly
586 4.From subscriber-1 end, send ping to public IP with ctag corresponds to vCPE-1 and stag
587 5.Verify ping gets success
588 6.Verify ping success flows added in OvS
589 7.Now stop vCPE-1 container
590 8.Now repeat step 4
591 9.Verify that ping fails as vCPE-1 container is down
592 10.Repeat step 4 with ctag corresponding to vCPE-2 container
593 11.Verify ping success and flows added in OvS
594 """
A R Karthick63751492017-03-22 09:28:01 -0700595
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000596 def test_vsg_for_multiple_vcpes_in_vsg_vm_with_one_vcpe_restart(self):
597 """
598 # Intention is to verify if subscriber can reach internet via vSG2 if vSG1 restarts
599 Algo:
600 1.Create a vSG VM in compute node
601 2.Create two vCPE containers corresponds to two subscribers in vSG VM
602 3.Ensure VM and containers created properly
603 4.From subscriber-1 end, send ping to public IP with ctag corresponds to vCPE-1 and stag
604 5.Verify ping gets success
605 6.Verify ping success flows added in OvS
606 7.Now restart vCPE-1 container
607 8.Now repeat step 4 while vCPE-1 restarts
608 9.Verify that ping fails as vCPE-1 container is restarts
609 10.Repeat step 4 with ctag corresponding to vCPE-2 container while vCPE-1 restarts
610 11..Verify ping success and flows added in OvS
611 """
A R Karthick63751492017-03-22 09:28:01 -0700612
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000613 def test_vsg_for_multiple_vcpes_in_vsg_vm_with_one_vcpe_pause(self):
614 """
615 # Intention is to verify if subscriber can reach internet via vSG2 if vSG1 paused
616 Algo:
617 1.Create a vSG VM in compute node
618 2.Create two vCPE containers corresponds to two subscribers in vSG VM
619 3.Ensure VM and containers created properly
620 4.From subscriber-1 end, send ping to public IP with ctag corresponds to vCPE-1 and stag
621 5.Verify ping gets success
622 6.Verify ping success flows added in OvS
623 7.Now pause vCPE-1 container
624 8.Now repeat step 4 while vCPE-1 in pause state
625 9.Verify that ping fails as vCPE-1 container in pause state
626 10.Repeat step 4 with ctag corresponding to vCPE-2 container while vCPE-1 in pause state
627 11.Verify ping success and flows added in OvS
628 """
629 def test_vsg_for_multiple_vcpes_in_vsg_vm_with_one_vcpe_removed(self):
630 """
631 # Intention is to verify if subscriber can reach internet via vSG2 if vSG1 removed
632 Algo:
633 1.Create a vSG VM in compute node
634 2.Create two vCPE containers corresponds to two subscribers in vSG VM
635 3.Ensure VM and containers created properly
636 4.From subscriber-1 end, send ping to public IP with ctag corresponds to vCPE-1 and stag
637 5.Verify ping gets success
638 6.Verify ping success flows added in OvS
639 7.Now remove vCPE-1 container
640 8.Now repeat step 4
641 9.Verify that ping fails as vCPE-1 container removed
642 10.Repeat step 4 with ctag corresponding to vCPE-2 container
643 11.Verify ping success and flows added in OvS
644 """
A R Karthick63751492017-03-22 09:28:01 -0700645
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000646 def test_vsg_for_vcpe_instance_removed_and_added_again(self):
647 """
648 Algo:
649 1.Create a vSG VM in compute node
650 2.Create a vCPE container in vSG VM
651 3.Ensure VM and containers created properly
652 4.From subscriber end, send ping to public IP
653 5.Verify ping gets success
654 6.Verify ping success flows added in OvS
655 7.Now remove vCPE container in vSG VM
656 8.Now repeat step 4
657 9.Verify that ping fails as vCPE container removed
658 10.Create the vCPE container again for the same subscriber
659 11.Ensure that vCPE created now
660 12.Now repeat step 4
661 13.Verify ping success and flows added in OvS
662 """
A R Karthick63751492017-03-22 09:28:01 -0700663
Anil Kumar Sanka1213d4c2017-02-23 22:50:48 +0000664 def test_vsg_for_vsg_vm_removed_and_added_again(self):
665 """
666 Algo:
667 1.Create a vSG VM in compute node
668 2.Create a vCPE container in vSG VM
669 3.Ensure VM and containers created properly
670 4.From subscriber end, send ping to public IP
671 5.Verify ping gets success
672 6.Verify ping success flows added in OvS
673 7.Now remove vSG VM
674 8.Now repeat step 4
675 9.Verify that ping fails as vSG VM not exists
676 10.Create the vSG VM and vCPE container in VM again
677 11.Ensure that vSG and vCPE created
678 12.Now repeat step 4
679 13.Verify ping success and flows added in OvS
680 """
681
682 #Test vSG - Subscriber Configuration
683 def test_vsg_for_configuring_new_subscriber_in_vcpe(self):
684 """
685 Algo:
686 1.Create a vSG VM in compute node
687 2.Create a vCPE container in vSG VM
688 3.Ensure VM and containers created properly
689 4.Configure a subscriber in XOS and assign a service id
690 5.Set the admin privileges to the subscriber
691 6.Verify subscriber configuration is success
692 """
693 def test_vsg_for_adding_subscriber_devices_in_vcpe(self):
694 """
695 Algo:
696 1.Create a vSG VM in compute node
697 2.Create a vCPE container in vSG VM
698 3.Ensure VM and containers created properly
699 4.Configure a subscriber in XOS and assign a service id
700 5.Verify subscriber successfully configured in vCPE
701 6.Now add devices( Mac addresses ) under the subscriber admin group
702 7.Verify all devices ( Macs ) added successfully
703 """
704 def test_vsg_for_removing_subscriber_devices_in_vcpe(self):
705 """
706 Algo:
707 1.Create a vSG VM in compute node
708 2.Create a vCPE container in vSG VM
709 3.Ensure VM and containers created properly
710 4.Configure a subscriber in XOS and assign a service id
711 5.Verify subscriber successfully configured
712 6.Now add devices( Mac addresses ) under the subscriber admin group
713 7.Verify all devices ( Macs ) added successfully
714 8.Now remove All the added devices in XOS
715 9.Verify all the devices removed
716 """
717 def test_vsg_for_modify_subscriber_devices_in_vcpe(self):
718 """
719 Algo:
720 1.Create a vSG VM in compute node
721 2.Create a vCPE container in vSG VM
722 3.Ensure VM and containers created properly
723 4.Configure a user in XOS and assign a service id
724 5.Verify subscriber successfully configured in vCPE.
725 6.Now add devices( Mac addresses ) under the subscriber admin group
726 7.Verify all devices ( Macs ) added successfully
727 8.Now remove few devices in XOS
728 9.Verify devices removed successfully
729 10.Now add few additional devices in XOS under the same subscriber admin group
730 11.Verify newly added devices successfully added
731 """
732 def test_vsg_for_vcpe_login_fails_with_incorrect_subscriber_credentials(self):
733 """
734 Algo:
735 1.Create a vSG VM in compute node
736 2.Create a vCPE container in vSG VM
737 3.Ensure VM and containers created properly
738 4.Configure a subscriber in XOS and assign a service id
739 5.Verify subscriber successfully configured
740 6.Now add devices( Mac addresses ) under the subscriber admin group
741 7.Verify all devices ( Macs ) added successfully
742 8.Login vCPE with credentials with which subscriber configured
743 9.Verify subscriber successfully logged in
744 10.Logout and login again with incorrect credentials ( either user name or password )
745 11.Verify login attempt to vCPE fails wtih incorrect credentials
746 """
747 def test_vsg_for_subscriber_configuration_in_vcpe_retain_after_vcpe_restart(self):
748 """
749 Algo:
750 1.Create a vSG VM in compute node
751 2.Create a vCPE container in vSG VM
752 3.Ensure VM and containers created properly
753 4.Configure a subscriber in XOS and assign a service id
754 5.Verify subscriber successfully configured
755 6.Now add devices( Mac addresses ) under the subscriber admin group
756 7.Verify all devices ( Macs ) added successfully
757 8.Restart vCPE ( locate backup config path while restart )
758 9.Verify subscriber details in vCPE after restart should be same as before the restart
759 """
760 def test_vsg_for_create_multiple_vcpe_instances_and_configure_subscriber_in_each_instance(self):
761 """
762 Algo:
763 1.Create a vSG VM in compute node
764 2.Create 2 vCPE containers in vSG VM
765 3.Ensure VM and containers created properly
766 4.Configure a subscriber in XOS for each vCPE instance and assign a service id
767 5.Verify subscribers successfully configured
768 6.Now login vCPE-2 with subscriber-1 credentials
769 7.Verify login fails
770 8.Now login vCPE-1 with subscriber-2 credentials
771 9.Verify login fails
772 10.Now login vCPE-1 with subscriber-1 and vCPE-2 with subscriber-2 credentials
773 11.Verify that both the subscribers able to login to their respective vCPE containers
774 """
775 def test_vsg_for_same_subscriber_can_be_configured_for_multiple_services(self):
776 """
777 Algo:
778 1.Create 2 vSG VMs in compute node
779 2.Create a vCPE container in each vSG VM
780 3.Ensure VMs and containers created properly
781 4.Configure same subscriber in XOS for each vCPE instance and assign a service id
782 5.Verify subscriber successfully configured
783 6.Now login vCPE-1 with subscriber credentials
784 7.Verify login success
785 8.Now login vCPE-2 with the same subscriber credentials
786 9.Verify login success
787 """
788
789 #Test Example Service
790 def test_vsg_for_subcriber_avail_example_service_running_in_apache_server(self):
791 """
792 Algo:
793 1.Create a vSG VM in compute node
794 2.Create a vCPE container in each vSG VM
795 3.Ensure VM and container created properly
796 4.Configure a subscriber in XOS for the vCPE instance and assign a service id
797 5.On-board an example service into cord pod
798 6.Create a VM in compute node and run the example service ( Apache server )
799 7.Configure the example service with service specific and subscriber specific messages
800 8.Verify example service on-boarded successfully
801 9.Verify example service running in VM
802 10.Run a curl command from subscriber to reach example service
803 11.Verify subscriber can successfully reach example service via vSG
804 12.Verify that service specific and subscriber specific messages
805 """
806 def test_vsg_for_subcriber_avail_example_service_running_in_apache_server_after_service_restart(self):
807 """
808 Algo:
809 1.Create a vSG VM in compute node
810 2.Create a vCPE container in each vSG VM
811 3.Ensure VM and container created properly
812 4.Configure a subscriber in XOS for the vCPE instance and assign a service id
813 5.On-board an example service into cord pod
814 6.Create a VM in compute node and run the example service ( Apache server )
815 7.Configure the example service with service specific and subscriber specific messages
816 8.Verify example service on-boarded successfully
817 9.Verify example service running in VM
818 10.Run a curl command from subscriber to reach example service
819 11.Verify subscriber can successfully reach example service via vSG
820 12.Verify that service specific and subscriber specific messages
821 13.Restart example service running in VM
822 14.Repeat step 10
823 15.Verify the same results as mentioned in steps 11, 12
824 """
825
826 #vCPE Firewall Functionality
827 def test_vsg_firewall_for_creating_acl_rule_based_on_source_ip(self):
828 """
829 Algo:
830 1.Create a vSG VM in compute node
831 2.Create vCPE container in the VM
832 3.Ensure vSG VM and vCPE container created properly
833 4.Configure ac acl rule in vCPE to deny IP traffic from a source IP
834 5.Bound the acl rule to WAN interface of vCPE
835 6.Verify configuration in vCPE is success
836 8.Verify flows added in OvS
837 """
838 def test_vsg_firewall_for_creating_acl_rule_based_on_destination_ip(self):
839 """
840 Algo:
841 1.Create a vSG VM in compute node
842 2.Create vCPE container in the VM
843 3.Ensure vSG VM and vCPE container created properly
844 4.Configure ac acl rule in vCPE to deny IP traffic to a destination ip
845 5.Bound the acl rule to WAN interface of vCPE
846 6.Verify configuration in vCPE is success
847 8.Verify flows added in OvS
848 """
849 def test_vsg_firewall_for_acl_deny_rule_based_on_source_ip_traffic(self):
850 """
851 Algo:
852 1.Create a vSG VM in compute node
853 2.Create vCPE container in the VM
854 3.Ensure vSG VM and vCPE container created properly
855 4.Configure ac acl rule in vCPE to deny IP traffic from a source IP
856 5.Bound the acl rule to WAN interface of vCPE
857 6.From subscriber, send ping to the denied IP address
858 7.Verify that ping fails as vCPE denies ping response
859 8.Verify flows added in OvS
860 """
861 def test_vsg_firewall_for_acl_deny_rule_based_on_destination_ip_traffic(self):
862 """
863 Algo:
864 1.Create a vSG VM in compute node
865 2.Create vCPE container in the VM
866 3.Ensure vSG VM and vCPE container created properly
867 4.Configure ac acl rule in vCPE to deny IP traffic to a destination IP
868 5.Bound the acl rule to WAN interface of vCPE
869 6.From subscriber, send ping to the denied IP address
870 7.Verify that ping fails as vCPE drops the ping request at WAN interface
871 8.Verify flows added in OvS
872 """
Chetan Gaonker52418832017-01-26 23:03:13 +0000873
874 def test_vsg_dnsmasq(self):
875 pass
876
877 def test_vsg_with_external_parental_control_family_shield_for_filter(self):
878 pass
879
880 def test_vsg_with_external_parental_control_with_answerx(self):
881 pass
882
883 def test_vsg_for_subscriber_upstream_bandwidth(self):
884 pass
885
886 def test_vsg_for_subscriber_downstream_bandwidth(self):
887 pass
888
889 def test_vsg_for_diagnostic_run_of_traceroute(self):
890 pass
891
892 def test_vsg_for_diagnostic_run_of_tcpdump(self):
893 pass
894
895 def test_vsg_for_iptable_rules(self):
896 pass
897
898 def test_vsg_for_iptables_with_neutron(self):
899 pass