When I perform copy() on a Strateos ProtocolInterface, the custom annotations needed for specifying dotnames are dropped. Here is reproducible code:
sg = opil.StrateosOpilGenerator()
opil_doc = sg.parse_strateos_json(ip_constants.STRATEOS_NAMESPACE,
protocol_name,
protocol['id'],
protocol['inputs'])
# dotname is present before copy
protocol_interfaces = [top_level for top_level in opil_doc.objects if isinstance(top_level, opil.ProtocolInterface)]
for parameter in protocol_interfaces[0].has_parameter:
if parameter.dotname:
print(parameter.dotname)
# dotname is dropped after copy
protocol_interface_copy = protocol_interfaces[0].copy()
for parameter in protocol_interface_copy.has_parameter:
if parameter.dotname:
print(parameter.dotname)
When I perform copy() on a Strateos ProtocolInterface, the custom annotations needed for specifying dotnames are dropped. Here is reproducible code: