Since SQLAlchemy 1.4, the method "Inspector.from_engine()" is
deprecated.
Error message:
"The from_engine() method on Inspector is deprecated and will be removed
in a future release. Please use the sqlalchemy.inspect() function on an
Engine or Connection in order to acquire an Inspector. (deprecated
since: 1.4)"
Minimum version of SQLAlchemy required is bumped to 1.4.23.
Change-Id: I6cf5944ccb3a0532cbf123ddc0d7df6b6de80af1
Closes-Bug: #1943155
Fix E402 (module level import not at top of file) pep8 errors
and no longer ignore new failures.
Trivialfix
Change-Id: If9a202f1f322b5b03966c692e33e94b7c872079b
Currently get_duplicate_l3_ha_port_bindings[1] is not postgres-compliant
because it's GROUP BY usage is not postgres-compliant: everything in the
SELECT list must be aggregated or in GROUP BY.
This change updates get_duplicate_l3_ha_port_bindings to respect
previous PostgreSQL rule.
[1] neutron.db.migration.alembic_migrations.versions.mitaka.expand\
.1df244e556f5_add_unique_ha_router_agent_port_bindings
Change-Id: Ie99dd31d695ab89814a86e50d45ababe53bd56fd
Closes-Bug: #1546731
It is expected that pair router_id and l3_agent_id will be unique
in table ha_router_agent_port_bindings. As it appeared that
duplicates can be added this change adds UniqueConstraint for
this columns.
Having duplicates is odd and leads to problems during sync_routers.
DBReferenceError will be caught create_ha_port_and_bind and
_bind_ha_router_to_agents(l3_agent_scheduler.py) as
L3HARouterAgentPortBinding are created with l3_agent_id=None
in _create_ha_port_binding (l3_hamode_db.py)
Change-Id: I7ac2283752deaa3d9601b83859a46b9e89940269
Partial-bug: #1499647