mirror of
https://github.com/openkmip/pykmip
synced 2025-12-15 07:43:26 +00:00
Adding KmipEngine support for Get
This change adds support for the Get operation to the KmipEngine. New exceptions and test cases are included.
This commit is contained in:
@@ -129,6 +129,44 @@ class ItemNotFound(KmipError):
|
||||
)
|
||||
|
||||
|
||||
class KeyCompressionTypeNotSupported(KmipError):
|
||||
"""
|
||||
An error generated when dealing with unsupported key compression types
|
||||
and operations.
|
||||
"""
|
||||
|
||||
def __init__(self, message):
|
||||
"""
|
||||
Create a KeyCompressionTypeNotSupported exception.
|
||||
|
||||
Args:
|
||||
message (string): A string containing information about the error.
|
||||
"""
|
||||
super(KeyCompressionTypeNotSupported, self).__init__(
|
||||
reason=enums.ResultReason.KEY_COMPRESSION_TYPE_NOT_SUPPORTED,
|
||||
message=message
|
||||
)
|
||||
|
||||
|
||||
class KeyFormatTypeNotSupported(KmipError):
|
||||
"""
|
||||
An error generated when dealing with unsupported key formats
|
||||
and operations.
|
||||
"""
|
||||
|
||||
def __init__(self, message):
|
||||
"""
|
||||
Create a KeyFormatTypeNotSupported exception.
|
||||
|
||||
Args:
|
||||
message (string): A string containing information about the error.
|
||||
"""
|
||||
super(KeyFormatTypeNotSupported, self).__init__(
|
||||
reason=enums.ResultReason.KEY_FORMAT_TYPE_NOT_SUPPORTED,
|
||||
message=message
|
||||
)
|
||||
|
||||
|
||||
class OperationNotSupported(KmipError):
|
||||
"""
|
||||
An error generated when an unsupported operation is invoked.
|
||||
@@ -147,6 +185,24 @@ class OperationNotSupported(KmipError):
|
||||
)
|
||||
|
||||
|
||||
class PermissionDenied(KmipError):
|
||||
"""
|
||||
An error generated when permission constraints are violated.
|
||||
"""
|
||||
|
||||
def __init__(self, message):
|
||||
"""
|
||||
Create a PermissionDenied exception.
|
||||
|
||||
Args:
|
||||
message (string): A string containing information about the error.
|
||||
"""
|
||||
super(PermissionDenied, self).__init__(
|
||||
reason=enums.ResultReason.PERMISSION_DENIED,
|
||||
message=message
|
||||
)
|
||||
|
||||
|
||||
class InvalidKmipEncoding(Exception):
|
||||
"""
|
||||
An exception raised when processing invalid KMIP message encodings.
|
||||
|
||||
Reference in New Issue
Block a user