diff --git a/Authors b/Authors index 8045d41f60f7..0fcb1fdf058d 100644 --- a/Authors +++ b/Authors @@ -124,6 +124,7 @@ Loganathan Parthipan Lorin Hochstein Lvov Maxim Mandell Degerness +Mandar Vaze Mark McClain Mark McLoughlin Mark Washenberger diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 0f1aaa80b446..49d3df0f98fc 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -3264,7 +3264,7 @@ def migration_get_all_unconfirmed(context, confirm_window, session=None): return model_query(context, models.Migration, session=session, read_deleted="yes").\ filter(models.Migration.updated_at <= confirm_window).\ - filter_by(status="FINISHED").\ + filter_by(status="finished").\ all() diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index d54fcda81544..b7b9531c3b7b 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -89,7 +89,7 @@ class DbApiTestCase(test.TestCase): # Ensure one migration older than 10 seconds is returned. updated_at = datetime.datetime(2000, 01, 01, 12, 00, 00) - values = {"status": "FINISHED", "updated_at": updated_at} + values = {"status": "finished", "updated_at": updated_at} migration = db.migration_create(ctxt, values) results = db.migration_get_all_unconfirmed(ctxt, 10) self.assertEqual(1, len(results)) @@ -97,7 +97,7 @@ class DbApiTestCase(test.TestCase): # Ensure the new migration is not returned. updated_at = datetime.datetime.utcnow() - values = {"status": "FINISHED", "updated_at": updated_at} + values = {"status": "finished", "updated_at": updated_at} migration = db.migration_create(ctxt, values) results = db.migration_get_all_unconfirmed(ctxt, 10) self.assertEqual(0, len(results))