incubator-ariatosca git commit: shited stuff around [Forced Update!]

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks 5fce85b12 -> e758e86ad (forced update)


shited stuff around


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: e758e86ade7741b654740b073938d30cf063985e
Parents: d1cfd26
Author: max-orlov 
Authored: Thu Jun 15 11:03:15 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 11:09:57 2017 +0300

--
 aria/modeling/orchestration.py |  3 +-
 aria/orchestrator/context/operation.py |  8 
 aria/orchestrator/workflow_runner.py   | 28 +--
 aria/orchestrator/workflows/executor/base.py   | 48 +--
 aria/orchestrator/workflows/executor/dry.py| 51 ++---
 tests/orchestrator/workflows/core/test_task.py |  5 +-
 6 files changed, 72 insertions(+), 71 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e758e86a/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 6f69483..11a4684 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -452,7 +452,8 @@ class TaskBase(mixins.ModelMixin):
 'api_id': api_task.id,
 '_context_cls': context_cls,
 '_executor': executor,
-})
+}
+)
 
 instantiation_kwargs.update(**kwargs)
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e758e86a/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7477912..7591d70 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -18,6 +18,7 @@ Workflow and operation contexts
 """
 
 import threading
+from contextlib import contextmanager
 
 import aria
 from aria.utils import file
@@ -109,6 +110,13 @@ class BaseOperationContext(common.BaseContext):
 self.model.log._session.remove()
 self.model.log._engine.dispose()
 
+@property
+@contextmanager
+def track_task(self):
+self.model.task.update(self.task)
+yield
+self.model.task.update(self.task)
+
 
 class NodeOperationContext(BaseOperationContext):
 """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e758e86a/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index f0a48ad..422066c 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -29,7 +29,7 @@ from .workflows import builtin
 from .workflows.core.engine import Engine
 from .workflows.executor.process import ProcessExecutor
 from .workflows.executor.base import StubTaskExecutor
-from .workflows.api import task
+from .workflows.api import task as api_task
 from ..modeling import models
 from ..modeling import utils as modeling_utils
 from ..utils.imports import import_fullname
@@ -180,9 +180,9 @@ class WorkflowRunner(object):
 
 def get_execution_graph(execution):
 graph = DiGraph()
-for t in execution.tasks:
-for dependency in t.dependencies:
-graph.add_edge(dependency, t)
+for task in execution.tasks:
+for dependency in task.dependencies:
+graph.add_edge(dependency, task)
 
 return graph
 
@@ -210,28 +210,28 @@ def construct_execution_tasks(execution,
  stub_type=start_stub_type,
  dependencies=depends_on)
 
-for api_task in task_graph.topological_order(reverse=True):
+for task in task_graph.topological_order(reverse=True):
 operation_dependencies = _get_tasks_from_dependencies(
-execution, task_graph.get_dependencies(api_task), [start_task])
+execution, task_graph.get_dependencies(task), [start_task])
 
