21101942 EVS to Neutron migration script should check for empty IPnets and VPorts list
authorPadma Dakoju <padma.dakoju@oracle.com>
Thu, 04 Jun 2015 10:56:50 -0700
changeset 4409 5a016b00883a
parent 4408 47b0133297d6
child 4410 79a50ebfb076
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 09:10:36 2015 -0700
+++ b/components/openstack/neutron/files/evs/migrate/evs-neutron-migration.py	Thu Jun 04 10:56:50 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 = ''