diff --git a/controllers/servers/csi/controller_server/__init__.py b/controllers/servers/csi/controller_server/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/controllers/servers/csi/csi_controller_server.py b/controllers/servers/csi/controller_server/csi_controller_server.py similarity index 100% rename from controllers/servers/csi/csi_controller_server.py rename to controllers/servers/csi/controller_server/csi_controller_server.py diff --git a/controllers/servers/csi/volume_group_server.py b/controllers/servers/csi/controller_server/volume_group_server.py similarity index 100% rename from controllers/servers/csi/volume_group_server.py rename to controllers/servers/csi/controller_server/volume_group_server.py diff --git a/controllers/servers/csi/main.py b/controllers/servers/csi/main.py index 830253f26..43e779ff9 100644 --- a/controllers/servers/csi/main.py +++ b/controllers/servers/csi/main.py @@ -10,8 +10,8 @@ from controllers.common.csi_logger import set_log_level from controllers.common.settings import CSI_CONTROLLER_SERVER_WORKERS from controllers.servers.csi.server_manager import ServerManager -from controllers.servers.csi.csi_controller_server import CSIControllerServicer -from controllers.servers.csi.volume_group_server import VolumeGroupControllerServicer +from controllers.servers.csi.controller_server.csi_controller_server import CSIControllerServicer +from controllers.servers.csi.controller_server.volume_group_server import VolumeGroupControllerServicer from controllers.servers.csi.csi_addons_server.replication_controller_servicer import ReplicationControllerServicer diff --git a/controllers/tests/controller_server/controller_server/__init__.py b/controllers/tests/controller_server/controller_server/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/controllers/tests/controller_server/csi_controller_server_test.py b/controllers/tests/controller_server/controller_server/csi_controller_server_test.py similarity index 97% rename from controllers/tests/controller_server/csi_controller_server_test.py rename to controllers/tests/controller_server/controller_server/csi_controller_server_test.py index 25222131b..6196ad57c 100644 --- a/controllers/tests/controller_server/csi_controller_server_test.py +++ b/controllers/tests/controller_server/controller_server/csi_controller_server_test.py @@ -11,7 +11,7 @@ import controllers.servers.settings as servers_settings from controllers.array_action.array_action_types import ObjectIds from controllers.array_action.array_mediator_xiv import XIVArrayMediator -from controllers.servers.csi.csi_controller_server import CSIControllerServicer +from controllers.servers.csi.controller_server.csi_controller_server import CSIControllerServicer from controllers.servers.csi.sync_lock import SyncLock from controllers.tests import utils from controllers.tests.common.test_settings import (CLONE_VOLUME_NAME, @@ -30,7 +30,7 @@ from controllers.tests.controller_server.common import mock_get_agent, mock_array_type, mock_mediator from controllers.tests.utils import ProtoBufMock -CONTROLLER_SERVER_PATH = "controllers.servers.csi.csi_controller_server" +CONTROLLER_SERVER_PATH = "controllers.servers.csi.controller_server.csi_controller_server" class BaseControllerSetUp(unittest.TestCase): @@ -916,7 +916,7 @@ def test_delete_volume_invalid_volume_id(self): self.assertEqual(self.context.code, grpc.StatusCode.OK) - @patch("controllers.servers.csi.csi_controller_server.get_agent") + @patch("controllers.servers.csi.controller_server.csi_controller_server.get_agent") def test_delete_volume_with_array_connection_exception(self, storage_agent): storage_agent.side_effect = [Exception("a_enter error")] diff --git a/controllers/tests/controller_server/volume_group_server_test.py b/controllers/tests/controller_server/controller_server/volume_group_server_test.py similarity index 97% rename from controllers/tests/controller_server/volume_group_server_test.py rename to controllers/tests/controller_server/controller_server/volume_group_server_test.py index 86901b761..16351425e 100644 --- a/controllers/tests/controller_server/volume_group_server_test.py +++ b/controllers/tests/controller_server/controller_server/volume_group_server_test.py @@ -7,15 +7,15 @@ from controllers.array_action import errors as array_errors from controllers.servers import settings as servers_settings -from controllers.servers.csi.volume_group_server import VolumeGroupControllerServicer +from controllers.servers.csi.controller_server.volume_group_server import VolumeGroupControllerServicer from controllers.tests import utils from controllers.tests.common.test_settings import SECRET, VOLUME_GROUP_NAME, NAME_PREFIX, REQUEST_VOLUME_GROUP_ID, \ VOLUME_GROUP_UID, REQUEST_VOLUME_ID, VOLUME_UID, REQUEST_REAL_VOLUME_ID, REAL_NGUID from controllers.tests.controller_server.common import mock_array_type, mock_mediator, mock_get_agent -from controllers.tests.controller_server.csi_controller_server_test import CommonControllerTest +from controllers.tests.controller_server.controller_server.csi_controller_server_test import CommonControllerTest from controllers.tests.utils import ProtoBufMock -VG_CONTROLLER_SERVER_PATH = "controllers.servers.csi.volume_group_server" +VG_CONTROLLER_SERVER_PATH = "controllers.servers.csi.controller_server.volume_group_server" class BaseVgControllerSetUp(unittest.TestCase): diff --git a/controllers/tests/controller_server/csi_addons/__init__.py b/controllers/tests/controller_server/csi_addons/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/controllers/tests/controller_server/addons_server_test.py b/controllers/tests/controller_server/csi_addons/addons_server_test.py similarity index 99% rename from controllers/tests/controller_server/addons_server_test.py rename to controllers/tests/controller_server/csi_addons/addons_server_test.py index 2b9c13c05..03fb6d9c6 100644 --- a/controllers/tests/controller_server/addons_server_test.py +++ b/controllers/tests/controller_server/csi_addons/addons_server_test.py @@ -13,7 +13,7 @@ OTHER_OBJECT_INTERNAL_ID, REPLICATION_NAME, SYSTEM_ID, COPY_TYPE, SECRET_USERNAME_VALUE, SECRET_PASSWORD_VALUE, \ SECRET_MANAGEMENT_ADDRESS_VALUE, DUMMY_VOLUME_GROUP from controllers.tests.controller_server.common import mock_get_agent -from controllers.tests.controller_server.csi_controller_server_test import (CommonControllerTest) +from controllers.tests.controller_server.controller_server.csi_controller_server_test import (CommonControllerTest) from controllers.tests.utils import ProtoBufMock ADDON_SERVER_PATH = "controllers.servers.csi.csi_addons_server.replication_controller_servicer" diff --git a/controllers/tests/controller_server/utils_test.py b/controllers/tests/controller_server/utils_test.py index 4e6dc4ad5..ce5126c96 100644 --- a/controllers/tests/controller_server/utils_test.py +++ b/controllers/tests/controller_server/utils_test.py @@ -14,11 +14,11 @@ from controllers.common.settings import SPACE_EFFICIENCY_DEDUPLICATED_COMPRESSED, SPACE_EFFICIENCY_NONE, \ SPACE_EFFICIENCY_DEDUPLICATED, SPACE_EFFICIENCY_THIN from controllers.servers import settings as controller_config -from controllers.servers.csi.csi_controller_server import CSIControllerServicer +from controllers.servers.csi.controller_server.csi_controller_server import CSIControllerServicer from controllers.servers.errors import ObjectIdError, ValidationException, InvalidNodeId from controllers.tests import utils as test_utils from controllers.tests.common.test_settings import DUMMY_POOL1, SECRET_USERNAME_VALUE, SECRET_PASSWORD_VALUE, ARRAY -from controllers.tests.controller_server.csi_controller_server_test import ProtoBufMock +from controllers.tests.controller_server.controller_server.csi_controller_server_test import ProtoBufMock from controllers.tests.utils import get_fake_secret_config