[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [tosca] sharing types between different profiles
Hi Tal, Yes, I feel strongly that profiles should be versioned, meaning the fully qualified profile name should have a ânameâ component and a âversionâ component clearly separated by a well-known separator (e.g. a colon). For example, the following
defines Version 2.0 of the Simple Profile:
I also think it makes most sense to allow sharing of type definitions between different profiles only if those profiles are different versions of the same profile. For example, letâs assume that the Simple Profile v2.0 defines a Compute
node type, as follows:
Now letâs assume weâre releasing an update to the Simple Profile, which will be Version 2.1. However, Version 2.1 of the Simple Profile does not introduce any changes to the Compute node type, meaning the Compute node type in Version 2.1
is identical to the Compute node type in Version 2.0, and it should be possible to use the two interchangeably. Iâm suggesting that this could be indicated using a âversionâ keyword in the node type definition (or some other keyword if that is more clear),
where the value of that keyword specifies the profile version that has the original Compute node definition to which this Compute node definition is identical. The following code snippet shows this:
Any other definitions in the v2.1 Compute node type definition must be ignored. Hopefully this makes things more clear. Thanks, Chris From: tosca@lists.oasis-open.org <tosca@lists.oasis-open.org>
On Behalf Of Tal Liron Hi Chris, I had difficulty following your "version" example. Perhaps you mean that the "version" string is appended to the "profile" string and type name when figuring out the canonical type name? E.g. a type name with version 3 in the Simple Profile
1.3: org.oasis-open.simple-1.3:Compute:3 This could be OK, but could also lead to confusion if different "editions" of the same profile version are released. I am leaning towards Calin's idea, but with a twist. I think we can have a keyword allowing canonical aliases. The idea is that the internal canonical type name is always usable as we have assumed until now,
derived from the profile string and the type name, but profile writers *can also* provide additional canonical names for specific types, and that these aliases can be used directly when referring to type names. You would still need to import the profile to
register the aliases in addition to the default name, but it might allow for special variants. Example profile: profile org.oasis-open.simple-1.3 node_types: Compute: aliases: - org.oasis-open.simple-1.2.ComputeLegacy And you could then refer to this type in two ways: imports: - profile: org.oasis-open.simple-1.3 namespace: simple topology_template: node_templates: Server1: type: simple:Compute Server2: type: org.oasis-open.simple-1.2.ComputeLegacy This does lead me back to my early idea that canonical type names would actually be part of the specification, allowing you two ways to refer to a type name. On Tue, Sep 22, 2020 at 4:08 PM Chris Lauwers <lauwers@ubicity.com> wrote:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]