From fc2ff5d04c9f0a6e1f8ba8dfbf4bdb1ef4d7d9cf Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Mon, 26 Feb 2018 15:02:42 -0500 Subject: [PATCH] Remove legacy base class code for the original client This change removes the legacy KMIP base class that was originally used for the KMIPProxy client. The base class simply defined the KMIP operation methods that the client should support. It has not been actively used to guide client development for some time and now just clutters up the code base. The KMIPProxy class has been updated to remove any reference to this original base class. --- kmip/core/server.py | 53 ------------------------------------ kmip/services/kmip_client.py | 4 +-- 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 kmip/core/server.py diff --git a/kmip/core/server.py b/kmip/core/server.py deleted file mode 100644 index 0525a5b..0000000 --- a/kmip/core/server.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - - -class KMIP(object): - - def __init__(self): - pass - - def create(self, object_type, template_attribute, credential=None): - raise NotImplementedError() - - def create_key_pair(self, common_template_attribute, - private_key_template_attribute, - public_key_template_attribute): - raise NotImplementedError() - - def register(self, object_type, template_attribute, secret, - credential=None): - raise NotImplementedError() - - def rekey_key_pair(self, private_key_unique_identifier, - offset, common_template_attribute, - private_key_template_attribute, - public_key_template_attribute): - raise NotImplementedError() - - def get(self, uuid=None, key_format_type=None, key_compression_type=None, - key_wrapping_specification=None, credential=None): - raise NotImplementedError() - - def destroy(self, uuid, credential=None): - raise NotImplementedError() - - def locate(self, maximum_items=None, storate_status_mask=None, - object_group_member=None, attributes=None, - credential=None): - raise NotImplementedError() - - def discover_versions(self, protocol_versions=None): - raise NotImplementedError() diff --git a/kmip/services/kmip_client.py b/kmip/services/kmip_client.py index 5b84e20..eff7d6c 100644 --- a/kmip/services/kmip_client.py +++ b/kmip/services/kmip_client.py @@ -39,7 +39,6 @@ from kmip.core.enums import Operation as OperationEnum from kmip.core.factories.credentials import CredentialFactory from kmip.core import objects -from kmip.core.server import KMIP from kmip.core.messages.contents import Authentication from kmip.core.messages.contents import BatchCount @@ -66,7 +65,7 @@ FILE_PATH = os.path.dirname(os.path.abspath(__file__)) CONFIG_FILE = os.path.normpath(os.path.join(FILE_PATH, '../kmipconfig.ini')) -class KMIPProxy(KMIP): +class KMIPProxy: def __init__(self, host=None, port=None, keyfile=None, certfile=None, @@ -74,7 +73,6 @@ class KMIPProxy(KMIP): do_handshake_on_connect=None, suppress_ragged_eofs=None, username=None, password=None, timeout=30, config='client'): - super(KMIPProxy, self).__init__() self.logger = logging.getLogger(__name__) self.credential_factory = CredentialFactory() self.config = config