Re: [DISCUSS] Rename ARIATOSCA to ARIA

2016-12-07 Thread Suneel Marthi
When reviewing the incubator proposal for this I recall someone from IPMC
mention a project from Mozilla called 'Aria' and this project choosing a
different name. Arthur had then suggested 'AriaTosca' and we went ahead
with that name when setting up this podling.

On Wed, Dec 7, 2016 at 8:56 PM, John D. Ament  wrote:

> All,
>
> I'm following up on this item.  There were previous discussion points about
> renaming the JIRA instance from ARIATOSCA to ARIA.  I've point out to the
> project in the past that the rename is meant to be a thorough process - all
> podling resources should be named consistently.
>
> If its decided to rename fro ARIATOSCA to ARIA, the following changes would
> be involved:
>
> - New JIRA project ARIA created.  No data retained.
> - Git repos renamed from incubator-ariatosca to incubator-aria
> - Maling lists renamed from @ariatosca.incubator.apache.org to @
> aria.incubator.apache.org
>
> I'm sure there are other resources as well.  The point is that within the
> ASF, we strive for consistency (the whole convention over configuration
> argument).  You will find two projects (that I can think of) that break
> this mold - and they break it really well.  AMQ and CMDA always require
> special handling.  CMDA is purely too long of a name
> (climatemodeldatanalyzer), and AMQ was simply the first JIRA project.
>
> If the podling chooses to rename itself, I don't have a personal opinion.
> I will point out that the name ARIA is not specially unique and wouldn't be
> something we could get a trademark on.  Its not that easy to defend.
> ARIATOSCA is very unique and can be defended as a trademark.
>
> John
>


Re: Dec 16 Podling Report

2016-12-07 Thread John D. Ament
I added the following mentor comment to the report:

  johndament:  The podling is still getting its feet wet.  Discussions are
starting to happen on the mailing lists rather than in physical offices
which is good and will help to bring about a more diverse community.  I
would also strongly encourage the podling to work with their mentors to get
infra changes in to avoid confusion.

On Mon, Dec 5, 2016 at 5:25 AM Arthur Berezin  wrote:

> +1
> Thanks, the "How to Contribute" guide is the first step towards starting to
> grow the community and encourage engagement and code contribution.
>
> On Mon, Dec 5, 2016 at 4:50 AM Suneel Marthi 
> wrote:
>
> > Updated the Dec 16 draft, see
> >
> >
> https://cwiki.apache.org/confluence/display/ARIATOSCA/Podling+Report+2016-12
> >
> > If Ok, I'll post the same to Incubator.
> >
> > Here's my +1
> >
> > On Sun, Dec 4, 2016 at 9:25 PM, John D. Ament 
> > wrote:
> >
> > > +1
> > > Its important to remember that graduation is not around technical
> merits
> > > but all about functional.  There are some basic mechanical things -
> > cutting
> > > valid releases but the bulk of it is around community.
> > >
> > > On Sun, Dec 4, 2016 at 7:39 PM Suneel Marthi 
> wrote:
> > >
> > > > What's most important for the graduation is the growth in community
> > that
> > > > includes committers and contributions from outside of Gigaspaces,
> > that's
> > > > something we need to work on as a higher priority.
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > AriaTosca  ARIA TOSCA project offers an easily consumable Software
> > > > Development Kit(SDK) and a Command Line Interface(CLI) to implement
> > > > TOSCA(Topology and Orchestration Specification of Cloud Applications)
> > > > based solutions.  AriaTosca has been incubating since 2016-08-27.
> > > > Three most important issues to address in the move towards
> graduation:
> > > >
> > > >1. Model storage mechanisem, and execution plugin.
> > > >
> > > > >>> Replace this with 'Grow community and enroll new committers"
> > > >
> > > >2. Update ARIA website acording to ASF guideline(Include release
> > > > process for ARIA-TOSCA Project)
> > > >
> > > >3. Publish "How To Contribute" guide at ARIA-TOSCA Website.
> > > >
> > > >
> > > >
> > > >   Any issues that the Incubator PMC (IPMC) or ASF Board wish/need to
> > > > be aware of?
> > > > There's an INFRA jira we created over a month ago which has yet to be
> > > > addressed - please see here
> > > >
> > > > INFRA-12733  -
> > > Ability
> > > > to create a Sprint Board for AriaTosca WAITING FOR USER
> > > >
> > > > It is not entirely critical for the project's progress, but it could
> > > > be helpful if we indeed get a sprint board and the other things
> > > > requested in that issue.
> > > >
> > > >
> > > > How has the community developed since the last report?
> > > >
> > > >
> > > >- Open-O is in process for consuming the ARIA ASF package
> > > >- Cloudfiy is in process for consuming the ARIA ASF package as
> well.
> > > >
> > > >   How has the project developed since the last report?
> > > >
> > > >
> > > >-
> > > >
> > > >TOSCA parser migrated into ASF
> > > >
> > > >-
> > > >
> > > >CI on Appveyor, Jenkins
> > > >
> > > >-
> > > >
> > > >Sphinx documentation added to the project
> > > >
> > > >- CLIs of workflow engine and parser coalesced
> > > >- TOSCA CSAR packager added
> > > >- APIs for workflows, operations
> > > >- Workflow engine task retry support
> > > >- Workflow engine execution cancel support
> > > >
> > > >
> > > >
> > > >  Date of last release:
> > > >   -
> > > >
> > > >  When were the last committers or PMC members elected?
> > > >
> > > >Project is being established in incubator with the proposed
> initial
> > > set
> > > > of
> > > >   committers.
> > > >
> > > >  Signed-off-by:
> > > >
> > > >[ ](ariatosca) Suneel Marthi
> > > >[ ](ariatosca) John D. Ament
> > > >[ ](ariatosca) Jakob Homan
> > > >
> > > >  Shepherd/Mentor notes:
> > > >
> > >
> >
>


[DISCUSS] Rename ARIATOSCA to ARIA

2016-12-07 Thread John D. Ament
All,

I'm following up on this item.  There were previous discussion points about
renaming the JIRA instance from ARIATOSCA to ARIA.  I've point out to the
project in the past that the rename is meant to be a thorough process - all
podling resources should be named consistently.

If its decided to rename fro ARIATOSCA to ARIA, the following changes would
be involved:

- New JIRA project ARIA created.  No data retained.
- Git repos renamed from incubator-ariatosca to incubator-aria
- Maling lists renamed from @ariatosca.incubator.apache.org to @
aria.incubator.apache.org

I'm sure there are other resources as well.  The point is that within the
ASF, we strive for consistency (the whole convention over configuration
argument).  You will find two projects (that I can think of) that break
this mold - and they break it really well.  AMQ and CMDA always require
special handling.  CMDA is purely too long of a name
(climatemodeldatanalyzer), and AMQ was simply the first JIRA project.

If the podling chooses to rename itself, I don't have a personal opinion.
I will point out that the name ARIA is not specially unique and wouldn't be
something we could get a trademark on.  Its not that easy to defend.
ARIATOSCA is very unique and can be defended as a trademark.

John


Podling Report Reminder - December 2016

2016-12-07 Thread johndament
Dear podling,

This email was sent by an automated system on behalf of the Apache
Incubator PMC. It is an initial reminder to give you plenty of time to
prepare your quarterly board report.

The board meeting is scheduled for Wed, 21 December 2016, 10:30 am PDT.
The report for your podling will form a part of the Incubator PMC
report. The Incubator PMC requires your report to be submitted 2 weeks
before the board meeting, to allow sufficient time for review and
submission (Wed, December 07).

Please submit your report with sufficient time to allow the Incubator
PMC, and subsequently board members to review and digest. Again, the
very latest you should submit your report is 2 weeks prior to the board
meeting.

Thanks,

The Apache Incubator PMC

Submitting your Report

--

Your report should contain the following:

*   Your project name
*   A brief description of your project, which assumes no knowledge of
the project or necessarily of its field
*   A list of the three most important issues to address in the move
towards graduation.
*   Any issues that the Incubator PMC or ASF Board might wish/need to be
aware of
*   How has the community developed since the last report
*   How has the project developed since the last report.

