Hi all,
I am trying to use Capella and PVMT to manage the physical architecture of a system deployed to a Kubernetes cluster and I defined some extensions to handle host types, such as VM, Container, Pod, …
For the Pod I defined a specific extension which records the resources requested by the pod itself
aql:self.eContents(pa::PhysicalComponent)->select(pc | pc.appliedPropertyValueGroups.ownedPropertyValues->any(pv | pv.name = 'HostType').value.name.equals('Pod'))
The idea is to collect such information in tables of the M2Doc generated document.
As a first step I am trying to implement a query able to collect all pods within a cluster
aql:self.eContents(pa::PhysicalComponent)->select(pc | pc.appliedPropertyValueGroups.ownedPropertyValues->any(pv | pv.name = 'HostType').value.name.equals('Pod'))
The query in the Sirius interpreter returns the expected result
but its M2Doc counterpart is not working
selection.eContents(pa::PhysicalComponent)->select(pc | pc.appliedPropertyValueGroups.ownedPropertyValues->any(pv | pv.name = 'HostType').value.name.equals('Pod'))
The error reported is
ERROR: expression in an any must return a boolean (105, 137)
which refers to the following query fragment
->any(pv | pv.name = 'HostType')
I still have difficulties in understanding some subtle differences in the syntax of AQL queries supported by M2Doc through the M2Doc services used in this addon.