ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject incubator-ariatosca git commit: final review fixes
Date Wed, 19 Apr 2017 11:01:45 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-48-aria-cli 1cbd81b3b -> a39e7d134


final review fixes


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

Branch: refs/heads/ARIA-48-aria-cli
Commit: a39e7d134989b5df753a50c9bcdf9c7a34e9a03f
Parents: 1cbd81b
Author: Ran Ziv <ran@gigaspaces.com>
Authored: Wed Apr 19 14:01:41 2017 +0300
Committer: Ran Ziv <ran@gigaspaces.com>
Committed: Wed Apr 19 14:01:41 2017 +0300

----------------------------------------------------------------------
 aria/cli/table.py                    | 4 ++--
 aria/modeling/orchestration.py       | 2 +-
 aria/orchestrator/workflow_runner.py | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a39e7d13/aria/cli/table.py
----------------------------------------------------------------------
diff --git a/aria/cli/table.py b/aria/cli/table.py
index 11d791e..408f81e 100644
--- a/aria/cli/table.py
+++ b/aria/cli/table.py
@@ -55,8 +55,8 @@ def _generate(cols, data, column_formatters=None, defaults=None):
 
                for example: [{'id':'123', 'name':'Pete'}]
 
-        column_formatters - A dictionary from a column name to a function that may manipulate
-                            the values printed for this column.
+        column_formatters - A dictionary from a column name to a formatter - a function that
+                            may manipulate the string values printed for this column.
                             (See below for a few built-in formatter examples)
 
                             for example: {'created_at': timestamp_formatter}

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a39e7d13/aria/modeling/orchestration.py
----------------------------------------------------------------------
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index a2f041b..01ab2e8 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -101,7 +101,7 @@ class ExecutionBase(ModelMixin):
         return self.status in self.END_STATES
 
     def is_active(self):
-        return not self.has_ended()
+        return not self.has_ended() and self.status != self.PENDING
 
     @declared_attr
     def logs(cls):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a39e7d13/aria/orchestrator/workflow_runner.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflow_runner.py b/aria/orchestrator/workflow_runner.py
index 8779f06..1ea60a1 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -129,8 +129,7 @@ class WorkflowRunner(object):
                 .format(self._workflow_name, self.service.name))
 
     def _validate_no_active_executions(self, execution):
-        active_executions = [e for e in self.service.executions
-                             if e.id != execution.id and e.is_active()]
+        active_executions = [e for e in self.service.executions if e.is_active()]
         if active_executions:
             raise exceptions.ActiveExecutionsError(
                 "Can't start execution; Service {0} has an active execution with id {1}"


Mime
View raw message