add exceptions package
As per the discussion in [1] extension specific exceptions that are not API facing would best live outside the api-def itself. This patch suggests added an exceptions package that will allow per-component exception definitions as sub-modules (ex: neutron_lib.exceptions.l3). The existing exceptions from neutron_lib.exceptions.py are defined in neutron_lib.exceptions.__init__ and don't impact existing consumers import them. [1] https://review.openstack.org/#/c/423289/ Change-Id: Ie0797f25b99c68bdf5cc1a58c6b906cf850699a4
This commit is contained in:
parent
12c3a82756
commit
b328eff733
@ -20,7 +20,7 @@ Tests for `neutron_lib.callback.exceptions` module.
|
|||||||
import functools
|
import functools
|
||||||
|
|
||||||
import neutron_lib.callbacks.exceptions as ex
|
import neutron_lib.callbacks.exceptions as ex
|
||||||
from neutron_lib.tests.unit import test_exceptions
|
from neutron_lib.tests.unit.exceptions import test_exceptions
|
||||||
|
|
||||||
|
|
||||||
class TestCallbackExceptions(test_exceptions.TestExceptions):
|
class TestCallbackExceptions(test_exceptions.TestExceptions):
|
||||||
|
0
neutron_lib/tests/unit/exceptions/__init__.py
Normal file
0
neutron_lib/tests/unit/exceptions/__init__.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- A new ``neutron_lib.exceptions`` package is now available where the
|
||||||
|
existing definitions from the ``exceptions`` module are now in
|
||||||
|
``neutron_lib.exceptions.__init__`` and subsequent per-component
|
||||||
|
exceptions can be created in their own exceptions sub-module.
|
Loading…
x
Reference in New Issue
Block a user