-if isinstance(api_task, task.OperationTask):
-models.Task.from_api_task(api_task=api_task,
+if isinstance(task, api_task.OperationTask):
+models.Task.from_api_task(api_task=task,
   executor=default_executor,
   dependencies=operation_dependencies)
 
-elif isinstance(api_task, 

incubator-ariatosca git commit: ARIA-54 Prepare for ARIA packaging

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master 2149a5ee0 -> e6cf67ec1


ARIA-54 Prepare for ARIA packaging

Preparations for ARIA packaging:
 - Added CHANGELOG file
 - Added CONTRIBUTING file
 - Added DISCLAIMER file
 - Updated Makefile
 - Converted README from md to rst for PyPI compatiability
 - Removed outdated TODO file
 - Added long_description, download_url to setup.py metadata
 - Modified setup.py url metadata to point at ASF domain
 - Added more badges to README


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

Branch: refs/heads/master
Commit: e6cf67ec1230bf46febc11d65122ee3c0eeebc10
Parents: 2149a5e
Author: Ran Ziv 
Authored: Mon Jun 5 13:24:49 2017 +0300
Committer: Ran Ziv 
Committed: Thu Jun 15 12:03:59 2017 +0300

--
 CHANGELOG.rst |   4 ++
 CONTRIBUTING  |   3 +
 DISCLAIMER|  10 
 MANIFEST.in   |  10 +++-
 Makefile  |  56 --
 README.md | 120 --
 README.rst| 140 +
 TODO.md   |   8 ---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.py  |   8 ++-
 11 files changed, 214 insertions(+), 152 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/CHANGELOG.rst
--
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 000..6abb1af
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,4 @@
+0.1.0
+-
+
+ * Initial release.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/CONTRIBUTING
--
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 000..4124003
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,3 @@
+Contribution guide is available on our Confluence:
+
+https://cwiki.apache.org/confluence/display/ARIATOSCA/Contributing+to+ARIA
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 000..358d8e1
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache AriaTosca is an effort undergoing incubation at the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 6c79a3a..877a7dd 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,10 @@
-include requirements.txt
-include VERSION
+include CONTRIBUTING
 include LICENSE
+include NOTICE
+include VERSION
+include CHANGELOG.rst
+include README.rst
+include requirements.txt
+recursive-include docs/html *
 recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..a857ca7 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,54 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
+PYTHON_VERSION = $$(python -V 2>&1 | cut -f2 -d' ' | cut -f1,2 -d'.' 
--output-delimiter='')
 
-.PHONY: clean aria-requirements docs-requirements docs
-.DEFAULT_GOAL = test
+.DEFAULT_GOAL = install
+.PHONY: clean install install-virtual docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 

[incubator-ariatosca] Git Push Summary

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging [deleted] e6cf67ec1


incubator-ariatosca git commit: test

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/test e6cf67ec1 -> d91519c53


test


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

Branch: refs/heads/test
Commit: d91519c53a0237c5b104774071258e984ca1
Parents: e6cf67e
Author: Ran Ziv 
Authored: Thu Jun 15 12:30:04 2017 +0300
Committer: Ran Ziv 
Committed: Thu Jun 15 12:30:04 2017 +0300

--
 tox.ini | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d91519c5/tox.ini
--
diff --git a/tox.ini b/tox.ini
index 58e62c3..7e106cf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -32,10 +32,10 @@ basepython =
   pylint_tests: python2.7
 
 [testenv:py27]
-commands=pytest tests --ignore=tests/end2end --cov-report term-missing --cov 
aria
+commands=pytest -vvv tests --ignore=tests/end2end
 
 [testenv:py26]
-commands=pytest tests --ignore=tests/end2end --cov-report term-missing --cov 
aria
+commands=pytest -vvv tests --ignore=tests/end2end
 
 [testenv:py27e2e]
 commands=pytest tests/end2end --cov-report term-missing --cov aria



[incubator-ariatosca] Git Push Summary

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/test [created] e6cf67ec1


incubator-ariatosca git commit: ARIA-54 Prepare for ARIA packaging [Forced Update!]

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging 5e4ac68ab -> e6cf67ec1 (forced 
update)


ARIA-54 Prepare for ARIA packaging

Preparations for ARIA packaging:
 - Added CHANGELOG file
 - Added CONTRIBUTING file
 - Added DISCLAIMER file
 - Updated Makefile
 - Converted README from md to rst for PyPI compatiability
 - Removed outdated TODO file
 - Added long_description, download_url to setup.py metadata
 - Modified setup.py url metadata to point at ASF domain
 - Added more badges to README


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

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: e6cf67ec1230bf46febc11d65122ee3c0eeebc10
Parents: 2149a5e
Author: Ran Ziv 
Authored: Mon Jun 5 13:24:49 2017 +0300
Committer: Ran Ziv 
Committed: Thu Jun 15 12:03:59 2017 +0300

--
 CHANGELOG.rst |   4 ++
 CONTRIBUTING  |   3 +
 DISCLAIMER|  10 
 MANIFEST.in   |  10 +++-
 Makefile  |  56 --
 README.md | 120 --
 README.rst| 140 +
 TODO.md   |   8 ---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.py  |   8 ++-
 11 files changed, 214 insertions(+), 152 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/CHANGELOG.rst
--
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 000..6abb1af
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,4 @@
+0.1.0
+-
+
+ * Initial release.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/CONTRIBUTING
--
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 000..4124003
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,3 @@
+Contribution guide is available on our Confluence:
+
+https://cwiki.apache.org/confluence/display/ARIATOSCA/Contributing+to+ARIA
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 000..358d8e1
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache AriaTosca is an effort undergoing incubation at the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 6c79a3a..877a7dd 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,10 @@
-include requirements.txt
-include VERSION
+include CONTRIBUTING
 include LICENSE
+include NOTICE
+include VERSION
+include CHANGELOG.rst
+include README.rst
+include requirements.txt
+recursive-include docs/html *
 recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..a857ca7 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,54 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
+PYTHON_VERSION = $$(python -V 2>&1 | cut -f2 -d' ' | cut -f1,2 -d'.' 
--output-delimiter='')
 
-.PHONY: clean aria-requirements docs-requirements docs
-.DEFAULT_GOAL = test
+.DEFAULT_GOAL = install
+.PHONY: clean install install-virtual docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' 

incubator-ariatosca git commit: ARIA-54 Prepare for ARIA packaging [Forced Update!]

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging 4a2e521cc -> 5e4ac68ab (forced 
update)


ARIA-54 Prepare for ARIA packaging

Preparations for ARIA packaging:
 - Added CHANGELOG file
 - Added CONTRIBUTING file
 - Added DISCLAIMER file
 - Updated Makefile
 - Converted README from md to rst for PyPI compatiability
 - Removed outdated TODO file
 - Added long_description, download_url to setup.py metadata
 - Modified setup.py url metadata to point at ASF domain
 - Added more badges to README


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

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 5e4ac68abb9e61ba8cb519693ec60891dcb3605f
Parents: 2149a5e
Author: Ran Ziv 
Authored: Mon Jun 5 13:24:49 2017 +0300
Committer: Ran Ziv 
Committed: Thu Jun 15 11:40:30 2017 +0300

--
 CHANGELOG.rst |   4 ++
 CONTRIBUTING  |   3 +
 DISCLAIMER|  10 
 MANIFEST.in   |  10 +++-
 Makefile  |  54 +++--
 README.md | 120 --
 README.rst| 140 +
 TODO.md   |   8 ---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.py  |   8 ++-
 11 files changed, 213 insertions(+), 151 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e4ac68a/CHANGELOG.rst
--
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 000..6abb1af
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,4 @@
+0.1.0
+-
+
+ * Initial release.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e4ac68a/CONTRIBUTING
--
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 000..4124003
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,3 @@
+Contribution guide is available on our Confluence:
+
+https://cwiki.apache.org/confluence/display/ARIATOSCA/Contributing+to+ARIA
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e4ac68a/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 000..358d8e1
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache AriaTosca is an effort undergoing incubation at the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e4ac68a/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 6c79a3a..877a7dd 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,10 @@
-include requirements.txt
-include VERSION
+include CONTRIBUTING
 include LICENSE
+include NOTICE
+include VERSION
+include CHANGELOG.rst
+include README.rst
+include requirements.txt
+recursive-include docs/html *
 recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e4ac68a/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..75ca221 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,54 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
+PYTHON_VERSION = $$(python -V 2>&1 | cut -f2 -d' ' | cut -f1,2 -d'.' 
--output-delimiter='')
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d 

incubator-ariatosca git commit: wip

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks e758e86ad -> 7f5c6204f


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/7f5c6204
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/7f5c6204
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/7f5c6204

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 7f5c6204fbbeda08520ee0741b7eb485878c6129
Parents: e758e86
Author: max-orlov 
Authored: Thu Jun 15 13:22:48 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 13:22:48 2017 +0300

--
 aria/orchestrator/context/workflow.py   | 15 
 aria/orchestrator/workflow_runner.py| 23 --
 aria/orchestrator/workflows/core/engine.py  | 25 
 aria/orchestrator/workflows/executor/base.py|  3 ++-
 tests/orchestrator/context/__init__.py  |  5 ++--
 tests/orchestrator/context/test_serialize.py|  5 ++--
 .../orchestrator/execution_plugin/test_local.py |  5 ++--
 tests/orchestrator/execution_plugin/test_ssh.py |  5 ++--
 tests/orchestrator/test_workflow_runner.py  | 13 ++
 .../orchestrator/workflows/core/test_engine.py  |  8 +++
 .../orchestrator/workflows/core/test_events.py  | 11 -
 .../executor/test_process_executor_extension.py |  5 ++--
 .../test_process_executor_tracked_changes.py|  5 ++--
 13 files changed, 65 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7f5c6204/aria/orchestrator/context/workflow.py
--
diff --git a/aria/orchestrator/context/workflow.py 
b/aria/orchestrator/context/workflow.py
index 920b237..5404df5 100644
--- a/aria/orchestrator/context/workflow.py
+++ b/aria/orchestrator/context/workflow.py
@@ -20,6 +20,8 @@ Workflow and operation contexts
 import threading
 from contextlib import contextmanager
 
+from networkx import DiGraph
+
 from .exceptions import ContextException
 from .common import BaseContext
 
@@ -41,6 +43,7 @@ class WorkflowContext(BaseContext):
 self._task_max_attempts = task_max_attempts
 self._task_retry_interval = task_retry_interval
 self._task_ignore_failure = task_ignore_failure
+self._execution_graph = None
 self._register_logger()
 
 def __repr__(self):
@@ -92,6 +95,18 @@ class WorkflowContext(BaseContext):
 }
 )
 
