2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-16 08:13:56 +00:00

Update the object data model to support storing key wrapping data

This change updates the KMIP object model to support explicitly
storing key wrapping data attributes. Key wrapping data is treated
externally as a dictionary and is stored as individual fields in
the back end. Various unit tests have been updated and added to
support these additions.
This commit is contained in:
Peter Hamilton
2017-09-30 16:22:52 -04:00
parent aa798d939c
commit fc86e1bef4
8 changed files with 736 additions and 30 deletions

View File

@@ -107,7 +107,10 @@ class EnumType(types.TypeDecorator):
value(Enum): An Enum instance whose integer value is to be stored.
dialect(string): SQL dialect
"""
return value.value
if value:
return value.value
else:
return -1
def process_result_value(self, value, dialect):
"""
@@ -120,6 +123,8 @@ class EnumType(types.TypeDecorator):
to create the Enum
dialect(string): SQL dialect
"""
if value == -1:
return None
return self._cls(value)