2
0
mirror of https://github.com/openkmip/pykmip synced 2026-01-06 10:33:35 +00:00

Updating support for the Enumeration primitive

This change updates the Enumeration primitive, adding a fresh
implementation and documentation. An updated unit test suite for the
primitive is included. Numerous changes to Enumeration usage across the
library are also included to comply with the updated implementation.
This commit is contained in:
Peter Hamilton
2015-09-29 13:23:44 -04:00
parent 55b35b0353
commit 20dbad5055
36 changed files with 732 additions and 529 deletions

View File

@@ -475,7 +475,7 @@ class KMIPProxy(KMIP):
def _process_batch_items(self, response):
results = []
for batch_item in response.batch_items:
operation = batch_item.operation.enum
operation = batch_item.operation.value
processor = self._get_batch_item_processor(operation)
result = processor(batch_item)
results.append(result)
@@ -597,7 +597,7 @@ class KMIPProxy(KMIP):
if unique_identifier is not None:
uuid = attr.UniqueIdentifier(unique_identifier)
if key_format_type is not None:
kft = get.GetRequestPayload.KeyFormatType(key_format_type.enum)
kft = get.GetRequestPayload.KeyFormatType(key_format_type.value)
if key_compression_type is not None:
kct = key_compression_type
kct = get.GetRequestPayload.KeyCompressionType(kct)