2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 15:53:36 +00:00

Adding the KmipEngine

This change adds the KmipEngine, the core processing component of the
KmipServer. The KmipEngine contains the KMIP application logic and
handles process request messages by batch. The engine handles logging
and error handling throughout the processing stack.
    
New server exceptions are added to handle new error cases. A test suite
is included.
This commit is contained in:
Peter
2016-03-08 15:15:17 -05:00
parent 0a7b0262a6
commit 55113a70f8
3 changed files with 1232 additions and 2 deletions

View File

@@ -53,7 +53,8 @@ class CryptographicFailure(KmipError):
"""
super(CryptographicFailure, self).__init__(
reason=enums.ResultReason.CRYPTOGRAPHIC_FAILURE,
message=message)
message=message
)
class InvalidField(KmipError):
@@ -70,7 +71,44 @@ class InvalidField(KmipError):
"""
super(InvalidField, self).__init__(
reason=enums.ResultReason.INVALID_FIELD,
message=message)
message=message
)
class InvalidMessage(KmipError):
"""
An error generated when an invalid message is processed.
"""
def __init__(self, message):
"""
Create an InvalidMessage exception.
Args:
message (string): A string containing information about the error.
"""
super(InvalidMessage, self).__init__(
reason=enums.ResultReason.INVALID_MESSAGE,
message=message
)
class OperationNotSupported(KmipError):
"""
An error generated when an unsupported operation is invoked.
"""
def __init__(self, message):
"""
Create an OperationNotSupported exception.
Args:
message (string): A string containing information about the error.
"""
super(OperationNotSupported, self).__init__(
reason=enums.ResultReason.OPERATION_NOT_SUPPORTED,
message=message
)
class InvalidKmipEncoding(Exception):