Replies: 6 comments 7 replies
-
Thanks for looking into this. I think you're on the right path here -- the "other definitions" are designed exactly for (potential) substitution mapping. In my view they should not all be joined into a single Clout, because they truly represent different topologies, and service composition is not a simple thing, basically out of scope for Puccini. (I discuss this in the FAQ.) So I do think the right way would to output multiple Clouts. This could be done in various ways:
I think it can be possible to support all these options. Here are my current thoughts:
|
Beta Was this translation helpful? Give feedback.
-
I like all options. My only doubt is with using names in What about having also a Also I have the gut feeling that when using numeric indexes the number 0 should be reserved for Entry-Defintions itself (so 0.yaml with P.S.: I know very little Go. For the time being I can only contribute ideas but not pull requests. I hope this changes in the future |
Beta Was this translation helpful? Give feedback.
-
All good ideas! I think it may be possible to have full-path support. True that you might not know it, but you might not also know the right index. Having both options seems easy enough to implement. I did do some work on this today -- I finally implemented proper parsing of the |
Beta Was this translation helpful? Give feedback.
-
The latest commit supports the I would appreciate if you give it a try! The |
Beta Was this translation helpful? Give feedback.
-
Thank you, Tal. I've given word to some colleagues and they'll test this new feature. |
Beta Was this translation helpful? Give feedback.
-
Great! I'm going to give more thought to how to handle exporting all compilation results in YAML. This would require some more significant refactoring. (By the way, it can be done quite fast because of intrinsic mulithreaded support in the library.) |
Beta Was this translation helpful? Give feedback.
-
This question is slightly related to #51.
Let's start this time as a question and then I'll create an issue depending on the response.
I don't know Go enough yet to be 100% sure, but reading the code it looks like currently:
Other-Definitions
from TOSCA 1.3 is parsed (inmeta.go
)If someone wants to use puccini just to validate, the algorithm is easy and it could even be done with an external script wrapper: parse normally then for each file in Other-Definitions parse an equivalent CSAR where you replace the value of Entry-Definitions. (Obviously if puccini implements this internally it would be better than a wrapper)
But my question here is about what happens after validation. Would the clout format support the result of compiling a CSAR containing multiple "toplevels"?
If that's not possible (or not easy), a "second best" could be to offer new arguments that allow to still compile a single toplevel but decide which one. E.g.
puccini compile --other_def=3
would process the 3rd file in the Other-Definitions entry instead of the file in Entry-Definitions (and give an error if Other-Definitions is not present or has less than 3 entries)Beta Was this translation helpful? Give feedback.
All reactions