2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-21 10:43:15 +00:00

Updated client integration tests, Added test for Application Specific Information

This commit is contained in:
Grace Lombardi
2022-07-12 13:54:51 -04:00
committed by arp102
parent 20f20b0e29
commit 1773fba67c
5 changed files with 72 additions and 26 deletions

View File

@@ -25,6 +25,7 @@ from kmip.core.factories import attributes
from kmip.core.attributes import CryptographicParameters
from kmip.core.attributes import DerivationParameters
from kmip.core.messages import payloads
from kmip.pie import exceptions
@@ -559,8 +560,15 @@ class ProxyKmipClient(object):
if hasattr(managed_object, '_application_specific_informations'):
if managed_object._application_specific_informations:
for attr in managed_object._application_specific_informations:
object_attributes.append(attr)
for attr in managed_object._application_specific_informations:
app_dict = {}
app_dict[attr] = managed_object._application_specific_informations[attr]
attribute = self.attribute_factory.create_attribute(
name=enums.AttributeType.APPLICATION_SPECIFIC_INFORMATION,
value=app_dict,
index=1
)
object_attributes.append(attribute)
template = cobjects.TemplateAttribute(attributes=object_attributes)
object_type = managed_object.object_type