-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attach playbook to Compute node without defining a new type #237
Comments
Hi and thanks for asking this. So, as I can see from TOSCA's documentation a lot of examples are not complete and quite some of them use older TOSCA versions (e.g., 1.0). I think that your example above is missing You can probably try this: tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
node_templates:
db_server:
type: tosca.nodes.Compute
interfaces:
Standard:
operations:
configure: scripts/my_own_configure.sh And also note that xOpera currently supports only Ansible for running interface operations and we have a plan for adding other executors (e.g., bash, python) in the future. |
@anzoman are you sure that the example about interface definition can be applied here? Above this example, standard refers to sub-classing behavior, which I believe I am doing. If this example is invalid, why nobody from consortia is interested in updating the invalid spec? |
Perhaps @lauwers can answer the last question. |
Hi Anatoli, the TOSCA TC is hard at work on TOSCA v2.0. We realize that some of the examples in the v1.3 specification have errors, but getting corrections approved through the OASIS standardization process is fairly cumbersome and we decided our efforts would be better spent by focusing on the quality of the v2.0 spec. As part of this process, we plan on managing all examples in the TOSCA git repo at https://github.com/oasis-open/tosca-community-contributions so they can be run through various parsers and validators. We have just started this effort. As you can imagine there is a fair bit of work involved and we welcome and encourage anyone to contribute and participate if possible, ideally by joining the TOSCA TC. |
@lauwers thanks for the proposal. TOSCA TC list holds addresses from major IT company domains. It looks like both OASIS and TC members are all sponsored by one entity or another, and the thought of doing this job sacrificing my time for free feels very miserable. So unless there is some serious funding involved, I have to refuse. |
@anzoman this doesn't work.
First is fails with this.
And then the file is created, with this.
|
Hi Anatoli,
Assuming the file ‘scripts/my_own_configure.sh’ exists, your example shows valid TOSCA.
Chris
From: Anatoli Babenia ***@***.***>
Sent: Thursday, February 3, 2022 1:00 PM
To: xlab-si/xopera-opera ***@***.***>
Cc: Chris Lauwers ***@***.***>; Mention ***@***.***>
Subject: Re: [xlab-si/xopera-opera] Attach playbook to Compute node without defining a new type (Issue #237)
@anzoman<https://github.com/anzoman> this doesn't work.
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
node_templates:
db_server:
type: tosca.nodes.Compute
interfaces:
Standard:
operations:
configure: scripts/my_own_configure.sh
First is fails with this.
opera.error.ParseError: [Path] Path scripts/my_own_configure.sh does not exist.
[[Command exited with 1]]
And then the file is created, with this.
opera.error.ParseError: [NodeTemplate] Undeclared operations: configure.
[[Command exited with 1]]
—
Reply to this email directly, view it on GitHub<#237 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AASPLILRIDLU3ZV7IHE5QULUZLUFHANCNFSM5MV4HUUQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Thanks. So it is a bug in xOpera then. |
Hi @abitrolly, I believe that you're looking at section 2.3 Overriding behavior of predefined node types and AFAIK you get the error because your
If you want to run your |
|
Anatoli is correct.
From: Anatoli Babenia ***@***.***>
Sent: Wednesday, February 9, 2022 12:39 AM
To: xlab-si/xopera-opera ***@***.***>
Cc: Chris Lauwers ***@***.***>; Mention ***@***.***>
Subject: Re: [xlab-si/xopera-opera] Attach playbook to Compute node without defining a new type (Issue #237)
tosca.nodes.Compute derives from tosca.nodes.Root https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/csprd01/TOSCA-Simple-Profile-YAML-v1.3-csprd01.html#DEFN_TYPE_NODES_ROOT`<https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/csprd01/TOSCA-Simple-Profile-YAML-v1.3-csprd01.html#DEFN_TYPE_NODES_ROOT%60> which includes tosca.interfaces.node.lifecycle.Standard.
—
Reply to this email directly, view it on GitHub<#237 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AASPLIJ5NT4LEDMUAN6VX2TU2IRZPANCNFSM5MV4HUUQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Oh, after some testing I see now that opera has a minor bug for this. I have located it already and will supply the PR that will fix this ASAP. |
In #237 we discovered that opera's parser doesn't take into account interfaces from derived parental nodes if those were defined by referencing some interface type (e.g., Standard or Configure). This commit will fix this, so it will be possible to use all interfaces from derived nodes. The second fix includes optimizing checks for operation names for pre-defined Standard and Configure interface types. Users are warned if the those operations have wrong names within node types or node templates.
In #237 we discovered that opera's parser doesn't take into account interfaces from derived parental nodes if those were defined by referencing some interface type (e.g., Standard or Configure). This commit will fix this, so it will be possible to use all interfaces from derived nodes. The second fix includes optimizing checks for operation names for pre-defined Standard and Configure interface types. Users are warned if the those operations have wrong names within node types or node templates. The third thing is that we also needed to update our TOSCA operation class to print out execution output only when primary implementation artifact is present.
In #237 we discovered that opera's parser doesn't take into account interfaces from derived parental nodes if those were defined by referencing some interface type (e.g., Standard or Configure). This commit will fix this, so it will be possible to use all interfaces from derived nodes. The second fix includes optimizing checks for operation names for pre-defined Standard and Configure interface types. Users are warned if the those operations have wrong names within node types or node templates. The third thing is that we also needed to update our TOSCA operation class to print out execution output only when primary implementation artifact is present.
In #237 we discovered that opera's parser doesn't take into account interfaces from derived parental nodes if those were defined by referencing some interface type (e.g., Standard or Configure). This commit will fix this, so it will be possible to use all interfaces from derived nodes. The second fix includes optimizing checks for operation names for pre-defined Standard and Configure interface types. Users are warned if the those operations have wrong names within node types or node templates. The third thing is that we also needed to update our TOSCA operation class to print out execution output only when primary implementation artifact is present.
In #237 we discovered that opera's parser doesn't take into account interfaces from derived parental nodes if those were defined by referencing some interface type (e.g., Standard or Configure). This commit will fix this, so it will be possible to use all interfaces from derived nodes. The second fix includes optimizing checks for operation names for pre-defined Standard and Configure interface types. Users are warned if the those operations have wrong names within node types or node templates. The third thing is that we also needed to update our TOSCA operation class to print out execution output only when primary implementation artifact is present.
Is it possible to execute playbook when
tosca.nodes.Compute
node template is deployed, without defining a new type?Using modified example from https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/os/TOSCA-Simple-Profile-YAML-v1.3-os.html#_Toc26969423
opera validate
errors out with this.The text was updated successfully, but these errors were encountered: