config/sysinv/sysinv/sysinv/sysinv/db
Thomas Gao 6f162c3422 Fixed address interface foreign key inconsistency
Foreign key in sysinv.object.address.Address is `interface_uuid`,
which is inconsistent with the foreign key `interface_id` defined
in the database schema. This fix corrected that.

Added a unit test to verify that addresses associated with an interface
could be deleted.

Additionally wrote a set of TODO unit tests blocked by
the bug: tested delete address for orphaned-routes case, unlocked
host state, and the case where address is allocated from pool.

Modified interface querying mechanism to look up all interfaces.
This modification is necessary because the current implementation of
add_interface_filter only looks up those of type ethernet, ae and
vlan. Attempting to get an virtual-type interface will raise an
exception, causing Jenkins installation to fail.

After a visual inspection of interface_uuid occurrences, fixed a few
other occurrences of bad address.interface_uuid that are not caught
by the unit test. Added new unit test suites in place to cover the
code paths.

Closes-Bug: 1861131

Change-Id: I6f2449bbbb69d6f2353e521bfcd138d880ce878f
Signed-off-by: Thomas Gao <Thomas.Gao@windriver.com>
2020-03-03 16:50:12 -05:00
..
sqlalchemy Fixed address interface foreign key inconsistency 2020-03-03 16:50:12 -05:00
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
api.py Deprecate sysinv.openstack.common.db in favor of oslo_db 2020-02-07 11:55:49 -06:00
migration.py Sysinv. Cleanup import statements for pep8 2018-06-29 13:43:53 -04:00