+@property
+def graph(self):
+if self._execution_graph is None:
+graph = DiGraph()
+for task in self.execution.tasks:
+for dependency in task.dependencies:
+graph.add_edge(dependency, task)
+
+self._execution_graph = graph
+
+return self._execution_graph
+
 
 class _CurrentContext(threading.local):
 """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7f5c6204/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 422066c..919da58 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -21,8 +21,6 @@ import os
 import sys
 from datetime import datetime
 
-from networkx import DiGraph
-
 from . import exceptions
 from .context.workflow import WorkflowContext
 from .workflows import builtin
@@ -74,7 +72,7 @@ class WorkflowRunner(object):
 execution = self._create_execution_model(inputs)
 self._execution_id = execution.id
 
-workflow_context = WorkflowContext(
+self._workflow_context = WorkflowContext(
 name=self.__class__.__name__,
 model_storage=self._model_storage,
 resource_storage=resource_storage,
@@ -90,15 +88,13 @@ class WorkflowRunner(object):
 # transforming the execution inputs to dict, to pass them to the 
workflow function
 execution_inputs_dict = dict(inp.unwrapped for inp in 
self.execution.inputs.values())
 
-self._tasks_graph = workflow_fn(ctx=workflow_context, 
**execution_inputs_dict)
+self._tasks_graph = workflow_fn(ctx=self._workflow_context, 
**execution_inputs_dict)
 construct_execution_tasks(self.execution, self._tasks_graph, 
executor.__class__)
 
 # Update the state
 self._model_storage.execution.update(execution)
 
-self._engine = Engine(executor=executor,
-  workflow_context=workflow_context,
-  
execution_graph=get_execution_graph(self.execution))
+self._engine = Engine(executor=executor)
 
 

incubator-ariatosca git commit: test [Forced Update!]

2017-06-15 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/test d91519c53 -> a61782c58 (forced update)


test


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

Branch: refs/heads/test
Commit: a61782c58b190096b74db9056634ec72f6d8027b
Parents: e6cf67e
Author: Ran Ziv 
Authored: Thu Jun 15 12:30:04 2017 +0300
Committer: Ran Ziv 
Committed: Thu Jun 15 13:14:54 2017 +0300

--
 tox.ini | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a61782c5/tox.ini
--
diff --git a/tox.ini b/tox.ini
index 58e62c3..7e106cf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -32,10 +32,10 @@ basepython =
   pylint_tests: python2.7
 
 [testenv:py27]
-commands=pytest tests --ignore=tests/end2end --cov-report term-missing --cov 
aria
+commands=pytest -vvv tests --ignore=tests/end2end
 
 [testenv:py26]
-commands=pytest tests --ignore=tests/end2end --cov-report term-missing --cov 
aria
+commands=pytest -vvv tests --ignore=tests/end2end
 
 [testenv:py27e2e]
 commands=pytest tests/end2end --cov-report term-missing --cov aria



incubator-ariatosca git commit: wip2 [Forced Update!]

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks ecf5fc9f0 -> 4d9112085 (forced update)


wip2


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 4d911208504f41e581376d0c5f770fa59571119e
Parents: 7f5c620
Author: max-orlov 
Authored: Thu Jun 15 13:49:19 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 13:58:43 2017 +0300

--
 aria/orchestrator/workflow_runner.py|  4 +-
 aria/orchestrator/workflows/core/engine.py  | 78 ++--
 tests/orchestrator/test_workflow_runner.py  | 31 
 .../orchestrator/workflows/core/test_engine.py  |  6 +-
 .../test_task_graph_into_execution_graph.py | 17 ++---
 5 files changed, 67 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4d911208/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 919da58..c4d8666 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -109,10 +109,10 @@ class WorkflowRunner(object):
 return self._model_storage.service.get(self._service_id)
 
 def execute(self):
-self._engine.execute(self._workflow_context)
+self._engine.execute(ctx=self._workflow_context)
 
 def cancel(self):
-self._engine.cancel_execution()
+self._engine.cancel_execution(ctx=self._workflow_context)
 
 def _create_execution_model(self, inputs):
 execution = models.Execution(

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4d911208/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index b9c3439..ade3661 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -38,75 +38,78 @@ class Engine(logger.LoggerMixin):
 def __init__(self, executor, **kwargs):
 super(Engine, self).__init__(**kwargs)
 self._executors = {executor.__class__: executor}
-self._workflow_context = None
 
 def execute(self, ctx):
 """
 execute the workflow
 """
-self._workflow_context = ctx
-
 try:
-events.start_workflow_signal.send(self._workflow_context)
+events.start_workflow_signal.send(ctx)
 while True:
-cancel = self._is_cancel()
+cancel = self._is_cancel(ctx)
 if cancel:
 break
-for task in self._ended_tasks():
-self._handle_ended_tasks(task)
-for task in self._executable_tasks():
-self._handle_executable_task(task)
-if self._all_tasks_consumed():
+for task in self._ended_tasks(ctx):
+self._handle_ended_tasks(ctx, task)
+for task in self._executable_tasks(ctx):
+self._handle_executable_task(ctx, task)
+if self._all_tasks_consumed(ctx):
 break
 else:
 time.sleep(0.1)
 if cancel:
-
events.on_cancelled_workflow_signal.send(self._workflow_context)
+events.on_cancelled_workflow_signal.send(ctx)
 else:
-events.on_success_workflow_signal.send(self._workflow_context)
+events.on_success_workflow_signal.send(ctx)
 except BaseException as e:
-events.on_failure_workflow_signal.send(self._workflow_context, 
exception=e)
+events.on_failure_workflow_signal.send(ctx, exception=e)
 raise
 
-def cancel_execution(self):
+@staticmethod
+def cancel_execution(ctx):
 """
 Send a cancel request to the engine. If execution already started, 
execution status
 will be modified to 'cancelling' status. If execution is in pending 
mode, execution status
 will be modified to 'cancelled' directly.
 """
-events.on_cancelling_workflow_signal.send(self._workflow_context)
-self._workflow_context.execution = self._workflow_context.execution
+events.on_cancelling_workflow_signal.send(ctx)
+ctx.execution = ctx.execution
 
-def 

incubator-ariatosca git commit: wip2

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks 7f5c6204f -> ecf5fc9f0


wip2


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: ecf5fc9f0223fc96e22d216edea636874902d237
Parents: 7f5c620
Author: max-orlov 
Authored: Thu Jun 15 13:49:19 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 13:49:19 2017 +0300

--
 aria/orchestrator/workflow_runner.py|  2 +-
 aria/orchestrator/workflows/core/engine.py  | 78 ++--
 tests/orchestrator/test_workflow_runner.py  | 28 +++
 .../orchestrator/workflows/core/test_engine.py  |  6 +-
 .../test_task_graph_into_execution_graph.py | 17 ++---
 5 files changed, 65 insertions(+), 66 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ecf5fc9f/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 919da58..1963087 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -109,7 +109,7 @@ class WorkflowRunner(object):
 return self._model_storage.service.get(self._service_id)
 
 def execute(self):
-self._engine.execute(self._workflow_context)
+self._engine.execute(ctx=self._workflow_context)
 
 def cancel(self):
 self._engine.cancel_execution()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ecf5fc9f/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index b9c3439..ade3661 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -38,75 +38,78 @@ class Engine(logger.LoggerMixin):
 def __init__(self, executor, **kwargs):
 super(Engine, self).__init__(**kwargs)
 self._executors = {executor.__class__: executor}
-self._workflow_context = None
 
 def execute(self, ctx):
 """
 execute the workflow
 """
-self._workflow_context = ctx
-
 try:
-events.start_workflow_signal.send(self._workflow_context)
+events.start_workflow_signal.send(ctx)
 while True:
-cancel = self._is_cancel()
+cancel = self._is_cancel(ctx)
 if cancel:
 break
-for task in self._ended_tasks():
-self._handle_ended_tasks(task)
-for task in self._executable_tasks():
-self._handle_executable_task(task)
-if self._all_tasks_consumed():
+for task in self._ended_tasks(ctx):
+self._handle_ended_tasks(ctx, task)
+for task in self._executable_tasks(ctx):
+self._handle_executable_task(ctx, task)
+if self._all_tasks_consumed(ctx):
 break
 else:
 time.sleep(0.1)
 if cancel:
-
events.on_cancelled_workflow_signal.send(self._workflow_context)
+events.on_cancelled_workflow_signal.send(ctx)
 else:
-events.on_success_workflow_signal.send(self._workflow_context)
+events.on_success_workflow_signal.send(ctx)
 except BaseException as e:
-events.on_failure_workflow_signal.send(self._workflow_context, 
exception=e)
+events.on_failure_workflow_signal.send(ctx, exception=e)
 raise
 
-def cancel_execution(self):
+@staticmethod
+def cancel_execution(ctx):
 """
 Send a cancel request to the engine. If execution already started, 
