You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by mx...@apache.org on 2017/11/15 12:19:09 UTC
[10/10] incubator-ariatosca git commit: wip
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/f92c513b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f92c513b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f92c513b
Branch: refs/heads/rest_client_work
Commit: f92c513bee4b4b2dee04be951bb5a43f53654fb0
Parents: 8e4f4e2
Author: max-orlov <ma...@gigaspaces.com>
Authored: Wed Nov 15 14:18:50 2017 +0200
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Wed Nov 15 14:18:50 2017 +0200
----------------------------------------------------------------------
aria/cli/commands/executions.py | 9 +++++++++
aria/orchestrator/workflow_runner.py | 2 +-
tests/mock/context.py | 2 ++
tests/orchestrator/workflows/executor/test_executor.py | 2 ++
4 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f92c513b/aria/cli/commands/executions.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index ea70af5..fb4ea70 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -19,6 +19,7 @@ CLI ``executions`` sub-commands.
import os
+from aria.rest_mapi.core import ARESTClient
from .. import helptexts
from .. import table
from .. import utils
@@ -143,6 +144,14 @@ def start(workflow_name,
service = model_storage.service.get_by_name(service_name)
executor = DryExecutor() if dry else None # use WorkflowRunner's default executor
+ import aria as aria_core
+ from aria.orchestrator.plugin import PluginManager
+
+ model_storage = aria_core.application_model_storage(
+ ARESTClient, initiator=False)
+ plugin_manager = PluginManager(model_storage, plugin_manager._plugins_dir)
+
+ import pydevd; pydevd.settrace('localhost', suspend=False)
workflow_runner = \
WorkflowRunner(
model_storage, resource_storage, plugin_manager,
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f92c513b/aria/orchestrator/workflow_runner.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflow_runner.py b/aria/orchestrator/workflow_runner.py
index df1725f..17f357e 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -124,7 +124,7 @@ class WorkflowRunner(object):
def _create_execution_model(self, inputs):
execution = models.Execution(
created_at=datetime.utcnow(),
- service=self.service,
+ service_fk=self.service.id,
workflow_name=self._workflow_name,
inputs={})
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f92c513b/tests/mock/context.py
----------------------------------------------------------------------
diff --git a/tests/mock/context.py b/tests/mock/context.py
index ac0a8a7..bb24abe 100644
--- a/tests/mock/context.py
+++ b/tests/mock/context.py
@@ -26,6 +26,8 @@ from . import models
from ..storage import init_inmemory_model_storage
from .topology import create_simple_topology_two_nodes
+from tests.rest_mapi.core import ARESTClient
+
def simple(tmpdir, inmemory=False, context_kwargs=None, topology=None):
initiator = init_inmemory_model_storage if inmemory else None
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f92c513b/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 32a68e0..8f1bfe6 100644
--- a/tests/orchestrator/workflows/executor/test_executor.py
+++ b/tests/orchestrator/workflows/executor/test_executor.py
@@ -17,6 +17,8 @@
import pytest
import retrying
+from tests.rest_mapi.core import ARESTClient
+
try:
import celery as _celery
app = _celery.Celery()