-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(capella2polarion): Add
LogicalComponent
FA template
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
jinja/document_templates/logical-architecture/logical-common.html.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{# | ||
Copyright DB InfraGO AG and contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
#} | ||
|
||
{% set table_attributes='class="polarion-Document-table" style="margin: auto;margin-left: 0px;empty-cells: show;border-collapse: collapse;max-width: 1280px;border: 1px solid #CCCCCC;"' %} | ||
{% set th_attributes='style="height: 12px;text-align: left;vertical-align: top;font-weight: bold;background-color: #F0F0F0;border: 1px solid #CCCCCC;padding: 5px;"' %} | ||
{% set td_attributes='style="height: 12px;text-align: left;vertical-align: top;line-height: 18px;border: 1px solid #CCCCCC;padding: 5px;"' %} | ||
|
||
{% macro render_content(component, model, session) %} | ||
{{ heading(2, component.name, session)}} | ||
{{ heading(3, "Logical Component Context", session)}} | ||
<workitem id="interface_partners">The figure below provides an overview of the logical subsystem and external entities that either require the functionality of <b>{{ object.name }}</b> (expect outputs) or enable it (provide inputs). The figure also identifies the interfaces between the subsystem and its environment.</workitem> | ||
{{ insert_work_item(component, session) }} | ||
{{ heading(3, "Logical interface partners of " + component.name, session) }} | ||
|
||
{%- set lexcs = [] -%} | ||
{%- for port in component.ports -%} | ||
{%- for lexc in port.exchanges -%} | ||
{%- set _ = lexcs.append([lexc, lexc.source.owner if lexc.source.owner != component else lexc.target.owner]) -%} | ||
{%- endfor -%} | ||
{%- endfor -%} | ||
|
||
{%- for partner_cmp_name in lexcs | map(attribute=1) | map(attribute="name") | unique -%} | ||
{%- set partner = lexcs | map(attribute=1) | selectattr("name", "equalto", partner_cmp_name) | first -%} | ||
{{- heading(4, partner.name, session) -}} | ||
{{- insert_work_item(partner, session) -}} | ||
|
||
{%- set spp = lexcs | map(attribute=0) | selectattr("source.owner", "equalto", partner) | list -%} | ||
{%- set tpp = lexcs | map(attribute=0) | selectattr("target.owner", "equalto", partner) | list -%} | ||
{%- for lexc in (spp + tpp) -%} | ||
{{- heading(5, "Logical interface " + lexc.name, session) -}} | ||
{{- insert_work_item(lexc, session) -}} | ||
{%- endfor -%} | ||
{%- endfor -%} | ||
{% endmacro %} |
21 changes: 21 additions & 0 deletions
21
jinja/document_templates/logical-architecture/logical-component.html.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{# | ||
Copyright DB InfraGO AG and contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
#} | ||
{% from 'logical-common.html.j2' import render_content %} | ||
|
||
{% set component = model.by_uuid(uuid) %} | ||
{{ heading(1, component.name, session) }} | ||
{{ heading(2, "Table of Content", session) }} | ||
<div id="polarion_wiki macro name=toc"></div> | ||
<div id="polarion_wiki macro name=page_break" contentEditable="false" data-is-landscape="false"></div> | ||
{{ heading(2, "Introduction", session)}} | ||
<p> | ||
This Document focuses on the interfaces connecting the logical | ||
component and its allocated functions. It outlines how inputs and outputs | ||
flow between these functions through functional exchanges, allocated | ||
to their interface. Additionally, the document covers exchanged items that are | ||
allocated to both the interfaces and the functional exchanges, describing the | ||
data interactions within the system. | ||
</p> | ||
{{ render_content(component, model, session) }} |