Skip to content
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

Derived_from not working as expected in xOpera 0.7.0 #258

Open
R4pinho opened this issue Oct 3, 2022 · 2 comments
Open

Derived_from not working as expected in xOpera 0.7.0 #258

R4pinho opened this issue Oct 3, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@R4pinho
Copy link

R4pinho commented Oct 3, 2022

Description

In xOpera version 0.7.0 the standard lifecycle interfaces are not working as expected in derived_from nodes. Let's say I have 2 node types derived from a parent node type. This 2 node types have different deployment steps but the undeployment process is the same, so I define the delete operation in the parent node type, but when I run opera undeploy nothing happens and the operation is not called.

This isn't a huge problem because the fix is very easy, but it was something that was working in previous versions and now doesn't work anymore.

@anzoman anzoman added the bug Something isn't working label Oct 5, 2022
@anzoman
Copy link
Contributor

anzoman commented Oct 5, 2022

Hi @R4pinho and many thanks for opening this. Can you provide your full TOSCA template or CSAR just to be clearer?

@R4pinho
Copy link
Author

R4pinho commented Oct 5, 2022

Sorry @anzoman, I'm afraid I can't share the full TOSCA template due to the project I'm working on. However, this example ilustrates pretty well the problem. Let's say I have the definition of this node types:

node_types:
  node1:
    derived_from: tosca.nodes.Compute
    properties:
      a:
        type: string
        required: true
    interfaces:
      Standard:
        delete:
            inputs:
              a:  { value: { get_property: [ SELF, a ] }, type: string }
            implementation: playbooks/delete.yaml
      
  node2:
    derived_from: node1
    properties:
      b:
        type: string
        required: true
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        operations:
          create:
            inputs:
              a:  { value: { get_property: [ SELF, a ] }, type: string }
              b:  { value: { get_property: [ SELF, b ] }, type: string }
            implementation: playbooks/create1.yaml
            
  node3:
    derived_from: node1
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        operations:
          create:
            inputs:
              a:  { value: { get_property: [ SELF, a ] }, type: string }
            implementation: playbooks/create2.yaml

As you can see, node2 and node3 have different create operations, but share the same delete operation inherited from node1 and the a property. When I define the instantiation of node2 in node_templates I'm able to use opera deploy to create this node. However when I run opera undeploy the delete operation inherited from node1 is not called and the undeploy operation skips this node.

@anzoman anzoman changed the title Derived_from not working as expected in xOpera 0.70 Derived_from not working as expected in xOpera 0.7.0 Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants