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