2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 07:43:26 +00:00

Adding KmipEngine support for Destroy

This change adds support for the Destroy operation to the KmipEngine.
New exceptions and test cases are included.
This commit is contained in:
Peter
2016-03-08 15:34:12 -05:00
parent 81222e23f1
commit 27befcb85c
3 changed files with 343 additions and 5 deletions

View File

@@ -57,6 +57,24 @@ class CryptographicFailure(KmipError):
)
class IndexOutOfBounds(KmipError):
"""
An error generated when exceeding the attribute instance limit.
"""
def __init__(self, message):
"""
Create an IndexOutOfBounds exception.
Args:
message (string): A string containing information about the error.
"""
super(IndexOutOfBounds, self).__init__(
reason=enums.ResultReason.INDEX_OUT_OF_BOUNDS,
message=message
)
class InvalidField(KmipError):
"""
An error generated when an invalid field value is processed.
@@ -93,6 +111,24 @@ class InvalidMessage(KmipError):
)
class ItemNotFound(KmipError):
"""
An error generated when a request item cannot be located.
"""
def __init__(self, message):
"""
Create an ItemNotFound exception.
Args:
message (string): A string containing information about the error.
"""
super(ItemNotFound, self).__init__(
reason=enums.ResultReason.ITEM_NOT_FOUND,
message=message
)
class OperationNotSupported(KmipError):
"""
An error generated when an unsupported operation is invoked.