From e2f93d49d740ceb5d5f2d7cdee5b03a7463311fa Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Thu, 21 Mar 2019 10:11:54 -0400 Subject: [PATCH] Move the KMIPProtocol from server to services This change moves the KMIPProtocol class from the server module to the services module. Because the client uses KMIPProtocol, and KMIPProtocol lived in the server module, the client would end up importing server libraries whenever it was used. If there are any issues with server dependencies, this would cause the client to fail for no good reason. This change now insulates the client from the server code base and prevents this case from happening. See #509 --- kmip/services/kmip_client.py | 2 +- kmip/services/{server => }/kmip_protocol.py | 0 kmip/tests/unit/services/test_kmip_protocol.py | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename kmip/services/{server => }/kmip_protocol.py (100%) diff --git a/kmip/services/kmip_client.py b/kmip/services/kmip_client.py index 262fe22..36309ae 100644 --- a/kmip/services/kmip_client.py +++ b/kmip/services/kmip_client.py @@ -52,7 +52,7 @@ from kmip.core.messages import messages from kmip.core.messages import payloads -from kmip.services.server.kmip_protocol import KMIPProtocol +from kmip.services.kmip_protocol import KMIPProtocol from kmip.core.config_helper import ConfigHelper diff --git a/kmip/services/server/kmip_protocol.py b/kmip/services/kmip_protocol.py similarity index 100% rename from kmip/services/server/kmip_protocol.py rename to kmip/services/kmip_protocol.py diff --git a/kmip/tests/unit/services/test_kmip_protocol.py b/kmip/tests/unit/services/test_kmip_protocol.py index f188da3..e84e43a 100644 --- a/kmip/tests/unit/services/test_kmip_protocol.py +++ b/kmip/tests/unit/services/test_kmip_protocol.py @@ -18,9 +18,9 @@ from testtools import TestCase import binascii -from kmip.services.server.kmip_protocol import KMIPProtocol -from kmip.services.server.kmip_protocol import RequestLengthMismatch -from kmip.services.server.kmip_protocol import KMIPProtocolFactory +from kmip.services.kmip_protocol import KMIPProtocol +from kmip.services.kmip_protocol import RequestLengthMismatch +from kmip.services.kmip_protocol import KMIPProtocolFactory class TestKMIPProtocol(TestCase):