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