ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject [2/2] incubator-ariatosca git commit: wip...
Date Tue, 18 Jul 2017 12:41:54 GMT
wip...


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/c4a9def6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/c4a9def6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/c4a9def6

Branch: refs/heads/topology_poc
Commit: c4a9def68432902a989956c9ef03d4d0ce9c8f78
Parents: e144f9a
Author: max-orlov <maxim@gigaspaces.com>
Authored: Tue Jul 18 15:41:48 2017 +0300
Committer: max-orlov <maxim@gigaspaces.com>
Committed: Tue Jul 18 15:41:48 2017 +0300

----------------------------------------------------------------------
 aria/parser/topology/topoloy.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c4a9def6/aria/parser/topology/topoloy.py
----------------------------------------------------------------------
diff --git a/aria/parser/topology/topoloy.py b/aria/parser/topology/topoloy.py
index 8a5fa0c..14318a8 100644
--- a/aria/parser/topology/topoloy.py
+++ b/aria/parser/topology/topoloy.py
@@ -69,6 +69,10 @@ class _Instantiation(object):
         self._model_storage = original_model_storage
 
     def instantiate_service(self, service_template, inputs=None):
+
+        # creating an empty ConsumptionContext, initiating a threadlocal context
+        context = consumption.ConsumptionContext(set_thread_local=True)
+
         now = datetime.now()
         service = models.Service(
             created_at=now,
@@ -77,10 +81,6 @@ class _Instantiation(object):
             service_template=service_template
         )
 
-        # TODO: we want to remove this use of the context
-        context = consumption.ConsumptionContext()
-        context.modeling.instance = service
-
         service.inputs = utils.merge_parameter_values(inputs, service_template.inputs)
         # TODO: now that we have inputs, we should scan properties and inputs and evaluate
functions
 
@@ -109,8 +109,6 @@ class _Instantiation(object):
             service.substitution = self.instantiate(service_template.substitution_template)
             service.outputs = self.instantiate(service_template.outputs)
 
-        # creating an empty ConsumptionContext, initiating a threadlocal context
-
         consumption.ConsumerChain(
             context,
             (


Mime
View raw message