From 5c140a2fce66548d424a3f94ff5549f22bc2cfe8 Mon Sep 17 00:00:00 2001 From: Renat Akhmerov Date: Fri, 3 Mar 2017 19:24:18 +0700 Subject: [PATCH] Rename package 'workbook' to 'lang' * The previous name of the package is not relevant anymore, it was chosen for reasons that don't make sense anymore. A name of the package should reflect that it's about the workflow language. Change-Id: I7e05ba97abf0aa5db4e19d9d72b4ea0d52e328fb --- mistral/api/controllers/v2/action.py | 2 +- mistral/api/controllers/v2/task.py | 2 +- mistral/api/controllers/v2/workbook.py | 2 +- mistral/api/controllers/v2/workflow.py | 2 +- mistral/engine/action_handler.py | 2 +- mistral/engine/actions.py | 2 +- mistral/engine/task_handler.py | 2 +- mistral/engine/workflows.py | 2 +- mistral/{tests/unit/workbook => lang}/__init__.py | 0 mistral/{workbook => lang}/base.py | 2 +- mistral/{workbook => lang}/parser.py | 10 +++++----- mistral/{workbook => lang}/types.py | 0 mistral/{tests/unit/workbook => lang}/v2/__init__.py | 0 mistral/{workbook => lang}/v2/actions.py | 4 ++-- mistral/{workbook => lang}/v2/base.py | 4 ++-- mistral/{workbook => lang}/v2/policies.py | 6 +++--- mistral/{workbook => lang}/v2/retry_policy.py | 4 ++-- mistral/{workbook => lang}/v2/task_defaults.py | 8 ++++---- mistral/{workbook => lang}/v2/tasks.py | 6 +++--- mistral/{workbook => lang}/v2/workbook.py | 6 +++--- mistral/{workbook => lang}/v2/workflows.py | 8 ++++---- mistral/services/actions.py | 2 +- mistral/services/triggers.py | 2 +- mistral/services/workbooks.py | 2 +- mistral/services/workflows.py | 2 +- mistral/tests/unit/base.py | 2 +- mistral/tests/unit/engine/test_policies.py | 2 +- mistral/tests/unit/engine/test_workflow_resume.py | 2 +- mistral/{workbook => tests/unit/lang}/__init__.py | 0 .../tests/unit/{workbook => lang}/test_spec_caching.py | 2 +- mistral/{workbook => tests/unit/lang}/v2/__init__.py | 0 mistral/tests/unit/{workbook => lang}/v2/base.py | 2 +- .../tests/unit/{workbook => lang}/v2/test_actions.py | 2 +- mistral/tests/unit/{workbook => lang}/v2/test_tasks.py | 4 ++-- .../tests/unit/{workbook => lang}/v2/test_workbook.py | 4 ++-- .../tests/unit/{workbook => lang}/v2/test_workflows.py | 2 +- mistral/tests/unit/services/test_action_service.py | 2 +- mistral/tests/unit/services/test_workbook_service.py | 2 +- mistral/tests/unit/services/test_workflow_service.py | 2 +- mistral/tests/unit/workflow/test_direct_workflow.py | 2 +- mistral/tests/unit/workflow/test_reverse_workflow.py | 2 +- mistral/tests/unit/workflow/test_workflow_base.py | 2 +- mistral/workflow/base.py | 2 +- mistral/workflow/commands.py | 4 ++-- mistral/workflow/data_flow.py | 2 +- 45 files changed, 62 insertions(+), 62 deletions(-) rename mistral/{tests/unit/workbook => lang}/__init__.py (100%) rename mistral/{workbook => lang}/base.py (99%) rename mistral/{workbook => lang}/parser.py (96%) rename mistral/{workbook => lang}/types.py (100%) rename mistral/{tests/unit/workbook => lang}/v2/__init__.py (100%) rename mistral/{workbook => lang}/v2/actions.py (97%) rename mistral/{workbook => lang}/v2/base.py (94%) rename mistral/{workbook => lang}/v2/policies.py (95%) rename mistral/{workbook => lang}/v2/retry_policy.py (97%) rename mistral/{workbook => lang}/v2/task_defaults.py (95%) rename mistral/{workbook => lang}/v2/tasks.py (98%) rename mistral/{workbook => lang}/v2/workbook.py (94%) rename mistral/{workbook => lang}/v2/workflows.py (98%) rename mistral/{workbook => tests/unit/lang}/__init__.py (100%) rename mistral/tests/unit/{workbook => lang}/test_spec_caching.py (99%) rename mistral/{workbook => tests/unit/lang}/v2/__init__.py (100%) rename mistral/tests/unit/{workbook => lang}/v2/base.py (98%) rename mistral/tests/unit/{workbook => lang}/v2/test_actions.py (98%) rename mistral/tests/unit/{workbook => lang}/v2/test_tasks.py (99%) rename mistral/tests/unit/{workbook => lang}/v2/test_workbook.py (99%) rename mistral/tests/unit/{workbook => lang}/v2/test_workflows.py (99%) diff --git a/mistral/api/controllers/v2/action.py b/mistral/api/controllers/v2/action.py index 19093bd2c..b1e6b837a 100644 --- a/mistral/api/controllers/v2/action.py +++ b/mistral/api/controllers/v2/action.py @@ -28,10 +28,10 @@ from mistral.api.hooks import content_type as ct_hook from mistral import context from mistral.db.v2 import api as db_api from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import actions from mistral.utils import filter_utils from mistral.utils import rest_utils -from mistral.workbook import parser as spec_parser LOG = logging.getLogger(__name__) diff --git a/mistral/api/controllers/v2/task.py b/mistral/api/controllers/v2/task.py index 72b3a0f5b..42ee7171d 100644 --- a/mistral/api/controllers/v2/task.py +++ b/mistral/api/controllers/v2/task.py @@ -28,9 +28,9 @@ from mistral import context from mistral.db.v2 import api as db_api from mistral.engine.rpc_backend import rpc from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.utils import filter_utils from mistral.utils import rest_utils -from mistral.workbook import parser as spec_parser from mistral.workflow import data_flow from mistral.workflow import states diff --git a/mistral/api/controllers/v2/workbook.py b/mistral/api/controllers/v2/workbook.py index cf18d1e3b..bee4d9136 100644 --- a/mistral/api/controllers/v2/workbook.py +++ b/mistral/api/controllers/v2/workbook.py @@ -27,10 +27,10 @@ from mistral.api.controllers.v2 import validation from mistral.api.hooks import content_type as ct_hook from mistral import context from mistral.db.v2 import api as db_api +from mistral.lang import parser as spec_parser from mistral.services import workbooks from mistral.utils import filter_utils from mistral.utils import rest_utils -from mistral.workbook import parser as spec_parser LOG = logging.getLogger(__name__) diff --git a/mistral/api/controllers/v2/workflow.py b/mistral/api/controllers/v2/workflow.py index 7e8a2e8c6..c0202e883 100644 --- a/mistral/api/controllers/v2/workflow.py +++ b/mistral/api/controllers/v2/workflow.py @@ -31,10 +31,10 @@ from mistral.api.hooks import content_type as ct_hook from mistral import context from mistral.db.v2 import api as db_api from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import workflows from mistral.utils import filter_utils from mistral.utils import rest_utils -from mistral.workbook import parser as spec_parser LOG = logging.getLogger(__name__) diff --git a/mistral/engine/action_handler.py b/mistral/engine/action_handler.py index a1791d1e2..96c66c8e6 100644 --- a/mistral/engine/action_handler.py +++ b/mistral/engine/action_handler.py @@ -21,7 +21,7 @@ from mistral.db.v2.sqlalchemy import models from mistral.engine import actions from mistral.engine import task_handler from mistral import exceptions as exc -from mistral.workbook import parser as spec_parser +from mistral.lang import parser as spec_parser LOG = logging.getLogger(__name__) diff --git a/mistral/engine/actions.py b/mistral/engine/actions.py index c63f05add..69d6ffcd2 100644 --- a/mistral/engine/actions.py +++ b/mistral/engine/actions.py @@ -25,11 +25,11 @@ from mistral.engine import utils as e_utils from mistral.engine import workflow_handler as wf_handler from mistral import exceptions as exc from mistral import expressions as expr +from mistral.lang import parser as spec_parser from mistral.services import action_manager as a_m from mistral.services import security from mistral import utils from mistral.utils import wf_trace -from mistral.workbook import parser as spec_parser from mistral.workflow import states from mistral.workflow import utils as wf_utils diff --git a/mistral/engine/task_handler.py b/mistral/engine/task_handler.py index 5cc77553f..f45b512fe 100644 --- a/mistral/engine/task_handler.py +++ b/mistral/engine/task_handler.py @@ -25,8 +25,8 @@ from mistral.engine import action_queue from mistral.engine import tasks from mistral.engine import workflow_handler as wf_handler from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import scheduler -from mistral.workbook import parser as spec_parser from mistral.workflow import base as wf_base from mistral.workflow import commands as wf_cmds from mistral.workflow import states diff --git a/mistral/engine/workflows.py b/mistral/engine/workflows.py index eb09012dc..ee58d8917 100644 --- a/mistral/engine/workflows.py +++ b/mistral/engine/workflows.py @@ -25,12 +25,12 @@ from mistral.engine import dispatcher from mistral.engine.rpc_backend import rpc from mistral.engine import utils as eng_utils from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import scheduler from mistral.services import workflows as wf_service from mistral import utils from mistral.utils import merge_dicts from mistral.utils import wf_trace -from mistral.workbook import parser as spec_parser from mistral.workflow import base as wf_base from mistral.workflow import commands from mistral.workflow import data_flow diff --git a/mistral/tests/unit/workbook/__init__.py b/mistral/lang/__init__.py similarity index 100% rename from mistral/tests/unit/workbook/__init__.py rename to mistral/lang/__init__.py diff --git a/mistral/workbook/base.py b/mistral/lang/base.py similarity index 99% rename from mistral/workbook/base.py rename to mistral/lang/base.py index 0c8c06e6d..28d6b02aa 100644 --- a/mistral/workbook/base.py +++ b/mistral/lang/base.py @@ -21,8 +21,8 @@ import six from mistral import exceptions as exc from mistral import expressions as expr +from mistral.lang import types from mistral import utils -from mistral.workbook import types CMD_PTRN = re.compile("^[\w\.]+[^=\(\s\"]*") diff --git a/mistral/workbook/parser.py b/mistral/lang/parser.py similarity index 96% rename from mistral/workbook/parser.py rename to mistral/lang/parser.py index e9d4408c4..3cf595d56 100644 --- a/mistral/workbook/parser.py +++ b/mistral/lang/parser.py @@ -22,11 +22,11 @@ import six from mistral.db.v2 import api as db_api from mistral import exceptions as exc -from mistral.workbook import base -from mistral.workbook.v2 import actions as actions_v2 -from mistral.workbook.v2 import tasks as tasks_v2 -from mistral.workbook.v2 import workbook as wb_v2 -from mistral.workbook.v2 import workflows as wf_v2 +from mistral.lang import base +from mistral.lang.v2 import actions as actions_v2 +from mistral.lang.v2 import tasks as tasks_v2 +from mistral.lang.v2 import workbook as wb_v2 +from mistral.lang.v2 import workflows as wf_v2 V2_0 = '2.0' diff --git a/mistral/workbook/types.py b/mistral/lang/types.py similarity index 100% rename from mistral/workbook/types.py rename to mistral/lang/types.py diff --git a/mistral/tests/unit/workbook/v2/__init__.py b/mistral/lang/v2/__init__.py similarity index 100% rename from mistral/tests/unit/workbook/v2/__init__.py rename to mistral/lang/v2/__init__.py diff --git a/mistral/workbook/v2/actions.py b/mistral/lang/v2/actions.py similarity index 97% rename from mistral/workbook/v2/actions.py rename to mistral/lang/v2/actions.py index 469c663b7..529ff6dbc 100644 --- a/mistral/workbook/v2/actions.py +++ b/mistral/lang/v2/actions.py @@ -15,9 +15,9 @@ import six +from mistral.lang import types +from mistral.lang.v2 import base from mistral import utils -from mistral.workbook import types -from mistral.workbook.v2 import base class ActionSpec(base.BaseSpec): diff --git a/mistral/workbook/v2/base.py b/mistral/lang/v2/base.py similarity index 94% rename from mistral/workbook/v2/base.py rename to mistral/lang/v2/base.py index 0c9b48565..b3a31fad3 100644 --- a/mistral/workbook/v2/base.py +++ b/mistral/lang/v2/base.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mistral.workbook import base -from mistral.workbook import types +from mistral.lang import base +from mistral.lang import types class BaseSpec(base.BaseSpec): diff --git a/mistral/workbook/v2/policies.py b/mistral/lang/v2/policies.py similarity index 95% rename from mistral/workbook/v2/policies.py rename to mistral/lang/v2/policies.py index e2d8b83da..e83c44063 100644 --- a/mistral/workbook/v2/policies.py +++ b/mistral/lang/v2/policies.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mistral.workbook import types -from mistral.workbook.v2 import base -from mistral.workbook.v2 import retry_policy +from mistral.lang import types +from mistral.lang.v2 import base +from mistral.lang.v2 import retry_policy RETRY_SCHEMA = retry_policy.RetrySpec.get_schema(includes=None) diff --git a/mistral/workbook/v2/retry_policy.py b/mistral/lang/v2/retry_policy.py similarity index 97% rename from mistral/workbook/v2/retry_policy.py rename to mistral/lang/v2/retry_policy.py index b46176588..2eeffe1bb 100644 --- a/mistral/workbook/v2/retry_policy.py +++ b/mistral/lang/v2/retry_policy.py @@ -15,8 +15,8 @@ import six -from mistral.workbook import types -from mistral.workbook.v2 import base +from mistral.lang import types +from mistral.lang.v2 import base class RetrySpec(base.BaseSpec): diff --git a/mistral/workbook/v2/task_defaults.py b/mistral/lang/v2/task_defaults.py similarity index 95% rename from mistral/workbook/v2/task_defaults.py rename to mistral/lang/v2/task_defaults.py index 6cb48b0dc..820e32fd8 100644 --- a/mistral/workbook/v2/task_defaults.py +++ b/mistral/lang/v2/task_defaults.py @@ -15,10 +15,10 @@ import six -from mistral.workbook import types -from mistral.workbook.v2 import base -from mistral.workbook.v2 import policies -from mistral.workbook.v2 import tasks +from mistral.lang import types +from mistral.lang.v2 import base +from mistral.lang.v2 import policies +from mistral.lang.v2 import tasks direct_wf_ts = tasks.DirectWorkflowTaskSpec diff --git a/mistral/workbook/v2/tasks.py b/mistral/lang/v2/tasks.py similarity index 98% rename from mistral/workbook/v2/tasks.py rename to mistral/lang/v2/tasks.py index 0342c46ce..065a70d86 100644 --- a/mistral/workbook/v2/tasks.py +++ b/mistral/lang/v2/tasks.py @@ -20,10 +20,10 @@ import six from mistral import exceptions as exc from mistral import expressions +from mistral.lang import types +from mistral.lang.v2 import base +from mistral.lang.v2 import policies from mistral import utils -from mistral.workbook import types -from mistral.workbook.v2 import base -from mistral.workbook.v2 import policies _expr_ptrns = [expressions.patterns[name] for name in expressions.patterns] WITH_ITEMS_PTRN = re.compile( diff --git a/mistral/workbook/v2/workbook.py b/mistral/lang/v2/workbook.py similarity index 94% rename from mistral/workbook/v2/workbook.py rename to mistral/lang/v2/workbook.py index 2f5d963f1..83d8c0fe5 100644 --- a/mistral/workbook/v2/workbook.py +++ b/mistral/lang/v2/workbook.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mistral.workbook.v2 import actions as act -from mistral.workbook.v2 import base -from mistral.workbook.v2 import workflows as wf +from mistral.lang.v2 import actions as act +from mistral.lang.v2 import base +from mistral.lang.v2 import workflows as wf # We want to match any single word that isn't exactly "version" NON_VERSION_WORD_REGEX = "^(?!version$)[\w-]+$" diff --git a/mistral/workbook/v2/workflows.py b/mistral/lang/v2/workflows.py similarity index 98% rename from mistral/workbook/v2/workflows.py rename to mistral/lang/v2/workflows.py index e2337b352..44031fcc6 100644 --- a/mistral/workbook/v2/workflows.py +++ b/mistral/lang/v2/workflows.py @@ -18,11 +18,11 @@ import six import threading from mistral import exceptions as exc +from mistral.lang import types +from mistral.lang.v2 import base +from mistral.lang.v2 import task_defaults +from mistral.lang.v2 import tasks from mistral import utils -from mistral.workbook import types -from mistral.workbook.v2 import base -from mistral.workbook.v2 import task_defaults -from mistral.workbook.v2 import tasks class WorkflowSpec(base.BaseSpec): diff --git a/mistral/services/actions.py b/mistral/services/actions.py index e9f1574d8..118f1bb31 100644 --- a/mistral/services/actions.py +++ b/mistral/services/actions.py @@ -16,7 +16,7 @@ import json from mistral.db.v2 import api as db_api from mistral import exceptions as exc -from mistral.workbook import parser as spec_parser +from mistral.lang import parser as spec_parser def create_actions(definition, scope='private'): diff --git a/mistral/services/triggers.py b/mistral/services/triggers.py index 19ec8a94c..8c616f398 100644 --- a/mistral/services/triggers.py +++ b/mistral/services/triggers.py @@ -21,8 +21,8 @@ from mistral.db.v2 import api as db_api from mistral.engine.rpc_backend import rpc from mistral.engine import utils as eng_utils from mistral import exceptions as exc +from mistral.lang import parser from mistral.services import security -from mistral.workbook import parser def get_next_execution_time(pattern, start_time): diff --git a/mistral/services/workbooks.py b/mistral/services/workbooks.py index 848d28df6..b1bb5ab76 100644 --- a/mistral/services/workbooks.py +++ b/mistral/services/workbooks.py @@ -13,8 +13,8 @@ # limitations under the License. from mistral.db.v2 import api as db_api_v2 +from mistral.lang import parser as spec_parser from mistral.services import actions -from mistral.workbook import parser as spec_parser def create_workbook_v2(definition, scope='private'): diff --git a/mistral/services/workflows.py b/mistral/services/workflows.py index ebfed895f..53b9c2c8d 100644 --- a/mistral/services/workflows.py +++ b/mistral/services/workflows.py @@ -14,8 +14,8 @@ from mistral.db.v2 import api as db_api from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral import utils -from mistral.workbook import parser as spec_parser from mistral.workflow import data_flow from mistral.workflow import states diff --git a/mistral/tests/unit/base.py b/mistral/tests/unit/base.py index a94a666c4..87ff4f342 100644 --- a/mistral/tests/unit/base.py +++ b/mistral/tests/unit/base.py @@ -29,12 +29,12 @@ from mistral import context as auth_context from mistral.db.sqlalchemy import base as db_sa_base from mistral.db.sqlalchemy import sqlite_lock from mistral.db.v2 import api as db_api +from mistral.lang import parser as spec_parser from mistral.services import action_manager from mistral.services import security from mistral.tests.unit import config as test_config from mistral.utils import inspect_utils as i_utils from mistral import version -from mistral.workbook import parser as spec_parser from mistral.workflow import lookup_utils RESOURCES_PATH = 'tests/resources/' diff --git a/mistral/tests/unit/engine/test_policies.py b/mistral/tests/unit/engine/test_policies.py index 00db9e273..643e69e85 100644 --- a/mistral/tests/unit/engine/test_policies.py +++ b/mistral/tests/unit/engine/test_policies.py @@ -21,10 +21,10 @@ from mistral.db.v2 import api as db_api from mistral.db.v2.sqlalchemy import models from mistral.engine import policies from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import workbooks as wb_service from mistral.services import workflows as wf_service from mistral.tests.unit.engine import base -from mistral.workbook import parser as spec_parser from mistral.workflow import states diff --git a/mistral/tests/unit/engine/test_workflow_resume.py b/mistral/tests/unit/engine/test_workflow_resume.py index 4b1e11db5..0cb4c32ae 100644 --- a/mistral/tests/unit/engine/test_workflow_resume.py +++ b/mistral/tests/unit/engine/test_workflow_resume.py @@ -17,9 +17,9 @@ from oslo_config import cfg from mistral.db.v2 import api as db_api from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import workbooks as wb_service from mistral.tests.unit.engine import base -from mistral.workbook import parser as spec_parser from mistral.workflow import data_flow from mistral.workflow import states from mistral.workflow import utils diff --git a/mistral/workbook/__init__.py b/mistral/tests/unit/lang/__init__.py similarity index 100% rename from mistral/workbook/__init__.py rename to mistral/tests/unit/lang/__init__.py diff --git a/mistral/tests/unit/workbook/test_spec_caching.py b/mistral/tests/unit/lang/test_spec_caching.py similarity index 99% rename from mistral/tests/unit/workbook/test_spec_caching.py rename to mistral/tests/unit/lang/test_spec_caching.py index 4ffaa1eb1..6c83accd7 100644 --- a/mistral/tests/unit/workbook/test_spec_caching.py +++ b/mistral/tests/unit/lang/test_spec_caching.py @@ -13,10 +13,10 @@ # limitations under the License. from mistral.db.v2 import api as db_api +from mistral.lang import parser as spec_parser from mistral.services import workbooks as wb_service from mistral.services import workflows as wf_service from mistral.tests.unit import base -from mistral.workbook import parser as spec_parser from mistral.workflow import states diff --git a/mistral/workbook/v2/__init__.py b/mistral/tests/unit/lang/v2/__init__.py similarity index 100% rename from mistral/workbook/v2/__init__.py rename to mistral/tests/unit/lang/v2/__init__.py diff --git a/mistral/tests/unit/workbook/v2/base.py b/mistral/tests/unit/lang/v2/base.py similarity index 98% rename from mistral/tests/unit/workbook/v2/base.py rename to mistral/tests/unit/lang/v2/base.py index 6c62208a0..0ff0b17f5 100644 --- a/mistral/tests/unit/workbook/v2/base.py +++ b/mistral/tests/unit/lang/v2/base.py @@ -17,9 +17,9 @@ import copy import yaml from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.tests.unit import base from mistral import utils -from mistral.workbook import parser as spec_parser class WorkflowSpecValidationTestCase(base.BaseTest): diff --git a/mistral/tests/unit/workbook/v2/test_actions.py b/mistral/tests/unit/lang/v2/test_actions.py similarity index 98% rename from mistral/tests/unit/workbook/v2/test_actions.py rename to mistral/tests/unit/lang/v2/test_actions.py index d599a86d7..2de690798 100644 --- a/mistral/tests/unit/workbook/v2/test_actions.py +++ b/mistral/tests/unit/lang/v2/test_actions.py @@ -15,7 +15,7 @@ import copy -from mistral.tests.unit.workbook.v2 import base +from mistral.tests.unit.lang.v2 import base from mistral import utils diff --git a/mistral/tests/unit/workbook/v2/test_tasks.py b/mistral/tests/unit/lang/v2/test_tasks.py similarity index 99% rename from mistral/tests/unit/workbook/v2/test_tasks.py rename to mistral/tests/unit/lang/v2/test_tasks.py index e04d89edd..b2b010c5d 100644 --- a/mistral/tests/unit/workbook/v2/test_tasks.py +++ b/mistral/tests/unit/lang/v2/test_tasks.py @@ -14,9 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mistral.tests.unit.workbook.v2 import base as v2_base +from mistral.lang.v2 import workflows +from mistral.tests.unit.lang.v2 import base as v2_base from mistral import utils -from mistral.workbook.v2 import workflows class TaskSpecValidation(v2_base.WorkflowSpecValidationTestCase): diff --git a/mistral/tests/unit/workbook/v2/test_workbook.py b/mistral/tests/unit/lang/v2/test_workbook.py similarity index 99% rename from mistral/tests/unit/workbook/v2/test_workbook.py rename to mistral/tests/unit/lang/v2/test_workbook.py index 62019eb5c..97c5738a4 100644 --- a/mistral/tests/unit/workbook/v2/test_workbook.py +++ b/mistral/tests/unit/lang/v2/test_workbook.py @@ -19,8 +19,8 @@ import re import yaml from mistral import exceptions as exc -from mistral.tests.unit.workbook.v2 import base -from mistral.workbook.v2 import workbook +from mistral.lang.v2 import workbook +from mistral.tests.unit.lang.v2 import base class WorkbookSpecValidation(base.WorkbookSpecValidationTestCase): diff --git a/mistral/tests/unit/workbook/v2/test_workflows.py b/mistral/tests/unit/lang/v2/test_workflows.py similarity index 99% rename from mistral/tests/unit/workbook/v2/test_workflows.py rename to mistral/tests/unit/lang/v2/test_workflows.py index 849f1a66d..4613520d2 100644 --- a/mistral/tests/unit/workbook/v2/test_workflows.py +++ b/mistral/tests/unit/lang/v2/test_workflows.py @@ -18,7 +18,7 @@ import copy import yaml from mistral import exceptions as exc -from mistral.tests.unit.workbook.v2 import base +from mistral.tests.unit.lang.v2 import base from mistral import utils diff --git a/mistral/tests/unit/services/test_action_service.py b/mistral/tests/unit/services/test_action_service.py index bd7db568a..ffd68f762 100644 --- a/mistral/tests/unit/services/test_action_service.py +++ b/mistral/tests/unit/services/test_action_service.py @@ -15,10 +15,10 @@ from oslo_config import cfg from mistral.db.v2 import api as db_api +from mistral.lang import parser as spec_parser from mistral.services import actions as action_service from mistral.tests.unit import base from mistral import utils -from mistral.workbook import parser as spec_parser # Use the set_default method to set value otherwise in certain test cases diff --git a/mistral/tests/unit/services/test_workbook_service.py b/mistral/tests/unit/services/test_workbook_service.py index aa2059bd5..f86821773 100644 --- a/mistral/tests/unit/services/test_workbook_service.py +++ b/mistral/tests/unit/services/test_workbook_service.py @@ -15,9 +15,9 @@ from oslo_config import cfg from mistral.db.v2 import api as db_api +from mistral.lang import parser as spec_parser from mistral.services import workbooks as wb_service from mistral.tests.unit import base -from mistral.workbook import parser as spec_parser # Use the set_default method to set value otherwise in certain test cases diff --git a/mistral/tests/unit/services/test_workflow_service.py b/mistral/tests/unit/services/test_workflow_service.py index bcdf212df..cd8a9dff6 100644 --- a/mistral/tests/unit/services/test_workflow_service.py +++ b/mistral/tests/unit/services/test_workflow_service.py @@ -19,10 +19,10 @@ from oslo_config import cfg from mistral.db.v2.sqlalchemy import api as db_api from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import workflows as wf_service from mistral.tests.unit import base from mistral import utils -from mistral.workbook import parser as spec_parser from mistral.workflow import states diff --git a/mistral/tests/unit/workflow/test_direct_workflow.py b/mistral/tests/unit/workflow/test_direct_workflow.py index 00f037b76..f78f8b219 100644 --- a/mistral/tests/unit/workflow/test_direct_workflow.py +++ b/mistral/tests/unit/workflow/test_direct_workflow.py @@ -17,9 +17,9 @@ import mock from mistral.db.v2 import api as db_api from mistral.db.v2.sqlalchemy import models from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import workflows as wf_service from mistral.tests.unit import base -from mistral.workbook import parser as spec_parser from mistral.workflow import direct_workflow as d_wf from mistral.workflow import states diff --git a/mistral/tests/unit/workflow/test_reverse_workflow.py b/mistral/tests/unit/workflow/test_reverse_workflow.py index 84f0bff48..70311dd99 100644 --- a/mistral/tests/unit/workflow/test_reverse_workflow.py +++ b/mistral/tests/unit/workflow/test_reverse_workflow.py @@ -15,9 +15,9 @@ from mistral.db.v2 import api as db_api from mistral.db.v2.sqlalchemy import models from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral.services import workbooks as wb_service from mistral.tests.unit import base -from mistral.workbook import parser as spec_parser from mistral.workflow import reverse_workflow as reverse_wf from mistral.workflow import states diff --git a/mistral/tests/unit/workflow/test_workflow_base.py b/mistral/tests/unit/workflow/test_workflow_base.py index b2b7d2ead..fb62b5ef4 100644 --- a/mistral/tests/unit/workflow/test_workflow_base.py +++ b/mistral/tests/unit/workflow/test_workflow_base.py @@ -13,8 +13,8 @@ # limitations under the License. +from mistral.lang import parser as spec_parser from mistral.tests.unit import base -from mistral.workbook import parser as spec_parser from mistral.workflow import base as wf_base from mistral.workflow import direct_workflow as direct_wf from mistral.workflow import reverse_workflow as reverse_wf diff --git a/mistral/workflow/base.py b/mistral/workflow/base.py index cc7d5dd04..f74b72332 100644 --- a/mistral/workflow/base.py +++ b/mistral/workflow/base.py @@ -21,8 +21,8 @@ from oslo_log import log as logging from osprofiler import profiler from mistral import exceptions as exc +from mistral.lang import parser as spec_parser from mistral import utils as u -from mistral.workbook import parser as spec_parser from mistral.workflow import commands from mistral.workflow import data_flow from mistral.workflow import lookup_utils diff --git a/mistral/workflow/commands.py b/mistral/workflow/commands.py index 8ef928601..45ee50465 100644 --- a/mistral/workflow/commands.py +++ b/mistral/workflow/commands.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from mistral.workbook import parser as spec_parser -from mistral.workbook.v2 import tasks +from mistral.lang import parser as spec_parser +from mistral.lang.v2 import tasks from mistral.workflow import states diff --git a/mistral/workflow/data_flow.py b/mistral/workflow/data_flow.py index ab8801b62..420c0332e 100644 --- a/mistral/workflow/data_flow.py +++ b/mistral/workflow/data_flow.py @@ -22,9 +22,9 @@ from mistral import context as auth_ctx from mistral.db.v2.sqlalchemy import models from mistral import exceptions as exc from mistral import expressions as expr +from mistral.lang import parser as spec_parser from mistral import utils from mistral.utils import inspect_utils -from mistral.workbook import parser as spec_parser from mistral.workflow import states LOG = logging.getLogger(__name__)