[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [tosca] Accessing nested properties
Hi Paul, You are correct that the syntax for navigating the TOSCA topology graph needs a lot more work. Calin and I have made a number of proposals in the past to address this, based on a concept we call TOSCAPath (which tries to combine graph traversal with JSONPath concepts). This is something we'd love to get into the 2.0 spec. As a workaround for your issue, could you specify a target node type in your requirement definition? If you had a target node type, then the current get_property syntax would allow you to identify the capability property as follows: get_property: [ TARGET, <capability_name>, <capability_property_name ] Chris -----Original Message----- From: tosca@lists.oasis-open.org <tosca@lists.oasis-open.org> On Behalf Of Paul Jordan Sent: Monday, December 6, 2021 10:03 AM To: tosca@lists.oasis-open.org Subject: [tosca] Accessing nested properties I recently came across a sytax restriction. Not sure if the TC have already discussed this. Consider the valid syntax: node_types ÂÂÂ <node_name>: ÂÂÂ derived from: <node_type_name> ÂÂÂ requirements: ÂÂÂ -ÂÂÂ <requirement_name> ÂÂÂ ÂÂÂ capability: <capability_type_name> ÂÂÂ ÂÂÂ relationship: ÂÂÂ ÂÂÂ ÂÂÂ type: <relationship_type_name> ÂÂÂ ÂÂÂ ÂÂÂ interfaces: ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <interface_name>: ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ operations: ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <operation_name> ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ inputs: ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <parameter_name> ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ type: <datatype_name> ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ value: ( get_property: [ SOURCE, .... ] } Now, note that the capability referenced by <capability_type_name> may have properties. However according to V2.0 draft Section 4.4.2 there does not seem to be a valid syntax to reference the capability property from within the get_property clause. There seems to be a need for a general purpose syntax to permit selection of a single parameter value from a valid TOSCA template of arbitrary depth and complexity; something like JSONPath or the less well supported YAMLPath. Regards Paul Jordan --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]