execution status
 will be modified to 'cancelling' status. If execution is in pending 
mode, execution status
 will be modified to 'cancelled' directly.
 """
-events.on_cancelling_workflow_signal.send(self._workflow_context)
-self._workflow_context.execution = self._workflow_context.execution
+events.on_cancelling_workflow_signal.send(ctx)
+ctx.execution = ctx.execution
 
-def _is_cancel(self):
-execution = 
self._workflow_context.model.execution.update(self._workflow_context.execution)
+@staticmethod
+def _is_cancel(ctx):
+

incubator-ariatosca git commit: wip4

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks 21120aa64 -> 7c5b9ff73


wip4


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 7c5b9ff73fe438ce073e1ba481176d0b0a4d07f1
Parents: 21120aa
Author: max-orlov 
Authored: Thu Jun 15 16:42:01 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 16:42:01 2017 +0300

--
 aria/modeling/orchestration.py| 6 +-
 aria/orchestrator/context/operation.py| 3 ---
 aria/orchestrator/workflows/core/engine.py| 8 ++--
 aria/orchestrator/workflows/events_logging.py | 8 
 aria/orchestrator/workflows/executor/base.py  | 6 ++
 tests/end2end/testenv.py  | 1 +
 6 files changed, 10 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7c5b9ff7/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 11a4684..007eefa 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -259,7 +259,6 @@ class TaskBase(mixins.ModelMixin):
 __private_fields__ = ['dependency_operation_task_fk', 
'dependency_stub_task_fk', 'node_fk',
   'relationship_fk', 'plugin_fk', 'execution_fk']
 
-
 START_WORKFLOW = 'start_workflow'
 END_WORKFLOW = 'end_workflow'
 START_SUBWROFKLOW = 'start_subworkflow'
@@ -408,10 +407,7 @@ class TaskBase(mixins.ModelMixin):
 return relationship.one_to_many_self(cls, 'dependency_fk')
 
 def has_ended(self):
-if self.stub_type is not None:
-return self.status == self.SUCCESS
-else:
-return self.status in (self.SUCCESS, self.FAILED)
+return self.status in (self.SUCCESS, self.FAILED)
 
 def is_waiting(self):
 if self.stub_type:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7c5b9ff7/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7591d70..6071c9b 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -59,9 +59,6 @@ class BaseOperationContext(common.BaseContext):
 self._thread_local.task = self.model.task.get(self._task_id)
 return self._thread_local.task
 
-def update_task(self):
-self.model.task.update(self.task)
-
 @property
 def plugin_workdir(self):
 """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7c5b9ff7/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 9ac7215..db5cc8e 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -73,7 +73,6 @@ class Engine(logger.LoggerMixin):
 will be modified to 'cancelled' directly.
 """
 events.on_cancelling_workflow_signal.send(ctx)
-ctx.execution = ctx.execution
 
 @staticmethod
 def _is_cancel(ctx):
@@ -95,8 +94,7 @@ class Engine(logger.LoggerMixin):
 
 @staticmethod
 def _task_has_dependencies(ctx, task):
-return task.dependencies and \
-   all(d in ctx.graph for d in task.dependencies)
+return len(ctx.graph.pred.get(task, [])) > 0
 
 @staticmethod
 def _all_tasks_consumed(ctx):
@@ -105,9 +103,7 @@ class Engine(logger.LoggerMixin):
 @staticmethod
 def _tasks_iter(ctx):
 for task in ctx.execution.tasks:
-if not task.has_ended():
-task = ctx.model.task.refresh(task)
-yield task
+yield ctx.model.task.refresh(task)
 
 def _handle_executable_task(self, ctx, task):
 if task._executor not in self._executors:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7c5b9ff7/aria/orchestrator/workflows/events_logging.py
--
diff --git a/aria/orchestrator/workflows/events_logging.py 
b/aria/orchestrator/workflows/events_logging.py
index e45367f..543e190 100644
--- a/aria/orchestrator/workflows/events_logging.py
+++ b/aria/orchestrator/workflows/events_logging.py
@@ -81,8 +81,8 @@ def 

incubator-ariatosca git commit: shited stuff around

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks d1cfd261d -> 5fce85b12


shited stuff around


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 5fce85b12ddd7ac0feebecbb456e7240ff2512ca
Parents: d1cfd26
Author: max-orlov 
Authored: Thu Jun 15 11:03:15 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 11:03:15 2017 +0300

--
 aria/modeling/orchestration.py |  3 +-
 aria/orchestrator/context/operation.py |  8 
 aria/orchestrator/workflow_runner.py   | 24 +-
 aria/orchestrator/workflows/executor/base.py   | 48 +--
 aria/orchestrator/workflows/executor/dry.py| 51 ++---
 tests/orchestrator/workflows/core/test_task.py |  5 +-
 6 files changed, 70 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5fce85b1/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 6f69483..11a4684 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -452,7 +452,8 @@ class TaskBase(mixins.ModelMixin):
 'api_id': api_task.id,
 '_context_cls': context_cls,
 '_executor': executor,
-})
+}
+)
 
 instantiation_kwargs.update(**kwargs)
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5fce85b1/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7477912..7591d70 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -18,6 +18,7 @@ Workflow and operation contexts
 """
 
 import threading
+from contextlib import contextmanager
 
 import aria
 from aria.utils import file
@@ -109,6 +110,13 @@ class BaseOperationContext(common.BaseContext):
 self.model.log._session.remove()
 self.model.log._engine.dispose()
 
+@property
+@contextmanager
+def track_task(self):
+self.model.task.update(self.task)
+yield
+self.model.task.update(self.task)
+
 
 class NodeOperationContext(BaseOperationContext):
 """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5fce85b1/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index f0a48ad..b24e474 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -29,7 +29,7 @@ from .workflows import builtin
 from .workflows.core.engine import Engine
 from .workflows.executor.process import ProcessExecutor
 from .workflows.executor.base import StubTaskExecutor
-from .workflows.api import task
+from .workflows.api import task as api_task
 from ..modeling import models
 from ..modeling import utils as modeling_utils
 from ..utils.imports import import_fullname
@@ -180,9 +180,9 @@ class WorkflowRunner(object):
 
 def get_execution_graph(execution):
 graph = DiGraph()
-for t in execution.tasks:
-for dependency in t.dependencies:
-graph.add_edge(dependency, t)
+for task in execution.tasks:
+for dependency in task.dependencies:
+graph.add_edge(dependency, task)
 
 return graph
 
@@ -210,16 +210,16 @@ def construct_execution_tasks(execution,
  stub_type=start_stub_type,
  dependencies=depends_on)
 
-for api_task in task_graph.topological_order(reverse=True):
+for task in task_graph.topological_order(reverse=True):
 operation_dependencies = _get_tasks_from_dependencies(
-execution, task_graph.get_dependencies(api_task), [start_task])
+execution, task_graph.get_dependencies(task), [start_task])
 
-if isinstance(api_task, task.OperationTask):
-models.Task.from_api_task(api_task=api_task,
+if isinstance(task, api_task.OperationTask):
+models.Task.from_api_task(api_task=task,
   executor=default_executor,
   dependencies=operation_dependencies)
 
-elif isinstance(api_task, task.WorkflowTask):
+

incubator-ariatosca git commit: optimization - try1

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks d517b820e -> 15a1f66f9


optimization - try1


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 15a1f66f9ca8c51746a92cea59cf14b3c043b2fd
Parents: d517b82
Author: max-orlov 
Authored: Thu Jun 15 18:44:51 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 18:44:51 2017 +0300

--
 aria/orchestrator/workflows/core/engine.py  |   9 +-
 .../workflows/core/events_handler.py| 129 +--
 aria/orchestrator/workflows/executor/base.py|   9 +-
 3 files changed, 72 insertions(+), 75 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/15a1f66f/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 48fb60a..e547aa1 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -38,6 +38,7 @@ class Engine(logger.LoggerMixin):
 def __init__(self, executor, **kwargs):
 super(Engine, self).__init__(**kwargs)
 self._executors = {executor.__class__: executor}
+self._executing_tasks = []
 
 def execute(self, ctx):
 """
