21101942 EVS to Neutron migration script should check for empty IPnets and VPorts list s11u2-sru
authorPadma Dakoju <padma.dakoju@oracle.com>
Fri, 12 Jun 2015 08:10:09 -0700
branchs11u2-sru
changeset 4473 9ef7eed37f24
parent 4471 22a03badd2b2
child 4475 ae2aef15d437
21101942 EVS to Neutron migration script should check for empty IPnets and VPorts list
components/openstack/neutron/files/evs/migrate/evs-neutron-migration.py
--- a/components/openstack/neutron/files/evs/migrate/evs-neutron-migration.py	Thu May 28 10:11:41 2015 -0700
+++ b/components/openstack/neutron/files/evs/migrate/evs-neutron-migration.py	Fri Jun 12 08:10:09 2015 -0700
@@ -185,6 +185,8 @@
             continue  # No need to iterate over subnets and ports
 
         # Populate subnets table
+        if not e.ipnets:
+            continue
         for i in e.ipnets:
             cidr = None
             gateway_ip = None
@@ -242,6 +244,8 @@
             create_db_subnet(sub)
 
         # Populate ports table
+        if not e.vports:
+            continue
         for j in e.vports:
             device_owner = ''
             device_id = ''