2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-16 00:04:26 +00:00

Add payload base classes to prepare for simplifying the client

This change adds payload request and response base classes to
prepare for future simplification updates to the current client
architecture. No new tests are required for this change.
This commit is contained in:
Peter Hamilton
2019-11-12 17:03:13 -05:00
committed by Peter Hamilton
parent 676aaf5e72
commit 77d5b32ea4
30 changed files with 180 additions and 216 deletions

View File

@@ -21,9 +21,10 @@ from kmip.core import exceptions
from kmip.core import objects
from kmip.core import primitives
from kmip.core import utils
from kmip.core.messages.payloads import base
class DeriveKeyRequestPayload(primitives.Struct):
class DeriveKeyRequestPayload(base.RequestPayload):
"""
A request payload for the DeriveKey operation.
@@ -68,9 +69,7 @@ class DeriveKeyRequestPayload(primitives.Struct):
cryptographic object. Optional, defaults to None. Required
for read/write.
"""
super(DeriveKeyRequestPayload, self).__init__(
enums.Tags.REQUEST_PAYLOAD
)
super(DeriveKeyRequestPayload, self).__init__()
self._object_type = None
self._unique_identifiers = None
@@ -434,7 +433,7 @@ class DeriveKeyRequestPayload(primitives.Struct):
})
class DeriveKeyResponsePayload(primitives.Struct):
class DeriveKeyResponsePayload(base.ResponsePayload):
"""
A response payload for the DeriveKey operation.
@@ -461,9 +460,7 @@ class DeriveKeyResponsePayload(primitives.Struct):
newly derived cryptographic object. Optional, defaults to
None.
"""
super(DeriveKeyResponsePayload, self).__init__(
enums.Tags.RESPONSE_PAYLOAD
)
super(DeriveKeyResponsePayload, self).__init__()
self._unique_identifier = None
self._template_attribute = None