@@ -88,7 +89,7 @@ class Engine(logger.LoggerMixin):
 )
 
 def _ended_tasks(self, ctx):
-for task in self._tasks_iter(ctx):
+for task in self._executing_tasks:
 if task.has_ended() and task in ctx._graph:
 yield task
 
@@ -122,12 +123,14 @@ class Engine(logger.LoggerMixin):
 name=task.name
 )
 
+self._executing_tasks.append(task)
+
 if not task.stub_type:
 events.sent_task_signal.send(op_ctx)
 executor.execute(op_ctx)
 
-@staticmethod
-def _handle_ended_tasks(ctx, task):
+def _handle_ended_tasks(self, ctx, task):
+self._executing_tasks.remove(task)
 if task.status == models.Task.FAILED and not task.ignore_failure:
 raise exceptions.ExecutorException('Workflow failed')
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/15a1f66f/aria/orchestrator/workflows/core/events_handler.py
--
diff --git a/aria/orchestrator/workflows/core/events_handler.py 
b/aria/orchestrator/workflows/core/events_handler.py
index 3a780d5..1f03167 100644
--- a/aria/orchestrator/workflows/core/events_handler.py
+++ b/aria/orchestrator/workflows/core/events_handler.py
@@ -31,108 +31,99 @@ from ... import exceptions
 
 @events.sent_task_signal.connect
 def _task_sent(ctx, *args, **kwargs):
-with ctx.track_changes:
-ctx.task.status = ctx.task.SENT
+ctx.task.status = ctx.task.SENT
 
 
 @events.start_task_signal.connect
 def _task_started(ctx, *args, **kwargs):
-with ctx.track_changes:
-ctx.task.started_at = datetime.utcnow()
-ctx.task.status = ctx.task.STARTED
-_update_node_state_if_necessary(ctx, is_transitional=True)
+ctx.task.started_at = datetime.utcnow()
+ctx.task.status = ctx.task.STARTED
+_update_node_state_if_necessary(ctx, is_transitional=True)
 
 
 @events.on_failure_task_signal.connect
 def _task_failed(ctx, exception, *args, **kwargs):
-with ctx.track_changes:
-should_retry = all([
-not isinstance(exception, exceptions.TaskAbortException),
-ctx.task.attempts_count < ctx.task.max_attempts or
-ctx.task.max_attempts == ctx.task.INFINITE_RETRIES,
-# ignore_failure check here means the task will not be retried and 
it will be marked
-# as failed. The engine will also look at ignore_failure so it 
won't fail the
-# workflow.
-not ctx.task.ignore_failure
-])
-if should_retry:
-retry_interval = None
-if isinstance(exception, exceptions.TaskRetryException):
-retry_interval = exception.retry_interval
-if retry_interval is None:
-retry_interval = ctx.task.retry_interval
-ctx.task.status = ctx.task.RETRYING
-ctx.task.attempts_count += 1
-ctx.task.due_at = datetime.utcnow() + 
timedelta(seconds=retry_interval)
-else:
-ctx.task.ended_at = datetime.utcnow()
-ctx.task.status = ctx.task.FAILED
+should_retry = 

incubator-ariatosca git commit: optimization - try1 [Forced Update!]

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks 15a1f66f9 -> f198fc05e (forced update)


optimization - try1


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: f198fc05e29aacc4c7d822be4a63e68233375df7
Parents: d517b82
Author: max-orlov 
Authored: Thu Jun 15 18:44:51 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 19:08:08 2017 +0300

--
 aria/orchestrator/workflows/core/engine.py | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f198fc05/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 48fb60a..e547aa1 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -38,6 +38,7 @@ class Engine(logger.LoggerMixin):
 def __init__(self, executor, **kwargs):
 super(Engine, self).__init__(**kwargs)
 self._executors = {executor.__class__: executor}
