Use openstack.common.importutils.
Use import_class(), import_object(), and import_module() from openstack-common's importutils module. The equivalent functions have been removed from nova.utils. A few modules had import order cleaned up in passing, as well. My initial motivation for this was to remove some more usage of nova bits from nova.rpc as another step towards being able to move nova.rpc import openstack-common. Since I was pulling importutils into nova, I went ahead and converted the whole thing. Change-Id: I7c7786cf0001bcd06db52b9a99ff4284a3f6c6fa
This commit is contained in:
@@ -20,6 +20,7 @@ import json
|
||||
from nova import context
|
||||
from nova import exception
|
||||
from nova import flags
|
||||
from nova.openstack.common import exception as common_exception
|
||||
from nova.scheduler import filters
|
||||
from nova import test
|
||||
from nova.tests.scheduler import fakes
|
||||
@@ -64,7 +65,7 @@ class HostFiltersTestCase(test.TestCase):
|
||||
self.assertEqual(len(classes), 1 + len(self.class_map))
|
||||
|
||||
def test_get_filter_classes_raises_on_invalid_classes(self):
|
||||
self.assertRaises(exception.ClassNotFound,
|
||||
self.assertRaises(common_exception.NotFound,
|
||||
filters.get_filter_classes,
|
||||
['nova.tests.scheduler.test_host_filters.NoExist'])
|
||||
self.assertRaises(exception.ClassNotFound,
|
||||
|
||||
Reference in New Issue
Block a user