Placement client: move to neutron_lib.placement

Move neutron_lib.clients.placement to neutron_lib.placement.client
with the intent of consolidating all Placement code under
neutron_lib.placement.

Change-Id: I48babd7e8d9fddb4c072f12515676dff1c08ef17
Related-Bug: #1578989
This commit is contained in:
Bence Romsics 2018-08-16 14:37:55 +02:00
parent 74c62da3b5
commit d32e570361
5 changed files with 12 additions and 5 deletions

View File

@ -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))

View File

@ -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

View File

@ -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``.