From 2e35d7177830e16abd3e919510437f48c6691d51 Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Sat, 4 May 2013 23:38:51 +0400 Subject: Session cleanup for db.floating_ip_* methods Session objects shouldn't be used in public db.api methods because db.api should be independent of db implementation. Remove session parameter from: floating_ip_create floating_ip_get_by_fixed_ip_id I didn't remove session parameter from floating_ip_count_by_project because it causes changes in nova.quota. So it will be done in separated patch. Cleanup test for floating_ip_count_by_project removed 3rd parameter (it should be session, but it is not required). blueprint db-session-cleanup Change-Id: Ifdf9edb17746a8e5b486317c917ea69016a2b99d --- nova/tests/test_db_api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index e298b7e03..cfed3ab3b 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -2752,8 +2752,7 @@ class FloatingIpTestCase(test.TestCase, ModelsObjectComparatorMixin): ctxt = context.RequestContext(user_id='a', project_id='abc', is_admin=False) self.assertRaises(exception.NotAuthorized, - db.floating_ip_count_by_project, - ctxt, 'def', 'does_not_matter') + db.floating_ip_count_by_project, ctxt, 'def') def _create_fixed_ip(self, params): default_params = {'address': '192.168.0.1'} -- cgit