xlab-si / xopera-opera

xOpera orchestrator compliant with TOSCA YAML v1.3 in the making
https://xlab-si.github.io/xopera-docs/
Apache License 2.0
35 stars 14 forks source link

XML CSAR converter #236

Closed abitrolly closed 2 years ago

abitrolly commented 2 years ago

From what I understand, CSAR can contain XML definitons or YAML definitions. I've got a CSAR with XML inside, and xOpera refuses to process it. So how to convert it into YAML that xOpera can understand?

SugarCRM-Interop-20130803.zip

anzoman commented 2 years ago

Hi @abitrolly thanks for opening this issue. As you have found out xOpera does not support XML TOSCA profile and we're not intending to do it because YAML is more suitable for writing TOSCA templates. You could probably convert your XML to YAML with one of the publicly available converters. Also I see that you're using TOSCA v1.0, which is not the latest and you should also upgrade that before trying anything with xOpera, which currently supports TOSCA v1.3 and will soon move to TOSCA 2.0.

abitrolly commented 2 years ago

Generic XML to YAML converter doesn't work, as it doesn't know the mapping convention. So TOSCA ecosystem doesn't provide any forward compatibility aids? Having to rewrite definitions every time a new version comes out doesn't look too exciting to me.

cankarm commented 2 years ago

Hi @abitrolly, I realized that you probably took this file from here: https://www.oasis-open.org/committees/document.php?document_id=50158.

The file is quite old and also it is stated that is "Draft (A preliminary unapproved sketch, outline, or version.)". So even if you would have such a converter (XLM/YAML), it is possible that there is much more "if" sentences to make this work.

I understand your concerns about the new version compatibility. However, OASIS TOSCA, Ansible and similar approaches used to describe infrastructure as a code are not expected to be fixed for such a long period. Files need to be up-to-date with the latest versions of components (servers, apps, etc) to overcome all possible security issues that usually arise during their life time and to comply with all changes of APIs that are implemented on the side of could providers (Azure, Amazon, GCP and others). In other words, for live applications these changes are not as huge as it seems from your example, as everything is made incrementally. In new xOpera you will be allowed to choose which version of TOSCA will you use (first line of service.yaml) and xOpera will automatically apply an appropriate TOSCA parser. Its the same analogy as using old an new Python.

abitrolly commented 2 years ago

Its the same analogy as using old an new Python.

I don't agree. Python standard library comes with https://docs.python.org/3/library/2to3.html and code in the same major version is forward compatible with minor releases.

Well, because there are no converter tools and writing them seems to be out of scope of this project, I don't think it makes sense to have this issue lingering open. If however, such tools appear, I would be interested to know about them in further comments.