ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject [1/2] incubator-ariatosca git commit: fixed most of the parser tests
Date Tue, 18 Jul 2017 12:41:53 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/topology_poc d38e6f8a4 -> c4a9def68


fixed most of the parser 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/e144f9a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e144f9a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e144f9a4

Branch: refs/heads/topology_poc
Commit: e144f9a4d4cb625b2f2d2f24eaf3076d1b19410c
Parents: d38e6f8
Author: max-orlov <maxim@gigaspaces.com>
Authored: Tue Jul 18 14:13:35 2017 +0300
Committer: max-orlov <maxim@gigaspaces.com>
Committed: Tue Jul 18 14:13:35 2017 +0300

----------------------------------------------------------------------
 aria/modeling/mixins.py             | 3 ---
 aria/parser/consumption/modeling.py | 8 +++++---
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e144f9a4/aria/modeling/mixins.py
----------------------------------------------------------------------
diff --git a/aria/modeling/mixins.py b/aria/modeling/mixins.py
index b2a0e0d..91fc5e3 100644
--- a/aria/modeling/mixins.py
+++ b/aria/modeling/mixins.py
@@ -149,9 +149,6 @@ class TemplateModelMixin(InstanceModelMixin):
     All model models can be instantiated into service instance models.
     """
 
-    def instantiate(self, container):
-        raise NotImplementedError
-
 
 class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):                     
           #pylint: disable=abstract-method
     """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e144f9a4/aria/parser/consumption/modeling.py
----------------------------------------------------------------------
diff --git a/aria/parser/consumption/modeling.py b/aria/parser/consumption/modeling.py
index 44027b9..8c46abf 100644
--- a/aria/parser/consumption/modeling.py
+++ b/aria/parser/consumption/modeling.py
@@ -105,9 +105,11 @@ class InstantiateServiceInstance(Consumer):
             self.context.validation.report('InstantiateServiceInstance consumer: missing
service '
                                            'template')
             return
-
-        self.context.modeling.template.instantiate(None, None,
-                                                   inputs=dict(self.context.modeling.inputs))
+        from .. import topology
+        topology.initiator.instantiate_service(self.context.modeling.template,
+                                               inputs=dict(self.context.modeling.inputs))
+        # TODO: fix this, it looks bad.
+        self.context.modeling.instance = self.context.modeling.template.services[None]
 
 
 class CoerceServiceInstanceValues(Consumer):


Mime
View raw message