Skip to content

Properties from relationships in xOpera 0.7.0 #257

Description

@R4pinho

Description

In xOpera 0.7.0 version I can't use properties from nodes used in a relationship. So for example, let's say that I'm trying to do this:

vm_ip: { value: { get_attribute: [ SELF, binding, public_address ] }, type: string }

I get this following error:

AttributeError: 'Node' object has no attribute 'get_property'

I was able to identify the error coming from the src/opera/instance/node.py line 295:

return requirements[0].target.get_property([OperationHost.SELF.value] + rest)

The error comes from the xopera-tosca-parser library not having get_property() function defined in the Node class. I was able to write a quick fix for this error, but I also saw that you have this comment: TODO: Add support for nested property values, maybe it is a known bug, just wanted to get a confirmation from you.

The get_property also doens't work with capabilities using hosted_on relationship. So let's say I have this:

distribution: { value: { get_property: [ HOST, os, distribution ] }, type: string }

The distribution is a property from os capability defined in the host node.

Both examples trigger a error using xOpera 0.70 but were fine using previous versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions