Merge "Revert "Fix Log.warn""
This commit is contained in:
commit
2195e9b42e
@ -27,12 +27,12 @@ keys = console
|
|||||||
keys = generic
|
keys = generic
|
||||||
|
|
||||||
[logger_root]
|
[logger_root]
|
||||||
level = WARNING
|
level = WARN
|
||||||
handlers = console
|
handlers = console
|
||||||
qualname =
|
qualname =
|
||||||
|
|
||||||
[logger_sqlalchemy]
|
[logger_sqlalchemy]
|
||||||
level = WARNING
|
level = WARN
|
||||||
handlers =
|
handlers =
|
||||||
qualname = sqlalchemy.engine
|
qualname = sqlalchemy.engine
|
||||||
|
|
||||||
|
@ -45,12 +45,11 @@ def upgrade():
|
|||||||
data_migrations.do_ha_ip_duplicate_entries_removal(session)
|
data_migrations.do_ha_ip_duplicate_entries_removal(session)
|
||||||
data_migrations.do_ha_ip_network_id_insertion(session)
|
data_migrations.do_ha_ip_network_id_insertion(session)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
util.warning("AIM schema present, but failed to import"
|
util.warn("AIM schema present, but failed to import AIM libraries"
|
||||||
"AIM libraries - HA IP duplicate entries"
|
" - HA IP duplicate entries removal not completed.")
|
||||||
"removal not completed.")
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
util.warning("Caught exception while migrating data in %s: %s"
|
util.warn("Caught exception while migrating data in %s: %s"
|
||||||
% ('apic_ml2_ha_ipaddress_to_port_owner', e))
|
% ('apic_ml2_ha_ipaddress_to_port_owner', e))
|
||||||
|
|
||||||
inspector = reflection.Inspector.from_engine(op.get_bind())
|
inspector = reflection.Inspector.from_engine(op.get_bind())
|
||||||
pk_constraint = inspector.get_pk_constraint(
|
pk_constraint = inspector.get_pk_constraint(
|
||||||
|
@ -43,11 +43,11 @@ def upgrade():
|
|||||||
session = sa.orm.Session(bind=bind, autocommit=True)
|
session = sa.orm.Session(bind=bind, autocommit=True)
|
||||||
data_migrations.do_sg_rule_remote_group_id_insertion(session)
|
data_migrations.do_sg_rule_remote_group_id_insertion(session)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
util.warning("AIM schema present, but failed to import AIM"
|
util.warn("AIM schema present, but failed to import AIM libraries"
|
||||||
"libraries - SG rules remote_group_id not inserted.")
|
" - SG rules remote_group_id not inserted.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
util.warning("Caught exception inserting SG rules remote_group_id:"
|
util.warn("Caught exception inserting SG rules remote_group_id: %s"
|
||||||
"%s" % e)
|
% e)
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
|
@ -43,10 +43,10 @@ def upgrade():
|
|||||||
session = sa.orm.Session(bind=bind, autocommit=True)
|
session = sa.orm.Session(bind=bind, autocommit=True)
|
||||||
data_migrations.do_apic_aim_security_group_migration(session)
|
data_migrations.do_apic_aim_security_group_migration(session)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
util.warning("AIM schema present, but failed to import AIM"
|
util.warn("AIM schema present, but failed to import AIM libraries"
|
||||||
"libraries - SG data not migrated.")
|
" - SG data not migrated.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
util.warning("Caught exception migrating SG data: %s" % e)
|
util.warn("Caught exception migrating SG data: %s" % e)
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
|
@ -72,8 +72,8 @@ def upgrade():
|
|||||||
session = sa.orm.Session(bind=bind, autocommit=True)
|
session = sa.orm.Session(bind=bind, autocommit=True)
|
||||||
data_migrations.do_apic_aim_persist_migration(session)
|
data_migrations.do_apic_aim_persist_migration(session)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
util.warning("AIM schema present, but failed to import AIM"
|
util.warn("AIM schema present, but failed to import AIM libraries"
|
||||||
"libraries - data not migrated.")
|
" - data not migrated.")
|
||||||
|
|
||||||
op.drop_table('apic_aim_addr_scope_extensions')
|
op.drop_table('apic_aim_addr_scope_extensions')
|
||||||
|
|
||||||
|
@ -172,8 +172,8 @@ def do_apic_aim_persist_migration(session):
|
|||||||
_add_address_scope_mapping(
|
_add_address_scope_mapping(
|
||||||
session, scope_db.id, vrf, vrf_owned)
|
session, scope_db.id, vrf, vrf_owned)
|
||||||
else:
|
else:
|
||||||
alembic_util.warning(
|
alembic_util.warn(
|
||||||
"No AIM VRF found for address scope: %s" % scope_db)
|
"No AIM VRF found for address scope: %s" % scope_db)
|
||||||
|
|
||||||
# Migrate networks.
|
# Migrate networks.
|
||||||
net_dbs = (session.query(models_v2.Network)
|
net_dbs = (session.query(models_v2.Network)
|
||||||
@ -237,9 +237,8 @@ def do_apic_aim_persist_migration(session):
|
|||||||
if bd and epg and vrf:
|
if bd and epg and vrf:
|
||||||
_add_network_mapping(session, net_db.id, bd, epg, vrf)
|
_add_network_mapping(session, net_db.id, bd, epg, vrf)
|
||||||
elif not net_db.external:
|
elif not net_db.external:
|
||||||
alembic_util.warning(
|
alembic_util.warn(
|
||||||
"AIM BD, EPG or VRF not found for"
|
"AIM BD, EPG or VRF not found for network: %s" % net_db)
|
||||||
"network: %s" % net_db)
|
|
||||||
|
|
||||||
alembic_util.msg(
|
alembic_util.msg(
|
||||||
"Finished data migration for apic_aim mechanism driver persistence.")
|
"Finished data migration for apic_aim mechanism driver persistence.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user