Commit Graph

7 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez 41846a6e8b [sqlalchemy-20] The Connection.connect() method is considered legacy
Closes-Bug: #2008227
Change-Id: I3dfa2688f7288dda43883b3cfba45e5f15f182fb
2023-03-01 14:36:51 +00:00
Rodolfo Alonso Hernandez 42fda206e9 Replace "Inspector.from_engine()" with "sqlalchemy.inspect()"
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
2021-09-23 13:41:50 +00:00
Brian Haley de243a3513 Fix E402 pep8 errors
Fix E402 (module level import not at top of file) pep8 errors
and no longer ignore new failures.

Trivialfix

Change-Id: If9a202f1f322b5b03966c692e33e94b7c872079b
2018-04-20 18:13:07 +00:00
Henry Gessau ae5bad49cc Use exceptions from neutron-lib
Related-Blueprint: neutron-lib

Change-Id: Ia014468bd621c4ee6aea95bf19328c61070174c4
2016-04-21 21:29:44 -04:00
Cedric Brandily 77a9c1c0d4 Fix GROUP BY usage for PostgreSQL in migrations
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
2016-02-17 21:25:46 +01:00
armando-migliaccio 13fe6af8a2 Address i18n related deprecation warnings
Unit tests logs show trace [1]. Right now it is just
noise, but this is a time bomb waiting to blow up
into someone's face.

[1] http://logs.openstack.org/55/252755/24/check/gate-neutron-python27-constraints/d78face/console.html#_2016-02-03_03_29_52_992

Change-Id: I24d3de2ee6b1209f0e86f8fb953aab18bae8cc98
2016-02-02 22:13:18 -08:00
Ann Kamyshnikova 756864270a Add UniqueConstraint in L3HARouterAgentPortBinding
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
2016-01-29 19:47:45 +03:00