diff --git a/neutron_lib/clients/__init__.py b/neutron_lib/placement/__init__.py similarity index 100% rename from neutron_lib/clients/__init__.py rename to neutron_lib/placement/__init__.py diff --git a/neutron_lib/clients/placement.py b/neutron_lib/placement/client.py similarity index 100% rename from neutron_lib/clients/placement.py rename to neutron_lib/placement/client.py diff --git a/neutron_lib/tests/unit/clients/test_placement.py b/neutron_lib/tests/unit/placement/test_client.py similarity index 99% rename from neutron_lib/tests/unit/clients/test_placement.py rename to neutron_lib/tests/unit/placement/test_client.py index 42bfae5dd..cc479124e 100644 --- a/neutron_lib/tests/unit/clients/test_placement.py +++ b/neutron_lib/tests/unit/placement/test_client.py @@ -17,9 +17,9 @@ from keystoneauth1 import exceptions as ks_exc from oslo_utils import uuidutils from neutron_lib._i18n import _ -from neutron_lib.clients import placement from neutron_lib.exceptions import placement as n_exc from neutron_lib import fixture +from neutron_lib.placement import client as place_client from neutron_lib.tests import _base as base @@ -46,8 +46,8 @@ class TestPlacementAPIClient(base.BaseTestCase): config = mock.Mock() config.region_name = 'region_name' self.openstack_api_version = ( - placement.PLACEMENT_API_LATEST_SUPPORTED) - self.placement_api_client = placement.PlacementAPIClient( + place_client.PLACEMENT_API_LATEST_SUPPORTED) + self.placement_api_client = place_client.PlacementAPIClient( config, self.openstack_api_version) self.placement_fixture = self.useFixture( fixture.PlacementAPIClientFixture(self.placement_api_client)) diff --git a/neutron_lib/tests/unit/test_fixture.py b/neutron_lib/tests/unit/test_fixture.py index e4ca0b74e..e8cc73cc7 100644 --- a/neutron_lib/tests/unit/test_fixture.py +++ b/neutron_lib/tests/unit/test_fixture.py @@ -19,9 +19,9 @@ from oslotest import base from neutron_lib.api import attributes from neutron_lib.api.definitions import port from neutron_lib.callbacks import registry -from neutron_lib.clients import placement from neutron_lib.db import model_base from neutron_lib import fixture +from neutron_lib.placement import client as place_client from neutron_lib.plugins import directory from neutron_lib.tests.unit.api import test_attributes @@ -128,7 +128,7 @@ class APIDefinitionFixtureTestCase(base.BaseTestCase): class PlacementAPIClientFixtureTestCase(base.BaseTestCase): def _create_client_and_fixture(self): - placement_client = placement.PlacementAPIClient(mock.Mock()) + placement_client = place_client.PlacementAPIClient(mock.Mock()) placement_fixture = self.useFixture( fixture.PlacementAPIClientFixture(placement_client)) return placement_client, placement_fixture diff --git a/releasenotes/notes/placement-client-move-9f292ae2067c119c.yaml b/releasenotes/notes/placement-client-move-9f292ae2067c119c.yaml new file mode 100644 index 000000000..f601dad73 --- /dev/null +++ b/releasenotes/notes/placement-client-move-9f292ae2067c119c.yaml @@ -0,0 +1,7 @@ +--- +other: + - | + The ``PlacementAPIClient`` class is moved from + ``neutron_lib.clients.placement`` to ``neutron_lib.placement.client`` + in order to consolidate all Placement related logic under sub-package + ``neutron_lib.placement``. \ No newline at end of file