diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/populate.py b/SAS/TMSS/backend/src/tmss/tmssapp/populate.py index b093121ea48a2b251c9b86120c47eeb0f1a99a74..8298bd9871b6e391597eea2d00192e94f1b58d71 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/populate.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/populate.py @@ -722,6 +722,23 @@ def populate_connectors(): task_template_name=task_template_name, iotype=IOType.objects.get(value=IOType.Choices.INPUT.value)) + # The Copy (sub)task accepts any kinds of data, and passes it on. + task_template_name = "copy pipeline" + for output_connector_type in TaskConnectorType.objects.filter(iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value)).all(): + # always create two input connectors for the specific output_connector_type.role and the any_role + any_role = Role.objects.get(value=Role.Choices.ANY.value) + for role in [output_connector_type.role, any_role]: + create_task_connector_skip_duplicate(role=role, + datatype=output_connector_type.datatype, + dataformat=output_connector_type.dataformat, + task_template_name="copy pipeline", + iotype=IOType.objects.get(value=IOType.Choices.INPUT.value)) + create_task_connector_skip_duplicate(role=role, + datatype=output_connector_type.datatype, + dataformat=output_connector_type.dataformat, + task_template_name=task_template_name, + iotype=IOType.objects.get(value=IOType.Choices.OUTPUT.value)) + def populate_permissions(): logger.info('Populating permissions')