Rename package mistral.engine.rpc to mistral.engine.rpc_backend
There is a small issue during changing branch from current to Mitaka, where there was module called rpc.py, and currently there is a package rpc. Problem is, if Mistral from master was already at least run once, and changed back to Mitaka, there is a chance, that directory rpc still exists, and contains pyc files. Trying to use old rpc module will fail with unable to find get_transport method due remains of bytecode from master branch. Simple solution for this situation is to rename rpc module to rpc_backend. Change-Id: Ib5d05930a9715caf2bb5ce1dba4e520a503bc0cd
This commit is contained in:
parent
4bc8163407
commit
606059add8
@ -25,7 +25,7 @@ from mistral.api.controllers import resource
|
|||||||
from mistral.api.controllers.v2 import types
|
from mistral.api.controllers.v2 import types
|
||||||
from mistral import context
|
from mistral import context
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.utils import rest_utils
|
from mistral.utils import rest_utils
|
||||||
from mistral.workflow import states
|
from mistral.workflow import states
|
||||||
|
@ -25,7 +25,7 @@ from mistral.api.controllers.v2 import task
|
|||||||
from mistral.api.controllers.v2 import types
|
from mistral.api.controllers.v2 import types
|
||||||
from mistral import context
|
from mistral import context
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.services import workflows as wf_service
|
from mistral.services import workflows as wf_service
|
||||||
from mistral.utils import rest_utils
|
from mistral.utils import rest_utils
|
||||||
|
@ -27,7 +27,7 @@ from mistral.api.controllers.v2 import action_execution
|
|||||||
from mistral.api.controllers.v2 import types
|
from mistral.api.controllers.v2 import types
|
||||||
from mistral import context
|
from mistral import context
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.utils import rest_utils
|
from mistral.utils import rest_utils
|
||||||
from mistral.workbook import parser as spec_parser
|
from mistral.workbook import parser as spec_parser
|
||||||
|
@ -54,7 +54,7 @@ from mistral import config
|
|||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine import default_engine as def_eng
|
from mistral.engine import default_engine as def_eng
|
||||||
from mistral.engine import default_executor as def_executor
|
from mistral.engine import default_executor as def_executor
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral.services import expiration_policy
|
from mistral.services import expiration_policy
|
||||||
from mistral.services import scheduler
|
from mistral.services import scheduler
|
||||||
from mistral.utils import profiler
|
from mistral.utils import profiler
|
||||||
|
@ -20,7 +20,7 @@ from osprofiler import profiler
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral.engine import utils as e_utils
|
from mistral.engine import utils as e_utils
|
||||||
from mistral.engine import workflow_handler as wf_handler
|
from mistral.engine import workflow_handler as wf_handler
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from mistral.engine.rpc.kombu import kombu_client
|
from mistral.engine.rpc_backend.kombu import kombu_client
|
||||||
|
|
||||||
|
|
||||||
# Example of using Kombu based RPC client.
|
# Example of using Kombu based RPC client.
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from mistral.engine.rpc.kombu import kombu_server
|
from mistral.engine.rpc_backend.kombu import kombu_server
|
||||||
|
|
||||||
|
|
||||||
# Simple example of endpoint of RPC server, which just
|
# Simple example of endpoint of RPC server, which just
|
@ -18,8 +18,8 @@ import time
|
|||||||
import kombu
|
import kombu
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from mistral.engine.rpc import base as rpc_base
|
from mistral.engine.rpc_backend import base as rpc_base
|
||||||
from mistral.engine.rpc.kombu import base as kombu_base
|
from mistral.engine.rpc_backend.kombu import base as kombu_base
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral import utils
|
from mistral import utils
|
||||||
|
|
@ -19,8 +19,8 @@ import kombu
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from mistral import context as auth_context
|
from mistral import context as auth_context
|
||||||
from mistral.engine.rpc import base as rpc_base
|
from mistral.engine.rpc_backend import base as rpc_base
|
||||||
from mistral.engine.rpc.kombu import base as kombu_base
|
from mistral.engine.rpc_backend.kombu import base as kombu_base
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
|||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
|
|
||||||
from mistral import context as auth_ctx
|
from mistral import context as auth_ctx
|
||||||
from mistral.engine.rpc import base as rpc_base
|
from mistral.engine.rpc_backend import base as rpc_base
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
|
|
||||||
|
|
||||||
class OsloRPCClient(rpc_base.RPCClient):
|
class OsloRPCClient(rpc_base.RPCClient):
|
@ -16,8 +16,8 @@ from oslo_log import log as logging
|
|||||||
import oslo_messaging as messaging
|
import oslo_messaging as messaging
|
||||||
|
|
||||||
from mistral import context as ctx
|
from mistral import context as ctx
|
||||||
from mistral.engine.rpc import base as rpc_base
|
from mistral.engine.rpc_backend import base as rpc_base
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
@ -86,7 +86,7 @@ def get_rpc_server_driver():
|
|||||||
global _IMPL_SERVER
|
global _IMPL_SERVER
|
||||||
if not _IMPL_SERVER:
|
if not _IMPL_SERVER:
|
||||||
_IMPL_SERVER = driver.DriverManager(
|
_IMPL_SERVER = driver.DriverManager(
|
||||||
'mistral.engine.rpc',
|
'mistral.engine.rpc_backend',
|
||||||
'%s_server' % rpc_impl
|
'%s_server' % rpc_impl
|
||||||
).driver
|
).driver
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ def get_rpc_client_driver():
|
|||||||
global _IMPL_CLIENT
|
global _IMPL_CLIENT
|
||||||
if not _IMPL_CLIENT:
|
if not _IMPL_CLIENT:
|
||||||
_IMPL_CLIENT = driver.DriverManager(
|
_IMPL_CLIENT = driver.DriverManager(
|
||||||
'mistral.engine.rpc',
|
'mistral.engine.rpc_backend',
|
||||||
'%s_client' % rpc_impl
|
'%s_client' % rpc_impl
|
||||||
).driver
|
).driver
|
||||||
|
|
@ -23,7 +23,7 @@ import six
|
|||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.db.v2.sqlalchemy import models as db_models
|
from mistral.db.v2.sqlalchemy import models as db_models
|
||||||
from mistral.engine import dispatcher
|
from mistral.engine import dispatcher
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral.engine import utils as eng_utils
|
from mistral.engine import utils as eng_utils
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.services import scheduler
|
from mistral.services import scheduler
|
||||||
|
@ -21,7 +21,7 @@ from oslo_service import threadgroup
|
|||||||
|
|
||||||
from mistral import context as auth_ctx
|
from mistral import context as auth_ctx
|
||||||
from mistral.db.v2 import api as db_api_v2
|
from mistral.db.v2 import api as db_api_v2
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.services import security
|
from mistral.services import security
|
||||||
from mistral.services import triggers
|
from mistral.services import triggers
|
||||||
|
@ -25,7 +25,7 @@ import oslo_messaging
|
|||||||
|
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.db.v2.sqlalchemy import models
|
from mistral.db.v2.sqlalchemy import models
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.tests.unit.api import base
|
from mistral.tests.unit.api import base
|
||||||
from mistral.workflow import states
|
from mistral.workflow import states
|
||||||
|
@ -27,7 +27,7 @@ from webtest import app as webtest_app
|
|||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.db.v2.sqlalchemy import api as sql_db_api
|
from mistral.db.v2.sqlalchemy import api as sql_db_api
|
||||||
from mistral.db.v2.sqlalchemy import models
|
from mistral.db.v2.sqlalchemy import models
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.tests.unit.api import base
|
from mistral.tests.unit.api import base
|
||||||
from mistral import utils
|
from mistral import utils
|
||||||
|
@ -20,7 +20,7 @@ import mock
|
|||||||
|
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.db.v2.sqlalchemy import models
|
from mistral.db.v2.sqlalchemy import models
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.tests.unit.api import base
|
from mistral.tests.unit.api import base
|
||||||
from mistral.workflow import data_flow
|
from mistral.workflow import data_flow
|
||||||
|
@ -22,7 +22,7 @@ from mistral import context as ctx
|
|||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine import default_engine as def_eng
|
from mistral.engine import default_engine as def_eng
|
||||||
from mistral.engine import default_executor as def_exec
|
from mistral.engine import default_executor as def_exec
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral.services import scheduler
|
from mistral.services import scheduler
|
||||||
from mistral.tests.unit import base
|
from mistral.tests.unit import base
|
||||||
from mistral.workflow import states
|
from mistral.workflow import states
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.tests.unit.engine.rpc.kombu import base
|
from mistral.tests.unit.engine.rpc_backend.kombu import base
|
||||||
from mistral.tests.unit.engine.rpc.kombu import fake_kombu
|
from mistral.tests.unit.engine.rpc_backend.kombu import fake_kombu
|
||||||
from mistral import utils
|
from mistral import utils
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
@ -23,7 +23,7 @@ import socket
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
with mock.patch.dict('sys.modules', kombu=fake_kombu):
|
with mock.patch.dict('sys.modules', kombu=fake_kombu):
|
||||||
from mistral.engine.rpc.kombu import kombu_client
|
from mistral.engine.rpc_backend.kombu import kombu_client
|
||||||
|
|
||||||
|
|
||||||
class TestException(exc.MistralException):
|
class TestException(exc.MistralException):
|
@ -14,14 +14,14 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.tests.unit.engine.rpc.kombu import base
|
from mistral.tests.unit.engine.rpc_backend.kombu import base
|
||||||
from mistral.tests.unit.engine.rpc.kombu import fake_kombu
|
from mistral.tests.unit.engine.rpc_backend.kombu import fake_kombu
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
with mock.patch.dict('sys.modules', kombu=fake_kombu):
|
with mock.patch.dict('sys.modules', kombu=fake_kombu):
|
||||||
from mistral.engine.rpc.kombu import kombu_server
|
from mistral.engine.rpc_backend.kombu import kombu_server
|
||||||
|
|
||||||
|
|
||||||
class TestException(exc.MistralError):
|
class TestException(exc.MistralError):
|
@ -17,7 +17,7 @@ from oslo_config import cfg
|
|||||||
|
|
||||||
from mistral.db.v2 import api as db_api
|
from mistral.db.v2 import api as db_api
|
||||||
from mistral.engine import default_executor
|
from mistral.engine import default_executor
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral.services import workbooks as wb_service
|
from mistral.services import workbooks as wb_service
|
||||||
from mistral.tests.unit.engine import base
|
from mistral.tests.unit.engine import base
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import eventlet
|
|||||||
import mock
|
import mock
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
|
||||||
from mistral.engine.rpc import rpc
|
from mistral.engine.rpc_backend import rpc
|
||||||
from mistral import exceptions as exc
|
from mistral import exceptions as exc
|
||||||
from mistral.services import periodic
|
from mistral.services import periodic
|
||||||
from mistral.services import security
|
from mistral.services import security
|
||||||
|
10
setup.cfg
10
setup.cfg
@ -40,11 +40,11 @@ console_scripts =
|
|||||||
mistral-server = mistral.cmd.launch:main
|
mistral-server = mistral.cmd.launch:main
|
||||||
mistral-db-manage = mistral.db.sqlalchemy.migration.cli:main
|
mistral-db-manage = mistral.db.sqlalchemy.migration.cli:main
|
||||||
|
|
||||||
mistral.engine.rpc =
|
mistral.engine.rpc_backend =
|
||||||
oslo_client = mistral.engine.rpc.oslo.oslo_client:OsloRPCClient
|
oslo_client = mistral.engine.rpc_backend.oslo.oslo_client:OsloRPCClient
|
||||||
oslo_server = mistral.engine.rpc.oslo.oslo_server:OsloRPCServer
|
oslo_server = mistral.engine.rpc_backend.oslo.oslo_server:OsloRPCServer
|
||||||
kombu_client = mistral.engine.rpc.kombu.kombu_client:KombuRPCClient
|
kombu_client = mistral.engine.rpc_backend.kombu.kombu_client:KombuRPCClient
|
||||||
kombu_server = mistral.engine.rpc.kombu.kombu_server:KombuRPCServer
|
kombu_server = mistral.engine.rpc_backend.kombu.kombu_server:KombuRPCServer
|
||||||
|
|
||||||
oslo.config.opts =
|
oslo.config.opts =
|
||||||
mistral.config = mistral.config:list_opts
|
mistral.config = mistral.config:list_opts
|
||||||
|
Loading…
Reference in New Issue
Block a user