2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-19 09:43:47 +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:
Peter Hamilton
2019-11-22 13:53:48 -05:00
committed by Peter Hamilton
parent 4d2d2ba4f1
commit e313731692
8 changed files with 69 additions and 1 deletions

View File

@@ -744,6 +744,8 @@ class KmipEngine(object):
return None
elif attr_name == 'Last Change Date':
return None
elif attr_name == "Sensitive":
return managed_object.sensitive
else:
# Since custom attribute names are possible, just return None
# for unrecognized attributes. This satisfies the spec.
@@ -825,6 +827,8 @@ class KmipEngine(object):
value.append(e)
elif attribute_name == 'Operation Policy Name':
field = 'operation_policy_name'
elif attribute_name == "Sensitive":
field = "sensitive"
if field:
existing_value = getattr(managed_object, field)