21101942 EVS to Neutron migration script should check for empty IPnets and VPorts list s11-update
authorPadma Dakoju <padma.dakoju@oracle.com>
Thu, 04 Jun 2015 23:43:06 -0700
branchs11-update
changeset 4415 a4e14565d114
parent 4414 bcb5766d82d0
child 4418 7ae5fd823a4b
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 Jun 04 15:40:26 2015 -0700
+++ b/components/openstack/neutron/files/evs/migrate/evs-neutron-migration.py	Thu Jun 04 23:43:06 2015 -0700
@@ -180,6 +180,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
@@ -237,6 +239,8 @@
             create_db_subnet(sub)
 
         # Populate ports table
+        if not e.vports:
+            continue
         for j in e.vports:
             device_owner = ''
             device_id = ''