Only add SVI when extensions are present
Commit d75ce445e7
added
the SVI extension to networks. These should not be applied
when the legacy plugin is used. Check for the presence of
extensions only used in the merged plugin before applying
the SVI extension to the resource.
Change-Id: Ib0bf8028e39b897f460c7eb374ed8d2d64fdc516
This commit is contained in:
parent
66964dc82f
commit
438c4feea0
|
@ -51,6 +51,10 @@ def upgrade():
|
|||
net_dbs = (session.query(models_v2.Network)
|
||||
.options(lazyload('*')).all())
|
||||
for net_db in net_dbs:
|
||||
# Skip applying this update if using a legacy plugin
|
||||
if not hasattr(net_db, 'aim_extension_mapping') or (
|
||||
net_db.aim_extension_mapping is None):
|
||||
continue
|
||||
util.msg("Migrating network: %s" % net_db)
|
||||
# If this update is successful then it means its an external
|
||||
# network with its DN set.
|
||||
|
|
Loading…
Reference in New Issue