[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [tosca] RE: Enhancements to the TOSCA data filtering abilities
Yes, apologies. I was just trying to highlight the proposed syntax changes. By the way, these examples come straight out of the SOL001 spec. Will ONAP not use those data types? Could you point me to the ONAP wiki page that has your alternative proposal? Iâll try to construct an example
based on that. Thanks, Chris From: Vul, Alex <alex.vul@intel.com>
Chris, Matej, As I mentioned in the TOSCA TC meeting, please donât use cpu pinning as an example. Intel is looking to use a different approach for EPA attributes that is similar to what we have been doing in ETSI, i.e.
using opaque strings and secondary orchestration functions to process EPA parameter. Perhaps we need to have a more in-depth conversation about thisâ Kind regards, Alex From: <tosca@lists.oasis-open.org> on behalf of Chris Lauwers <lauwers@ubicity.com> Hi Matej, I believe you may be mis-interpreting Anatolyâs proposal. Heâs not proposing to apply the same constraint to multiple properties at the same time by grouping those properties in a list. Instead, heâs proposing
a ânavigationâ syntax to allow you to âdrill-downâ into specific sub-properties of complex data type. In Anatolyâs example:
(actually, there is a mechanism, but itâs somewhat convoluted:
This approach requires changes in two places and would be less readable. It gets even more convoluted if you go more than one level down in complex data types). As Anatoly correctly points out, we already have (loosely) define navigation syntax in TOSCA. It would be well worth formalizing this better (Xpath for TOSCA? ToscaPath?) Chris From: Katzman, Anatoly <anatoly.katzman@intl.att.com>
Hi Matej, This list-alike thing is not just a shorthand notation that comes to replace an already existing but unfortunately verbose construct. It introduces a totally new functionality. It says âgiven
a value of a complex type, please use this path to navigate to a selected part of the value, and apply the validation to that part onlyâ. Today there is no way to do this. In my example, properties âvirtual_cpu_pinningâ and âcpu_pinning_policyâ are not at
same level. âcpu_pinning_policyâ is a sub-property of âvirtual_cpu_pinningâ. Whatever headache the orchestrators may have with it, this is an already familiar headache. Functions get_property, get_attribute, etc use a similar construct to specify their arguments.
On a separate note, I would advise against using YAML anchors and aliases in TOSCA templates. These are low-level creatures that can replace almost everything with anything, they can get resolved
on a pre-parsing phase, and potentially, this resolution may result in a document that is valid YAML yet invalid TOSCA. The TOSCA dsl_definition mechanism is a bit safer, but it is for creating TOSCA extensions, while we want this navigation ability to become
part of the TOSCA core. BR, Anatoly From: Matej ArtaÄ <matej.artac@xlab.si>
Hello all, If I may, Iâd just like to voice my opinion about the proposal of using a list in the YAML key to shorten the definitions in this example: data_types: VirtualCpuWithStaticPinning: derived_from: tosca.datatypes.nfv.VirtualCpu properties: [virtual_cpu_pinning, cpu_pinning_policy]: constraints: - equal: static While this approach seems to simplify matters from the userâs perspective, it will create major headaches to the orchestrator implementors. Also, YAML also has support for anchors that does away
with the issue of repetition, so the following will work in any existing orchestrator, according to existing standard, and will do the trick: data_types: VirtualCpuWithStaticPinning: derived_from: tosca.datatypes.nfv.VirtualCpu properties: virtual_cpu_pinning:
&static_constraints constraints: - equal: static cpu_pinning_policy:
*static_constraints Additionally, for this specific case, TOSCA also provides a
dsl_definitions mechanism: dsl_definitions: - &static_constraints constraints: - equal: static data_types: VirtualCpuWithStaticPinning: derived_from: tosca.datatypes.nfv.VirtualCpu properties: virtual_cpu_pinning: *static_constraints cpu_pinning_policy: *static_constraints Best regards, Matej
From:
tosca@lists.oasis-open.org <tosca@lists.oasis-open.org>
On Behalf Of Chris Lauwers By the way, as I think about this more, it seems to me that there is no reason why node filters should use condition clauses (rather than constraint clauses). For example, if I wanted a node filter that says:
âI want a Ubuntu host with 8G of memory or a CentOS host with 4G of memoryâ. I donât think I can express that using just constraint clauses (even when we add Boolean operators to constraints) since we need constraints that combine multiple properties. Using
condition clauses in node filters would solve this problem. Thanks, Chris From: Katzman, Anatoly <ak435s@intl.att.com>
Hi Calin, Thank you for the feedback, really encouraging. Regarding the new self-reflecting attributes â I think it is a good addition and that it deserves a separate proposal and a separate discussion thread
😊 On the sub-property targeting syntax, âmapâ vs âlistâ: The map option crossed my mind when I was working on the proposal, but I have intentionally chosen the list, and this is why:
I was also going to propose changes in the data type definition syntax to allow laconic refinement of deeply buried sub-properties:
Well, we have a lot to discuss. Looking forward to our future meetings, Anatoly From: Calin Curescu <calin.curescu@ericsson.com>
Hi Anatoly, I fully
support your proposed changes. I have a suggestion for the format of proposal #3 syntax. Instead of: Node_templates: function_01: type: MyFunction requirements: - compute: node_filter: capabilities: - tosca.capabilities.nfv.VirtualCompute: properties:
[virtual_cpu, virtual_cpu_pinning, cpu_pinning_policy]:
- equal: static I would propose: Node_templates: function_01: type: MyFunction requirements: - compute: node_filter: capabilities: - tosca.capabilities.nfv.VirtualCompute: properties:
virtual_cpu:
virtual_cpu_pinning: cpu_pinning_policy:
- equal: static That would be the same hierarchy, but when (and only when) descending through datatypes we would have the option to omit the âproperties:â keyname in the hierarchy to make the structure more readable.
NOTE also that the same hierarchy as above could be used in the refinement proposal of Chris, when we want
to refine a property deeply buried in another set of complex properties. I would also propose
to extend the self-reflecting attributes of TOSCA node and relationship template to contain:
BR, /Calin From: Chris Lauwers <lauwers@ubicity.com> We obviously need to discuss the specifics in detail, but in general I fully support these types of enhancements as proposed by Anatoly.
Chris From: Katzman, Anatoly <ak435s@intl.att.com>
Claude, all, In addition to these topics, I would also like to submit for discussion on the WG forum a set of enhancements to the existing TOSCA syntax for conditions and constraints. The attached
document contains the details. The document is probably far from perfect, but I believe that even in its current form it makes a good basis for the further discussion. Of course, it is up to the forum to decide on the priority of this new topic in our backlog. Regards, Anatoly From: NOSHPITZ, CLAUDE
TOSCA Simple Profile for YAML Discussion topics for 2018-08-28:
If time allows, otherwise for future meetings:
Thanks. --Claude |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]