mirror of
https://github.com/openkmip/pykmip
synced 2026-01-04 09:33:37 +00:00
Update ProxyKmipClient register to support name attributes
This change updates the ProxyKmipClient support for the Register operation, adding the ability to register Name attributes with the managed object being registered. This matches the functionality available when using the Create operation. Fixes #400
This commit is contained in:
@@ -353,6 +353,14 @@ class ProxyKmipClient(object):
|
||||
managed_object.operation_policy_name
|
||||
)
|
||||
object_attributes.append(opn_attribute)
|
||||
if hasattr(managed_object, 'names'):
|
||||
if managed_object.names:
|
||||
for name in managed_object.names:
|
||||
name_attribute = self.attribute_factory.create_attribute(
|
||||
enums.AttributeType.NAME,
|
||||
name
|
||||
)
|
||||
object_attributes.append(name_attribute)
|
||||
|
||||
template = cobjects.TemplateAttribute(attributes=object_attributes)
|
||||
object_type = managed_object.object_type
|
||||
|
||||
Reference in New Issue
Block a user