This should be appended to the Incubator Wiki page at:

https://wiki.apache.org/incubator/December2016

Note: This is manually populated. You may need to wait a little before
this page is created from a template.

Mentors
---

Mentors should review reports for their project(s) and sign them off on
the Incubator wiki page. Signing off reports shows that you are
following the project - projects that are not signed may raise alarms
for the Incubator PMC.

Incubator PMC


incubator-ariatosca git commit: added cleanup func, better cleaning, and actor/instace.id test [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 86f4aa835 -> a58f6c4b2 
(forced update)


added cleanup func, better cleaning, and actor/instace.id 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/a58f6c4b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a58f6c4b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a58f6c4b

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: a58f6c4b2727e555940cfc0a11e346ddee7e2c82
Parents: 0003e47
Author: mxmrlv 
Authored: Wed Dec 7 14:36:43 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 21:18:12 2016 +0200

--
 aria/orchestrator/context/operation.py  |   2 +-
 aria/orchestrator/workflows/core/engine.py  |   6 +-
 tests/mock/context.py   |   3 -
 tests/orchestrator/context/test_operation.py|  44 +++-
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/context/test_workflow.py |  11 +-
 tests/orchestrator/workflows/api/test_task.py   |   4 +-
 .../workflows/builtin/test_execute_operation.py |   6 +-
 .../orchestrator/workflows/builtin/test_heal.py |   6 +-
 .../workflows/builtin/test_install.py   |   6 +-
 .../workflows/builtin/test_uninstall.py |   6 +-
 .../orchestrator/workflows/core/test_engine.py  |  19 ++--
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_exececution_graph.py   |   5 +-
 tests/storage/__init__.py   |  22 +++-
 tests/storage/test_model_storage.py |  11 +-
 tests/storage/test_models.py| 104 ++-
 17 files changed, 178 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a58f6c4b/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index a789e24..a73bad1 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -71,7 +71,7 @@ class NodeOperationContext(BaseOperationContext):
 The node instance of the current operation
 :return:
 """
-return self.model.node_instance.get(self._task_id)
+return self.model.node_instance.get(self._actor_id)
 
 
 class RelationshipOperationContext(BaseOperationContext):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a58f6c4b/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 87ea8c6..2d26aeb 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -100,7 +100,11 @@ class Engine(logger.LoggerMixin):
 return len(self._execution_graph.node) == 0
 
 def _tasks_iter(self):
-return (data['task'] for _, data in 
self._execution_graph.nodes_iter(data=True))
+for _, data in self._execution_graph.nodes_iter(data=True):
+task = data['task']
+if isinstance(task, engine_task.OperationTask):
+self._workflow_context.model.task.refresh(task.model_task)
+yield task
 
 def _handle_executable_task(self, task):
 if isinstance(task, engine_task.StubTask):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a58f6c4b/tests/mock/context.py
--
diff --git a/tests/mock/context.py b/tests/mock/context.py
index 7eb57ed..1904140 100644
--- a/tests/mock/context.py
+++ b/tests/mock/context.py
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import pytest
-
 from aria import application_model_storage
 from aria.orchestrator import context
 from aria.storage.sql_mapi import SQLAlchemyModelAPI
@@ -22,7 +20,6 @@ from aria.storage.sql_mapi import SQLAlchemyModelAPI
 from . import models
 
 
-@pytest.fixture
 def simple(api_kwargs, **kwargs):
 model_storage = application_model_storage(SQLAlchemyModelAPI, 
api_kwargs=api_kwargs)
 blueprint = models.get_blueprint()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a58f6c4b/tests/orchestrator/context/test_operation.py
--
diff --git a/tests/orchestrator/context/test_operation.py 
b/tests/orchestrator/context/test_operation.py
index f3af0c5..b5f52a3 100644
--- 

incubator-ariatosca git commit: tmp fix [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation df1c2abc0 -> 0f15c99f1 
(forced update)


tmp fix


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

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 0f15c99f15585b6b03a41ddb78d87c10fc848d81
Parents: 2fa5b7b
Author: mxmrlv 
Authored: Wed Dec 7 18:59:02 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 19:16:43 2016 +0200

--
 aria/orchestrator/workflows/core/engine.py | 12 +---
 tests/orchestrator/workflows/core/test_engine.py   |  1 -
 tests/orchestrator/workflows/executor/test_executor.py |  4 ++--
 tests/storage/__init__.py  |  7 +--
 4 files changed, 8 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0f15c99f/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 35aa976..2d26aeb 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -63,7 +63,6 @@ class Engine(logger.LoggerMixin):
 break
 else:
 time.sleep(0.1)
-self.refresh_tasks()
 if cancel:
 
events.on_cancelled_workflow_signal.send(self._workflow_context)
 else:
@@ -72,11 +71,6 @@ class Engine(logger.LoggerMixin):
 events.on_failure_workflow_signal.send(self._workflow_context, 
exception=e)
 raise
 
-def refresh_tasks(self):
-for task in self._tasks_iter():
-if isinstance(task, engine_task.OperationTask):
-self._workflow_context.model.task.refresh(task)
-
 def cancel_execution(self):
 """
 Send a cancel request to the engine. If execution already started, 
execution status
@@ -106,7 +100,11 @@ class Engine(logger.LoggerMixin):
 return len(self._execution_graph.node) == 0
 
 def _tasks_iter(self):
-return (data['task'] for _, data in 
self._execution_graph.nodes_iter(data=True))
+for _, data in self._execution_graph.nodes_iter(data=True):
+task = data['task']
+if isinstance(task, engine_task.OperationTask):
+self._workflow_context.model.task.refresh(task.model_task)
+yield task
 
 def _handle_executable_task(self, task):
 if isinstance(task, engine_task.StubTask):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0f15c99f/tests/orchestrator/workflows/core/test_engine.py
--
diff --git a/tests/orchestrator/workflows/core/test_engine.py 
b/tests/orchestrator/workflows/core/test_engine.py
index 8eaf0be..a231d10 100644
--- a/tests/orchestrator/workflows/core/test_engine.py
+++ b/tests/orchestrator/workflows/core/test_engine.py
@@ -214,7 +214,6 @@ class TestEngine(BaseTest):
 
 class TestCancel(BaseTest):
 
-# TODO: what is up with this test?
 def test_cancel_started_execution(self, workflow_context, executor):
 number_of_tasks = 100
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0f15c99f/tests/orchestrator/workflows/executor/test_executor.py
--
diff --git a/tests/orchestrator/workflows/executor/test_executor.py 
b/tests/orchestrator/workflows/executor/test_executor.py
index 078697e..a425799 100644
--- a/tests/orchestrator/workflows/executor/test_executor.py
+++ b/tests/orchestrator/workflows/executor/test_executor.py
@@ -43,8 +43,8 @@ class TestExecutor(object):
 @pytest.mark.parametrize('executor_cls,executor_kwargs', [
 (thread.ThreadExecutor, {'pool_size': 1}),
 (thread.ThreadExecutor, {'pool_size': 2}),
-# (multiprocess.MultiprocessExecutor, {'pool_size': 1}),
-# (multiprocess.MultiprocessExecutor, {'pool_size': 2}),
+(multiprocess.MultiprocessExecutor, {'pool_size': 1}),
+(multiprocess.MultiprocessExecutor, {'pool_size': 2}),
 (blocking.CurrentThreadBlockingExecutor, {}),
 # (celery.CeleryExecutor, {'app': app})
 ])

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0f15c99f/tests/storage/__init__.py
--
diff --git a/tests/storage/__init__.py 

incubator-ariatosca git commit: tmp fix [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 24e06d68a -> df1c2abc0 
(forced update)


tmp fix


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

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: df1c2abc00a524a77d8172b871861758c0682d59
Parents: 2fa5b7b
Author: mxmrlv 
Authored: Wed Dec 7 18:59:02 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 19:12:21 2016 +0200

--
 aria/orchestrator/workflows/core/engine.py | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/df1c2abc/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 35aa976..2d26aeb 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -63,7 +63,6 @@ class Engine(logger.LoggerMixin):
 break
 else:
 time.sleep(0.1)
-self.refresh_tasks()
 if cancel:
 
events.on_cancelled_workflow_signal.send(self._workflow_context)
 else:
@@ -72,11 +71,6 @@ class Engine(logger.LoggerMixin):
 events.on_failure_workflow_signal.send(self._workflow_context, 
exception=e)
 raise
 
-def refresh_tasks(self):
-for task in self._tasks_iter():
-if isinstance(task, engine_task.OperationTask):
-self._workflow_context.model.task.refresh(task)
-
 def cancel_execution(self):
 """
 Send a cancel request to the engine. If execution already started, 
execution status
@@ -106,7 +100,11 @@ class Engine(logger.LoggerMixin):
 return len(self._execution_graph.node) == 0
 
 def _tasks_iter(self):
-return (data['task'] for _, data in 
self._execution_graph.nodes_iter(data=True))
+for _, data in self._execution_graph.nodes_iter(data=True):
+task = data['task']
+if isinstance(task, engine_task.OperationTask):
+self._workflow_context.model.task.refresh(task.model_task)
+yield task
 
 def _handle_executable_task(self, task):
 if isinstance(task, engine_task.StubTask):



incubator-ariatosca git commit: ARIA-31 Add registry mechanism for extensions [Forced Update!]

2016-12-07 Thread dankilman
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-31-extensions e2c1d29da -> c07af3ea0 (forced update)


ARIA-31 Add registry mechanism for extensions


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

Branch: refs/heads/ARIA-31-extensions
Commit: c07af3ea00521f8022183f9f0e0fc53faab66704
Parents: fe974e4
Author: Dan Kilman 
Authored: Mon Dec 5 15:28:29 2016 +0200
Committer: Dan Kilman 
Committed: Wed Dec 7 19:01:39 2016 +0200

--
 aria/__init__.py|  25 ++--
 aria/cli/commands.py|   9 +-
 aria/extension.py   | 126 ++
 aria/orchestrator/events.py |  36 +
 aria/orchestrator/events/__init__.py|  57 
 .../events/builtin_event_handler.py | 123 -
 .../events/workflow_engine_event_handler.py |  74 ---
 aria/orchestrator/workflows/__init__.py |   3 +
 aria/orchestrator/workflows/core/engine.py  |   2 +
 .../workflows/core/event_handler.py | 113 
 aria/orchestrator/workflows/logging.py  |  65 +
 aria/parser/__init__.py |   5 +-
 aria/parser/loading/__init__.py |   3 +-
 aria/parser/loading/uri.py  |   5 +-
 aria/parser/presentation/__init__.py|   3 +-
 aria/parser/presentation/source.py  |   7 +-
 aria/parser/specification.py|   6 +-
 aria/utils/plugin.py|  39 --
 extensions/aria_extension_tosca/__init__.py |  52 
 .../simple_v1_0/data_types.py   |   5 +-
 requirements.txt|   1 +
 tests/orchestrator/conftest.py  |  23 
 tests/orchestrator/events/__init__.py   |  14 --
 .../events/test_builtin_event_handlers.py   |  14 --
 .../test_workflow_enginge_event_handlers.py |   0
 .../workflows/executor/test_executor.py |  16 +--
 tests/test_extension.py | 132 +++
 27 files changed, 571 insertions(+), 387 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c07af3ea/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index 3f81f98..cd27c25 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,14 +17,19 @@
 Aria top level package
 """
 
-import sys
 import pkgutil
 
+try:
+import pkg_resources
+except ImportError:
+pkg_resources = None
+
 from .VERSION import version as __version__
 
 from .orchestrator.decorators import workflow, operation
 from .storage import ModelStorage, ResourceStorage, models, ModelDriver, 
ResourceDriver
 from . import (
+extension,
 utils,
 parser,
 storage,
@@ -43,19 +48,17 @@ _resource_storage = {}
 
 def install_aria_extensions():
 """
-Iterates all Python packages with names beginning with 
:code:`aria_extension_` and calls
-their :code:`install_aria_extension` function if they have it.
+Iterates all Python packages with names beginning with 
:code:`aria_extension_` and all
+:code:`aria_extension` entry points and loads them.
+It then invokes all registered extension functions.
 """
-
 for loader, module_name, _ in pkgutil.iter_modules():
 if module_name.startswith('aria_extension_'):
-module = loader.find_module(module_name).load_module(module_name)
-
-if hasattr(module, 'install_aria_extension'):
-module.install_aria_extension()
-
-# Loading the module has contaminated sys.modules, so we'll clean 
it up
-del sys.modules[module_name]
+loader.find_module(module_name).load_module(module_name)
+if pkg_resources:
+for entry_point in 
pkg_resources.iter_entry_points(group='aria_extension'):
+entry_point.load()
+extension.init()
 
 
 def application_model_storage(driver):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c07af3ea/aria/cli/commands.py
--
diff --git a/aria/cli/commands.py b/aria/cli/commands.py
index 3426bb0..dd893d6 100644
--- a/aria/cli/commands.py
+++ b/aria/cli/commands.py
@@ -28,13 +28,14 @@ from importlib import import_module
 
 from yaml import safe_load, YAMLError
 
+from .. import extension
 from .. import (application_model_storage, 

incubator-ariatosca git commit: ARIA-31 Add registry mechanism for extensions [Forced Update!]

2016-12-07 Thread dankilman
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-31-extensions 6d6a7b971 -> e2c1d29da (forced update)


ARIA-31 Add registry mechanism for extensions


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

Branch: refs/heads/ARIA-31-extensions
Commit: e2c1d29da78de3baa26cd5e82afb9d8e194545a9
Parents: fe974e4
Author: Dan Kilman 
Authored: Mon Dec 5 15:28:29 2016 +0200
Committer: Dan Kilman 
Committed: Wed Dec 7 19:01:04 2016 +0200

--
 aria/__init__.py|  25 ++--
 aria/cli/commands.py|   9 +-
 aria/extension.py   | 126 ++
 aria/orchestrator/events.py |  36 +
 aria/orchestrator/events/__init__.py|  57 
 .../events/builtin_event_handler.py | 123 -
 .../events/workflow_engine_event_handler.py |  74 ---
 aria/orchestrator/workflows/__init__.py |   3 +
 aria/orchestrator/workflows/core/engine.py  |   2 +
 .../workflows/core/event_handler.py | 113 
 aria/orchestrator/workflows/logging.py  |  65 +
 aria/parser/__init__.py |   5 +-
 aria/parser/loading/__init__.py |   3 +-
 aria/parser/loading/uri.py  |   5 +-
 aria/parser/presentation/__init__.py|   3 +-
 aria/parser/presentation/source.py  |   7 +-
 aria/parser/specification.py|   6 +-
 aria/utils/plugin.py|  39 --
 extensions/aria_extension_tosca/__init__.py |  52 
 .../simple_v1_0/data_types.py   |   6 +-
 requirements.txt|   1 +
 tests/orchestrator/conftest.py  |  23 
 tests/orchestrator/events/__init__.py   |  14 --
 .../events/test_builtin_event_handlers.py   |  14 --
 .../test_workflow_enginge_event_handlers.py |   0
 .../workflows/executor/test_executor.py |  16 +--
 tests/test_extension.py | 132 +++
 27 files changed, 572 insertions(+), 387 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e2c1d29d/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index 3f81f98..cd27c25 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,14 +17,19 @@
 Aria top level package
 """
 
-import sys
 import pkgutil
 
+try:
+import pkg_resources
+except ImportError:
+pkg_resources = None
+
 from .VERSION import version as __version__
 
 from .orchestrator.decorators import workflow, operation
 from .storage import ModelStorage, ResourceStorage, models, ModelDriver, 
ResourceDriver
 from . import (
+extension,
 utils,
 parser,
 storage,
@@ -43,19 +48,17 @@ _resource_storage = {}
 
 def install_aria_extensions():
 """
-Iterates all Python packages with names beginning with 
:code:`aria_extension_` and calls
-their :code:`install_aria_extension` function if they have it.
+Iterates all Python packages with names beginning with 
:code:`aria_extension_` and all
+:code:`aria_extension` entry points and loads them.
+It then invokes all registered extension functions.
 """
-
 for loader, module_name, _ in pkgutil.iter_modules():
 if module_name.startswith('aria_extension_'):
-module = loader.find_module(module_name).load_module(module_name)
-
-if hasattr(module, 'install_aria_extension'):
-module.install_aria_extension()
-
-# Loading the module has contaminated sys.modules, so we'll clean 
it up
-del sys.modules[module_name]
+loader.find_module(module_name).load_module(module_name)
+if pkg_resources:
+for entry_point in 
pkg_resources.iter_entry_points(group='aria_extension'):
+entry_point.load()
+extension.init()
 
 
 def application_model_storage(driver):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e2c1d29d/aria/cli/commands.py
--
diff --git a/aria/cli/commands.py b/aria/cli/commands.py
index 3426bb0..dd893d6 100644
--- a/aria/cli/commands.py
+++ b/aria/cli/commands.py
@@ -28,13 +28,14 @@ from importlib import import_module
 
 from yaml import safe_load, YAMLError
 
+from .. import extension
 from .. import (application_model_storage, 

incubator-ariatosca git commit: tmp fix

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 2fa5b7bfe -> 24e06d68a


tmp fix


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

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 24e06d68a28f0ba3fe7a30f50318e893cf8f8342
Parents: 2fa5b7b
Author: mxmrlv 
Authored: Wed Dec 7 18:59:02 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 18:59:02 2016 +0200

--
 aria/orchestrator/workflows/core/engine.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/24e06d68/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 35aa976..9d67bfb 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -63,7 +63,10 @@ class Engine(logger.LoggerMixin):
 break
 else:
 time.sleep(0.1)
-self.refresh_tasks()
+try:
+self.refresh_tasks()
+finally:
+pass
 if cancel:
 
events.on_cancelled_workflow_signal.send(self._workflow_context)
 else:



incubator-ariatosca git commit: ARIA-31 Add registry mechanism for extensions [Forced Update!]

2016-12-07 Thread dankilman
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-31-extensions 82d6b6402 -> 6d6a7b971 (forced update)


ARIA-31 Add registry mechanism for extensions


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

Branch: refs/heads/ARIA-31-extensions
Commit: 6d6a7b971f6830a8415725bfd36705f64ab86698
Parents: fe974e4
Author: Dan Kilman 
Authored: Mon Dec 5 15:28:29 2016 +0200
Committer: Dan Kilman 
Committed: Wed Dec 7 18:57:57 2016 +0200

--
 aria/__init__.py|  25 ++--
 aria/cli/commands.py|   9 +-
 aria/extension.py   | 126 ++
 aria/orchestrator/events.py |  36 +
 aria/orchestrator/events/__init__.py|  57 
 .../events/builtin_event_handler.py | 123 -
 .../events/workflow_engine_event_handler.py |  74 ---
 aria/orchestrator/workflows/__init__.py |   3 +
 aria/orchestrator/workflows/core/engine.py  |   2 +
 .../workflows/core/event_handler.py | 113 
 aria/orchestrator/workflows/logging.py  |  65 +
 aria/parser/__init__.py |   5 +-
 aria/parser/loading/__init__.py |   3 +-
 aria/parser/loading/uri.py  |   5 +-
 aria/parser/presentation/__init__.py|   3 +-
 aria/parser/presentation/source.py  |   7 +-
 aria/parser/specification.py|   6 +-
 aria/utils/plugin.py|  39 --
 extensions/aria_extension_tosca/__init__.py |  52 
 requirements.txt|   1 +
 tests/orchestrator/conftest.py  |  23 
 tests/orchestrator/events/__init__.py   |  14 --
 .../events/test_builtin_event_handlers.py   |  14 --
 .../test_workflow_enginge_event_handlers.py |   0
 .../workflows/executor/test_executor.py |  16 +--
 tests/test_extension.py | 132 +++
 26 files changed, 567 insertions(+), 386 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/6d6a7b97/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index 3f81f98..cd27c25 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,14 +17,19 @@
 Aria top level package
 """
 
-import sys
 import pkgutil
 
+try:
+import pkg_resources
+except ImportError:
+pkg_resources = None
+
 from .VERSION import version as __version__
 
 from .orchestrator.decorators import workflow, operation
 from .storage import ModelStorage, ResourceStorage, models, ModelDriver, 
ResourceDriver
 from . import (
+extension,
 utils,
 parser,
 storage,
@@ -43,19 +48,17 @@ _resource_storage = {}
 
 def install_aria_extensions():
 """
-Iterates all Python packages with names beginning with 
:code:`aria_extension_` and calls
-their :code:`install_aria_extension` function if they have it.
+Iterates all Python packages with names beginning with 
:code:`aria_extension_` and all
+:code:`aria_extension` entry points and loads them.
+It then invokes all registered extension functions.
 """
-
 for loader, module_name, _ in pkgutil.iter_modules():
 if module_name.startswith('aria_extension_'):
-module = loader.find_module(module_name).load_module(module_name)
-
-if hasattr(module, 'install_aria_extension'):
-module.install_aria_extension()
-
-# Loading the module has contaminated sys.modules, so we'll clean 
it up
-del sys.modules[module_name]
+loader.find_module(module_name).load_module(module_name)
+if pkg_resources:
+for entry_point in 
pkg_resources.iter_entry_points(group='aria_extension'):
+entry_point.load()
+extension.init()
 
 
 def application_model_storage(driver):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/6d6a7b97/aria/cli/commands.py
--
diff --git a/aria/cli/commands.py b/aria/cli/commands.py
index 3426bb0..dd893d6 100644
--- a/aria/cli/commands.py
+++ b/aria/cli/commands.py
@@ -28,13 +28,14 @@ from importlib import import_module
 
 from yaml import safe_load, YAMLError
 
+from .. import extension
 from .. import (application_model_storage, application_resource_storage)
 from ..logger import LoggerMixin
 from 

incubator-ariatosca git commit: refresh task

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 97ddc94b0 -> 2fa5b7bfe


refresh task


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

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 2fa5b7bfe494bf9bb143931e855806e5ee9a65d2
Parents: 97ddc94
Author: mxmrlv 
Authored: Wed Dec 7 18:53:43 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 18:53:43 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2fa5b7bf/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 87ea8c6..35aa976 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -63,6 +63,7 @@ class Engine(logger.LoggerMixin):
 break
 else:
 time.sleep(0.1)
+self.refresh_tasks()
 if cancel:
 
events.on_cancelled_workflow_signal.send(self._workflow_context)
 else:
@@ -71,6 +72,11 @@ class Engine(logger.LoggerMixin):
 events.on_failure_workflow_signal.send(self._workflow_context, 
exception=e)
 raise
 
+def refresh_tasks(self):
+for task in self._tasks_iter():
+if isinstance(task, engine_task.OperationTask):
+self._workflow_context.model.task.refresh(task)
+
 def cancel_execution(self):
 """
 Send a cancel request to the engine. If execution already started, 
execution status



incubator-ariatosca git commit: ARIA-31 Add registry mechanism for extensions [Forced Update!]

2016-12-07 Thread dankilman
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-31-extensions 0e2ccf001 -> 82d6b6402 (forced update)


ARIA-31 Add registry mechanism for extensions


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

Branch: refs/heads/ARIA-31-extensions
Commit: 82d6b6402ccc991526d588a660f3225f1d714145
Parents: fe974e4
Author: Dan Kilman 
Authored: Mon Dec 5 15:28:29 2016 +0200
Committer: Dan Kilman 
Committed: Wed Dec 7 18:01:54 2016 +0200

--
 aria/__init__.py|  25 ++--
 aria/cli/commands.py|   9 +-
 aria/extension.py   | 126 ++
 aria/orchestrator/events.py |  36 +
 aria/orchestrator/events/__init__.py|  57 
 .../events/builtin_event_handler.py | 123 -
 .../events/workflow_engine_event_handler.py |  74 ---
 aria/orchestrator/workflows/__init__.py |   3 +
 aria/orchestrator/workflows/core/engine.py  |   2 +
 .../workflows/core/event_handler.py | 113 
 aria/orchestrator/workflows/logging.py  |  65 +
 aria/parser/__init__.py |   5 +-
 aria/parser/loading/__init__.py |   3 +-
 aria/parser/loading/uri.py  |   5 +-
 aria/parser/presentation/__init__.py|   3 +-
 aria/parser/presentation/source.py  |   7 +-
 aria/parser/specification.py|   6 +-
 aria/utils/plugin.py|  39 --
 extensions/aria_extension_tosca/__init__.py |  52 
 tests/orchestrator/conftest.py  |  23 
 tests/orchestrator/events/__init__.py   |  14 --
 .../events/test_builtin_event_handlers.py   |  14 --
 .../test_workflow_enginge_event_handlers.py |   0
 .../workflows/executor/test_executor.py |  16 +--
 tests/test_extension.py | 132 +++
 25 files changed, 566 insertions(+), 386 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/82d6b640/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index 3f81f98..cd27c25 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,14 +17,19 @@
 Aria top level package
 """
 
-import sys
 import pkgutil
 
+try:
+import pkg_resources
+except ImportError:
+pkg_resources = None
+
 from .VERSION import version as __version__
 
 from .orchestrator.decorators import workflow, operation
 from .storage import ModelStorage, ResourceStorage, models, ModelDriver, 
ResourceDriver
 from . import (
+extension,
 utils,
 parser,
 storage,
@@ -43,19 +48,17 @@ _resource_storage = {}
 
 def install_aria_extensions():
 """
-Iterates all Python packages with names beginning with 
:code:`aria_extension_` and calls
-their :code:`install_aria_extension` function if they have it.
+Iterates all Python packages with names beginning with 
:code:`aria_extension_` and all
+:code:`aria_extension` entry points and loads them.
+It then invokes all registered extension functions.
 """
-
 for loader, module_name, _ in pkgutil.iter_modules():
 if module_name.startswith('aria_extension_'):
-module = loader.find_module(module_name).load_module(module_name)
-
-if hasattr(module, 'install_aria_extension'):
-module.install_aria_extension()
-
-# Loading the module has contaminated sys.modules, so we'll clean 
it up
-del sys.modules[module_name]
+loader.find_module(module_name).load_module(module_name)
+if pkg_resources:
+for entry_point in 
pkg_resources.iter_entry_points(group='aria_extension'):
+entry_point.load()
+extension.init()
 
 
 def application_model_storage(driver):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/82d6b640/aria/cli/commands.py
--
diff --git a/aria/cli/commands.py b/aria/cli/commands.py
index 3426bb0..dd893d6 100644
--- a/aria/cli/commands.py
+++ b/aria/cli/commands.py
@@ -28,13 +28,14 @@ from importlib import import_module
 
 from yaml import safe_load, YAMLError
 
+from .. import extension
 from .. import (application_model_storage, application_resource_storage)
 from ..logger import LoggerMixin
 from ..storage import (FileSystemModelDriver, 

incubator-ariatosca git commit: ARIA-31 Add registry mechanism for extensions [Forced Update!]

2016-12-07 Thread dankilman
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-31-extensions 7bbcb8be3 -> 0e2ccf001 (forced update)


ARIA-31 Add registry mechanism for extensions


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

Branch: refs/heads/ARIA-31-extensions
Commit: 0e2ccf001c7f66601754c6d45584403ed3ce5f71
Parents: fe974e4
Author: Dan Kilman 
Authored: Mon Dec 5 15:28:29 2016 +0200
Committer: Dan Kilman 
Committed: Wed Dec 7 17:53:17 2016 +0200

--
 aria/__init__.py|  25 ++--
 aria/cli/commands.py|   9 +-
 aria/extension.py   | 128 ++
 aria/orchestrator/events.py |  36 +
 aria/orchestrator/events/__init__.py|  57 
 .../events/builtin_event_handler.py | 123 -
 .../events/workflow_engine_event_handler.py |  74 ---
 aria/orchestrator/workflows/__init__.py |   3 +
 aria/orchestrator/workflows/core/engine.py  |   2 +
 .../workflows/core/event_handler.py | 113 
 aria/orchestrator/workflows/logging.py  |  65 +
 aria/parser/__init__.py |   5 +-
 aria/parser/loading/__init__.py |   3 +-
 aria/parser/loading/uri.py  |   5 +-
 aria/parser/presentation/__init__.py|   3 +-
 aria/parser/presentation/source.py  |   7 +-
 aria/parser/specification.py|   6 +-
 aria/utils/plugin.py|  39 --
 extensions/aria_extension_tosca/__init__.py |  52 
 tests/orchestrator/conftest.py  |  23 
 tests/orchestrator/events/__init__.py   |  14 --
 .../events/test_builtin_event_handlers.py   |  14 --
 .../test_workflow_enginge_event_handlers.py |   0
 .../workflows/executor/test_executor.py |  16 +--
 tests/test_extension.py | 132 +++
 25 files changed, 568 insertions(+), 386 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0e2ccf00/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index 3f81f98..cd27c25 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,14 +17,19 @@
 Aria top level package
 """
 
-import sys
 import pkgutil
 
+try:
+import pkg_resources
+except ImportError:
+pkg_resources = None
+
 from .VERSION import version as __version__
 
 from .orchestrator.decorators import workflow, operation
 from .storage import ModelStorage, ResourceStorage, models, ModelDriver, 
ResourceDriver
 from . import (
+extension,
 utils,
 parser,
 storage,
@@ -43,19 +48,17 @@ _resource_storage = {}
 
 def install_aria_extensions():
 """
-Iterates all Python packages with names beginning with 
:code:`aria_extension_` and calls
-their :code:`install_aria_extension` function if they have it.
+Iterates all Python packages with names beginning with 
:code:`aria_extension_` and all
+:code:`aria_extension` entry points and loads them.
+It then invokes all registered extension functions.
 """
-
 for loader, module_name, _ in pkgutil.iter_modules():
 if module_name.startswith('aria_extension_'):
-module = loader.find_module(module_name).load_module(module_name)
-
-if hasattr(module, 'install_aria_extension'):
-module.install_aria_extension()
-
-# Loading the module has contaminated sys.modules, so we'll clean 
it up
-del sys.modules[module_name]
+loader.find_module(module_name).load_module(module_name)
+if pkg_resources:
+for entry_point in 
pkg_resources.iter_entry_points(group='aria_extension'):
+entry_point.load()
+extension.init()
 
 
 def application_model_storage(driver):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0e2ccf00/aria/cli/commands.py
--
diff --git a/aria/cli/commands.py b/aria/cli/commands.py
index 3426bb0..dd893d6 100644
--- a/aria/cli/commands.py
+++ b/aria/cli/commands.py
@@ -28,13 +28,14 @@ from importlib import import_module
 
 from yaml import safe_load, YAMLError
 
+from .. import extension
 from .. import (application_model_storage, application_resource_storage)
 from ..logger import LoggerMixin
 from ..storage import (FileSystemModelDriver, 

incubator-ariatosca git commit: added cleanup func, better cleaning, and actor/instace.id test [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 0cf542b4f -> d00855fc0 
(forced update)


added cleanup func, better cleaning, and actor/instace.id 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/d00855fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d00855fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d00855fc

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: d00855fc05913f3faf842d3e6f76571b69c25683
Parents: 0003e47
Author: mxmrlv 
Authored: Wed Dec 7 14:36:43 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 17:27:20 2016 +0200

--
 aria/orchestrator/context/operation.py  |   2 +-
 tests/mock/context.py   |   3 -
 tests/orchestrator/context/test_operation.py|  44 +++-
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/context/test_workflow.py |  11 +-
 tests/orchestrator/workflows/api/test_task.py   |   4 +-
 .../workflows/builtin/test_execute_operation.py |   6 +-
 .../orchestrator/workflows/builtin/test_heal.py |   6 +-
 .../workflows/builtin/test_install.py   |   6 +-
 .../workflows/builtin/test_uninstall.py |   6 +-
 .../orchestrator/workflows/core/test_engine.py  |  16 ++-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_exececution_graph.py   |   5 +-
 .../workflows/executor/test_executor.py |   4 +-
 tests/storage/__init__.py   |  21 +++-
 tests/storage/test_model_storage.py |  11 +-
 tests/storage/test_models.py| 104 ++-
 17 files changed, 172 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d00855fc/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index a789e24..a73bad1 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -71,7 +71,7 @@ class NodeOperationContext(BaseOperationContext):
 The node instance of the current operation
 :return:
 """
-return self.model.node_instance.get(self._task_id)
+return self.model.node_instance.get(self._actor_id)
 
 
 class RelationshipOperationContext(BaseOperationContext):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d00855fc/tests/mock/context.py
--
diff --git a/tests/mock/context.py b/tests/mock/context.py
index 7eb57ed..1904140 100644
--- a/tests/mock/context.py
+++ b/tests/mock/context.py
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import pytest
-
 from aria import application_model_storage
 from aria.orchestrator import context
 from aria.storage.sql_mapi import SQLAlchemyModelAPI
@@ -22,7 +20,6 @@ from aria.storage.sql_mapi import SQLAlchemyModelAPI
 from . import models
 
 
-@pytest.fixture
 def simple(api_kwargs, **kwargs):
 model_storage = application_model_storage(SQLAlchemyModelAPI, 
api_kwargs=api_kwargs)
 blueprint = models.get_blueprint()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d00855fc/tests/orchestrator/context/test_operation.py
--
diff --git a/tests/orchestrator/context/test_operation.py 
b/tests/orchestrator/context/test_operation.py
index f3af0c5..b5f52a3 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -35,11 +35,9 @@ global_test_holder = {}
 
 @pytest.fixture
 def ctx(tmpdir):
-context = mock.context.simple(
-storage.get_sqlite_api_kwargs(str(tmpdir))
-)
+context = mock.context.simple(storage.get_sqlite_api_kwargs(str(tmpdir)))
 yield context
-context.model.drop()
+storage.release_sqlite_storage(context.model)
 
 
 @pytest.fixture
@@ -142,11 +140,49 @@ def test_relationship_operation_task_execution(ctx, 
executor):
 assert operation_context.source_node_instance == dependent_node_instance
 
 
+def test_invalid_task_operation_id(ctx, executor):
+"""
+Checks that the right id is used. The task created with id == 1, thus 
running the task on
+node_instance with id == 2. will check that indeed the node_instance uses 
the correct id.
+:param ctx:
+:param executor:
+:return:
+"""
+operation_name = 'aria.interfaces.lifecycle.create'
+other_node_instance, node_instance = 

incubator-ariatosca git commit: added cleanup func, better cleaning, and actor/instace.id test [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 395b9b0b1 -> 0cf542b4f 
(forced update)


added cleanup func, better cleaning, and actor/instace.id 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/0cf542b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0cf542b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0cf542b4

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 0cf542b4f90d1deefdce38b4dfffd6d2b53c29dc
Parents: 0003e47
Author: mxmrlv 
Authored: Wed Dec 7 14:36:43 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 15:29:08 2016 +0200

--
 aria/orchestrator/context/operation.py  |   2 +-
 tests/mock/context.py   |   3 -
 tests/orchestrator/context/test_operation.py|  44 +++-
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/context/test_workflow.py |  11 +-
 tests/orchestrator/workflows/api/test_task.py   |   4 +-
 .../workflows/builtin/test_execute_operation.py |   6 +-
 .../orchestrator/workflows/builtin/test_heal.py |   6 +-
 .../workflows/builtin/test_install.py   |   6 +-
 .../workflows/builtin/test_uninstall.py |   6 +-
 .../orchestrator/workflows/core/test_engine.py  |   8 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_exececution_graph.py   |   5 +-
 tests/storage/__init__.py   |  24 -
 tests/storage/test_model_storage.py |  11 +-
 tests/storage/test_models.py| 104 ++-
 16 files changed, 170 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0cf542b4/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index a789e24..a73bad1 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -71,7 +71,7 @@ class NodeOperationContext(BaseOperationContext):
 The node instance of the current operation
 :return:
 """
-return self.model.node_instance.get(self._task_id)
+return self.model.node_instance.get(self._actor_id)
 
 
 class RelationshipOperationContext(BaseOperationContext):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0cf542b4/tests/mock/context.py
--
diff --git a/tests/mock/context.py b/tests/mock/context.py
index 7eb57ed..1904140 100644
--- a/tests/mock/context.py
+++ b/tests/mock/context.py
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import pytest
-
 from aria import application_model_storage
 from aria.orchestrator import context
 from aria.storage.sql_mapi import SQLAlchemyModelAPI
@@ -22,7 +20,6 @@ from aria.storage.sql_mapi import SQLAlchemyModelAPI
 from . import models
 
 
-@pytest.fixture
 def simple(api_kwargs, **kwargs):
 model_storage = application_model_storage(SQLAlchemyModelAPI, 
api_kwargs=api_kwargs)
 blueprint = models.get_blueprint()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0cf542b4/tests/orchestrator/context/test_operation.py
--
diff --git a/tests/orchestrator/context/test_operation.py 
b/tests/orchestrator/context/test_operation.py
index f3af0c5..b5f52a3 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -35,11 +35,9 @@ global_test_holder = {}
 
 @pytest.fixture
 def ctx(tmpdir):
-context = mock.context.simple(
-storage.get_sqlite_api_kwargs(str(tmpdir))
-)
+context = mock.context.simple(storage.get_sqlite_api_kwargs(str(tmpdir)))
 yield context
-context.model.drop()
+storage.release_sqlite_storage(context.model)
 
 
 @pytest.fixture
@@ -142,11 +140,49 @@ def test_relationship_operation_task_execution(ctx, 
executor):
 assert operation_context.source_node_instance == dependent_node_instance
 
 
+def test_invalid_task_operation_id(ctx, executor):
+"""
+Checks that the right id is used. The task created with id == 1, thus 
running the task on
+node_instance with id == 2. will check that indeed the node_instance uses 
the correct id.
+:param ctx:
+:param executor:
+:return:
+"""
+operation_name = 'aria.interfaces.lifecycle.create'
+other_node_instance, node_instance = ctx.model.node_instance.list()
+assert 

incubator-ariatosca git commit: added cleanup func, better cleaning, and actor/instace.id test [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation e01575cbc -> 395b9b0b1 
(forced update)


added cleanup func, better cleaning, and actor/instace.id 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/395b9b0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/395b9b0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/395b9b0b

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 395b9b0b1417339f7b37b6ac6841ea1fb384fa09
Parents: 0003e47
Author: mxmrlv 
Authored: Wed Dec 7 14:36:43 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 15:09:47 2016 +0200

--
 aria/orchestrator/context/operation.py  |   2 +-
 tests/mock/context.py   |   3 -
 tests/orchestrator/context/test_operation.py|  44 +++-
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/context/test_workflow.py |  12 ++-
 tests/orchestrator/workflows/api/test_task.py   |   4 +-
 .../workflows/builtin/test_execute_operation.py |   6 +-
 .../orchestrator/workflows/builtin/test_heal.py |   6 +-
 .../workflows/builtin/test_install.py   |   6 +-
 .../workflows/builtin/test_uninstall.py |   6 +-
 .../orchestrator/workflows/core/test_engine.py  |   8 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_exececution_graph.py   |   5 +-
 tests/storage/__init__.py   |  25 -
 tests/storage/test_model_storage.py |  11 +-
 tests/storage/test_models.py| 104 ++-
 16 files changed, 172 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/395b9b0b/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index a789e24..a73bad1 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -71,7 +71,7 @@ class NodeOperationContext(BaseOperationContext):
 The node instance of the current operation
 :return:
 """
-return self.model.node_instance.get(self._task_id)
+return self.model.node_instance.get(self._actor_id)
 
 
 class RelationshipOperationContext(BaseOperationContext):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/395b9b0b/tests/mock/context.py
--
diff --git a/tests/mock/context.py b/tests/mock/context.py
index 7eb57ed..1904140 100644
--- a/tests/mock/context.py
+++ b/tests/mock/context.py
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import pytest
-
 from aria import application_model_storage
 from aria.orchestrator import context
 from aria.storage.sql_mapi import SQLAlchemyModelAPI
@@ -22,7 +20,6 @@ from aria.storage.sql_mapi import SQLAlchemyModelAPI
 from . import models
 
 
-@pytest.fixture
 def simple(api_kwargs, **kwargs):
 model_storage = application_model_storage(SQLAlchemyModelAPI, 
api_kwargs=api_kwargs)
 blueprint = models.get_blueprint()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/395b9b0b/tests/orchestrator/context/test_operation.py
--
diff --git a/tests/orchestrator/context/test_operation.py 
b/tests/orchestrator/context/test_operation.py
index f3af0c5..b5f52a3 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -35,11 +35,9 @@ global_test_holder = {}
 
 @pytest.fixture
 def ctx(tmpdir):
-context = mock.context.simple(
-storage.get_sqlite_api_kwargs(str(tmpdir))
-)
+context = mock.context.simple(storage.get_sqlite_api_kwargs(str(tmpdir)))
 yield context
-context.model.drop()
+storage.release_sqlite_storage(context.model)
 
 
 @pytest.fixture
@@ -142,11 +140,49 @@ def test_relationship_operation_task_execution(ctx, 
executor):
 assert operation_context.source_node_instance == dependent_node_instance
 
 
+def test_invalid_task_operation_id(ctx, executor):
+"""
+Checks that the right id is used. The task created with id == 1, thus 
running the task on
+node_instance with id == 2. will check that indeed the node_instance uses 
the correct id.
+:param ctx:
+:param executor:
+:return:
+"""
+operation_name = 'aria.interfaces.lifecycle.create'
+other_node_instance, node_instance = ctx.model.node_instance.list()
+assert 

incubator-ariatosca git commit: added cleanup func, better cleaning, and actor/instace.id test [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation a8e9b3cc3 -> 66c128668 
(forced update)


added cleanup func, better cleaning, and actor/instace.id 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/66c12866
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/66c12866
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/66c12866

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 66c128668544aaae07b45be592d2ad447e4e6c86
Parents: 0003e47
Author: mxmrlv 
Authored: Wed Dec 7 14:36:43 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 14:45:32 2016 +0200

--
 aria/orchestrator/context/operation.py  |  2 +-
 tests/mock/context.py   |  3 --
 tests/orchestrator/context/test_operation.py| 40 +++-
 tests/orchestrator/context/test_toolbelt.py |  2 +-
 tests/orchestrator/workflows/api/test_task.py   |  4 +-
 .../workflows/builtin/test_execute_operation.py |  2 +-
 .../orchestrator/workflows/builtin/test_heal.py |  2 +-
 .../workflows/builtin/test_install.py   |  2 +-
 .../workflows/builtin/test_uninstall.py |  2 +-
 .../orchestrator/workflows/core/test_engine.py  |  4 +-
 tests/orchestrator/workflows/core/test_task.py  |  2 +-
 tests/storage/__init__.py   | 24 ++--
 tests/storage/test_model_storage.py |  9 ++---
 13 files changed, 74 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/66c12866/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index a789e24..a73bad1 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -71,7 +71,7 @@ class NodeOperationContext(BaseOperationContext):
 The node instance of the current operation
 :return:
 """
-return self.model.node_instance.get(self._task_id)
+return self.model.node_instance.get(self._actor_id)
 
 
 class RelationshipOperationContext(BaseOperationContext):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/66c12866/tests/mock/context.py
--
diff --git a/tests/mock/context.py b/tests/mock/context.py
index 7eb57ed..1904140 100644
--- a/tests/mock/context.py
+++ b/tests/mock/context.py
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import pytest
-
 from aria import application_model_storage
 from aria.orchestrator import context
 from aria.storage.sql_mapi import SQLAlchemyModelAPI
@@ -22,7 +20,6 @@ from aria.storage.sql_mapi import SQLAlchemyModelAPI
 from . import models
 
 
-@pytest.fixture
 def simple(api_kwargs, **kwargs):
 model_storage = application_model_storage(SQLAlchemyModelAPI, 
api_kwargs=api_kwargs)
 blueprint = models.get_blueprint()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/66c12866/tests/orchestrator/context/test_operation.py
--
diff --git a/tests/orchestrator/context/test_operation.py 
b/tests/orchestrator/context/test_operation.py
index f3af0c5..f820bcc 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -39,7 +39,7 @@ def ctx(tmpdir):
 storage.get_sqlite_api_kwargs(str(tmpdir))
 )
 yield context
-context.model.drop()
+storage.release_sqlite_storage(context.model)
 
 
 @pytest.fixture
@@ -142,11 +142,49 @@ def test_relationship_operation_task_execution(ctx, 
executor):
 assert operation_context.source_node_instance == dependent_node_instance
 
 
+def test_invalid_task_operation_id(ctx, executor):
+"""
+Checks that the right id is used. The task created with id == 1, thus 
running the task on
+node_instance with id == 2. will check that indeed the node_instance uses 
the correct id.
+:param ctx:
+:param executor:
+:return:
+"""
+operation_name = 'aria.interfaces.lifecycle.create'
+other_node_instance, node_instance = ctx.model.node_instance.list()
+assert other_node_instance.id == 1
+assert node_instance.id == 2
+
+node = node_instance.node
+node.operations[operation_name] = {
+'operation': op_path(get_node_instance_id, module_path=__name__)
+
+}
+ctx.model.node.update(node)
+
+@workflow
+def basic_workflow(graph, **_):
+graph.add_tasks(
+

[GitHub] incubator-ariatosca pull request #31: ARIA-30-SQL-based-storage-implementati...

2016-12-07 Thread mxmrlv
Github user mxmrlv commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/31#discussion_r91277691
  
--- Diff: tests/storage/__init__.py ---
@@ -33,10 +35,30 @@ def teardown_method(self):
 rmtree(self.path, ignore_errors=True)
 
 
-def get_sqlite_api_kwargs():
-engine = create_engine('sqlite:///:memory:',
-   connect_args={'check_same_thread': False},
-   poolclass=StaticPool)
-session = orm.sessionmaker(bind=engine)()
+def get_sqlite_api_kwargs(base_dir=None, filename='memory'):
--- End diff --

memory->db.sqlit


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-ariatosca pull request #31: ARIA-30-SQL-based-storage-implementati...

2016-12-07 Thread mxmrlv
Github user mxmrlv commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/31#discussion_r91277752
  
--- Diff: tests/storage/__init__.py ---
@@ -33,10 +35,30 @@ def teardown_method(self):
 rmtree(self.path, ignore_errors=True)
 
 
-def get_sqlite_api_kwargs():
-engine = create_engine('sqlite:///:memory:',
-   connect_args={'check_same_thread': False},
-   poolclass=StaticPool)
-session = orm.sessionmaker(bind=engine)()
+def get_sqlite_api_kwargs(base_dir=None, filename='memory'):
+"""
+Create sql params. works in in-memory and in filesystem mode.
+If base_dir is passed, the mode will be filesystem mode. while the 
default mode is in-memory.
+:param str base_dir: The base dir for the filesystem memory file.
+:param str filename: the file name - defaults to 'memory'.
--- End diff --

...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-ariatosca pull request #31: ARIA-30-SQL-based-storage-implementati...

2016-12-07 Thread mxmrlv
Github user mxmrlv commented on a diff in the pull request:

https://github.com/apache/incubator-ariatosca/pull/31#discussion_r91277019
  
--- Diff: tests/mock/context.py ---
@@ -15,19 +15,15 @@
 
 import pytest
 
-
 from aria import application_model_storage
 from aria.orchestrator import context
 from aria.storage.sql_mapi import SQLAlchemyModelAPI
 
-from tests.storage import get_sqlite_api_kwargs
-
 from . import models
 
 
 @pytest.fixture
--- End diff --

remove


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


incubator-ariatosca git commit: major threading fix [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation 642a7fb64 -> a2551dbb6 
(forced update)


major threading fix


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

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: a2551dbb67c89ab5078a4a202550a4fd1c1e82e2
Parents: 7ec1183
Author: mxmrlv 
Authored: Tue Dec 6 22:57:42 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 11:55:06 2016 +0200

--
 aria/__init__.py| 13 ---
 aria/orchestrator/context/operation.py  | 16 +
 aria/orchestrator/context/toolbelt.py   | 12 ---
 aria/orchestrator/workflows/core/task.py|  3 +-
 aria/storage/structures.py  |  2 +-
 tests/mock/context.py   |  6 +---
 tests/orchestrator/context/test_operation.py|  8 +++--
 tests/orchestrator/context/test_toolbelt.py | 38 ++--
 tests/orchestrator/context/test_workflow.py |  2 +-
 tests/orchestrator/workflows/api/test_task.py   |  8 ++---
 .../workflows/builtin/test_execute_operation.py |  7 ++--
 .../orchestrator/workflows/builtin/test_heal.py |  8 +++--
 .../workflows/builtin/test_install.py   |  7 ++--
 .../workflows/builtin/test_uninstall.py |  7 ++--
 .../orchestrator/workflows/core/test_engine.py  | 11 +++---
 tests/orchestrator/workflows/core/test_task.py  | 10 --
 .../test_task_graph_into_exececution_graph.py   |  5 ++-
 tests/storage/__init__.py   | 34 ++
 tests/storage/test_model_storage.py |  5 ++-
 19 files changed, 104 insertions(+), 98 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a2551dbb/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index f5151e3..b000397 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -61,18 +61,21 @@ def application_model_storage(api, api_kwargs=None):
 Initiate model storage for the supplied storage driver
 """
 models = [
+storage.models.Plugin,
+storage.models.ProviderContext,
+
 storage.models.Blueprint,
 storage.models.Deployment,
+storage.models.DeploymentUpdate,
+storage.models.DeploymentUpdateStep,
+storage.models.DeploymentModification,
+
 storage.models.Node,
 storage.models.NodeInstance,
 storage.models.Relationship,
 storage.models.RelationshipInstance,
-storage.models.Plugin,
-storage.models.DeploymentUpdate,
-storage.models.DeploymentUpdateStep,
-storage.models.DeploymentModification,
+
 storage.models.Execution,
-storage.models.ProviderContext,
 storage.models.Task,
 ]
 # if api not in _model_storage:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a2551dbb/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 02469a7..a789e24 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -26,7 +26,7 @@ class BaseOperationContext(BaseContext):
 Context object used during operation creation and execution
 """
 
-def __init__(self, name, workflow_context, task, **kwargs):
+def __init__(self, name, workflow_context, task, actor, **kwargs):
 super(BaseOperationContext, self).__init__(
 name=name,
 model_storage=workflow_context.model,
@@ -35,7 +35,8 @@ class BaseOperationContext(BaseContext):
 workflow_name=workflow_context._workflow_name,
 **kwargs)
 self._task_model = task
-self._actor = self.task.actor
+self._task_id = task.id
+self._actor_id = actor.id
 
 def __repr__(self):
 details = 'operation_mapping={task.operation_mapping}; ' \
@@ -49,7 +50,7 @@ class BaseOperationContext(BaseContext):
 The task in the model storage
 :return: Task model
 """
-return self._task_model
+return self.model.task.get(self._task_id)
 
 
 class NodeOperationContext(BaseOperationContext):
@@ -62,7 +63,7 @@ class NodeOperationContext(BaseOperationContext):
 the node of the current operation
 :return:
 """
-return self._actor.node
+return self.node_instance.node
 
 

incubator-ariatosca git commit: major threading fix [Forced Update!]

2016-12-07 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-30-SQL-based-storage-implementation e5bbeaa03 -> 402aeaca4 
(forced update)


major threading fix


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

Branch: refs/heads/ARIA-30-SQL-based-storage-implementation
Commit: 402aeaca4c600317a0178de102c29ca16f8893f0
Parents: 7ec1183
Author: mxmrlv 
Authored: Tue Dec 6 22:57:42 2016 +0200
Committer: mxmrlv 
Committed: Wed Dec 7 11:16:48 2016 +0200

--
 aria/__init__.py| 13 ---
 aria/orchestrator/context/operation.py  | 16 +
 aria/orchestrator/context/toolbelt.py   | 12 ---
 aria/orchestrator/workflows/core/task.py|  3 +-
 aria/storage/structures.py  |  2 +-
 tests/mock/context.py   |  6 +---
 tests/orchestrator/context/test_operation.py|  8 +++--
 tests/orchestrator/context/test_toolbelt.py | 38 ++--
 tests/orchestrator/context/test_workflow.py |  2 +-
 tests/orchestrator/workflows/api/test_task.py   |  8 ++---
 .../workflows/builtin/test_execute_operation.py |  7 ++--
 .../orchestrator/workflows/builtin/test_heal.py |  8 +++--
 .../workflows/builtin/test_install.py   |  7 ++--
 .../workflows/builtin/test_uninstall.py |  7 ++--
 .../orchestrator/workflows/core/test_engine.py  | 11 +++---
 tests/orchestrator/workflows/core/test_task.py  | 10 --
 .../test_task_graph_into_exececution_graph.py   |  5 ++-
 tests/storage/__init__.py   | 26 +++---
 tests/storage/test_model_storage.py |  5 ++-
 19 files changed, 97 insertions(+), 97 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/402aeaca/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index f5151e3..b000397 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -61,18 +61,21 @@ def application_model_storage(api, api_kwargs=None):
 Initiate model storage for the supplied storage driver
 """
 models = [
+storage.models.Plugin,
+storage.models.ProviderContext,
+
 storage.models.Blueprint,
 storage.models.Deployment,
+storage.models.DeploymentUpdate,
+storage.models.DeploymentUpdateStep,
+storage.models.DeploymentModification,
+
 storage.models.Node,
 storage.models.NodeInstance,
 storage.models.Relationship,
 storage.models.RelationshipInstance,
-storage.models.Plugin,
-storage.models.DeploymentUpdate,
-storage.models.DeploymentUpdateStep,
-storage.models.DeploymentModification,
+
 storage.models.Execution,
-storage.models.ProviderContext,
 storage.models.Task,
 ]
 # if api not in _model_storage:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/402aeaca/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 02469a7..a789e24 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -26,7 +26,7 @@ class BaseOperationContext(BaseContext):
 Context object used during operation creation and execution
 """
 
-def __init__(self, name, workflow_context, task, **kwargs):
+def __init__(self, name, workflow_context, task, actor, **kwargs):
 super(BaseOperationContext, self).__init__(
 name=name,
 model_storage=workflow_context.model,
@@ -35,7 +35,8 @@ class BaseOperationContext(BaseContext):
 workflow_name=workflow_context._workflow_name,
 **kwargs)
 self._task_model = task
-self._actor = self.task.actor
+self._task_id = task.id
+self._actor_id = actor.id
 
 def __repr__(self):
 details = 'operation_mapping={task.operation_mapping}; ' \
@@ -49,7 +50,7 @@ class BaseOperationContext(BaseContext):
 The task in the model storage
 :return: Task model
 """
-return self._task_model
+return self.model.task.get(self._task_id)
 
 
 class NodeOperationContext(BaseOperationContext):
@@ -62,7 +63,7 @@ class NodeOperationContext(BaseOperationContext):
 the node of the current operation
 :return:
 """
-return self._actor.node
+return self.node_instance.node