mirror of
https://github.com/openkmip/pykmip
synced 2025-12-23 03:33:32 +00:00
Add support for the Sensitive attribute
This change adds support for the Sensitive attribute, adding it to the attribute factory, the SQLAlchemy object hierarchy, and to the server attribute handling methods. The intent is to use this new attribute to test the new SetAttribute and ModifyAttribute operations coming in future commits. Unit tests have been added and modified to support the new additions.
This commit is contained in:
committed by
Peter Hamilton
parent
4d2d2ba4f1
commit
e313731692
@@ -104,6 +104,8 @@ class AttributeValueFactory(object):
|
||||
return self._create_contact_information(value)
|
||||
elif name is enums.AttributeType.LAST_CHANGE_DATE:
|
||||
return primitives.DateTime(value, enums.Tags.LAST_CHANGE_DATE)
|
||||
elif name is enums.AttributeType.SENSITIVE:
|
||||
return primitives.Boolean(value, enums.Tags.SENSITIVE)
|
||||
elif name is enums.AttributeType.CUSTOM_ATTRIBUTE:
|
||||
return attributes.CustomAttribute(value)
|
||||
else:
|
||||
@@ -194,6 +196,8 @@ class AttributeValueFactory(object):
|
||||
return self._create_contact_information(value)
|
||||
elif enum is enums.Tags.LAST_CHANGE_DATE:
|
||||
return primitives.DateTime(value, enums.Tags.LAST_CHANGE_DATE)
|
||||
elif enum is enums.Tags.SENSITIVE:
|
||||
return primitives.Boolean(value, enums.Tags.SENSITIVE)
|
||||
elif enum is enums.Tags.CUSTOM_ATTRIBUTE:
|
||||
return attributes.CustomAttribute(value)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user