+self._executing_tasks = []
 
 def execute(self, ctx):
 """
@@ -88,7 +89,7 @@ class Engine(logger.LoggerMixin):
 )
 
 def _ended_tasks(self, ctx):
-for task in self._tasks_iter(ctx):
+for task in self._executing_tasks:
 if task.has_ended() and task in ctx._graph:
 yield task
 
@@ -122,12 +123,14 @@ class Engine(logger.LoggerMixin):
 name=task.name
 )
 
+self._executing_tasks.append(task)
+
 if not task.stub_type:
 events.sent_task_signal.send(op_ctx)
 executor.execute(op_ctx)
 
-@staticmethod
-def _handle_ended_tasks(ctx, task):
+def _handle_ended_tasks(self, ctx, task):
+self._executing_tasks.remove(task)
 if task.status == models.Task.FAILED and not task.ignore_failure:
 raise exceptions.ExecutorException('Workflow failed')
 else:



incubator-ariatosca git commit: removed a test

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks aa6f801de -> 9bad514e6


removed a test


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: 9bad514e62edaa289f1fd9f794a3efb6bab20c93
Parents: aa6f801
Author: max-orlov 
Authored: Thu Jun 15 22:04:08 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 22:04:08 2017 +0300

--
 tests/orchestrator/workflows/executor/test_process_executor.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/9bad514e/tests/orchestrator/workflows/executor/test_process_executor.py
--
diff --git a/tests/orchestrator/workflows/executor/test_process_executor.py 
b/tests/orchestrator/workflows/executor/test_process_executor.py
index cde5402..99e0e91 100644
--- a/tests/orchestrator/workflows/executor/test_process_executor.py
+++ b/tests/orchestrator/workflows/executor/test_process_executor.py
@@ -74,6 +74,7 @@ class TestProcessExecutor(object):
 events.on_success_task_signal.disconnect(handler)
 events.on_failure_task_signal.disconnect(handler)
 
+@pytest.mark.skip("This test currently might freeze the entire test")
 def test_closed(self, ctx, executor):
 executor.close()
 node = next(ctx.nodes)
@@ -114,4 +115,4 @@ def ctx(tmpdir):
 
 @pytest.fixture
 def model(ctx):
-return ctx.model
\ No newline at end of file
+return ctx.model



Re: New mailing lists

2017-06-15 Thread Arthur Berezin
So, now that we have comm...@ariatosca.apache.org
 mailing
list, how do we reconfigure the commit notification emails to go to the new
list?

On Sun, Jun 4, 2017 at 5:26 AM Arthur Berezin  wrote:

> Sorry for late reply. Unfortunately it's the best we can currently get
> from this bot. Seems there aren't too many Slack-to-email options out there.
>
> On Thu, May 25, 2017, 19:20 Ran Ziv  wrote:
>
>> Thank you for weighing in Matej. Glad to hear you're okay with the slack
>> digests.
>>
>> Arthur, have you had the chance to see if the bot's format can be adjusted
>> to be, um, somewhat prettier..?
>>
>> On Tue, May 23, 2017 at 6:58 PM, Matej Artač  wrote:
>>
>> > Hello Ran,
>> >
>> > I as an observer am quite fine with having digests or transcripts from
>> > Slack appear in the mailing list.
>> >
>> > As far as I understand, Slack is reserved to people with Apache ID, so
>> > getting the conversation onto the mailing list would be good.
>> >
>> > Best regards,
>> > Matej
>> >
>> >
>> > Ran Ziv je 21.5.2017 ob 14:03 napisal:
>> >
>> > Matej, John etc. - The issue we keep coming back to, and the reason we
>> try
>> >> to avoid emails, is that discussions on emails are simply much slower
>> than
>> >> ones on Slack.
>> >>
>> >> John, regarding summarizing slack conversations on the mailing list
>> >> manually - that's possible, but then I feel like we might be getting
>> the
>> >> worst of both worlds - someone would have to spend the time summarizing
>> >> the
>> >> conversation, plus it would not be as complete as it would have been
>> had
>> >> it
>> >> been copied in its entirety (or, alternatively, have taken place
>> entirely
>> >> over the mailing list). I personally think the bot - assuming we can
>> >> improve its format somewhat - is actually more useful in that regard,
>> even
>> >> when excluding the work one would have to do to summarize the
>> >> conversation.
>> >>
>> >> Arthur (and also Tal, who suggested it on Slack) - I'm very much
>> against
>> >> moving specifically the daily updates to the mailing list, keeping
>> >> everything else on Slack. IMO it makes sense to do it exactly the other
>> >> way
>> >> around. The updates are about things which are in progress, and are
>> much
>> >> less relevant to the mailing list than actual discussions and
>> >> announcements
>> >> over completed features etc.
>> >>
>> >>
>> >> We need to find the right balance between the overhead the mailing list
>> >> incurs and the need to have everything logged on the list - and IMO the
>> >> bot
>> >> is the best solution at this time.
>> >> However, John, if you think otherwise, even after taking into
>> >> consideration
>> >> what I've mentioned above, then let us know what other flow you suggest
>> >> exactly, and we'll follow that instead.
>> >>
>> >>
>> >> Ran
>> >>
>> >>
>> >>
>> >>
>> >> On Tue, May 16, 2017 at 8:04 AM, Matej Artač 
>> wrote:
>> >>
>> >> Dear all,
>> >>>
>> >>> I like this proposal. I am an outsider who is interested in the
>> >>> activities
>> >>> and progress of your project. It would be really great for me if this
>> >>> mailing list would contain what John suggests. I think it would
>> greatly
>> >>> improve visibility into your project and likely provide a grounds for
>> >>> some
>> >>> additional discussion and comments from a larger community.
>> >>>
>> >>> Best regards,
>> >>> Matej
>> >>>
>> >>>
>> >>> John D. Ament je 15.5.2017 ob 16:12 napisal:
>> >>>
>> >>> No, and that's sort of the issue at hand here.  I've requested these
>> >>>
>>  mailing list changes because the dev@ traffic is typically github or
>>  JIRA
>>  chatter.  We have no on list discussions.  I'm basically trying to
>> force
>>  you guys to actually talk to one another via email, since our other
>>  attempts have not worked out well.
>> 
>>  I would expect that Slack discussions are summarized here by those
>>  participating in them.  Not automatically.
>> 
>>  John
>> 
>>  On Tue, May 9, 2017 at 10:00 PM Arthur Berezin <
>> art...@gigaspaces.com>
>>  wrote:
>> 
>>  I missed the Slack chat, but sounds good +1. Is there an easy way to
>>  get a
>> 
>> > digest of the slack chat over dev mailing list?
>> >
>> > On Tue, May 9, 2017, 21:43 John D. Ament 
>> > wrote:
>> >
>> > All,
>> >
>> >> Based on a brief chat on Slack, I'm going to go ahead and create
>> two
>> >> new
>> >> mailing lists:
>> >>
>> >> - commits@
>> >> - issues@
>> >>
>> >> The reason being, the dev list is designed for developer
>> discussions,
>> >> but
>> >> most of the banter is on JIRA issues or GitHub PRs/commits.  To
>> >>
>> >> effectively
>> >
>> > measure the community openness we need to separate the types.
>> 

[Slack] Notifications from the ASF team for June 16th, 2017 at 8:17 AM

2017-06-15 Thread Slack
Hi ARIA TOSCA,

You have a new direct message from the ASF team
(https://the-asf.slack.com/x-185534614710-198733309090/).

---

@digestai
View in the archives:
https://the-asf.slack.com/x-185534614710-198733309090/archives/D5E4SCANM/p1497589326397850

Digest.AI (8:02 AM, June 16th)
Hi ARIA,
*Here’s your digest for June 16th 2017*
There are 5 messages yesterday, and the most active user is jamesbognar

*#ariatosca*
 @ran: [UPDATE] Merged ARIA-54 which was mostly about sorting out our
project's top level files - added NOTICE, DISCLAIMER, etc...; Makefile
has also been updated by Tal :slightly_smiling_face:





* * *

You can snooze these notifications for
an hour:
https://the-asf.slack.com/unsub/U5FFQJ2LW-5a1cb74d28-notify-mute-1h
eight hours:
https://the-asf.slack.com/unsub/U5FFQJ2LW-796e6535e1-notify-mute-8h
a day:
https://the-asf.slack.com/unsub/U5FFQJ2LW-4e6e073ada-notify-mute-1d
three days:
https://the-asf.slack.com/unsub/U5FFQJ2LW-806a2d8aa0-notify-mute-3d
or the next week:
https://the-asf.slack.com/unsub/U5FFQJ2LW-6adc840c34-notify-mute-7d.

You can also turn email notifications off:
https://the-asf.slack.com/unsub/U5FFQJ2LW-64de78982b-notify.

For more detailed preferences, see your account page:
https://the-asf.slack.com/account.


incubator-ariatosca git commit: tiny fix to testenv [Forced Update!]

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks 23ac30197 -> f29148af4 (forced update)


tiny fix to testenv


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

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: f29148af40766753817d5528660c474f19484411
Parents: 7c5b9ff
Author: max-orlov 
Authored: Thu Jun 15 17:32:53 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 18:14:32 2017 +0300

--
 aria/orchestrator/context/operation.py|  2 +-
 aria/orchestrator/context/workflow.py |  4 ++--
 aria/orchestrator/workflows/core/engine.py|  8 
 .../orchestrator/workflows/core/events_handler.py | 18 +-
 aria/orchestrator/workflows/events_logging.py | 16 
 aria/orchestrator/workflows/executor/base.py  |  4 ++--
 aria/orchestrator/workflows/executor/dry.py   |  2 +-
 tests/end2end/testenv.py  |  4 +++-
 .../core/test_task_graph_into_execution_graph.py  |  2 +-
 9 files changed, 31 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f29148af/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 6071c9b..2e897b5 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -109,7 +109,7 @@ class BaseOperationContext(common.BaseContext):
 
 @property
 @contextmanager
-def track_task(self):
+def track_changes(self):
 self.model.task.update(self.task)
 yield
 self.model.task.update(self.task)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f29148af/aria/orchestrator/context/workflow.py
--
diff --git a/aria/orchestrator/context/workflow.py 
b/aria/orchestrator/context/workflow.py
index 6a7fb1b..ce7a892 100644
--- a/aria/orchestrator/context/workflow.py
+++ b/aria/orchestrator/context/workflow.py
@@ -96,7 +96,7 @@ class WorkflowContext(BaseContext):
 )
 
 @property
-def graph(self):
+def _graph(self):
 if self._execution_graph is None:
 graph = DiGraph()
 for task in self.execution.tasks:
@@ -109,7 +109,7 @@ class WorkflowContext(BaseContext):
 
 @property
 @contextmanager
-def track_execution(self):
+def track_changes(self):
 self._model.execution.update(self.execution)
 yield
 self._model.execution.update(self.execution)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f29148af/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index db5cc8e..48fb60a 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -89,16 +89,16 @@ class Engine(logger.LoggerMixin):
 
 def _ended_tasks(self, ctx):
 for task in self._tasks_iter(ctx):
-if task.has_ended() and task in ctx.graph:
+if task.has_ended() and task in ctx._graph:
 yield task
 
 @staticmethod
 def _task_has_dependencies(ctx, task):
-return len(ctx.graph.pred.get(task, [])) > 0
+return len(ctx._graph.pred.get(task, [])) > 0
 
 @staticmethod
 def _all_tasks_consumed(ctx):
-return len(ctx.graph.node) == 0
+return len(ctx._graph.node) == 0
 
 @staticmethod
 def _tasks_iter(ctx):
@@ -131,4 +131,4 @@ class Engine(logger.LoggerMixin):
 if task.status == models.Task.FAILED and not task.ignore_failure:
 raise exceptions.ExecutorException('Workflow failed')
 else:
-ctx.graph.remove_node(task)
+ctx._graph.remove_node(task)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f29148af/aria/orchestrator/workflows/core/events_handler.py
--
diff --git a/aria/orchestrator/workflows/core/events_handler.py 
b/aria/orchestrator/workflows/core/events_handler.py
index b9d467d..3a780d5 100644
--- a/aria/orchestrator/workflows/core/events_handler.py
+++ b/aria/orchestrator/workflows/core/events_handler.py
@@ -31,13 +31,13 @@ from ... import exceptions
 
 @events.sent_task_signal.connect
 def 

[2/2] incubator-ariatosca git commit: wip

2017-06-15 Thread mxmrlv
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/d517b820
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d517b820
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d517b820

Branch: refs/heads/ARIA-278-Remove-core-tasks
Commit: d517b820e45cb5d59e23045710417f2562228efa
Parents: 2149a5e
Author: max-orlov 
Authored: Sun Jun 11 19:05:35 2017 +0300
Committer: max-orlov 
Committed: Thu Jun 15 18:15:33 2017 +0300

--
 aria/modeling/mixins.py |   4 +-
 aria/modeling/orchestration.py  | 145 +++---
 aria/orchestrator/context/operation.py  |   8 +
 aria/orchestrator/context/workflow.py   |  22 ++
 aria/orchestrator/workflow_runner.py| 113 +++-
 aria/orchestrator/workflows/core/__init__.py|   2 +-
 aria/orchestrator/workflows/core/engine.py  | 115 
 .../workflows/core/events_handler.py| 138 +-
 aria/orchestrator/workflows/core/task.py| 271 ---
 aria/orchestrator/workflows/core/translation.py | 109 
 aria/orchestrator/workflows/events_logging.py   |  63 +++--
 aria/orchestrator/workflows/executor/base.py|  36 +--
 aria/orchestrator/workflows/executor/dry.py |  57 ++--
 aria/orchestrator/workflows/executor/process.py |  18 +-
 aria/orchestrator/workflows/executor/thread.py  |  18 +-
 tests/end2end/testenv.py|   3 +
 tests/orchestrator/context/__init__.py  |   9 +-
 tests/orchestrator/context/test_operation.py|  26 +-
 tests/orchestrator/context/test_serialize.py|   8 +-
 .../orchestrator/execution_plugin/test_local.py |  12 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  12 +-
 tests/orchestrator/test_workflow_runner.py  |  30 +-
 .../orchestrator/workflows/core/test_engine.py  |  24 +-
 .../orchestrator/workflows/core/test_events.py  |  22 +-
 tests/orchestrator/workflows/core/test_task.py  |  31 +--
 .../test_task_graph_into_execution_graph.py |  63 ++---
 .../orchestrator/workflows/executor/__init__.py |  75 +++--
 .../workflows/executor/test_executor.py |  83 +++---
 .../workflows/executor/test_process_executor.py |  51 +++-
 .../executor/test_process_executor_extension.py |   8 +-
 .../test_process_executor_tracked_changes.py|   8 +-
 31 files changed, 727 insertions(+), 857 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d517b820/aria/modeling/mixins.py
--
diff --git a/aria/modeling/mixins.py b/aria/modeling/mixins.py
index c98a866..31675fe 100644
--- a/aria/modeling/mixins.py
+++ b/aria/modeling/mixins.py
@@ -18,14 +18,12 @@ classes:
 * ModelMixin - abstract model implementation.
 * ModelIDMixin - abstract model implementation with IDs.
 """
