From 4aa30f4a8500d0ce8258e409df06d570ccd39ef4 Mon Sep 17 00:00:00 2001 From: Martin Lehmann Date: Thu, 19 Sep 2024 15:05:38 +0200 Subject: [PATCH] feat(validation): Show Capability as "SystemCapability" Analogous to the OperationCapability for OA, make it clear in the report that Capability refers to those on the SA layer. --- capellambse/extensions/validation/report-template.html.jinja | 2 +- capellambse/extensions/validation/rules.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/capellambse/extensions/validation/report-template.html.jinja b/capellambse/extensions/validation/report-template.html.jinja index 63ebfc7d..3a8e11e6 100644 --- a/capellambse/extensions/validation/report-template.html.jinja +++ b/capellambse/extensions/validation/report-template.html.jinja @@ -5,7 +5,7 @@ {% set CATEGORIES = ["REQUIRED", "RECOMMENDED", "SUGGESTED"] -%} {% set object_types = [ - "Capability", + "SystemCapability", "SystemActor", "SystemComponent", "SystemFunction", diff --git a/capellambse/extensions/validation/rules.py b/capellambse/extensions/validation/rules.py index a7ac5219..79ef89b1 100644 --- a/capellambse/extensions/validation/rules.py +++ b/capellambse/extensions/validation/rules.py @@ -9,6 +9,11 @@ from ._validate import rule, virtual_type +@virtual_type(mm.sa.Capability) +def SystemCapability(_: mm.sa.Capability) -> bool: + return True + + @virtual_type(mm.sa.SystemComponent) def SystemActor(cmp: mm.sa.SystemComponent) -> bool: return cmp.is_actor