blob: 22e93c6bbac56127244af60d42bc00b1278492b4 [file] [log] [blame]
ChetanGaonker901727c2016-11-29 14:05:03 -08001#
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#
16import unittest
17import os,sys
ChetanGaonker901727c2016-11-29 14:05:03 -080018import keystoneclient.v2_0.client as ksclient
19import keystoneclient.apiclient.exceptions
20import neutronclient.v2_0.client as nclient
21import neutronclient.common.exceptions
Chetan Gaonker80e06152017-03-07 01:07:19 +000022#import novaclient.v1_1.client as novaclient
ChetanGaonker901727c2016-11-29 14:05:03 -080023from multiprocessing import Pool
ChetanGaonkeraaea6b62016-12-16 17:06:39 -080024from neutronclient.v2_0 import client as neutron_client
ChetanGaonker901727c2016-11-29 14:05:03 -080025from nose.tools import assert_equal
ChetanGaonkeraaea6b62016-12-16 17:06:39 -080026from OnosCtrl import OnosCtrl, get_mac
ChetanGaonker901727c2016-11-29 14:05:03 -080027from CordLogger import CordLogger
Chetan Gaonker80e06152017-03-07 01:07:19 +000028from vtn-model import vtnconfig
ChetanGaonkeraaea6b62016-12-16 17:06:39 -080029import time
Chetan Gaonker3c8ae682017-02-18 00:50:45 +000030import py_compile
ChetanGaonker901727c2016-11-29 14:05:03 -080031
ChetanGaonker71fe0302016-12-19 17:45:44 -080032PROTO_NAME_TCP = 'tcp'
33PROTO_NAME_ICMP = 'icmp'
34IPv4 = 'IPv4'
35
36OS_USERNAME = 'admin'
Chetan Gaonker0fb91c92017-02-07 01:52:18 +000037OS_PASSWORD = 'VeryLongKeystoneAdminPassword'
ChetanGaonker71fe0302016-12-19 17:45:44 -080038OS_TENANT = 'admin'
Chetan Gaonker0fb91c92017-02-07 01:52:18 +000039OS_AUTH_URL = 'https://keystone.cord.lab:5000/v2.0'
40OS_SERVICE_ENDPOINT = 'https://keystone.cord.lab:5000/v2.0/'
Chetan Gaonker1f422af2017-01-13 21:59:16 +000041VM_BOOT_TIMEOUT = 100
42VM_DELETE_TIMEOUT = 100
43
ChetanGaonker71fe0302016-12-19 17:45:44 -080044
45#VM SSH CREDENTIALS
46VM_USERNAME = 'ubuntu'
47VM_PASSWORD = 'ubuntu'
48
49TENANT_PREFIX = 'test-'
50VM_PREFIX = 'test-'
51NETWORK_PREFIX = 'test-'
52CIDR_PREFIX = '192.168'
53
Chetan Gaonker1c387cf2017-02-22 02:21:43 +000054class vtn_validation_utils:
55
56 endpoint = "http://172.17.0.2:8101"
57 version=""
58 def __init__(self, version):
59 self.version = version
60 self.devices = '/onos/v1/devices'
61 self.links = '/onos/v1/links'
62 self.flows = '/onos/v1/flows'
63 self.apps = '/onos/v1/applications'
64
65 def getDevices(self, endpoint, user, passwd):
66 headers = {'Accept': 'application/json'}
67 url = endpoint+self.devices
68 response = requests.get(url, headers=headers, auth=(user, passwd))
69 response.raise_for_status()
70 return response.json()
71
72 def getLinks(self, endpoint, user, passwd):
73 headers = {'Accept': 'application/json'}
74 url = endpoint+self.links
75 response = requests.get(url, headers=headers, auth=(user, passwd))
76 response.raise_for_status()
77 return response.json()
78
79 def getDevicePorts(self, endpoint, user, passwd, switch_id):
80 headers = {'Accept': 'application/json'}
81 url = endpoint+self.devices+"/"+str(switch_id)+"/ports"
82 response = requests.get(url, headers=headers, auth=(user, passwd))
83 response.raise_for_status()
84 return response.json()
85
86 def activateVTNApp(self, endpoint, user, passwd, app_name):
87 headers = {'Accept': 'application/json'}
88 url = endpoint+self.apps+"/"+str(app_name)+"/active"
89 response = requests.post(url, headers=headers, auth=(user, passwd))
90 response.raise_for_status()
91 return response.json()
92
93 def deactivateVTNApp(self, endpoint, user, passwd, app_name):
94 headers = {'Accept': 'application/json'}
95 url = endpoint+self.apps+"/"+str(app_name)+"/active"
96 response = requests.delete(url, headers=headers, auth=(user, passwd))
97 response.raise_for_status()
98 return response.json()
99
ChetanGaonker901727c2016-11-29 14:05:03 -0800100class cordvtn_exchange(CordLogger):
101
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800102 app_cordvtn = 'org.opencord.vtn'
103 test_path = os.path.dirname(os.path.realpath(__file__))
104 cordvtn_dir = os.path.join(test_path, '..', 'setup')
105 cordvtn_conf_file = os.path.join(test_path, '..', '../cordvtn/network_cfg.json')
ChetanGaonker901727c2016-11-29 14:05:03 -0800106
107 @classmethod
108 def setUpClass(cls):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800109 ''' Activate the cordvtn app'''
ChetanGaonker901727c2016-11-29 14:05:03 -0800110 time.sleep(3)
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800111 cls.onos_ctrl = OnosCtrl(cls.app_cordvtn)
112 status, _ = cls.onos_ctrl.activate()
113 assert_equal(status, False)
114 time.sleep(3)
115 cls.cordvtn_setup()
ChetanGaonker901727c2016-11-29 14:05:03 -0800116
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800117 @classmethod
118 def tearDownClass(cls):
ChetanGaonker901727c2016-11-29 14:05:03 -0800119 '''Deactivate the cord vtn app'''
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800120 cls.onos_ctrl.deactivate()
121 cls.cord_vtn_cleanup()
ChetanGaonker901727c2016-11-29 14:05:03 -0800122
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800123 @classmethod
124 def cordvtn_setup(cls):
125 pass
126
127 @classmethod
128 def cord_vtn_cleanup(cls):
129 ##reset the ONOS port configuration back to default
130 for config in cls.configs.items():
131 OnosCtrl.delete(config)
132
133 @classmethod
134 def onos_load_config(cls, cordvtn_conf_file):
135 status, code = OnosCtrl.config(cordvtn_conf_file)
ChetanGaonker901727c2016-11-29 14:05:03 -0800136 if status is False:
137 log.info('JSON request returned status %d' %code)
138 assert_equal(status, True)
139 time.sleep(3)
140
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800141 def get_neutron_credentials():
142 n = {}
143 n['username'] = os.environ['OS_USERNAME']
144 n['password'] = os.environ['OS_PASSWORD']
145 n['auth_url'] = os.environ['OS_AUTH_URL']
146 n['tenant_name'] = os.environ['OS_TENANT_NAME']
Chetan Gaonker80e06152017-03-07 01:07:19 +0000147 n['ca_cert'] = os.environ['REQUESTS_CA_BUNDLE']
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800148 return n
149
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800150 def create_network(i):
151 neutron_credentials = get_neutron_credentials()
152 neutron = neutron_client.Client(**neutron_credentials)
153 json = {'network': {'name': 'network-' + str(i),
154 'admin_state_up': True}}
155 while True:
156 try:
Chetan Gaonker3c8ae682017-02-18 00:50:45 +0000157 net = neutron.create_network(body=json)
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800158 print '\nnetwork-' + str(i) + ' created'
Chetan Gaonker3c8ae682017-02-18 00:50:45 +0000159 return net
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800160 except Exception as e:
161 print e
162 continue
163
ChetanGaonker901727c2016-11-29 14:05:03 -0800164 def create_tenant(tenant_name):
165 new_tenant = keystone.tenants.create(tenant_name=tenant_name,
166 description="CORD Tenant \
167 created",
168 enabled=True)
169 tenant_id = new_tenant.id
170 tenant_status = True
171 user_data = []
172 for j in range(2):
173 j += 1
174 user_name = tenant_name + '-user-' + str(j)
175 user_data.append(create_user(user_name, tenant_id))
176
177 print " Tenant and User Created"
178
179 tenant_data = {'tenant_name': tenant_name,
180 'tenant_id': tenant_id,
181 'status': tenant_status}
182 return tenant_data
183
184 def create_user(user_name, tenant_id):
185 new_user = keystone.users.create(name=user_name,
186 password="ubuntu",
187 tenant_id=tenant_id)
188 print(' - Created User %s' % user_name)
189 keystone.roles.add_user_role(new_user, member_role, tenant_id)
190 if assign_admin:
191 admin_user = keystone.users.find(name='admin')
192 admin_role = keystone.roles.find(name='admin')
193 keystone.roles.add_user_role(admin_user, admin_role, tenant_id)
194 user_data = {'name': new_user.name,
195 'id': new_user.id}
196 return user_data
197
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800198 def create_port( router_id, network_id):
199 credentials = get_credentials()
200 neutron = client.Client(**credentials)
201 router = neutron.show_router(router_id)
202
203 value = {'port':{
204 'admin_state_up':True,
205 'device_id': router_id,
206 'name': 'port1',
207 'network_id':network_id,
208 }}
209 response = neutron.create_port(body=value)
210
ChetanGaonker71fe0302016-12-19 17:45:44 -0800211 def router_create(self, name):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800212 external_network = None
213 for network in self.neutron.list_networks()["networks"]:
214 if network.get("router:external"):
215 external_network = network
216 break
217
218 if not external_network:
219 raise Exception("Alarm! Can not to find external network")
220
221 gw_info = {
222 "network_id": external_network["id"],
223 "enable_snat": True
224 }
225 router_info = {
226 "router": {
227 "name": name,
228 "external_gateway_info": gw_info,
229 "tenant_id": self.tenant_id
230 }
231 }
ChetanGaonker71fe0302016-12-19 17:45:44 -0800232 router = self.neutron.router_create(router_info)['router']
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800233 return router
234
ChetanGaonker901727c2016-11-29 14:05:03 -0800235 def delete_tenant(tenant_name):
236 tenant = keystone.tenants.find(name=tenant_name)
237 for j in range(2):
238 j += 1
239 user_name = tenant_name + '-user-' + str(j)
240 delete_user(user_name, tenant.id)
241 tenant.delete()
242 print(' - Deleted Tenant %s ' % tenant_name)
243 return True
244
245 def delete_user(user_name, tenant_id):
246 user = keystone.users.find(name=user_name)
247 user.delete()
248
249 print(' - Deleted User %s' % user_name)
250 return True
251
ChetanGaonker71fe0302016-12-19 17:45:44 -0800252 def set_environment(tenants_num=0, networks_per_tenant=1, vms_per_network=2):
253 octet = 115
254 vm_inc = 11
255 image = nova_connection.images.get(IMAGE_ID)
256 flavor = nova_connection.flavors.get(FLAVOR_ID)
257
258 admin_user_id = keystone_connection.users.find(name=OS_USERNAME).id
259 member_role_id = keystone_connection.roles.find(name='Member').id
260 for num_tenant in range(1, tenants_num+1):
261 tenant = keystone_connection.tenants.create('%stenant%s' % (TENANT_PREFIX, num_tenant))
262 keystone_connection.roles.add_user_role(admin_user_id, member_role_id, tenant=tenant.id)
263 for num_network in range(networks_per_tenant):
264 network_json = {'name': '%snet%s' % (NETWORK_PREFIX, num_tenant*10+num_network),
265 'admin_state_up': True,
266 'tenant_id': tenant.id}
267 network = neutron_connection.create_network({'network': network_json})
268 subnet_json = {'name': '%ssubnet%s' % (NETWORK_PREFIX, num_tenant*10+num_network),
269 'network_id': network['network']['id'],
270 'tenant_id': tenant.id,
271 'enable_dhcp': True,
272 'cidr': '%s.%s.0/24' % (CIDR_PREFIX, octet), 'ip_version': 4}
273 octet += 1
274 subnet = neutron_connection.create_subnet({'subnet': subnet_json})
275 router_json = {'name': '%srouter%s' % (NETWORK_PREFIX, num_tenant*10+num_network),
276 'tenant_id': tenant.id}
277 router = neutron_connection.router_create({'router': router_json})
278 port = neutron_connection.add_interface_router(router['router']['id'], {'subnet_id': subnet['subnet']['id']})
279 for num_vm in range(vms_per_network):
280 tenant_nova_connection = novacli.Client(OS_USERNAME, OS_PASSWORD, tenant.name, OS_AUTH_URL)
281 m = tenant_nova_connection.servers.create('%svm%s' % (VM_PREFIX, vm_inc), image, flavor, nics=[{'net-id': network['network']['id']}, {'net-id': MGMT_NET}])
282 vm_inc += 1
283
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800284 def verify_neutron_crud():
285 x = os.system("neutron_test.sh")
286 return x
ChetanGaonker901727c2016-11-29 14:05:03 -0800287
Author Name91eaeba2017-01-05 13:41:45 -0800288 def list_floatingips( **kwargs):
289 creds = get_neutron_credentials()
290 neutron = client.Client(**creds)
291 return neutron.list_floatingips(**kwargs)['floatingips']
292
293 def list_security_groups( **kwargs):
294 creds = get_neutron_credentials()
295 neutron = client.Client(**creds)
296 return neutron.list_security_groups(**kwargs)['security_groups']
297
298 def list_subnets( **kwargs):
299 creds = get_neutron_credentials()
300 neutron = client.Client(**creds)
301 return neutron.list_subnets(**kwargs)['subnets']
302
303 def list_networks( **kwargs):
304 creds = get_neutron_credentials()
305 neutron = client.Client(**creds)
306 return neutron.list_networks(**kwargs)['networks']
307
308 def list_ports( **kwargs):
309 creds = get_neutron_credentials()
310 neutron = client.Client(**creds)
311 return neutron.list_ports(**kwargs)['ports']
312
313 def list_routers( **kwargs):
314 creds = get_neutron_credentials()
315 neutron = client.Client(**creds)
316 return neutron.list_routers(**kwargs)['routers']
317
318 def update_floatingip( fip, port_id=None):
319 creds = get_neutron_credentials()
320 neutron = client.Client(**creds)
321 neutron.update_floatingip(fip, {"floatingip":
322 {"port_id": port_id}})
323
324 def update_subnet( subnet_id, **subnet_params):
325 creds = get_neutron_credentials()
326 neutron = client.Client(**creds)
327 neutron.update_subnet(subnet_id, {'subnet': subnet_params})
328
329 def update_router( router_id, **router_params):
330 creds = get_neutron_credentials()
331 neutron = client.Client(**creds)
332 neutron.update_router(router_id, {'router': router_params})
333
334 def router_gateway_set( router_id, external_gateway):
335 creds = get_neutron_credentials()
336 neutron = client.Client(**creds)
337 neutron.update_router(
338 router_id, {'router': {'external_gateway_info':
339 {'network_id': external_gateway}}})
340
341 def router_gateway_clear( router_id):
342 creds = get_neutron_credentials()
343 neutron = client.Client(**creds)
344 neutron.update_router(
345 router_id, {'router': {'external_gateway_info': None}})
346
347 def router_add_interface( router_id, subnet_id):
348 creds = get_neutron_credentials()
349 neutron = client.Client(**creds)
350 neutron.add_interface_router(router_id, {'subnet_id': subnet_id})
351
352 def router_rem_interface( router_id, subnet_id):
353 creds = get_neutron_credentials()
354 neutron = client.Client(**creds)
355 neutron.remove_interface_router(
356 router_id, {'subnet_id': subnet_id})
357
358 def create_floatingip( **floatingip_params):
359 creds = get_neutron_credentials()
360 neutron = client.Client(**creds)
361 response = neutron.create_floatingip(
362 {'floatingip': floatingip_params})
363 if 'floatingip' in response and 'id' in response['floatingip']:
364 return response['floatingip']['id']
365
Chetan Gaonker1f422af2017-01-13 21:59:16 +0000366 def make_iperf_pair(server, client, **kwargs):
367 ssh = SSHClient()
368 ssh.set_missing_host_key_policy(MissingHostKeyPolicy())
369
370 ssh.connect(server, username=VM_USERNAME, password=VM_PASSWORD)
371 ssh.exec_command('/usr/local/bin/iperf3 -s -D')
372
373 ssh.connect(client, username=VM_USERNAME, password=VM_PASSWORD)
374 stdin, stdout, stderr = ssh.exec_command('/usr/local/bin/iperf3 -c %s -J' % server)
375
376 rawdata = stdout.read()
377 data = json.loads(rawdata.translate(None,'\t').translate(None,'\n'))
378
379 return data
380
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000381 def connect_ssh(os_ip, private_key_file=None, user='ubuntu'):
382 key = ssh.RSAKey.from_private_key_file(private_key_file)
383 client = ssh.SSHClient()
384 client.set_missing_host_key_policy(ssh.WarningPolicy())
385 client.connect(ip, username=user, pkey=key, timeout=5)
386 return client
Chetan Gaonker1f422af2017-01-13 21:59:16 +0000387
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000388 def validate_vtn_flows(switch):
389 egress = 1
390 ingress = 2
391 egress_map = { 'ether': '00:00:00:00:00:03', 'ip': '192.168.30.1' }
392 ingress_map = { 'ether': '00:00:00:00:00:04', 'ip': '192.168.40.1' }
393 device_id = 'of:{}'.format(get_mac(switch))
394 flow_id = flow.findFlow(device_id, IN_PORT = ('port', ingress),
395 ETH_TYPE = ('ethType','0x800'), IPV4_SRC = ('ip', ingress_map['ip']+'/32'),
396 IPV4_DST = ('ip', egress_map['ip']+'/32'))
397 if flow_id:
398 return True
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800399
Chetan Gaonker3c8ae682017-02-18 00:50:45 +0000400 def cordvtn_config_load(self, config = None):
401 if config:
402 for k in config.keys():
403 if cordvtn_config.has_key(k):
404 cordvtn_config[k] = config[k]
405 self.onos_load_config(self.cordvtn_dict)
406
407 def search_value(d, pat):
408 for k, v in d.items():
409 if isinstance(v, dict):
410 search_value(v, pat)
411 else:
412 if v == pat:
413 print "Network created successfully"
414 return True
415 else:
416 return False
417
418 def test_cordvtn_neutron_network_sync(self):
419 """
420 Algo:
421 0. Create Test-Net,
422 1. Load cordvtn config, vtn-cfg-1.json to cord-onos
423 2. Run sync command for cordvtn
424 3. Do GET Rest API and validate creation of network
425 4. Validate network synch with created network in cord-onos
426 """
427
428 vtnconfig = {
429 "apps" : {
430 "org.opencord.vtn" : {
431 "cordvtn" : {
432 "controllers" : [ "10.1.0.1:6654" ],
433 "localManagementIp" : "172.27.0.1/24",
434 "nodes" : [ {
435 "bridgeId" : "of:0000525400201852",
436 "dataPlaneIntf" : "fabric",
437 "dataPlaneIp" : "10.6.1.2/24",
438 "hostManagementIp" : "10.1.0.14/24",
439 "hostname" : "cold-flag"
440 } ],
441 "openstack" : {
442 "endpoint" : "https://keystone.cord.lab:5000/v2.0",
443 "password" : "VeryLongKeystoneAdminPassword",
444 "tenant" : "admin",
445 "user" : "admin"
446 },
447 "ovsdbPort" : "6641",
448 "privateGatewayMac" : "00:00:00:00:00:01",
449 "publicGateways" : [ {
450 "gatewayIp" : "10.6.1.193",
451 "gatewayMac" : "02:42:0a:06:01:01"
452 }, {
453 "gatewayIp" : "10.6.1.129",
454 "gatewayMac" : "02:42:0a:06:01:01"
455 } ],
456 "ssh" : {
457 "sshKeyFile" : "/root/node_key",
458 "sshPort" : "22",
459 "sshUser" : "root"
460 },
461 "xos" : {
462 "endpoint" : "http://xos:8888/",
463 "password" : "letmein",
464 "user" : "padmin@vicci.org"
465 }
466 }
467 }
468 }
469 }
470
471 self.onos_load_config(vtnconfig)
472 creds = get_neutron_credentials()
473 neutron = neutronclient.Client(**creds)
474 body_example = {"network":{"name": "Test-Net","admin_state_up":True}}
475 net = neutron.create_network(body=body_example)
476
477 url = "http://172.17.0.2/onos/cordvtn/serviceNetworks"
478 auth = ('karaf','karaf')
479
480 resp = requests.get(url=url, auth=auth)
481 data = json.loads(resp.text)
482
483 result = search_response(data, "Test-Net")
484 assert_equal(result, True)
485
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800486 def test_cordvtn_basic_tenant(self):
487 onos_load_config()
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800488
ChetanGaonker71fe0302016-12-19 17:45:44 -0800489 tenant_1= create_tenant("CORD_Subscriber_Test_Tenant_1")
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000490 if tenant1 != 0:
ChetanGaonker71fe0302016-12-19 17:45:44 -0800491 print "Creation of CORD Subscriber Test Tenant 1"
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800492
ChetanGaonker71fe0302016-12-19 17:45:44 -0800493 tenant_2 = create_tenant("CORD_Subscriber_Test_Tenant_2")
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000494 if tenant2 != 0:
ChetanGaonker71fe0302016-12-19 17:45:44 -0800495 print "Creation of CORD Subscriber Test Tenant 2"
496
497 create_net(tenant_1,"a1")
498 create_subnet(tenant_1,"a1","as1","10.0.1.0/24")
499
500 create_net(tenant_2,"a2")
501 create_subnet(tenant_2,"a2","as1","10.0.2.0/24")
502
503 netid_1 = get_id(tenant_1,"net","a1")
504 netid_2 = get_id(tenant_2,"net","a2")
505
506 nova_boot(tenant_1,"vm1",netid=netid)
507 nova_boot(tenant_2,"vm1",netid=netid)
508
509 nova_wait_boot(tenant_1,"vm1", "ACTIVE")
510 nova_wait_boot(tenant_2,"vm1", "ACTIVE")
511
512 router_create(tenant_1,"r1")
513 router_interface_add(tenant_1,"r1","as1")
514 router_create(tenant_2,"r1")
515 router_interface_add(tenant_2,"r1","as1")
516
517 create_net(tenant_1,"x1","","--router:external=True")
518 create_net(tenant_2,"x1","","--router:external=True")
519
520 router_gateway_set(tenant_1,"r1","x1")
521 router_gateway_set(tenant_2,"r1","x1")
522
523 subnetid_1 = get_id(tenant_1,"subnet","as1")
524 subnetid_2 = get_id(tenant_2,"subnet","as1")
525 port_create(tenant_1,"p1","a1","10.0.1.100",subnetid_1)
526 port_create(tenant_2,"p1","a1","10.0.1.100",subnetid_2)
527
528 port_id_1 = get_id(tenant_1,"port","p1")
529 port_id_2 = get_id(tenant_2,"port","p1")
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000530 status = validate_vtn_flows()
531 assert_equal(status, True)
ChetanGaonker71fe0302016-12-19 17:45:44 -0800532
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000533 def test_cordvtn_for_creation_of_network(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800534 onos_load_config()
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800535
536 ret1 = create_tenant(netA)
537 if ret1 != 0:
538 print "Creation of Tenant netA Failed"
539
540 ret2 = create_tenant(netB)
541 if ret2 != 0:
542 print "Creation of Tenant netB Failed"
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800543 network = {'name': self.network_name, 'admin_state_up': True}
544 self.neutron.create_network({'network':network})
545 log.info("Created network:{0}".format(self.network_name))
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000546 status = validate_vtn_flows()
547 assert_equal(status, True)
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800548
549 def test_cordvtn_to_create_net_work_with_subnet(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800550 onos_load_config()
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800551
552 ret1 = create_tenant(netA)
553 if ret1 != 0:
554 print "Creation of Tenant netA Failed"
555
556 ret2 = create_tenant(netB)
557 if ret2 != 0:
558 print "Creation of Tenant netB Failed"
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800559 network_name = self.network_name
560 network = {'name': network_name, 'admin_state_up': True}
561 network_info = self.neutron.create_network({'network':network})
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800562 network_id = network_info['network']['id']
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800563
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800564 log.info("Created network:{0}".format(network_id))
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800565 self.network_ids.append(network_id)
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800566 subnet_count = 1
567 for cidr in self.subnet_cidrs:
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800568 gateway_ip = str(list(cidr)[1])
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800569 subnet = {"network_id": network_id, "ip_version":4,
570 "cidr":str(cidr), "enable_dhcp":True,
571 "host_routes":[{"destination":"0.0.0.0/0", "nexthop":gateway_ip}]
572 }
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800573 subnet = {"name":"subnet-"+str(subnet_count), "network_id": network_id, "ip_version":4, "cidr":str(cidr), "enable_dhcp":True}
574 print subnet
575 self.neutron.create_subnet({'subnet':subnet})
576 log.info("Created subnet:{0}".format(str(cidr)))
577 if not self.number_of_subnet - 1:
578 break
579 self.number_of_subnet -= 1
580 subnet_count += 1
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000581 status = validate_vtn_flows()
582 assert_equal(status, True)
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800583
584 def test_cordvtn_subnet_limit(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800585 onos_load_config()
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800586
587 ret1 = create_tenant(netA)
588 if ret1 != 0:
589 print "Creation of Tenant netA Failed"
590
591 ret2 = create_tenant(netB)
592 if ret2 != 0:
593 print "Creation of Tenant netB Failed"
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800594 network_name = uuid.uuid4().get_hex()
595 network = {'name': network_name, 'admin_state_up': True}
596 network_info = self.neutron.create_network({'network':network})
597 log.info("Created network:{0}".format(network_name))
598 network_id = network_info['network']['id']
599 self.network_ids.append(network_id)
600 subnet_cidrs = ['11.2.2.0/29', '11.2.2.8/29']
601 for cidr in subnet_cidrs:
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800602 subnet = {"network_id": network_id, "ip_version":4, "cidr": cidr}
603 subnet_info = self.neutron.create_subnet({'subnet':subnet})
604 subnet_id = subnet_info['subnet']['id']
605 log.info("Created subnet:{0}".format(cidr))
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800606 while True:
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800607 port = {"network_id": network_id, "admin_state_up": True}
608 port_info = self.neutron.create_port({'port':port})
609 port_id = port_info['port']['id']
610 self.port_ids.append(port_id)
611 log.info("Created Port:{0}".format(port_info['port']['id']))
612 if not self.quota_limit:
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800613 break
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800614 self.quota_limit -= 1
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000615 status = validate_vtn_flows()
616 assert_equal(status, True)
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800617
618 def test_cordvtn_floatingip_limit(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800619 onos_load_config()
ChetanGaonkerd65b7612016-12-07 01:01:20 -0800620
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800621 ret1 = create_tenant(netA)
622 if ret1 != 0:
623 print "Creation of Tenant netA Failed"
624
625 ret2 = create_tenant(netB)
626 if ret2 != 0:
627 print "Creation of Tenant netB Failed"
628 while True:
629 floatingip = {"floating_network_id": self.floating_nw_id}
630 fip_info = self.neutron.create_floatingip({'floatingip':floatingip})
631 fip_id = fip_info['floatingip']['id']
632 log.info("Created Floating IP:{0}".format(fip_id))
633 self.fip_ids.append(fip_id)
634 if not self.quota_limit:
635 break
636 self.quota_limit -= 1
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000637 status = validate_vtn_flows()
638 assert_equal(status, True)
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800639
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000640 def test_cordvtn_for_10_neutron_networks(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800641 onos_load_config()
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800642
643 ret1 = create_tenant(netA)
644 if ret1 != 0:
645 print "Creation of Tenant netA Failed"
646
647 ret2 = create_tenant(netB)
648 if ret2 != 0:
649 print "Creation of Tenant netB Failed"
650 pool = Pool(processes=10)
651 ret = os.system("neutron quote-update --network 15")
652 if ret1 != 0:
653 print "Neutron network install failed"
654 for i in range(1, 11):
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000655 pool.apply_async(create_network, (i, ))
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800656
657 pool.close()
658 pool.join()
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000659 status = validate_vtn_flows()
660 assert_equal(status, True)
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800661
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000662 def test_cordvtn_for_100_neutron_networks(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800663 onos_load_config()
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800664
665 ret1 = create_tenant(netA)
666 if ret1 != 0:
667 print "Creation of Tenant netA Failed"
668
669 ret2 = create_tenant(netB)
670 if ret2 != 0:
671 print "Creation of Tenant netB Failed"
672 pool = Pool(processes=10)
673
674 ret = os.system("neutron quote-update --network 105")
675 if ret1 != 0:
676 print "Neutron network install failed"
677 for i in range(1, 101):
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000678 pool.apply_async(create_network, (i, ))
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800679
680 pool.close()
681 pool.join()
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000682 status = validate_vtn_flows()
683 assert_equal(status, True)
684
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000685 def test_cordvtn_creating_virtual_private_network(self):
686 """
687 Algo:
688 1) Validate that required openstack service is up and running.
689 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
690 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
691 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
692 4) Verify that NetA is being created and validate IP in nova list command.
693 5) Verify that flow is being added in ovs-switch in compute-node.
694 6) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
695 """
696 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000697
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000698 def test_cordvtn_creating_virtual_public_network(self):
699 """
700 Algo:
701 1) Validate that required openstack service is up and running.
702 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
703 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
704 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
705 4) Verify that NetA is being created and validate IP in nova list command.
706 5) Verify that flow is being added in ovs-switch in compute-node.
707 6) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
708 """
709 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000710
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000711 def test_cordvtn_creating_virtual_local_management_network(self):
712 """
713 Algo:
714 1) Validate that required openstack service is up and running.
715 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
716 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
717 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
718 4) Verify that NetA is being created and validate IP in nova list command.
719 5) Verify that flow is being added in ovs-switch in compute-node.
720 6) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
721 """
722 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000723
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000724 def test_cordvtn_creating_virtual_vlan_connectivity_network(self):
725 """
726 Algo:
727 1) Validate that required openstack service is up and running.
728 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
729 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
730 (neutron port-create net-A-private --name stag-100).
731 4) Verify that NetA is being created and validate IP in nova list command.
732 5) Verify that flow is being added in ovs-switch in compute-node.
733 6) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
734 """
735 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000736
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000737 def test_cordvtn_creating_virtual_floating_IP_with_vlan_connectivity_network(self):
738 """
739 Algo:
740 1) Validate that required openstack service is up and running.
741 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
742 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
743 (neutron port-create net-A-private --name stag-500).
744 4) Verify that NetA is being created and validate IP in nova list command.
745 5) Verify that flow is being added in ovs-switch in compute-node.
746 6) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
747 """
748 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000749
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000750 def test_cordvtn_creating_virtual_private_network_and_boot_image(self):
751 """
752 Algo:
753 1) Validate that required openstack service is up and running.
754 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
755 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
756 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
757 4) Now boot image in the same created network using nova boot image command (example given below :-
758 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
759 5) Wait till VM boots up and starts running.
760 6) Verify that a VM is launched and running by using novaclient python API.
761 7) Verify that flow is being added in ovs-switch in compute-node.
762 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
763 9) Verify that cord-onos pushed flows to OVS switch.
764 """
765 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000766
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000767 def test_cordvtn_creating_virtual_public_network_and_boot_image(self):
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000768
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000769 """
770 Algo:
771 1) Validate that required openstack service is up and running.
772 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
773 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
774 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
775 4) Now boot image in the same created network using nova boot image command (example given below :-
776 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
777 5) Wait till VM boots up and starts running.
778 6) Verify that a VM is launched and running by using novaclient python API.
779 7) Verify that flow is being added in ovs-switch in compute-node.
780 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
781 9) Verify that cord-onos pushed flows to OVS switch.
782 """
783 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000784
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000785 def test_cordvtn_creating_virtual_local_management_network_and_boot_image(self):
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000786
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000787 """
788 Algo:
789 1) Validate that required openstack service is up and running.
790 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
791 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
792 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
793 4) Now boot image in the same created network using nova boot image command (example given below :-
794 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
795 5) Wait till VM boots up and starts running.
796 6) Verify that a VM is launched and running by using novaclient python API.
797 7) Verify that flow is being added in ovs-switch in compute-node.
798 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
799 9) Verify that cord-onos pushed flows to OVS switch.
800 """
801 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000802
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000803 def test_cordvtn_creating_virtual_vlan_connectivity_network_and_boot_image(self):
804 """
805 Algo:
806 1) Validate that required openstack service is up and running.
807 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
808 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
809 (neutron port-create net-A-private --name stag-100).
810 4) Now boot image in the same created network using nova boot image command (example given below :-
811 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
812 5) Wait till VM boots up and starts running.
813 6) Verify that a VM is launched and running by using novaclient python API.
814 7) Verify that flow is being added in ovs-switch in compute-node.
815 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
816 9) Verify that cord-onos pushed flows to OVS switch.
817 """
818 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000819
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000820 def test_cordvtn_creating_virtual_floating_IP_with_vlan_connectivity_network_and_boot_image(self):
821 """
822 Algo:
823 1) Validate that required openstack service is up and running.
824 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
825 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
826 (neutron port-create net-A-private --name stag-500).
827 4) Now boot image in the same created network using nova boot image command (example given below :-
828 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
829 5) Wait till VM boots up and starts running.
830 6) Verify that a VM is launched and running by using novaclient python API.
831 7) Verify that flow is being added in ovs-switch in compute-node.
832 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
833 9) Verify that cord-onos pushed flows to OVS switch.
834 """
835 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000836
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000837 def test_cordvtn_creating_virtual_private_network_and_boot_2_images_in_same_service(self):
838 """
839 Algo:
840 1) Validate that required openstack service is up and running.
841 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
842 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
843 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
844 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
845 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
846 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
847 5) Wait till VMs boot up and running.
848 6) Verify that two VMs are launched and running by using novaclient python API.
849 7) Verify that flow is being added in ovs-switch in compute-node.
850 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
851 9) Verify that cord-onos pushed flows to OVS switch.
852 """
853 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000854
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000855 def test_cordvtn_creating_virtual_public_network_and_boot_2_images_in_same_service(self):
856 """
857 Algo:
858 1) Validate that required openstack service is up and running.
859 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
860 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
861 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
862 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
863 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
864 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
865 5) Wait till VMs boot up and running.
866 6) Verify that two VMs are launched and running by using novaclient python API.
867 7) Verify that flow is being added in ovs-switch in compute-node.
868 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
869 9) Verify that cord-onos pushed flows to OVS switch.
870 """
871 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000872
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000873 def test_cordvtn_creating_virtual_local_management_network_and_boot_2_images_in_same_service(self):
874 """
875 Algo:
876 1) Validate that required openstack service is up and running.
877 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
878 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
879 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
880 4) Now boot two images in the same created network using nova boot image command (example given below :-
881 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
882 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
883 5) Wait till VMs boot up and running.
884 6) Verify that two VMs are launched and running by using novaclient python API.
885 7) Verify that flow is being added in ovs-switch in compute-node.
886 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
887 9) Verify that cord-onos pushed flows to OVS switch.
888 """
889 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000890
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000891 def test_cordvtn_creating_virtual_vlan_connectivity_network_and_boot_2_images_in_same_service(self):
892 """
893 Algo:
894 1) Validate that required openstack service is up and running.
895 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
896 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
897 (neutron port-create net-A-private --name stag-100).
898 4) Now boot two images in the same created network using nova boot image command (example given below :-
899 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
900 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
901 5) Wait till VMs boot up and running.
902 6) Verify that two VMs are launched and running by using novaclient python API.
903 7) Verify that flow is being added in ovs-switch in compute-node.
904 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
905 9) Verify that cord-onos pushed flows to OVS switch.
906 """
907 pass
Chetan Gaonker0fb91c92017-02-07 01:52:18 +0000908
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000909 def test_cordvtn_creating_virtual_floating_IP_with_vlan_connectivity_network_and_boot_2_images_in_same_service(self):
910 """
911 Algo:
912 1) Validate that required openstack service is up and running.
913 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
914 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
915 (neutron port-create net-A-private --name stag-500).
916 4) Now boot two images in the same created network using nova boot image command (example given below :-
917 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
918 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
919 5) Wait till VMs boot up and running.
920 6) Verify that two VMs are launched and running by using novaclient python API.
921 7) Verify that flow is being added in ovs-switch in compute-node.
922 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
923 9) Verify that cord-onos pushed flows to OVS switch.
924 """
925 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800926
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000927 def test_cordvtn_creating_virtual_private_network_and_boot_2_images_in_same_service_connectivity(self):
928 """
929 Algo:
930 1) Validate that required openstack service is up and running.
931 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
932 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
933 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
934 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
935 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
936 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
937 5) Wait till VMs boot up and running.
938 6) Verify that two VMs are launched and running by using novaclient python API.
939 7) Now ping to the VM from other VM which are launched in same network
940 8) verify that ping is successful
941 9) Verify that flow is being added in ovs-switch in compute-node.
942 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
943 11) Verify that cord-onos pushed flows to OVS switch.
944 """
945 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800946
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000947 def test_cordvtn_creating_virtual_public_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
948 """
949 Algo:
950 1) Validate that required openstack service is up and running.
951 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
952 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
953 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
954 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
955 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
956 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
957 5) Wait till VMs boot up and running.
958 6) Verify that two VMs are launched and running by using novaclient python API.
959 7) Now ping to the VM from other VM which are launched in same network
960 8) verify that ping is not successful
961 9) Verify that flow is being added in ovs-switch in compute-node.
962 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
963 11) Verify that cord-onos pushed flows to OVS switch.
964 """
965 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800966
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000967 def test_cordvtn_creating_virtual_local_management_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800968
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000969 """
970 Algo:
971 1) Validate that required openstack service is up and running.
972 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
973 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
974 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
975 4) Now boot two images in the same created network using nova boot image command (example given below :-
976 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
977 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
978 5) Wait till VMs boot up and running.
979 6) Verify that two VMs are launched and running by using novaclient python API.
980 7) Now ping to the VM from other VM which are launched in same network
981 8) verify that ping is not successful
982 9) Verify that flow is being added in ovs-switch in compute-node.
983 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
984 11) Verify that cord-onos pushed flows to OVS switch.
985 """
986 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800987
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000988 def test_cordvtn_creating_virtual_vlan_connectivity_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -0800989
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +0000990 """
991 Algo:
992 1) Validate that required openstack service is up and running.
993 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
994 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
995 (neutron port-create net-A-private --name stag-100).
996 4) Now boot two images in the same created network using nova boot image command (example given below :-
997 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
998 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
999 5) Wait till VMs boot up and running.
1000 6) Verify that two VMs are launched and running by using novaclient python API.
1001 7) Now ping to the VM from other VM which are launched in same network
1002 8) verify that ping is not successful
1003 9) Verify that flow is being added in ovs-switch in compute-node.
1004 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1005 11) Verify that cord-onos pushed flows to OVS switch.
1006 """
1007 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001008
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001009 def test_cordvtn_creating_virtual_floating_IP_with_vlan_connectivity_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1010 """
1011 Algo:
1012 1) Validate that required openstack service is up and running.
1013 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1014 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1015 (neutron port-create net-A-private --name stag-500).
1016 4) Now boot two images in the same created network using nova boot image command (example given below :-
1017 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1018 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
1019 5) Wait till VMs boot up and running.
1020 6) Verify that two VMs are launched and running by using novaclient python API.
1021 7) Now ping to the VM from other VM which are launched in same network
1022 8) verify that ping is not successful
1023 9) Verify that flow is being added in ovs-switch in compute-node.
1024 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1025 11) Verify that cord-onos pushed flows to OVS switch.
1026 """
1027 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001028
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001029 def test_cordvtn_creating_virtual_private_network_and_boot_image_connectivity_negative_scenario(self):
1030 """
1031 Algo:
1032 1) Validate that required openstack service is up and running.
1033 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1034 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1035 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1036 4) Now boot image in the same created network using nova boot image command (example given below :-
1037 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1038 5) Wait till VM boots up and starts running.
1039 6) Verify that a VM is launched and running by using novaclient python API.
1040 7) Now ping to the VM from outside network which are internet network (global ping)
1041 8) verify that ping is not successful
1042 9) Verify that flow is being added in ovs-switch in compute-node.
1043 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1044 11) Verify that cord-onos pushed flows to OVS switch.
1045 """
1046 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001047
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001048 def test_cordvtn_creating_virtual_public_network_and_boot_image_connectivity(self):
1049 """
1050 Algo:
1051 1) Validate that required openstack service is up and running.
1052 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1053 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
1054 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1055 4) Now boot image in the same created network using nova boot image command (example given below :-
1056 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1057 5) Wait till VM boots up and starts running.
1058 6) Verify that a VM is launched and running by using novaclient python API.
1059 7) Now ping to the VM from outside network which are internet network (global ping)
1060 8) verify that ping is successful
1061 9) Verify that flow is being added in ovs-switch in compute-node.
1062 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1063 11) Verify that cord-onos pushed flows to OVS switch.
1064 """
1065 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001066
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001067 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_connectivity_negative_scenario(self):
1068 """
1069 Algo:
1070 1) Validate that required openstack service is up and running.
1071 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1072 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1073 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1074 4) Now boot image in the same created network using nova boot image command (example given below :-
1075 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1076 5) Wait till VM boots up and starts running.
1077 6) Verify that a VM is launched and running by using novaclient python API.
1078 7) Now ping to the VM from outside network which are internet network (global ping)
1079 8) verify that ping is not successful
1080 9) Verify that flow is being added in ovs-switch in compute-node.
1081 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1082 11) Verify that cord-onos pushed flows to OVS switch.
1083 """
1084 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001085
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001086 def test_cordvtn_creating_virtual_vlan_connectivity_network_and_boot_image_connectivity_negative_scenario(self):
1087 """
1088 Algo:
1089 1) Validate that required openstack service is up and running.
1090 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1091 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
1092 (neutron port-create net-A-private --name stag-100).
1093 4) Now boot image in the same created network using nova boot image command (example given below :-
1094 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1095 5) Wait till VM boots up and starts running.
1096 6) Verify that a VM is launched and running by using novaclient python API.
1097 7) Now ping to the VM from outside network which are internet network (global ping)
1098 8) verify that ping is not successful
1099 9) Verify that flow is being added in ovs-switch in compute-node.
1100 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1101 11) Verify that cord-onos pushed flows to OVS switch.
1102 """
1103 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001104
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001105 def test_cordvtn_creating_virtual_floating_IP_with_vlan_connectivity_network_and_boot_image_connectivity_negative_scenario(self):
1106 """
1107 Algo:
1108 1) Validate that required openstack service is up and running.
1109 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1110 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1111 (neutron port-create net-A-private --name stag-500).
1112 4) Now boot image in the same created network using nova boot image command (example given below :-
1113 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1114 5) Wait till VM boots up and starts running.
1115 6) Verify that a VM is launched and running by using novaclient python API.
1116 7) Now ping to the VM from outside network which are internet network (global ping)
1117 8) verify that ping is not successful
1118 9) Verify that flow is being added in ovs-switch in compute-node.
1119 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1120 11) Verify that cord-onos pushed flows to OVS switch.
1121 """
1122 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001123
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001124 def test_cordvtn_creating_virtual_private_network_and_boot_image_connectivity_negative_scenario(self):
1125 """
1126 Algo:
1127 1) Validate that required openstack service is up and running.
1128 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1129 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1130 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1131 4) Now boot image in the same created network using nova boot image command (example given below :-
1132 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1133 5) Wait till VM boots up and starts running.
1134 6) Verify that a VM is launched and running by using novaclient python API.
1135 7) Now ping to the VM from compute node network which are launched a VM.
1136 8) verify that ping is not successful
1137 9) Verify that flow is being added in ovs-switch in compute-node.
1138 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1139 11) Verify that cord-onos pushed flows to OVS switch.
1140 """
1141 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001142
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001143 def test_cordvtn_creating_virtual_public_network_and_boot_image_connectivity_negative_scenario(self):
1144 """
1145 Algo:
1146 1) Validate that required openstack service is up and running.
1147 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1148 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
1149 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1150 4) Now boot image in the same created network using nova boot image command (example given below :-
1151 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1152 5) Wait till VM boots up and starts running.
1153 6) Verify that a VM is launched and running by using novaclient python API.
1154 7) Now ping to the VM from compute node network which are launched a VM.
1155 8) verify that ping is not successful
1156 9) Verify that flow is being added in ovs-switch in compute-node.
1157 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1158 11) Verify that cord-onos pushed flows to OVS switch.
1159 """
1160 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001161
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001162 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_connectivity(self):
1163 """
1164 Algo:
1165 1) Validate that required openstack service is up and running.
1166 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1167 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1168 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1169 4) Now boot image in the same created network using nova boot image command (example given below :-
1170 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1171 5) Wait till VM boots up and starts running.
1172 6) Verify that a VM is launched and running by using novaclient python API.
1173 7) Now ping to the VM from compute node network which are launched a VM.
1174 8) verify that ping is successful
1175 9) Verify that flow is being added in ovs-switch in compute-node.
1176 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1177 11) Verify that cord-onos pushed flows to OVS switch.
1178 """
1179 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001180
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001181 def test_cordvtn_creating_virtual_vlan_connectivity_network_and_boot_image_connectivity_negative_scenario(self):
1182 """
1183 Algo:
1184 1) Validate that required openstack service is up and running.
1185 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1186 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
1187 (neutron port-create net-A-private --name stag-100).
1188 4) Now boot image in the same created network using nova boot image command (example given below :-
1189 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1190 5) Wait till VM boots up and starts running.
1191 6) Verify that a VM is launched and running by using novaclient python API.
1192 7) Now ping to the VM from compute node network which are launched a VM.
1193 8) verify that ping is not successful
1194 9) Verify that flow is being added in ovs-switch in compute-node.
1195 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1196 11) Verify that cord-onos pushed flows to OVS switch.
1197 """
1198 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001199
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001200 def test_cordvtn_creating_virtual_floating_IP_with_vlan_connectivity_network_and_boot_image_connectivity_negative_scenario(self):
1201 """
1202 Algo:
1203 1) Validate that required openstack service is up and running.
1204 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1205 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1206 (neutron port-create net-A-private --name stag-500).
1207 4) Now boot image in the same created network using nova boot image command (example given below :-
1208 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1209 5) Wait till VM boots up and starts running.
1210 6) Verify that a VM is launched and running by using novaclient python API.
1211 7) Now ping to the VM from compute node network which are launched a VM.
1212 8) verify that ping is not successful
1213 9) Verify that flow is being added in ovs-switch in compute-node.
1214 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1215 11) Verify that cord-onos pushed flows to OVS switch.
1216 """
1217 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001218
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001219 def test_cordvtn_creating_virtual_vlan_interface_private_network_and_boot_image_connectivity_negative_scenario(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001220
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001221 """
1222 Algo:
1223 1) Validate that required openstack service is up and running.
1224 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1225 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1226 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1227 4) Now boot image in the same created network using nova boot image command (example given below :-
1228 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1229 5) Wait till VM boots up and starts running.
1230 6) Verify that a VM is launched and running by using novaclient python API.
1231 7) Create a virtual interface with vlan tag and private ip on VM.
1232 8) Create a same virtual interface with valn tag and private ip on head node.
1233 9) Now ping to the VM from head node network which are launched a openstack service.
1234 10) verify that ping is successful
1235 11) Verify that flow is being added in ovs-switch in compute-node.
1236 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1237 13) Verify that cord-onos pushed flows to OVS switch.
1238 """
1239 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001240
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001241 def test_cordvtn_creating_virtual_vlan_interface_public_network_and_boot_image_connectivity_negative_scenario(self):
ChetanGaonker901727c2016-11-29 14:05:03 -08001242
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001243 """
1244 Algo:
1245 1) Validate that required openstack service is up and running.
1246 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1247 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
1248 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1249 4) Now boot image in the same created network using nova boot image command (example given below :-
1250 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1251 5) Wait till VM boots up and starts running.
1252 6) Verify that a VM is launched and running by using novaclient python API.
1253 7) Create a virtual interface with vlan tag and public ip on VM.
1254 8) Create a same virtual interface with valn tag and any pulic ip on head node.
1255 9) Now ping to the VM from head node network which are launched a openstack service.
1256 10) verify that ping is successful
1257 11) Verify that flow is being added in ovs-switch in compute-node.
1258 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1259 13) Verify that cord-onos pushed flows to OVS switch.
1260 """
1261 pass
ChetanGaonker901727c2016-11-29 14:05:03 -08001262
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001263 def test_cordvtn_creating_virtual_vlan_interface_local_management_network_and_boot_image_connectivity(self):
ChetanGaonker901727c2016-11-29 14:05:03 -08001264
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001265 """
1266 Algo:
1267 1) Validate that required openstack service is up and running.
1268 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1269 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1270 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1271 4) Now boot image in the same created network using nova boot image command (example given below :-
1272 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1273 5) Wait till VM boots up and starts running.
1274 6) Verify that a VM is launched and running by using novaclient python API.
1275 7) Create a virtual interface with vlan tag and local management ip on VM.
1276 8) Create a same virtual interface with valn tag and any local management ip on head node.
1277 9) Now ping to the VM from head node network which are launched a openstack service.
1278 10) verify that ping is successful
1279 11) Verify that flow is being added in ovs-switch in compute-node.
1280 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1281 13) Verify that cord-onos pushed flows to OVS switch.
1282 """
1283 pass
ChetanGaonker901727c2016-11-29 14:05:03 -08001284
ChetanGaonker901727c2016-11-29 14:05:03 -08001285
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001286 def test_cordvtn_creating_virtual_vlan_interface_floating_private_network_and_boot_image_connectivity_negative_scenario(self):
ChetanGaonker901727c2016-11-29 14:05:03 -08001287
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001288 """
1289 Algo:
1290 1) Validate that required openstack service is up and running.
1291 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1292 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1293 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1294 4) Now boot image in the same created network using nova boot image command (example given below :-
1295 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1296 5) Wait till VM boots up and starts running.
1297 6) Verify that a VM is launched and running by using novaclient python API.
1298 7) Create a virtual interface with vlan tag and private floating ip on VM.
1299 8) Create a same virtual interface with valn tag and private floating ip on head node.
1300 9) Now ping to the VM from head node network which are launched a openstack service.
1301 10) verify that ping is successful
1302 11) Verify that flow is being added in ovs-switch in compute-node.
1303 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1304 13) Verify that cord-onos pushed flows to OVS switch.
1305 """
1306 pass
ChetanGaonker901727c2016-11-29 14:05:03 -08001307
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001308 def test_cordvtn_creating_virtual_vlan_interface_floating_public_network_and_boot_image_connectivity_negative_scenario(self):
ChetanGaonker901727c2016-11-29 14:05:03 -08001309
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001310 """
1311 Algo:
1312 1) Validate that required openstack service is up and running.
1313 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1314 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
1315 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1316 4) Now boot image in the same created network using nova boot image command (example given below :-
1317 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1318 5) Wait till VM boots up and starts running.
1319 6) Verify that a VM is launched and running by using novaclient python API.
1320 7) Create a virtual interface with vlan tag and public floating ip on VM.
1321 8) Create a same virtual interface with valn tag and any pulic floating ip on head node.
1322 9) Now ping to the VM from head node network which are launched a openstack service.
1323 10) verify that ping is successful
1324 11) Verify that flow is being added in ovs-switch in compute-node.
1325 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1326 13) Verify that cord-onos pushed flows to OVS switch.
1327 """
1328 pass
ChetanGaonker901727c2016-11-29 14:05:03 -08001329
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001330 def test_cordvtn_creating_virtual_vlan_interface_floating_local_management_network_and_boot_image_connectivity(self):
ChetanGaonker901727c2016-11-29 14:05:03 -08001331
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001332 """
1333 Algo:
1334 1) Validate that required openstack service is up and running.
1335 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1336 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1337 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1338 4) Now boot image in the same created network using nova boot image command (example given below :-
1339 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1340 5) Wait till VM boots up and starts running.
1341 6) Verify that a VM is launched and running by using novaclient python API.
1342 7) Create a virtual interface with vlan tag and local management floating ip on VM.
1343 8) Create a same virtual interface with valn tag and any local management floating ip on head node.
1344 9) Now ping to the VM from head node network which are launched a openstack service.
1345 10) verify that ping is successful
1346 11) Verify that flow is being added in ovs-switch in compute-node.
1347 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1348 13) Verify that cord-onos pushed flows to OVS switch.
1349 """
1350 pass
ChetanGaonker901727c2016-11-29 14:05:03 -08001351
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001352 def test_cordvtn_creating_one_virtual_public_and_a_private_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001353
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001354 """
1355 Algo:
1356 1) Validate that required openstack service is up and running.
1357 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1358 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
1359 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1360 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
1361 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1362 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
1363 5) Wait till VMs boot up and running.
1364 6) Verify that two VMs are launched and running by using novaclient python API.
1365 7) Now ping to the VM from other VM which are launched in the private network
1366 8) verify that ping is not successful
1367 9) Verify that flow is being added in ovs-switch in compute-node.
1368 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1369 11) Verify that cord-onos pushed flows to OVS switch.
1370 """
1371 pass
ChetanGaonker901727c2016-11-29 14:05:03 -08001372
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001373 def test_cordvtn_creating_one_virtual_local_management_and_a_private_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
ChetanGaonker901727c2016-11-29 14:05:03 -08001374
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001375 """
1376 Algo:
1377 1) Validate that required openstack service is up and running.
1378 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1379 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1380 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1381 4) Now boot two images in the same created network using nova boot image command (example given below :-
1382 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1383 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
1384 5) Wait till VMs boot up and running.
1385 6) Verify that two VMs are launched and running by using novaclient python API.
1386 7) Now ping to the VM from other VM which are launched in the private network
1387 8) verify that ping is not successful
1388 9) Verify that flow is being added in ovs-switch in compute-node.
1389 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1390 11) Verify that cord-onos pushed flows to OVS switch.
1391 """
1392 pass
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001393
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001394 def test_cordvtn_creating_one_virtual_vlan_connectivity_and_a_private_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
ChetanGaonkeraaea6b62016-12-16 17:06:39 -08001395
Thangavelu K Sbdb1ec42017-02-23 19:51:42 +00001396 """
1397 Algo:
1398 1) Validate that required openstack service is up and running.
1399 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1400 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
1401 (neutron port-create net-A-private --name stag-100).
1402 4) Now boot two images in the same created network using nova boot image command (example given below :-
1403 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1404 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1405 5) Wait till VMs boot up and running.
1406 6) Verify that two VMs are launched and running by using novaclient python API.
1407 7) Now ping to the VM from other VM which are launched in the private network
1408 8) verify that ping is not successful
1409 9) Verify that flow is being added in ovs-switch in compute-node.
1410 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1411 11) Verify that cord-onos pushed flows to OVS switch.
1412 """
1413 pass
1414
1415 def test_cordvtn_creating_one_virtual_floating_IP_with_vlan_connectivity_and_a_private_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1416
1417 """
1418 Algo:
1419 1) Validate that required openstack service is up and running.
1420 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1421 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1422 (neutron port-create net-A-private --name stag-500).
1423 4) Now boot two images in the same created network using nova boot image command (example given below :-
1424 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1425 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
1426 5) Wait till VMs boot up and running.
1427 6) Verify that two VMs are launched and running by using novaclient python API.
1428 7) Now ping to the VM from other VM which are launched in the private network
1429 8) verify that ping is not successful
1430 9) Verify that flow is being added in ovs-switch in compute-node.
1431 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1432 11) Verify that cord-onos pushed flows to OVS switch.
1433 """
1434 pass
1435
1436 def test_cordvtn_creating_one_virtual_local_management_other_public_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1437
1438 """
1439 Algo:
1440 1) Validate that required openstack service is up and running.
1441 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1442 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1443 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1444 4) Now boot two images in the same created network using nova boot image command (example given below :-
1445 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1446 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
1447 5) Wait till VMs boot up and running.
1448 6) Verify that two VMs are launched and running by using novaclient python API.
1449 7) Now ping to the VM from other VM which are launched in the public network
1450 8) verify that ping is not successful
1451 9) Verify that flow is being added in ovs-switch in compute-node.
1452 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1453 11) Verify that cord-onos pushed flows to OVS switch.
1454 """
1455 pass
1456
1457 def test_cordvtn_creating_one_virtual_vlan_connectivity_and_a_private_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1458
1459 """
1460 Algo:
1461 1) Validate that required openstack service is up and running.
1462 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1463 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
1464 (neutron port-create net-A-private --name stag-100).
1465 4) Now boot two images in the same created network using nova boot image command (example given below :-
1466 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1467 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1468 5) Wait till VMs boot up and running.
1469 6) Verify that two VMs are launched and running by using novaclient python API.
1470 7) Now ping to the VM from other VM which are launched in the public network
1471 8) verify that ping is not successful
1472 9) Verify that flow is being added in ovs-switch in compute-node.
1473 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1474 11) Verify that cord-onos pushed flows to OVS switch.
1475 """
1476 pass
1477
1478 def test_cordvtn_creating_one_virtual_floating_IP_with_vlan_connectivity_and_a_private_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1479
1480 """
1481 Algo:
1482 1) Validate that required openstack service is up and running.
1483 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1484 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1485 (neutron port-create net-A-private --name stag-500).
1486 4) Now boot two images in the same created network using nova boot image command (example given below :-
1487 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1488 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
1489 5) Wait till VMs boot up and running.
1490 6) Verify that two VMs are launched and running by using novaclient python API.
1491 7) Now ping to the VM from other VM which are launched in the public network
1492 8) verify that ping is not successful
1493 9) Verify that flow is being added in ovs-switch in compute-node.
1494 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1495 11) Verify that cord-onos pushed flows to OVS switch.
1496 """
1497 pass
1498
1499 def test_cordvtn_creating_one_virtual_vlan_connectivity_other_local_management_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1500
1501 """
1502 Algo:
1503 1) Validate that required openstack service is up and running.
1504 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1505 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a vlan port-create.
1506 (neutron port-create net-A-private --name stag-100).
1507 4) Now boot two images in the same created network using nova boot image command (example given below :-
1508 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1509 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1510 5) Wait till VMs boot up and running.
1511 6) Verify that two VMs are launched and running by using novaclient python API.
1512 7) Now ping to the VM from other VM which are launched in the public network
1513 8) verify that ping is not successful
1514 9) Verify that flow is being added in ovs-switch in compute-node.
1515 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1516 11) Verify that cord-onos pushed flows to OVS switch.
1517 """
1518 pass
1519
1520 def test_cordvtn_creating_one_virtual_floating_IP_with_vlan_connectivity_other_local_management_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1521
1522 """
1523 Algo:
1524 1) Validate that required openstack service is up and running.
1525 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1526 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1527 (neutron port-create net-A-private --name stag-500).
1528 4) Now boot two images in the same created network using nova boot image command (example given below :-
1529 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1530 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
1531 5) Wait till VMs boot up and running.
1532 6) Verify that two VMs are launched and running by using novaclient python API.
1533 7) Now ping to the VM from other VM which are launched in the public network
1534 8) verify that ping is not successful
1535 9) Verify that flow is being added in ovs-switch in compute-node.
1536 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1537 11) Verify that cord-onos pushed flows to OVS switch.
1538 """
1539 pass
1540
1541 def test_cordvtn_creating_one_virtual_floating_IP_with_vlan_connectivity_other_virtual_vlan_network_and_boot_2_images_in_same_service_connectivity_negative_scenario(self):
1542
1543 """
1544 Algo:
1545 1) Validate that required openstack service is up and running.
1546 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1547 3) From CORD-Test container, use python-neutron client and create network with name - NetA with a floating ip and vlan port-create.
1548 (neutron port-create net-A-private --name stag-500).
1549 4) Now boot two images in the same created network using nova boot image command (example given below :-
1550 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1551 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
1552 5) Wait till VMs boot up and running.
1553 6) Verify that two VMs are launched and running by using novaclient python API.
1554 7) Now ping to the VM from other VM which are launched in the public network
1555 8) verify that ping is not successful
1556 9) Verify that flow is being added in ovs-switch in compute-node.
1557 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1558 11) Verify that cord-onos pushed flows to OVS switch.
1559 """
1560 pass
1561
1562 def test_cordvtn_creating_virtual_public_network_and_boot_2_images_with_invalid_public_field_of_onos_network_cfg_json_in_same_service(self):
1563 """
1564 Algo:
1565 1) Validate that required openstack service is up and running.
1566 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1567 3) Push network_cfg.json config file to onos with an invalid public gateway ip in network_cfg.json file.
1568 4) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
1569 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1570 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1571 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1572 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
1573 6) Wait till VMs boot up and running.
1574 7) Verify that two VMs are launched and running by using novaclient python API.
1575 8) Verify that flow is being added in ovs-switch in compute-node.
1576 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1577 10) Verify that cord-onos pushed flows to OVS switch.
1578 11) Verify ping from VM to public gateway which is send to ONOS through rest API in network_cfg.json file.
1579 12) 11th step should be failed due to we are passing invalid public IP as gatway and we have not seen any flows in OVS for it.
1580 13) Now ping one VM to other VM it should not ping again even it in the same service.
1581 """
1582 pass
1583
1584 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_with_invalid_localManagementIp_field_of_onos_network_cfg_json(self):
1585
1586 """
1587 Algo:
1588 1) Validate that required openstack service is up and running.
1589 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1590 3) Push network_cfg.json config file to onos with an invalid localManagement ip in network_cfg.json file.
1591 4) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
1592 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1593 5) Now boot image in the same created network using nova boot image command (example given below :-
1594 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1595 6) Wait till VM boots up and starts running.
1596 7) Verify that a VM is launched and running by using novaclient python API.
1597 8) Verify that flow is being added in ovs-switch in compute-node.
1598 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1599 10) Verify that cord-onos pushed flows to OVS switch.
1600 11) Verify ping from VM to local management ip which is send to ONOS through rest API in network_cfg.json file.
1601 12) 11th step should be failed due to we are passing invalid local management IP and we have not seen any flows in OVS for it.
1602 """
1603 pass
1604
1605 def test_cordvtn_creating_virtual_private_network_and_boot_image_with_invalid_OVSDB_port_field_of_onos_network_cfg_json(self):
1606 """
1607 Algo:
1608 1) Validate that required openstack service is up and running.
1609 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1610 3) Push network_cfg.json config file to onos with an invalid ovsdb port in network_cfg.json file.
1611 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1612 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1613 4) Now boot image in the same created network using nova boot image command (example given below :-
1614 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1615 5) Wait till VM boots up and starts running.
1616 6) Verify that a VM is launched and running by using novaclient python API.
1617 7) Verify that flows are being added in ovs-switch in compute-node.
1618 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1619 9) Verify that cord-onos did not push any flows to OVS switch.
1620 """
1621 pass
1622
1623 def test_cordvtn_creating_virtual_private_network_and_boot_image_with_invalid_OpenStack_details_in_onos_network_cfg_json(self):
1624 """
1625 Algo:
1626 1) Validate that required openstack service is up and running.
1627 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1628 3) Push network_cfg.json config file to onos with an invalid openstack in network_cfg.json file.
1629 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1630 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1631 4) Now boot image in the same created network using nova boot image command (example given below :-
1632 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1633 5) Wait till VM boots up and starts running.
1634 6) Verify that a VM is launched and running by using novaclient python API.
1635 7) Verify that no flows are being added in ovs-switch in compute-node.
1636 8) Verify that onos-ml2 plugin is not being received a message from openstack service neutron.
1637 9) Verify that cord-onos did not push any flows to OVS switch.
1638 """
1639 pass
1640
1641 def test_cordvtn_creating_virtual_private_network_and_boot_image_with_invalid_compute_node_details_in_onos_network_cfg_json(self):
1642 """
1643 Algo:
1644 1) Validate that required openstack service is up and running.
1645 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1646 3) Push network_cfg.json config file to onos with an invalid compute node details in network_cfg.json file.
1647 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1648 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1649 4) Now boot image in the same created network using nova boot image command (example given below :-
1650 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1651 5) Wait till VM boots up and starts running.
1652 6) Verify that a VM is launched and running by using novaclient python API.
1653 7) Verify that no flows are being added in ovs-switch in compute-node.
1654 8) Verify that onos-ml2 plugin is not being received a message from openstack service neutron.
1655 9) Verify that cord-onos did not push any flows to OVS switch.
1656 """
1657 pass
1658
1659
1660 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_in_different_services_connectivity(self):
1661 """
1662 Algo:
1663 1) Validate that required openstack service is up and running.
1664 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1665 3) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetB with an IP as private network.
1666 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1667 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1668 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
1669 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1670 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1671 5) Wait till VMs boot up and running.
1672 6) Verify that two VMs are launched and running by using novaclient python API.
1673 7) Verify that flow is being added in ovs-switch in compute-node.
1674 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1675 9) Verify that cord-onos pushed flows to OVS switch.
1676 10) Now ping from VM which is Net-A to other VM which is in Net-B, should not ping.
1677 11) Verify that no flows are being added in the OVS switch.
1678 """
1679 pass
1680
1681 def test_cordvtn_creating_two_virtual_public_networks_and_boot_images_in_different_service_connectivity(self):
1682 """
1683 Algo:
1684 1) Validate that required openstack service is up and running.
1685 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1686 3) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetB with an IP as public network.
1687 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
1688 (neutron net-create net-A-public, neutron subnet-create net-B-public 198.1.0.0/24).
1689 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
1690 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1691 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1692 5) Wait till VMs boot up and running.
1693 6) Verify that two VMs are launched and running by using novaclient python API.
1694 7) Verify that flow is being added in ovs-switch in compute-node.
1695 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1696 9) Verify that cord-onos pushed flows to OVS switch.
1697 10) Now ping from VM which is Net-A to other VM which is in Net-B, should not ping.
1698 11) Verify that no flows are being added in the OVS switch.
1699 """
1700 pass
1701
1702 def test_cordvtn_creating_two_virtual_local_management_networks_and_boot_images_in_different_service_connectivity(self):
1703 """
1704 Algo:
1705 1) Validate that required openstack service is up and running.
1706 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1707 3) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetB with an IP as local management network.
1708 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
1709 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.28.0.0/24 -gateway 172.28.0.1).
1710 4) Now boot two images in the same created network using nova boot image command (example given below :-
1711 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1712 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1713 5) Wait till VMs boot up and running.
1714 6) Verify that two VMs are launched and running by using novaclient python API.
1715 7) Verify that flow is being added in ovs-switch in compute-node.
1716 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1717 9) Verify that cord-onos pushed flows to OVS switch.
1718 10) Now ping from VM which is Net-A to other VM which is in Net-B, should not ping.
1719 11) Verify that no flows are being added in the OVS switch.
1720 """
1721 pass
1722
1723 def test_cordvtn_creating_two_virtual_vlan_connectivity_networks_and_boot_images_in_different_service_connectivity(self):
1724 """
1725 Algo:
1726 1) Validate that required openstack service is up and running.
1727 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1728 3) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetB with a vlan port-create.
1729 (neutron port-create net-A-private --name stag-100).
1730 (neutron port-create net-B-private --name stag-200).
1731 4) Now boot two images in the same created network using nova boot image command (example given below :-
1732 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1733 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg1-01
1734 5) Wait till VMs boot up and running.
1735 6) Verify that two VMs are launched and running by using novaclient python API.
1736 7) Verify that flow is being added in ovs-switch in compute-node.
1737 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1738 9) Verify that cord-onos pushed flows to OVS switch.
1739 10) Now ping from VM which is Net-A to other VM which is in Net-B, should not ping.
1740 11) Verify that no flows are being added in the OVS switch.
1741 """
1742 pass
1743 def test_cordvtn_creating_two_virtual_floating_IP_with_vlan_connectivity_networks_and_boot_images_in_different_service_connectivity(self):
1744 """
1745 Algo:
1746 1) Validate that required openstack service is up and running.
1747 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1748 3) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetB with a floating ip and vlan port-create.
1749 (neutron port-create net-A-private --name stag-500).
1750 (neutron port-create net-B-private --name stag-500).
1751 4) Now boot two images in the same created network using nova boot image command (example given below :-
1752 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-01
1753 nova boot --image 6ba954df-063f-4379-9e2a-920050879918 --flavor 2 --nic port-id=2c7a397f-949e-4502-aa61-2c9cefe96c74 --user-data passwd.data vsg-02
1754 5) Wait till VMs boot up and running.
1755 6) Verify that two VMs are launched and running by using novaclient python API.
1756 7) Verify that flow is being added in ovs-switch in compute-node.
1757 8) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1758 9) Verify that cord-onos pushed flows to OVS switch.
1759 10) Now ping from VM which is Net-A to other VM which is in Net-B, should not ping.
1760 11) Verify that no flows are being added in the OVS switch.
1761 """
1762 pass
1763
1764 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_for_services_dependency_with_out_xos_direct_access(self):
1765 """
1766 Algo:
1767 1) Validate that required openstack service is up and running.
1768 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1769 3) Push service dependency data.json file to onos to subscriber of other service.
1770 $ curl -X POST -H "Content-Type: application/json" -u onos:rocks -d @data.json http://$OC1:8181/onos/cordvtn/serviceNetworks
1771 4) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetBwith an IP as private network.
1772 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1773 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1774 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1775 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1776 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1777 6) Wait till VMs boot up and running.
1778 7) Verify that two VMs are launched and running by using novaclient python API.
1779 8) Verify that flow is being added in ovs-switch in compute-node.
1780 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1781 10) Verify that cord-onos pushed flows to OVS switch.
1782 11) Now ping from VM which is Net-A to other VM which is in Net-B, should ping.
1783 12) Verify that flows are being added in the OVS switch.
1784 """
1785 pass
1786
1787 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_for_services_dependency_with_out_xos_indirect_access(self):
1788 """
1789 Algo:
1790 1) Validate that required openstack service is up and running.
1791 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1792 3) Push service dependency data.json file to onos to subscriber of other service.
1793 $ curl -X POST -H "Content-Type: application/json" -u onos:rocks -d @data.json http://$OC1:8181/onos/cordvtn/serviceNetworks
1794 4) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetBwith an IP as private network.
1795 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1796 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1797 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1798 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1799 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1800 6) Wait till VMs boot up and running.
1801 7) Verify that two VMs are launched and running by using novaclient python API.
1802 8) Verify that flow is being added in ovs-switch in compute-node.
1803 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1804 10) Verify that cord-onos pushed flows to OVS switch.
1805 11) Now ping from VM which is Net-B to other VM which is in Net-A, capture packets on port for ICMP request packets.
1806 12) Verify that flows are being added in the OVS switch.
1807 """
1808 pass
1809
1810 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_remove_services_dependency_with_out_xos_direct_access(self):
1811 """
1812 Algo:
1813 1) Validate that required openstack service is up and running.
1814 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1815 3) Push service dependency data.json file to onos to subscriber of other service.
1816 $ curl -X POST -H "Content-Type: application/json" -u onos:rocks -d @data.json http://$OC1:8181/onos/cordvtn/serviceNetworks
1817 4) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetBwith an IP as private network.
1818 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1819 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1820 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1821 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1822 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1823 6) Wait till VMs boot up and running.
1824 7) Verify that two VMs are launched and running by using novaclient python API.
1825 8) Verify that flow is being added in ovs-switch in compute-node.
1826 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1827 10) Verify that cord-onos pushed flows to OVS switch.
1828 11) Now ping from VM which is Net-A to other VM which is in Net-B, should ping.
1829 12) Verify that flows are being added in the OVS switch.
1830 13) Push config data with outservice dependency in data.json file to onos to subscriber of other service.
1831 14) Now ping from VM which is Net-A to other VM which is in Net-B, should not ping.
1832 15) Verify that no flows are being added in the OVS switch.
1833 """
1834 pass
1835
1836 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_remove_services_dependency_with_out_xos_indirect_access(self):
1837 """
1838 Algo:
1839 1) Validate that required openstack service is up and running.
1840 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1841 3) Push service dependency data.json file to onos to subscriber of other service.
1842 $ curl -X POST -H "Content-Type: application/json" -u onos:rocks -d @data.json http://$OC1:8181/onos/cordvtn/serviceNetworks
1843 4) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetBwith an IP as private network.
1844 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1845 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1846 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1847 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1848 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1849 6) Wait till VMs boot up and running.
1850 7) Verify that two VMs are launched and running by using novaclient python API.
1851 8) Verify that flow is being added in ovs-switch in compute-node.
1852 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1853 10) Verify that cord-onos pushed flows to OVS switch.
1854 11) Now ping from VM which is Net-B to other VM which is in Net-A, capture packets on port for ICMP request packets.
1855 12) Verify that flows are being added in the OVS switch.
1856 13) Push config data with out service dependency in data.json file to onos to subscriber of other service.
1857 14) Now ping from VM which is Net-B to other VM which is in Net-A, should not see any ICMP request packets on port.
1858 15) Verify that no flows are being added in the OVS switch.
1859 """
1860 pass
1861
1862 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_for_services_dependency_with_xos_direct_access(self):
1863 """
1864 Algo:
1865 1) Validate that required openstack service is up and running.
1866 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1867 3) Validate that XOS is up and running.
1868 4) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetBwith an IP as private network.
1869 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1870 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1871 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1872 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1873 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1874 6) Wait till VMs boot up and running.
1875 7) Verify that two VMs are launched and running by using novaclient python API.
1876 8) Verify that flow is being added in ovs-switch in compute-node.
1877 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1878 10) Verify that cord-onos pushed flows to OVS switch.
1879 11) Now ping from VM which is Net-A to other VM which is in Net-B, should ping.
1880 12) Verify that flows are being added in the OVS switch.
1881 """
1882 pass
1883
1884 def test_cordvtn_creating_two_virtual_private_networks_and_boot_images_for_services_dependency_with_xos_indirect_access(self):
1885 """
1886 Algo:
1887 1) Validate that required openstack service is up and running.
1888 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1889 3) Validate that XOS is up and running.
1890 4) From CORD-Test container, use python-neutron client and create two networks with name - NetA and NetBwith an IP as private network.
1891 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1892 (neutron net-create net-B-private, neutron subnet-create net-B-private 10.1.0.0/24).
1893 5) Now boot 2 images in the same created network using nova boot image command (example given below :-
1894 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1895 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-B-vm-01
1896 6) Wait till VMs boot up and running.
1897 7) Verify that two VMs are launched and running by using novaclient python API.
1898 8) Verify that flow is being added in ovs-switch in compute-node.
1899 9) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1900 10) Verify that cord-onos pushed flows to OVS switch.
1901 11) Now ping from VM which is Net-B to other VM which is in Net-A, should ping.
1902 12) Verify that flows are being added in the OVS switch.
1903 """
1904 pass
1905
1906 def test_cordvtn_with_access_agent_serviceType_and_vtn_location_field_network_cfg_connectivity_to_access_device(self):
1907 """
1908 Algo:
1909 1) Validate that required openstack service is up and running.
1910 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1911 3) Push access-agent additional network_cfg to ONOS and specify vtn-location field info must be access-agent container.
1912 4) Launch the access-agent and access-device containers and then restart openstack compute node.
1913 $ sudo docker run --privileged --cap-add=ALL -d --name access-agent -t ubuntu:14.04 /bin/bash
1914 5) Create each interface on br-int and br-mgmt using pipework on access-agent containers
1915 $ sudo ./pipework br-mgmt -i eth1 access-agent 10.10.10.20/24
1916 $ sudo ./pipework br-int -i eth2 access-agent 10.168.0.100/24 fa:00:00:00:00:11
1917 6) We ahve to stop ONOS service to test this
1918 onos-service stop
1919 sudo ovs-ofctl -O OpenFlow13 del-flows br-int "arp"
1920 7) Now attach to access-agent container and ping to access-device
1921 8) Verify that ping should be success and flows are being added in br-int.
1922 """
1923 pass
1924
1925 def test_cordvtn_with_access_agent_serviceType_and_vtn_location_field_in_network_cfg_connectivity_to_head_node(self):
1926 """
1927 Algo:
1928 1) Validate that required openstack service is up and running.
1929 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1930 3) Push access-agent additional network_cfg to ONOS and specify vtn-location field info must be access-agent container.
1931 4) Launch the access-agent and access-device containers and then restart openstack compute node.
1932 $ sudo docker run --privileged --cap-add=ALL -d --name access-agent -t ubuntu:14.04 /bin/bash
1933 5) Create each interface on br-int and br-mgmt using pipework on access-agent containers
1934 $ sudo ./pipework br-mgmt -i eth1 access-agent 10.10.10.20/24
1935 $ sudo ./pipework br-int -i eth2 access-agent 10.168.0.100/24 fa:00:00:00:00:11
1936 6) We ahve to stop ONOS service to test this
1937 onos-service stop
1938 sudo ovs-ofctl -O OpenFlow13 del-flows br-int "arp"
1939 7) Now attach to access-agent container and ping to head node
1940 8) Verify that ping should be success and flows are being added in br-int.
1941 """
1942 pass
1943
1944 def test_cordvtn_with_access_agent_serviceType_and_invalid_vtn_location_field_network_cfg_connectivity_to_access_device(self):
1945 """
1946 Algo:
1947 1) Validate that required openstack service is up and running.
1948 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1949 3) Push access-agent additional network_cfg to ONOS and specify vtn-location field info must not be access-agent container.
1950 4) Launch the access-agent and access-device containers and then restart openstack compute node.
1951 $ sudo docker run --privileged --cap-add=ALL -d --name access-agent -t ubuntu:14.04 /bin/bash
1952 5) Create each interface on br-int and br-mgmt using pipework on access-agent containers
1953 $ sudo ./pipework br-mgmt -i eth1 access-agent 10.10.10.20/24
1954 $ sudo ./pipework br-int -i eth2 access-agent 10.168.0.100/24 fa:00:00:00:00:11
1955 6) We ahve to stop ONOS service to test this
1956 onos-service stop
1957 sudo ovs-ofctl -O OpenFlow13 del-flows br-int "arp"
1958 7) Now attach to access-agent container and ping to access-device
1959 8) Verify that ping should not be success and no flows are being added in br-int.
1960 """
1961 pass
1962
1963 def test_cordvtn_with_access_agent_serviceType_and_invalid_vtn_location_field_in_network_cfg_connectivity_to_head_node(self):
1964 """
1965 Algo:
1966 1) Validate that required openstack service is up and running.
1967 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1968 3) Push access-agent additional network_cfg to ONOS and specify vtn-location field info must not be access-agent container.
1969 4) Launch the access-agent and access-device containers and then restart openstack compute node.
1970 $ sudo docker run --privileged --cap-add=ALL -d --name access-agent -t ubuntu:14.04 /bin/bash
1971 5) Create each interface on br-int and br-mgmt using pipework on access-agent containers
1972 $ sudo ./pipework br-mgmt -i eth1 access-agent 10.10.10.20/24
1973 $ sudo ./pipework br-int -i eth2 access-agent 10.168.0.100/24 fa:00:00:00:00:11
1974 6) We ahve to stop ONOS service to test this
1975 onos-service stop
1976 sudo ovs-ofctl -O OpenFlow13 del-flows br-int "arp"
1977 7) Now attach to access-agent container and ping to head node
1978 8) Verify that ping should not be success and no flows are being added in br-int.
1979 """
1980 pass
1981
1982 def test_cordvtn_creating_virtual_private_network_and_boot_2_images_in_same_service_connectivity_after_restarting_VMs(self):
1983 """
1984 Algo:
1985 1) Validate that required openstack service is up and running.
1986 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
1987 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
1988 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
1989 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
1990 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
1991 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
1992 5) Wait till VMs boot up and running.
1993 6) Verify that two VMs are launched and running by using novaclient python API.
1994 7) Now ping to the VM from other VM which are launched in same network
1995 8) verify that ping is successful
1996 9) Verify that flow is being added in ovs-switch in compute-node.
1997 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
1998 11) Verify that cord-onos pushed flows to OVS switch.
1999 12) Restart both VMs in same service and repeat steps 7 to 11.
2000 """
2001 pass
2002
2003 def test_cordvtn_creating_virtual_private_network_and_boot_2_images_in_same_service_connectivity_after_restarting_cord_onos(self):
2004 """
2005 Algo:
2006 1) Validate that required openstack service is up and running.
2007 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2008 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
2009 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
2010 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
2011 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2012 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
2013 5) Wait till VMs boot up and running.
2014 6) Verify that two VMs are launched and running by using novaclient python API.
2015 7) Now ping to the VM from other VM which are launched in same network
2016 8) verify that ping is successful
2017 9) Verify that flow is being added in ovs-switch in compute-node.
2018 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2019 11) Verify that cord-onos pushed flows to OVS switch.
2020 12) Restart ONOS service and repeat steps 7 to 11.
2021 """
2022 pass
2023
2024 def test_cordvtn_creating_virtual_private_network_and_boot_2_images_in_same_service_connectivity_after_delete_any_VM_recreating_it(self):
2025 """
2026 Algo:
2027 1) Validate that required openstack service is up and running.
2028 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2029 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
2030 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
2031 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
2032 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2033 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
2034 5) Wait till VMs boot up and running.
2035 6) Verify that two VMs are launched and running by using novaclient python API.
2036 7) Now ping to the VM from other VM which are launched in same network
2037 8) verify that ping is successful
2038 9) Verify that flow is being added in ovs-switch in compute-node.
2039 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2040 11) Verify that cord-onos pushed flows to OVS switch.
2041 12) Delete a VM which was created earlier and repeat steps 4 to 11.
2042 """
2043 pass
2044
2045 def test_cordvtn_creating_virtual_private_network_and_boot_2_images_in_same_service_connectivity_after_delete_and_add_br_int_bridge(self):
2046 """
2047 Algo:
2048 1) Validate that required openstack service is up and running.
2049 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2050 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as private network.
2051 (neutron net-create net-A-private, neutron subnet-create net-A-private 10.0.0.0/24).
2052 4) Now boot 2 images in the same created network using nova boot image command (example given below :-
2053 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2054 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-02
2055 5) Wait till VMs boot up and running.
2056 6) Verify that two VMs are launched and running by using novaclient python API.
2057 7) Now ping to the VM from other VM which are launched in same network
2058 8) verify that ping is successful
2059 9) Verify that flow is being added in ovs-switch in compute-node.
2060 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2061 11) Verify that cord-onos pushed flows to OVS switch.
2062 12) Delete a br_int bridge and repeat steps 7 to 11, (it should not ping)
2063 13) Add br_int bridge and repeat steps 7 to 11, (it should ping)
2064 """
2065 pass
2066
2067 def test_cordvtn_creating_virtual_public_network_and_boot_image_connectivity_after_restarting_VM(self):
2068
2069 """
2070 Algo:
2071 1) Validate that required openstack service is up and running.
2072 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2073 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
2074 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
2075 4) Now boot image in the same created network using nova boot image command (example given below :-
2076 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2077 5) Wait till VM boots up and starts running.
2078 6) Verify that a VM is launched and running by using novaclient python API.
2079 7) Now ping to the VM from outside network which are internet network (global ping)
2080 8) verify that ping is successful
2081 9) Verify that flow is being added in ovs-switch in compute-node.
2082 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2083 11) Verify that cord-onos pushed flows to OVS switch.
2084 12) Restart the VM in service and repeat steps 7 to 11.
2085
2086 """
2087 pass
2088
2089 def test_cordvtn_creating_virtual_public_network_and_boot_image_connectivity_after_restarting_cord_onos(self):
2090
2091 """
2092 Algo:
2093 1) Validate that required openstack service is up and running.
2094 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2095 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
2096 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
2097 4) Now boot image in the same created network using nova boot image command (example given below :-
2098 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2099 5) Wait till VM boots up and starts running.
2100 6) Verify that a VM is launched and running by using novaclient python API.
2101 7) Now ping to the VM from outside network which are internet network (global ping)
2102 8) verify that ping is successful
2103 9) Verify that flow is being added in ovs-switch in compute-node.
2104 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2105 11) Verify that cord-onos pushed flows to OVS switch.
2106 12) Restart onos service container and repeat steps 7 to 11.
2107
2108 """
2109 pass
2110
2111 def test_cordvtn_creating_virtual_public_network_and_boot_image_connectivity_after_delete_and_recreate_VM(self):
2112
2113 """
2114 Algo:
2115 1) Validate that required openstack service is up and running.
2116 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2117 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
2118 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
2119 4) Now boot image in the same created network using nova boot image command (example given below :-
2120 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2121 5) Wait till VM boots up and starts running.
2122 6) Verify that a VM is launched and running by using novaclient python API.
2123 7) Now ping to the VM from outside network which are internet network (global ping)
2124 8) verify that ping is successful
2125 9) Verify that flow is being added in ovs-switch in compute-node.
2126 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2127 11) Verify that cord-onos pushed flows to OVS switch.
2128 12) Delete and re-create a VM in the same service and repeat steps 7 to 11.
2129
2130 """
2131 pass
2132
2133 def test_cordvtn_creating_virtual_public_network_and_boot_image_connectivity_after_delete_and_add_br_int_bridge(self):
2134
2135 """
2136 Algo:
2137 1) Validate that required openstack service is up and running.
2138 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2139 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as public network.
2140 (neutron net-create net-A-public, neutron subnet-create net-A-public 198.0.0.0/24).
2141 4) Now boot image in the same created network using nova boot image command (example given below :-
2142 $ nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2143 5) Wait till VM boots up and starts running.
2144 6) Verify that a VM is launched and running by using novaclient python API.
2145 7) Now ping to the VM from outside network which are internet network (global ping)
2146 8) verify that ping is successful
2147 9) Verify that flow is being added in ovs-switch in compute-node.
2148 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2149 11) Verify that cord-onos pushed flows to OVS switch.
2150 12) Delete a br_int bridge and repeat steps 7 to 11, (it should not ping)
2151 13) Add br_int bridge and repeat steps 7 to 11, (it should ping)
2152
2153 """
2154 pass
2155
2156 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_connectivity_after_restarting_VM(self):
2157
2158 """
2159 Algo:
2160 1) Validate that required openstack service is up and running.
2161 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2162 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2163 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2164 4) Now boot image in the same created network using nova boot image command (example given below :-
2165 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2166 5) Wait till VM boots up and starts running.
2167 6) Verify that a VM is launched and running by using novaclient python API.
2168 7) Now ping to the VM from compute node network which are launched a VM.
2169 8) verify that ping is successful
2170 9) Verify that flow is being added in ovs-switch in compute-node.
2171 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2172 11) Verify that cord-onos pushed flows to OVS switch.
2173 12) Restart the VM in service and repeat steps 7 to 11.
2174 """
2175 pass
2176
2177 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_connectivity_after_restarting_cord_onos(self):
2178
2179 """
2180 Algo:
2181 1) Validate that required openstack service is up and running.
2182 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2183 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2184 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2185 4) Now boot image in the same created network using nova boot image command (example given below :-
2186 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2187 5) Wait till VM boots up and starts running.
2188 6) Verify that a VM is launched and running by using novaclient python API.
2189 7) Now ping to the VM from compute node network which are launched a VM.
2190 8) verify that ping is successful
2191 9) Verify that flow is being added in ovs-switch in compute-node.
2192 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2193 11) Verify that cord-onos pushed flows to OVS switch.
2194 12) Restart the onos service and repeat steps 7 to 11.
2195 """
2196 pass
2197
2198 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_connectivity_after_delete_and_recreate_VM(self):
2199
2200 """
2201 Algo:
2202 1) Validate that required openstack service is up and running.
2203 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2204 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2205 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2206 4) Now boot image in the same created network using nova boot image command (example given below :-
2207 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2208 5) Wait till VM boots up and starts running.
2209 6) Verify that a VM is launched and running by using novaclient python API.
2210 7) Now ping to the VM from compute node network which are launched a VM.
2211 8) verify that ping is successful
2212 9) Verify that flow is being added in ovs-switch in compute-node.
2213 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2214 11) Verify that cord-onos pushed flows to OVS switch.
2215 12) Delete and re-create a VM in the same service and repeat steps 7 to 11.
2216 """
2217 pass
2218
2219 def test_cordvtn_creating_virtual_local_management_network_and_boot_image_connectivity_after_delete_and_add_br_int_bridge(self):
2220
2221 """
2222 Algo:
2223 1) Validate that required openstack service is up and running.
2224 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2225 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2226 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2227 4) Now boot image in the same created network using nova boot image command (example given below :-
2228 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2229 5) Wait till VM boots up and starts running.
2230 6) Verify that a VM is launched and running by using novaclient python API.
2231 7) Now ping to the VM from compute node network which are launched a VM.
2232 8) verify that ping is successful
2233 9) Verify that flow is being added in ovs-switch in compute-node.
2234 10) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2235 11) Verify that cord-onos pushed flows to OVS switch.
2236 12) Delete a br_int bridge and repeat steps 7 to 11, (it should not ping)
2237 13) Add br_int bridge and repeat steps 7 to 11, (it should ping)
2238 """
2239 pass
2240
2241 def test_cordvtn_creating_virtual_vlan_interface_local_management_network_and_boot_image_connectivity_after_restarting_VM(self):
2242
2243 """
2244 Algo:
2245 1) Validate that required openstack service is up and running.
2246 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2247 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2248 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2249 4) Now boot image in the same created network using nova boot image command (example given below :-
2250 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2251 5) Wait till VM boots up and starts running.
2252 6) Verify that a VM is launched and running by using novaclient python API.
2253 7) Create a virtual interface with vlan tag and local management ip on VM.
2254 8) Create a same virtual interface with valn tag and any local management ip on head node.
2255 9) Now ping to the VM from head node network which are launched a openstack service.
2256 10) verify that ping is successful
2257 11) Verify that flow is being added in ovs-switch in compute-node.
2258 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2259 13) Verify that cord-onos pushed flows to OVS switch.
2260 14) Restart the VM in service and repeat steps 9 to 13.
2261
2262 """
2263 pass
2264
2265 def test_cordvtn_creating_virtual_vlan_interface_local_management_network_and_boot_image_connectivity_after_restarting_cord_onos(self):
2266
2267 """
2268 Algo:
2269 1) Validate that required openstack service is up and running.
2270 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2271 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2272 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2273 4) Now boot image in the same created network using nova boot image command (example given below :-
2274 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2275 5) Wait till VM boots up and starts running.
2276 6) Verify that a VM is launched and running by using novaclient python API.
2277 7) Create a virtual interface with vlan tag and local management ip on VM.
2278 8) Create a same virtual interface with valn tag and any local management ip on head node.
2279 9) Now ping to the VM from head node network which are launched a openstack service.
2280 10) verify that ping is successful
2281 11) Verify that flow is being added in ovs-switch in compute-node.
2282 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2283 13) Verify that cord-onos pushed flows to OVS switch.
2284 14) Restart the ONOS service and repeat steps 9 to 13.
2285
2286 """
2287 pass
2288
2289 def test_cordvtn_creating_virtual_vlan_interface_local_management_network_and_boot_image_connectivity_after_delete_and_recreate_VM(self):
2290
2291 """
2292 Algo:
2293 1) Validate that required openstack service is up and running.
2294 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2295 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2296 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2297 4) Now boot image in the same created network using nova boot image command (example given below :-
2298 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2299 5) Wait till VM boots up and starts running.
2300 6) Verify that a VM is launched and running by using novaclient python API.
2301 7) Create a virtual interface with vlan tag and local management ip on VM.
2302 8) Create a same virtual interface with valn tag and any local management ip on head node.
2303 9) Now ping to the VM from head node network which are launched a openstack service.
2304 10) verify that ping is successful
2305 11) Verify that flow is being added in ovs-switch in compute-node.
2306 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2307 13) Verify that cord-onos pushed flows to OVS switch.
2308 14) Delete and re-create a VM in service and repeat steps 9 to 13.
2309
2310 """
2311 pass
2312
2313 def test_cordvtn_creating_virtual_vlan_interface_local_management_network_and_boot_image_connectivity_after_delete_and_add_br_int_bridge(self):
2314
2315 """
2316 Algo:
2317 1) Validate that required openstack service is up and running.
2318 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2319 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2320 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2321 4) Now boot image in the same created network using nova boot image command (example given below :-
2322 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2323 5) Wait till VM boots up and starts running.
2324 6) Verify that a VM is launched and running by using novaclient python API.
2325 7) Create a virtual interface with vlan tag and local management ip on VM.
2326 8) Create a same virtual interface with valn tag and any local management ip on head node.
2327 9) Now ping to the VM from head node network which are launched a openstack service.
2328 10) verify that ping is successful
2329 11) Verify that flow is being added in ovs-switch in compute-node.
2330 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2331 13) Verify that cord-onos pushed flows to OVS switch.
2332 14) Delete a br_int bridge and repeat steps 9 to 13, (it should not ping)
2333 15) Add br_int bridge and repeat steps 9 to 13, (it should ping)
2334
2335 """
2336 pass
2337
2338 def test_cordvtn_creating_virtual_vlan_interface_floating_local_management_network_and_boot_image_connectivity_after_restarting_VM(self):
2339
2340 """
2341 Algo:
2342 1) Validate that required openstack service is up and running.
2343 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2344 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2345 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2346 4) Now boot image in the same created network using nova boot image command (example given below :-
2347 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2348 5) Wait till VM boots up and starts running.
2349 6) Verify that a VM is launched and running by using novaclient python API.
2350 7) Create a virtual interface with vlan tag and local management floating ip on VM.
2351 8) Create a same virtual interface with valn tag and any local management floating ip on head node.
2352 9) Now ping to the VM from head node network which are launched a openstack service.
2353 10) verify that ping is successful
2354 11) Verify that flow is being added in ovs-switch in compute-node.
2355 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2356 13) Verify that cord-onos pushed flows to OVS switch.
2357 14) Restart the VM in service and repeat steps 9 to 13.
2358 """
2359 pass
2360
2361 def test_cordvtn_creating_virtual_vlan_interface_floating_local_management_network_and_boot_image_connectivity_after_restarting_cord_onos(self):
2362
2363 """
2364 Algo:
2365 1) Validate that required openstack service is up and running.
2366 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2367 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2368 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2369 4) Now boot image in the same created network using nova boot image command (example given below :-
2370 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2371 5) Wait till VM boots up and starts running.
2372 6) Verify that a VM is launched and running by using novaclient python API.
2373 7) Create a virtual interface with vlan tag and local management floating ip on VM.
2374 8) Create a same virtual interface with valn tag and any local management floating ip on head node.
2375 9) Now ping to the VM from head node network which are launched a openstack service.
2376 10) verify that ping is successful
2377 11) Verify that flow is being added in ovs-switch in compute-node.
2378 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2379 13) Verify that cord-onos pushed flows to OVS switch.
2380 14) Restart the ONOS service and repeat steps 9 to 13.
2381 """
2382 pass
2383
2384 def test_cordvtn_creating_virtual_vlan_interface_floating_local_management_network_and_boot_image_connectivity_after_delete_and_recreate_VM(self):
2385 """
2386 Algo:
2387 1) Validate that required openstack service is up and running.
2388 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2389 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2390 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2391 4) Now boot image in the same created network using nova boot image command (example given below :-
2392 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2393 5) Wait till VM boots up and starts running.
2394 6) Verify that a VM is launched and running by using novaclient python API.
2395 7) Create a virtual interface with vlan tag and local management floating ip on VM.
2396 8) Create a same virtual interface with valn tag and any local management floating ip on head node.
2397 9) Now ping to the VM from head node network which are launched a openstack service.
2398 10) verify that ping is successful
2399 11) Verify that flow is being added in ovs-switch in compute-node.
2400 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2401 13) Verify that cord-onos pushed flows to OVS switch.
2402 14) Delete and re-create a VM in service and repeat steps 9 to 13.
2403 """
2404 pass
2405
2406 def test_cordvtn_creating_virtual_vlan_interface_floating_local_management_network_and_boot_image_connectivity_after_delete_and_add_br_int_bridge(self):
2407
2408 """
2409 Algo:
2410 1) Validate that required openstack service is up and running.
2411 2) Validate that compute node is being created and get compute node name by using "sudo cord prov list".
2412 3) From CORD-Test container, use python-neutron client and create network with name - NetA with an IP as local management network.
2413 (neutron net-create net-A-management, neutron subnet-create net-A-management 172.27.0.0/24 -gateway 172.27.0.1).
2414 4) Now boot image in the same created network using nova boot image command (example given below :-
2415 nova boot --image 3e2d7760-774a-4a16-be07-aaccafa779b6 --flavor 1 --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de --nic net-id=8bc19377-f493-4cad-af23-45fb299da9de net-A-vm-01
2416 5) Wait till VM boots up and starts running.
2417 6) Verify that a VM is launched and running by using novaclient python API.
2418 7) Create a virtual interface with vlan tag and local management floating ip on VM.
2419 8) Create a same virtual interface with valn tag and any local management floating ip on head node.
2420 9) Now ping to the VM from head node network which are launched a openstack service.
2421 10) verify that ping is successful
2422 11) Verify that flow is being added in ovs-switch in compute-node.
2423 12) Verify that onos-ml2 plugin syncs through ReST call from openstack service neutron.
2424 13) Verify that cord-onos pushed flows to OVS switch.
2425 14) Delete a br_int bridge and repeat steps 9 to 13, (it should not ping)
2426 15) Add br_int bridge and repeat steps 9 to 13, (it should ping)
2427 """
2428 pass