Merge pull request #396 from OpenKMIP/feat/remove-client-base

Remove legacy base class code for the original client
This commit is contained in:
Peter Hamilton 2018-02-26 15:33:06 -05:00 committed by GitHub
commit c9c72e172e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 56 deletions

View File

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

View File

@ -39,7 +39,6 @@ from kmip.core.enums import Operation as OperationEnum
from kmip.core.factories.credentials import CredentialFactory from kmip.core.factories.credentials import CredentialFactory
from kmip.core import objects from kmip.core import objects
from kmip.core.server import KMIP
from kmip.core.messages.contents import Authentication from kmip.core.messages.contents import Authentication
from kmip.core.messages.contents import BatchCount 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')) 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, def __init__(self, host=None, port=None, keyfile=None,
certfile=None, certfile=None,
@ -74,7 +73,6 @@ class KMIPProxy(KMIP):
do_handshake_on_connect=None, do_handshake_on_connect=None,
suppress_ragged_eofs=None, suppress_ragged_eofs=None,
username=None, password=None, timeout=30, config='client'): username=None, password=None, timeout=30, config='client'):
super(KMIPProxy, self).__init__()
self.logger = logging.getLogger(__name__) self.logger = logging.getLogger(__name__)
self.credential_factory = CredentialFactory() self.credential_factory = CredentialFactory()
self.config = config self.config = config