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:
committed by
Peter Hamilton
parent
4d2d2ba4f1
commit
e313731692
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user