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