-
 from sqlalchemy.ext import associationproxy
 from sqlalchemy import (
 Column,
 Integer,
 Text,
-PickleType
-)
+PickleType)
 
 from ..parser.consumption import ConsumptionContext
 from ..utils import console, collections, caching, formatting

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d517b820/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 995c8c2..007eefa 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -21,7 +21,6 @@ classes:
 """
 
 # pylint: disable=no-self-argument, no-member, abstract-method
-
 from datetime import datetime
 
 from sqlalchemy import (
@@ -34,19 +33,19 @@ from sqlalchemy import (
 String,
 Float,
 orm,
-)
+PickleType)
 from sqlalchemy.ext.associationproxy import association_proxy
 from sqlalchemy.ext.declarative import declared_attr
 
 from ..orchestrator.exceptions import (TaskAbortException, TaskRetryException)
-from .mixins import ModelMixin, ParameterMixin
+from . import mixins
 from . import (
 relationship,
 types as modeling_types
 )
 
 
-class ExecutionBase(ModelMixin):
+class ExecutionBase(mixins.ModelMixin):
 """
 Execution model representation.
 """
@@ -152,7 +151,7 @@ class ExecutionBase(ModelMixin):
 )
 
 
-class PluginBase(ModelMixin):
+class PluginBase(mixins.ModelMixin):
 """
 An installed plugin.
 
@@ -213,7 +212,7 @@ class PluginBase(ModelMixin):
 uploaded_at = Column(DateTime, nullable=False, index=True)
 
 
