Github user mxmrlv commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/95#discussion_r109899936
--- Diff: aria/modeling/service_instance.py ---
@@ -529,6 +524,32 @@ def validate_capabilities(self):
satisfied = False
return satisfied
+ def find_host(self):
+ def _find_host(node):
+ if node.type.role == 'host':
+ return node
+ for the_relationship in node.outbound_relationships:
+ if (the_relationship.target_capability is not None) and \
+ the_relationship.target_capability.type.role == 'host':
+ host = _find_host(the_relationship.target_node)
+ if host is not None:
+ return host
+ for the_relationship in node.inbound_relationships:
+ if (the_relationship.target_capability is not None) and \
--- End diff --
this seems odd, target_capability is basicaly self.capabilities, isn't it?
why would i need to traverse all the inbound relationships an test each ones
target_capability?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---