ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [01/12] incubator-ariatosca git commit: Requirments-arent-instantiated-properly [Forced Update!]
Date Wed, 19 Apr 2017 11:21:19 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/cli-tests 56a4767e3 -> ed07f9f27 (forced update)


Requirments-arent-instantiated-properly


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

Branch: refs/heads/cli-tests
Commit: 8ced0f49e6439aff434b7c2c09f97e9be5d2b3ea
Parents: cf80675
Author: max-orlov <maxim@gigaspaces.com>
Authored: Tue Apr 18 11:03:13 2017 +0300
Committer: max-orlov <maxim@gigaspaces.com>
Committed: Tue Apr 18 11:03:13 2017 +0300

----------------------------------------------------------------------
 aria/core.py                        | 20 ++++++++++++--------
 aria/parser/consumption/__init__.py |  7 +++++--
 2 files changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8ced0f49/aria/core.py
----------------------------------------------------------------------
diff --git a/aria/core.py b/aria/core.py
index 365f39c..f5e2025 100644
--- a/aria/core.py
+++ b/aria/core.py
@@ -75,14 +75,18 @@ class Core(object):
             service = service_template.instantiate(None, self.model_storage, inputs=inputs)
 
         self.model_storage._all_api_kwargs['session'].flush()
-        consumption.ConsumerChain(
-            context,
-            (
-                consumption.FindHosts,
-                consumption.ConfigureOperations
-            )).consume()
-        if context.validation.dump_issues():
-            raise exceptions.InstantiationError('Failed to instantiate service template')
+
+        with self.model_storage._all_api_kwargs['session'].no_autoflush:
+            consumption.ConsumerChain(
+                context,
+                (
+                    consumption.SatisfyRequirements,
+                    consumption.ValidateCapabilities,
+                    consumption.FindHosts,
+                    consumption.ConfigureOperations
+                )).consume()
+            if context.validation.dump_issues():
+                raise exceptions.InstantiationError('Failed to instantiate service template')
 
         # If the user didn't enter a name for this service, we'll want to auto generate it.
         # But how will we ensure a unique but simple name? We'll append the services' unique
id

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8ced0f49/aria/parser/consumption/__init__.py
----------------------------------------------------------------------
diff --git a/aria/parser/consumption/__init__.py b/aria/parser/consumption/__init__.py
index ff1b376..8e565eb 100644
--- a/aria/parser/consumption/__init__.py
+++ b/aria/parser/consumption/__init__.py
@@ -20,7 +20,7 @@ from .style import Style
 from .consumer import Consumer, ConsumerChain
 from .presentation import Read
 from .validation import Validate
-from .modeling import ServiceTemplate, Types, ServiceInstance, FindHosts, ConfigureOperations
+from .modeling import ServiceTemplate, Types, ServiceInstance, FindHosts, ConfigureOperations,
SatisfyRequirements, ValidateCapabilities
 from .inputs import Inputs
 
 __all__ = (
@@ -34,4 +34,7 @@ __all__ = (
     'ServiceTemplate',
     'Types',
     'ServiceInstance',
-    'Inputs')
+    'Inputs',
+    'SatisfyRequirements',
+    'ValidateCapabilities'
+)
\ No newline at end of file


Mime
View raw message