-class TaskBase(ModelMixin):
+class TaskBase(mixins.ModelMixin):
 """
 Represents the smallest unit of stateful execution in ARIA. The task state 
includes inputs,
 outputs, as well as an atomic status, 

[1/2] incubator-ariatosca git commit: wip [Forced Update!]

2017-06-15 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-278-Remove-core-tasks f29148af4 -> d517b820e (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d517b820/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
--
diff --git 
a/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py 
b/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
index 5dd2855..de40fcf 100644
--- a/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
+++ b/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
@@ -13,12 +13,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from networkx import topological_sort, DiGraph
-
-from aria.orchestrator import context
-from aria.orchestrator.workflows import api, core
+from networkx import topological_sort
+
+from aria.modeling import models
+from aria.orchestrator import (
+context,
+workflow_runner
+)
+from aria.orchestrator.workflows import api
 from aria.orchestrator.workflows.executor import base
-
 from tests import mock
 from tests import storage
 
@@ -26,8 +29,8 @@ from tests import storage
 def test_task_graph_into_execution_graph(tmpdir):
 interface_name = 'Standard'
 operation_name = 'create'
-task_context = mock.context.simple(str(tmpdir))
-node = 
task_context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
+workflow_context = mock.context.simple(str(tmpdir))
+node = 
workflow_context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
 interface = mock.models.create_interface(
 node.service,
 interface_name,
@@ -35,12 +38,12 @@ def test_task_graph_into_execution_graph(tmpdir):
 operation_kwargs=dict(function='test')
 )
 node.interfaces[interface.name] = interface
-task_context.model.node.update(node)
+workflow_context.model.node.update(node)
 
 def sub_workflow(name, **_):
 return api.task_graph.TaskGraph(name)
 
-with context.workflow.current.push(task_context):
+with context.workflow.current.push(workflow_context):
 test_task_graph = api.task.WorkflowTask(sub_workflow, 
name='test_task_graph')
 simple_before_task = api.task.OperationTask(
 node,
@@ -65,11 +68,12 @@ def test_task_graph_into_execution_graph(tmpdir):
 test_task_graph.add_dependency(simple_after_task, inner_task_graph)
 
 # Direct check
-execution_graph = DiGraph()
-core.translation.build_execution_graph(task_graph=test_task_graph,
-   execution_graph=execution_graph,
-   
default_executor=base.StubTaskExecutor())
-execution_tasks = topological_sort(execution_graph)
+execution = workflow_context.model.execution.list()[0]
+
+workflow_runner.construct_execution_tasks(execution, test_task_graph, 
base.StubTaskExecutor)
+workflow_context.execution = execution
+
+execution_tasks = topological_sort(workflow_context._graph)
 
 assert len(execution_tasks) == 7
 
@@ -83,30 +87,23 @@ def test_task_graph_into_execution_graph(tmpdir):
 '{0}-End'.format(test_task_graph.id)
 ]
 
-assert expected_tasks_names == execution_tasks
-
-assert isinstance(_get_task_by_name(execution_tasks[0], execution_graph),
-  core.task.StartWorkflowTask)
-
-_assert_execution_is_api_task(_get_task_by_name(execution_tasks[1], 
execution_graph),
-  simple_before_task)
-assert isinstance(_get_task_by_name(execution_tasks[2], execution_graph),
-  core.task.StartSubWorkflowTask)
+assert expected_tasks_names == [t.api_id for t in execution_tasks]
+assert all(isinstance(task, models.Task) for task in execution_tasks)
+execution_tasks = iter(execution_tasks)
 
-_assert_execution_is_api_task(_get_task_by_name(execution_tasks[3], 
execution_graph),
-  inner_task)
-assert isinstance(_get_task_by_name(execution_tasks[4], execution_graph),
-  core.task.EndSubWorkflowTask)
+assert next(execution_tasks).stub_type == models.Task.START_WORKFLOW
+_assert_execution_is_api_task(next(execution_tasks), simple_before_task)
+assert next(execution_tasks).stub_type == models.Task.START_SUBWROFKLOW
+_assert_execution_is_api_task(next(execution_tasks), inner_task)
+assert next(execution_tasks).stub_type == models.Task.END_SUBWORKFLOW
+_assert_execution_is_api_task(next(execution_tasks), simple_after_task)
+assert next(execution_tasks).stub_type == models.Task.END_WORKFLOW
 
-_assert_execution_is_api_task(_get_task_by_name(execution_tasks[5], 
execution_graph),
-  simple_after_task)
-assert 

Re: ARIA dependencies License issues

2017-06-15 Thread John D. Ament
Ran,

I believe the reason you're not getting a response is that this isn't the
right list to bring it up.  I can provide some insight, but ultimately you
need to get some legal input (from legal-discuss)

- Code formatting shouldn't be an issue, since its not required for the
execution of the code.
- Paramiko would be an issue.  I would not include it as a dependency.

John

On Wed, Jun 14, 2017 at 11:17 AM Ran Ziv  wrote:

> Bumping this again, still waiting for answers on these issues.
>
> On Sun, Jun 4, 2017 at 3:02 PM, Ran Ziv  wrote:
>
> > Hi,
> >
> > I went over all of ARIA's dependencies (including recursive dependencies)
> > and validated them against the Apache allowed licenses
> > .
> > We've done this before and found no issues, but this time two libraries
> > came up as a possible problem. I have a few theories about how this might
> > have happened, but what's more important is to understand what we can do
> > about it.
> >
> > John, Suneel - I was hoping you might be able to answer some of the legal
> > questions / suggestions I've made below. If not, please advise where I
> > might be able to get answers for those.
> >
> >
> > The first package is PyLint (GPL2.0) - This is the tool we use for
> > validating our Python code format. This is only relevant for development
> > purposes, and would not be packaged with ARIA - not even in the source
> > distribution format.
> > It is installed from the tests/requirements.txt file, and is used by tox
> > on CIs or manually by developers.
> > I'm not sure if this is a problem from Apache's perspective - i'd assume
> > it shouldn't be, but if it is we could supposedly simply work with a
> > different tool for this.
> >
> >
> > The more serious issue is with the Paramiko package (LGPL2.1) - Paramiko
> > is the native python implementation for SSH, and is widely used in Python
> > ecosystem - including in Fabric, which is the library ARIA uses for
> remote
> > execution in the execution-plugin.
> > I believe the main reason we haven't noticed this so far is because in
> the
> > past we only checked for non-recursive dependencies - and Fabric is
> > licensed under BSD-2-clause, which is allowed by Apache.
> >
> > Since ARIA doesn't use Paramiko directly (but only via Fabric), this
> might
> > be considered ok.
> > Otherwise, we have few other options:
> >
> > I'm not completely clear about what constitutes as "included packages" -
> > When we will make a release, we'll distribute a source and binary
> packages
> > of ARIA, but no packages which actually contain any dependencies code -
> > those will be installed separately (e.g. from PyPI).
> >
> > Assuming this is not enough to claim that these packages are "not
> > included" with ARIA, we could remove Fabric (and thereby Paramiko) from
> > ARIA's dependencies, but leave the code using them inside - This way,
> when
> > a user installs ARIA, they won't automatically receive any
> > non-ASF-sanctioned dependency code, and ARIA will work but without any
> > remote execution capabilities - and all that would be required from the
> > user to add these capabilities is to manually install the Fabric library.
> > This way, Fabric is treated like an extension or a plugin, so I'd like to
> > think this is something acceptable according to Apache's legal
> constraints.
> >
> > If this too is not acceptable, because ARIA will still have references to
> > Fabric in the code (despite Fabric not getting installed), then perhaps
> we
> > could extract the referencing code as well into a separate package which
> > lives outside of ASF, and users would have to install this separate
> package
> > to be able to use the remote execution capabilities.
> >
> >
> > Finally, if none of my suggestions above pans out, I'd suggest we
> > temporarily remove the remote execution capabilities, aim for an ARIA
> > release with local capabilities only, and try to figure a workaround for
> > the remote execution at a later date.
> >
> >
> > Thanks,
> > Ran.
> >
> >
>