ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran-z <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #95: ARIA-92 Automatic operation task confi...
Date Wed, 12 Apr 2017 13:21:45 GMT
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/95#discussion_r111147585
  
    --- Diff: aria/modeling/service_instance.py ---
    @@ -522,17 +524,10 @@ def properties(cls):
         __mapper_args__ = {'version_id_col': version} # Enable SQLAlchemy automatic version
counting
     
         @property
    -    def ip(self):
    -        # TODO: totally broken
    -        if not self.host_fk:
    -            return None
    -        host_node = self.host
    -        if 'ip' in host_node.runtime_properties:  # pylint: disable=no-member
    -            return host_node.runtime_properties['ip']  # pylint: disable=no-member
    -        host_node = host_node.node_template  # pylint: disable=no-member
    -        host_ip_property = host_node.properties.get('ip')
    -        if host_ip_property:
    -            return host_ip_property.value
    +    def host_address(self):
    +        if self.host:
    +            if self.host.runtime_properties:
    +                return self.host.runtime_properties.get('host_address')
    --- End diff --
    
    while I understand your reasoning to using "host_address" instead of "ip" everywhere,
the actual runtime property that gets set by plugins remains to be "ip". this can't change
at this stage.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message