[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [tosca-comment] RE: Restricting relationship types to node types and node types with capability types.
Hi Paul, It seems that if you want to specify the relationship between two nodes in the common file (or profile) then you need to define a requirement in the source node type, where you specify the relationship to be used. Now,
within the same requirement definition you can alternatively use the node keyname. So, it would seem that being able to specify the
valid_target_node_types in the relationship type will not allow for a higher granularity level specification e.g: DeployableNode: â requirements: - extension: capability: NodeExtension relationship:
NodeIsExtendedBy node:
ExtensionNode But maybe I donât have a good image of your use-case; could you send a short example of your intended usage? Regarding the error hiding I mention in the second paragraph, it would only appear if the
the node type restriction would be expressed in the relationship type definition as
you requested. Today such situation does not exist since the capability specification in the requirement in the node type is mandatory, thus the
valid_target_types constraint in the relationship cannot act like a hidden constraint. Thanks for your relevant questions, BR/C From: <tosca-comment@lists.oasis-open.org> on behalf of "paul.m.jordan@bt.com" <paul.m.jordan@bt.com> Calin, Thanks for joining the conversation. I hadnât previously considered making use of the node keyword. While it does appear to apply the restriction Iâm looking for it occurs in the syntax at an inconvenient point.
My aim is to predefine the extension nodes and their relationships in file (or profile) which is created once from the TMForum SID using tooling. That common file would then be available to template authors to who wish to extend their deployable
nodes with the standard MetricABE structure. The node keyword for MetricDefinition occurs within the hosted_app_type type definition and so could not be part of that common file. Would the orchestrator error reporting problem that you mention in your second paragraph be eased if the node type restriction could be expressed in the relationship type definition as I requested?
Paul Jordan This email contains information from BT that might be privileged or confidential. And it's
only meant for the person above. If that's not you, we're sorry - we must have sent it to you by mistake. Please email us to let us know, and don't copy or forward it to anyone else. Thanks. We monitor our email systems and may record all our emails. From: Calin Curescu <calin.curescu@ericsson.com>
Hi Paul, If you donât need the different capability types, then I think you can just use one capability type and use the requirement definition where you can either restrict the capability type (via the capability keyword) or restrict the node
type (via the node keyword). Please see the attached yaml. One observation that I made is that the valid_target_types (as it is now) acts only like a constraint on the capability type you need to choose in the requirement definition (i.e. the orchestrator will not validate the template if mismatched).
On the other hand the node keyname is not mandatory in the requirement definition. Thus, in the case the target node type is not defined in the requirement, the valid_target_node_types
would act as a node_filter that is not defined in the requirement but in the relationship type (i.e. the orchestrator will not return a validation error, but will need to filter out such invalid node types at runtime). Thus errors w.r.t.
the latter will be harder to discover. BR, /Calin From: <tosca-comment@lists.oasis-open.org>
on behalf of "paul.m.jordan@bt.com" <paul.m.jordan@bt.com> Chris, Thanks for taking the time on this. There is nothing wrong with what you have done here. My problem occurred when expanding this pattern to larder numbers of extension nodes: There will be many node_types derived_from MetricABE in the same way as you have done for MetricDefinition.
Many pairs of these derived node types will have a relationship between them and that relationship has its own name.
In order to create all those relationships with different names, there will many relationship_types derived_from NodeIsExtendedBy in the same way as you have done for MetricDefinitionMeasures.
I will need to restrict the use of each of these relationship types to the specific pair of node_types which use that name.
You have achieved that using the MetricDefinitionExtention capability type. My point is that all these capabilities would be defined only for this job which adds about 30% more lines to the template. I could avoid all that if a revised
syntax allowed me to restrict the application of the relationships by referencing the node_type rather than referencing a capability_type within the node type. Regards
Paul Jordan This email contains information from BT that might be privileged or confidential. And it's
only meant for the person above. If that's not you, we're sorry - we must have sent it to you by mistake. Please email us to let us know, and don't copy or forward it to anyone else. Thanks. We monitor our email systems and may record all our emails. From: Chris Lauwers <lauwers@ubicity.com>
Hi Paul, Iâm attaching a very rudimentary TOSCA template that starts to implement your pattern for the SID Metric ABE. It shows how relationship types can be refined by limiting valid_target_types to derived types of the NodeExtension
capability type. Iâd love to work with you to flesh this out further if youâre interested. Thanks, Chris From: Chris Lauwers
Thanks Paul, weâll take this up for review. In the meantime, a couple of additional comments:
Thanks again for all your helpful feedback. Chris From:
tosca-comment@lists.oasis-open.org <tosca-comment@lists.oasis-open.org>
On Behalf Of paul.m.jordan@bt.com At present relationship type definitions may contain a restriction to limit their application to node types which contain one or more of the specified capability types. Currently the name of this keyword is valid_target_types which is somewhat
inaccurate and could be confusing. Furthermore I have a pattern for node extension which would benefit from an additional limitation on relationship types so that they were only applicable to specified node types. Therefore I propose that relationship type definition is amended as follows:
If both valid_target_node_types and valid_target_node_capabilities are specified then they would be ANDed, i.e. the relationship type would be applicable only to a nodes of the specified type if it had one or more of the specified capabilities.
Paul Jordan This email contains information from BT that might be privileged or confidential. And it's
only meant for the person above. If that's not you, we're sorry - we must have sent it to you by mistake. Please email us to let us know, and don't copy or forward it to anyone else. Thanks. We monitor our email systems and may record all our emails. |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]