You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/05/17 11:04:40 UTC
incubator-ariatosca git commit: fixed host_address and tests
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-258-Convert-runtime-properties-to-attributes 84a3f7300 -> d1fa9d2ed
fixed host_address and tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/d1fa9d2e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d1fa9d2e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d1fa9d2e
Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: d1fa9d2edd0c27274589f5ec789465742a935357
Parents: 84a3f73
Author: max-orlov <ma...@gigaspaces.com>
Authored: Wed May 17 14:04:35 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Wed May 17 14:04:35 2017 +0300
----------------------------------------------------------------------
aria/modeling/service_instance.py | 2 +-
tests/modeling/test_models.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d1fa9d2e/aria/modeling/service_instance.py
----------------------------------------------------------------------
diff --git a/aria/modeling/service_instance.py b/aria/modeling/service_instance.py
index 469b661..bd91214 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -529,7 +529,7 @@ class NodeBase(InstanceModelMixin):
@property
def host_address(self):
if self.host and self.host.attributes:
- return self.host.attributes.get('ip')
+ return self.host.attributes.get('ip').value
return None
def satisfy_requirements(self):
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d1fa9d2e/tests/modeling/test_models.py
----------------------------------------------------------------------
diff --git a/tests/modeling/test_models.py b/tests/modeling/test_models.py
index 61034bd..86e8482 100644
--- a/tests/modeling/test_models.py
+++ b/tests/modeling/test_models.py
@@ -644,7 +644,7 @@ class TestNodeHostAddress(object):
if host_address is not None:
host_address = host_address.value
if host_address:
- kwargs['runtime_properties']['ip'] = host_address
+ kwargs.setdefault('attributes', {})['ip'] = Parameter.wrap('ip', host_address)
if is_host:
kwargs['host_fk'] = 1
elif host_fk: