components/openstack/neutron/files/evs/migrate/evs-neutron-migration.py
branchs11-update
changeset 4415 a4e14565d114
parent 4364 7e498582e773
child 4570 60ae9e6df0ca
--- 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 = ''