summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-09-20 15:18:32 +0000
committerGerrit Code Review <review@openstack.org>2018-09-20 15:18:32 +0000
commit070179948ba6dad714373ceda51bc9d2328ce2e9 (patch)
tree2798dbb758eb1364cfd2354c19743a5afb7b9e30
parent670dfe447aa2f8686b745b16fcdef682ac867aaf (diff)
parentc58e5e02af76cad3967d22d14c63794c6d60456f (diff)
Merge "Rename async package to async_"
-rw-r--r--doc/source/admin/interoperable-image-import.rst10
-rw-r--r--glance/async_/__init__.py (renamed from glance/async/__init__.py)0
-rw-r--r--glance/async_/flows/__init__.py (renamed from glance/async/flows/__init__.py)0
-rw-r--r--glance/async_/flows/_internal_plugins/__init__.py (renamed from glance/async/flows/_internal_plugins/__init__.py)0
-rw-r--r--glance/async_/flows/_internal_plugins/web_download.py (renamed from glance/async/flows/_internal_plugins/web_download.py)0
-rw-r--r--glance/async_/flows/api_image_import.py (renamed from glance/async/flows/api_image_import.py)4
-rw-r--r--glance/async_/flows/base_import.py (renamed from glance/async/flows/base_import.py)2
-rw-r--r--glance/async_/flows/convert.py (renamed from glance/async/flows/convert.py)0
-rw-r--r--glance/async_/flows/introspect.py (renamed from glance/async/flows/introspect.py)2
-rw-r--r--glance/async_/flows/ovf_process.py (renamed from glance/async/flows/ovf_process.py)0
-rw-r--r--glance/async_/flows/plugins/__init__.py (renamed from glance/async/flows/plugins/__init__.py)0
-rw-r--r--glance/async_/flows/plugins/image_conversion.py (renamed from glance/async/flows/plugins/image_conversion.py)2
-rw-r--r--glance/async_/flows/plugins/inject_image_metadata.py (renamed from glance/async/flows/plugins/inject_image_metadata.py)0
-rw-r--r--glance/async_/flows/plugins/no_op.py (renamed from glance/async/flows/plugins/no_op.py)0
-rw-r--r--glance/async_/flows/plugins/plugin_opts.py (renamed from glance/async/flows/plugins/plugin_opts.py)8
-rw-r--r--glance/async_/taskflow_executor.py (renamed from glance/async/taskflow_executor.py)4
-rw-r--r--glance/async_/utils.py (renamed from glance/async/utils.py)0
-rw-r--r--glance/common/utils.py2
-rw-r--r--glance/domain/__init__.py2
-rw-r--r--glance/opts.py19
-rw-r--r--glance/tests/unit/async_/__init__.py (renamed from glance/tests/unit/async/__init__.py)0
-rw-r--r--glance/tests/unit/async_/flows/__init__.py (renamed from glance/tests/unit/async/flows/__init__.py)0
-rw-r--r--glance/tests/unit/async_/flows/plugins/__init__.py (renamed from glance/tests/unit/async/flows/plugins/__init__.py)0
-rw-r--r--glance/tests/unit/async_/flows/plugins/test_inject_image_metadata.py (renamed from glance/tests/unit/async/flows/plugins/test_inject_image_metadata.py)2
-rw-r--r--glance/tests/unit/async_/flows/test_api_image_import.py (renamed from glance/tests/unit/async/flows/test_api_image_import.py)4
-rw-r--r--glance/tests/unit/async_/flows/test_convert.py (renamed from glance/tests/unit/async/flows/test_convert.py)4
-rw-r--r--glance/tests/unit/async_/flows/test_import.py (renamed from glance/tests/unit/async/flows/test_import.py)6
-rw-r--r--glance/tests/unit/async_/flows/test_introspect.py (renamed from glance/tests/unit/async/flows/test_introspect.py)4
-rw-r--r--glance/tests/unit/async_/flows/test_ovf_process.py (renamed from glance/tests/unit/async/flows/test_ovf_process.py)2
-rw-r--r--glance/tests/unit/async_/flows/test_web_download.py (renamed from glance/tests/unit/async/flows/test_web_download.py)2
-rw-r--r--glance/tests/unit/async_/test_async.py (renamed from glance/tests/unit/async/test_async.py)12
-rw-r--r--glance/tests/unit/async_/test_taskflow_executor.py (renamed from glance/tests/unit/async/test_taskflow_executor.py)2
-rw-r--r--glance/tests/unit/test_domain.py14
-rw-r--r--glance/tests/unit/test_notifier.py6
-rw-r--r--setup.cfg18
35 files changed, 66 insertions, 65 deletions
diff --git a/doc/source/admin/interoperable-image-import.rst b/doc/source/admin/interoperable-image-import.rst
index f93fdc0..b1b2ae2 100644
--- a/doc/source/admin/interoperable-image-import.rst
+++ b/doc/source/admin/interoperable-image-import.rst
@@ -243,17 +243,17 @@ specified in the ``glance-image-import.conf`` file. The plugins are loaded by
243the Glance project team, these are already registered for you.) 243the Glance project team, these are already registered for you.)
244 244
245A plugin must be written in Python as a `Taskflow "Task" object`_. The file 245A plugin must be written in Python as a `Taskflow "Task" object`_. The file
246containing this object must be present in the ``glance/async/flows/plugins`` 246containing this object must be present in the ``glance/async_/flows/plugins``
247directory. The plugin file must contain a ``get_flow`` function that returns a 247directory. The plugin file must contain a ``get_flow`` function that returns a
248Taskflow Task object wrapped in a linear flow. See the ``no_op`` plugin, 248Taskflow Task object wrapped in a linear flow. See the ``no_op`` plugin,
249located at ``glance/async/flows/plugins/no_op.py`` for an example of how to do 249located at ``glance/async_/flows/plugins/no_op.py`` for an example of how to do
250this. 250this.
251 251
252Specifying the plugins to be used 252Specifying the plugins to be used
253~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 253~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
254 254
255First, the plugin code must exist in the directory 255First, the plugin code must exist in the directory
256``glance/async/flows/plugins``. The name of a plugin is the filename (without 256``glance/async_/flows/plugins``. The name of a plugin is the filename (without
257extension) of the file containing the plugin code. For example, a file named 257extension) of the file containing the plugin code. For example, a file named
258``fred_mertz.py`` would contain the plugin ``fred_mertz``. 258``fred_mertz.py`` would contain the plugin ``fred_mertz``.
259 259
@@ -269,7 +269,7 @@ of the form::
269 269
270For example:: 270For example::
271 271
272 no_op = glance.async.flows.plugins.no_op:get_flow 272 no_op = glance.async_.flows.plugins.no_op:get_flow
273 273
274Make sure any plugin you want to use is included here. 274Make sure any plugin you want to use is included here.
275 275
@@ -337,7 +337,7 @@ required.
337 The first section, ``image_import_opts``, is used to enable the plugin by 337 The first section, ``image_import_opts``, is used to enable the plugin by
338 specifying the plugin name as one of the elements of the list that is the 338 specifying the plugin name as one of the elements of the list that is the
339 value of the `image_import_plugins` parameter. The plugin name is simply 339 value of the `image_import_plugins` parameter. The plugin name is simply
340 the module name under glance/async/flows/plugins/ 340 the module name under glance/async\_/flows/plugins/
341 341
342 The second section, ``inject_metadata_properties``, is where you set the 342 The second section, ``inject_metadata_properties``, is where you set the
343 parameters for the injection plugin. (Note that the values you specify here 343 parameters for the injection plugin. (Note that the values you specify here
diff --git a/glance/async/__init__.py b/glance/async_/__init__.py
index b637745..b637745 100644
--- a/glance/async/__init__.py
+++ b/glance/async_/__init__.py
diff --git a/glance/async/flows/__init__.py b/glance/async_/flows/__init__.py
index e69de29..e69de29 100644
--- a/glance/async/flows/__init__.py
+++ b/glance/async_/flows/__init__.py
diff --git a/glance/async/flows/_internal_plugins/__init__.py b/glance/async_/flows/_internal_plugins/__init__.py
index 9efada3..9efada3 100644
--- a/glance/async/flows/_internal_plugins/__init__.py
+++ b/glance/async_/flows/_internal_plugins/__init__.py
diff --git a/glance/async/flows/_internal_plugins/web_download.py b/glance/async_/flows/_internal_plugins/web_download.py
index a58e5d0..a58e5d0 100644
--- a/glance/async/flows/_internal_plugins/web_download.py
+++ b/glance/async_/flows/_internal_plugins/web_download.py
diff --git a/glance/async/flows/api_image_import.py b/glance/async_/flows/api_image_import.py
index dc08d37..0511f18 100644
--- a/glance/async/flows/api_image_import.py
+++ b/glance/async_/flows/api_image_import.py
@@ -23,8 +23,8 @@ from taskflow.patterns import linear_flow as lf
23from taskflow import retry 23from taskflow import retry
24from taskflow import task 24from taskflow import task
25 25
26import glance.async.flows._internal_plugins as internal_plugins 26import glance.async_.flows._internal_plugins as internal_plugins
27import glance.async.flows.plugins as import_plugins 27import glance.async_.flows.plugins as import_plugins
28from glance.common import exception 28from glance.common import exception
29from glance.common.scripts.image_import import main as image_import 29from glance.common.scripts.image_import import main as image_import
30from glance.common.scripts import utils as script_utils 30from glance.common.scripts import utils as script_utils
diff --git a/glance/async/flows/base_import.py b/glance/async_/flows/base_import.py
index 18e7655..66a0be1 100644
--- a/glance/async/flows/base_import.py
+++ b/glance/async_/flows/base_import.py
@@ -30,7 +30,7 @@ from taskflow import retry
30from taskflow import task 30from taskflow import task
31from taskflow.types import failure 31from taskflow.types import failure
32 32
33from glance.async import utils 33from glance.async_ import utils
34from glance.common import exception 34from glance.common import exception
35from glance.common.scripts.image_import import main as image_import 35from glance.common.scripts.image_import import main as image_import
36from glance.common.scripts import utils as script_utils 36from glance.common.scripts import utils as script_utils
diff --git a/glance/async/flows/convert.py b/glance/async_/flows/convert.py
index d1b9f1a..d1b9f1a 100644
--- a/glance/async/flows/convert.py
+++ b/glance/async_/flows/convert.py
diff --git a/glance/async/flows/introspect.py b/glance/async_/flows/introspect.py
index 4d39daf..b5f1fb1 100644
--- a/glance/async/flows/introspect.py
+++ b/glance/async_/flows/introspect.py
@@ -21,7 +21,7 @@ from oslo_utils import encodeutils
21from oslo_utils import excutils 21from oslo_utils import excutils
22from taskflow.patterns import linear_flow as lf 22from taskflow.patterns import linear_flow as lf
23 23
24from glance.async import utils 24from glance.async_ import utils
25from glance.i18n import _LE 25from glance.i18n import _LE
26 26
27 27
diff --git a/glance/async/flows/ovf_process.py b/glance/async_/flows/ovf_process.py
index 79357de..79357de 100644
--- a/glance/async/flows/ovf_process.py
+++ b/glance/async_/flows/ovf_process.py
diff --git a/glance/async/flows/plugins/__init__.py b/glance/async_/flows/plugins/__init__.py
index d920cb0..d920cb0 100644
--- a/glance/async/flows/plugins/__init__.py
+++ b/glance/async_/flows/plugins/__init__.py
diff --git a/glance/async/flows/plugins/image_conversion.py b/glance/async_/flows/plugins/image_conversion.py
index 1d7adcf..53f81de 100644
--- a/glance/async/flows/plugins/image_conversion.py
+++ b/glance/async_/flows/plugins/image_conversion.py
@@ -24,7 +24,7 @@ from oslo_utils import excutils
24from taskflow.patterns import linear_flow as lf 24from taskflow.patterns import linear_flow as lf
25from taskflow import task 25from taskflow import task
26 26
27from glance.async import utils 27from glance.async_ import utils
28from glance.i18n import _ 28from glance.i18n import _
29 29
30LOG = logging.getLogger(__name__) 30LOG = logging.getLogger(__name__)
diff --git a/glance/async/flows/plugins/inject_image_metadata.py b/glance/async_/flows/plugins/inject_image_metadata.py
index 24010a8..24010a8 100644
--- a/glance/async/flows/plugins/inject_image_metadata.py
+++ b/glance/async_/flows/plugins/inject_image_metadata.py
diff --git a/glance/async/flows/plugins/no_op.py b/glance/async_/flows/plugins/no_op.py
index 35c290f..35c290f 100644
--- a/glance/async/flows/plugins/no_op.py
+++ b/glance/async_/flows/plugins/no_op.py
diff --git a/glance/async/flows/plugins/plugin_opts.py b/glance/async_/flows/plugins/plugin_opts.py
index 709b78c..173f23c 100644
--- a/glance/async/flows/plugins/plugin_opts.py
+++ b/glance/async_/flows/plugins/plugin_opts.py
@@ -14,8 +14,8 @@
14# under the License. 14# under the License.
15 15
16 16
17import glance.async.flows.plugins.image_conversion 17import glance.async_.flows.plugins.image_conversion
18import glance.async.flows.plugins.inject_image_metadata 18import glance.async_.flows.plugins.inject_image_metadata
19 19
20 20
21# Note(jokke): This list contains tuples of config options for import plugins. 21# Note(jokke): This list contains tuples of config options for import plugins.
@@ -27,9 +27,9 @@ import glance.async.flows.plugins.inject_image_metadata
27# registered under at the config file. 27# registered under at the config file.
28PLUGIN_OPTS = [ 28PLUGIN_OPTS = [
29 ('inject_metadata_properties', 29 ('inject_metadata_properties',
30 glance.async.flows.plugins.inject_image_metadata.inject_metadata_opts), 30 glance.async_.flows.plugins.inject_image_metadata.inject_metadata_opts),
31 ('image_conversion', 31 ('image_conversion',
32 glance.async.flows.plugins.image_conversion.conversion_plugin_opts), 32 glance.async_.flows.plugins.image_conversion.conversion_plugin_opts),
33] 33]
34 34
35 35
diff --git a/glance/async/taskflow_executor.py b/glance/async_/taskflow_executor.py
index 3fe810d..943c33c 100644
--- a/glance/async/taskflow_executor.py
+++ b/glance/async_/taskflow_executor.py
@@ -23,7 +23,7 @@ from stevedore import driver
23from taskflow import engines 23from taskflow import engines
24from taskflow.listeners import logging as llistener 24from taskflow.listeners import logging as llistener
25 25
26import glance.async 26import glance.async_
27from glance.common import exception 27from glance.common import exception
28from glance.common.scripts import utils as script_utils 28from glance.common.scripts import utils as script_utils
29from glance.i18n import _, _LE 29from glance.i18n import _, _LE
@@ -85,7 +85,7 @@ CONF = cfg.CONF
85CONF.register_opts(taskflow_executor_opts, group='taskflow_executor') 85CONF.register_opts(taskflow_executor_opts, group='taskflow_executor')
86 86
87 87
88class TaskExecutor(glance.async.TaskExecutor): 88class TaskExecutor(glance.async_.TaskExecutor):
89 89
90 def __init__(self, context, task_repo, image_repo, image_factory): 90 def __init__(self, context, task_repo, image_repo, image_factory):
91 self.context = context 91 self.context = context
diff --git a/glance/async/utils.py b/glance/async_/utils.py
index 6a5054e..6a5054e 100644
--- a/glance/async/utils.py
+++ b/glance/async_/utils.py
diff --git a/glance/common/utils.py b/glance/common/utils.py
index 05ff3df..92df5bf 100644
--- a/glance/common/utils.py
+++ b/glance/common/utils.py
@@ -128,7 +128,7 @@ def cooperative_read(fd):
128MAX_COOP_READER_BUFFER_SIZE = 134217728 # 128M seems like a sane buffer limit 128MAX_COOP_READER_BUFFER_SIZE = 134217728 # 128M seems like a sane buffer limit
129 129
130CONF.import_group('import_filtering_opts', 130CONF.import_group('import_filtering_opts',
131 'glance.async.flows._internal_plugins') 131 'glance.async_.flows._internal_plugins')
132 132
133 133
134def validate_import_uri(uri): 134def validate_import_uri(uri):
diff --git a/glance/domain/__init__.py b/glance/domain/__init__.py
index 2d5b7af..7feb1ed 100644
--- a/glance/domain/__init__.py
+++ b/glance/domain/__init__.py
@@ -513,7 +513,7 @@ class TaskExecutorFactory(object):
513 TaskExecutorFactory.eventlet_deprecation_warned = True 513 TaskExecutorFactory.eventlet_deprecation_warned = True
514 task_executor = 'taskflow' 514 task_executor = 'taskflow'
515 515
516 executor_cls = ('glance.async.%s_executor.' 516 executor_cls = ('glance.async_.%s_executor.'
517 'TaskExecutor' % task_executor) 517 'TaskExecutor' % task_executor)
518 LOG.debug("Loading %s executor", task_executor) 518 LOG.debug("Loading %s executor", task_executor)
519 executor = importutils.import_class(executor_cls) 519 executor = importutils.import_class(executor_cls)
diff --git a/glance/opts.py b/glance/opts.py
index 93caf40..4d9b1ea 100644
--- a/glance/opts.py
+++ b/glance/opts.py
@@ -28,11 +28,11 @@ from osprofiler import opts as profiler
28 28
29import glance.api.middleware.context 29import glance.api.middleware.context
30import glance.api.versions 30import glance.api.versions
31import glance.async.flows._internal_plugins 31import glance.async_.flows._internal_plugins
32import glance.async.flows.api_image_import 32import glance.async_.flows.api_image_import
33import glance.async.flows.convert 33import glance.async_.flows.convert
34from glance.async.flows.plugins import plugin_opts 34from glance.async_.flows.plugins import plugin_opts
35import glance.async.taskflow_executor 35import glance.async_.taskflow_executor
36import glance.common.config 36import glance.common.config
37import glance.common.location_strategy 37import glance.common.location_strategy
38import glance.common.location_strategy.store_type 38import glance.common.location_strategy.store_type
@@ -71,8 +71,8 @@ _api_opts = [
71 ('image_format', glance.common.config.image_format_opts), 71 ('image_format', glance.common.config.image_format_opts),
72 ('task', glance.common.config.task_opts), 72 ('task', glance.common.config.task_opts),
73 ('taskflow_executor', list(itertools.chain( 73 ('taskflow_executor', list(itertools.chain(
74 glance.async.taskflow_executor.taskflow_executor_opts, 74 glance.async_.taskflow_executor.taskflow_executor_opts,
75 glance.async.flows.convert.convert_task_opts))), 75 glance.async_.flows.convert.convert_task_opts))),
76 ('store_type_location_strategy', 76 ('store_type_location_strategy',
77 glance.common.location_strategy.store_type.store_type_opts), 77 glance.common.location_strategy.store_type.store_type_opts),
78 profiler.list_opts()[0], 78 profiler.list_opts()[0],
@@ -109,9 +109,10 @@ _manage_opts = [
109 (None, []) 109 (None, [])
110] 110]
111_image_import_opts = [ 111_image_import_opts = [
112 ('image_import_opts', glance.async.flows.api_image_import.api_import_opts), 112 ('image_import_opts',
113 glance.async_.flows.api_image_import.api_import_opts),
113 ('import_filtering_opts', 114 ('import_filtering_opts',
114 glance.async.flows._internal_plugins.import_filtering_opts), 115 glance.async_.flows._internal_plugins.import_filtering_opts),
115] 116]
116 117
117 118
diff --git a/glance/tests/unit/async/__init__.py b/glance/tests/unit/async_/__init__.py
index e69de29..e69de29 100644
--- a/glance/tests/unit/async/__init__.py
+++ b/glance/tests/unit/async_/__init__.py
diff --git a/glance/tests/unit/async/flows/__init__.py b/glance/tests/unit/async_/flows/__init__.py
index e69de29..e69de29 100644
--- a/glance/tests/unit/async/flows/__init__.py
+++ b/glance/tests/unit/async_/flows/__init__.py
diff --git a/glance/tests/unit/async/flows/plugins/__init__.py b/glance/tests/unit/async_/flows/plugins/__init__.py
index e69de29..e69de29 100644
--- a/glance/tests/unit/async/flows/plugins/__init__.py
+++ b/glance/tests/unit/async_/flows/plugins/__init__.py
diff --git a/glance/tests/unit/async/flows/plugins/test_inject_image_metadata.py b/glance/tests/unit/async_/flows/plugins/test_inject_image_metadata.py
index 8234607..8bc7c11 100644
--- a/glance/tests/unit/async/flows/plugins/test_inject_image_metadata.py
+++ b/glance/tests/unit/async_/flows/plugins/test_inject_image_metadata.py
@@ -19,7 +19,7 @@ import os
19import glance_store 19import glance_store
20from oslo_config import cfg 20from oslo_config import cfg
21 21
22import glance.async.flows.plugins.inject_image_metadata as inject_metadata 22import glance.async_.flows.plugins.inject_image_metadata as inject_metadata
23from glance.common import utils 23from glance.common import utils
24from glance import domain 24from glance import domain
25from glance import gateway 25from glance import gateway
diff --git a/glance/tests/unit/async/flows/test_api_image_import.py b/glance/tests/unit/async_/flows/test_api_image_import.py
index 20aa6da..5519027 100644
--- a/glance/tests/unit/async/flows/test_api_image_import.py
+++ b/glance/tests/unit/async_/flows/test_api_image_import.py
@@ -17,7 +17,7 @@ import mock
17 17
18from oslo_config import cfg 18from oslo_config import cfg
19 19
20import glance.async.flows.api_image_import as import_flow 20import glance.async_.flows.api_image_import as import_flow
21import glance.tests.utils as test_utils 21import glance.tests.utils as test_utils
22 22
23CONF = cfg.CONF 23CONF = cfg.CONF
@@ -52,7 +52,7 @@ class TestApiImageImportTask(test_utils.BaseTestCase):
52 self.mock_task_repo = mock.MagicMock() 52 self.mock_task_repo = mock.MagicMock()
53 self.mock_image_repo = mock.MagicMock() 53 self.mock_image_repo = mock.MagicMock()
54 54
55 @mock.patch('glance.async.flows.api_image_import._VerifyStaging.__init__') 55 @mock.patch('glance.async_.flows.api_image_import._VerifyStaging.__init__')
56 @mock.patch('taskflow.patterns.linear_flow.Flow.add') 56 @mock.patch('taskflow.patterns.linear_flow.Flow.add')
57 @mock.patch('taskflow.patterns.linear_flow.__init__') 57 @mock.patch('taskflow.patterns.linear_flow.__init__')
58 def _pass_uri(self, mock_lf_init, mock_flow_add, mock_VS_init, 58 def _pass_uri(self, mock_lf_init, mock_flow_add, mock_VS_init,
diff --git a/glance/tests/unit/async/flows/test_convert.py b/glance/tests/unit/async_/flows/test_convert.py
index b3c3848..8b141e2 100644
--- a/glance/tests/unit/async/flows/test_convert.py
+++ b/glance/tests/unit/async_/flows/test_convert.py
@@ -22,8 +22,8 @@ from oslo_concurrency import processutils
22from oslo_config import cfg 22from oslo_config import cfg
23import six 23import six
24 24
25from glance.async.flows import convert 25from glance.async_.flows import convert
26from glance.async import taskflow_executor 26from glance.async_ import taskflow_executor
27from glance.common.scripts import utils as script_utils 27from glance.common.scripts import utils as script_utils
28from glance.common import utils 28from glance.common import utils
29from glance import domain 29from glance import domain
diff --git a/glance/tests/unit/async/flows/test_import.py b/glance/tests/unit/async_/flows/test_import.py
index 70752d8..e3d1a4a 100644
--- a/glance/tests/unit/async/flows/test_import.py
+++ b/glance/tests/unit/async_/flows/test_import.py
@@ -25,9 +25,9 @@ from six.moves import urllib
25from taskflow import task 25from taskflow import task
26from taskflow.types import failure 26from taskflow.types import failure
27 27
28import glance.async.flows.base_import as import_flow 28import glance.async_.flows.base_import as import_flow
29from glance.async import taskflow_executor 29from glance.async_ import taskflow_executor
30from glance.async import utils as async_utils 30from glance.async_ import utils as async_utils
31from glance.common.scripts.image_import import main as image_import 31from glance.common.scripts.image_import import main as image_import
32from glance.common.scripts import utils as script_utils 32from glance.common.scripts import utils as script_utils
33from glance.common import utils 33from glance.common import utils
diff --git a/glance/tests/unit/async/flows/test_introspect.py b/glance/tests/unit/async_/flows/test_introspect.py
index 869f99d..573c441 100644
--- a/glance/tests/unit/async/flows/test_introspect.py
+++ b/glance/tests/unit/async_/flows/test_introspect.py
@@ -20,8 +20,8 @@ import glance_store
20from oslo_concurrency import processutils 20from oslo_concurrency import processutils
21from oslo_config import cfg 21from oslo_config import cfg
22 22
23from glance.async.flows import introspect 23from glance.async_.flows import introspect
24from glance.async import utils as async_utils 24from glance.async_ import utils as async_utils
25from glance import domain 25from glance import domain
26import glance.tests.utils as test_utils 26import glance.tests.utils as test_utils
27 27
diff --git a/glance/tests/unit/async/flows/test_ovf_process.py b/glance/tests/unit/async_/flows/test_ovf_process.py
index 5646cae..0a70bc2 100644
--- a/glance/tests/unit/async/flows/test_ovf_process.py
+++ b/glance/tests/unit/async_/flows/test_ovf_process.py
@@ -24,7 +24,7 @@ try:
24except ImportError: 24except ImportError:
25 from defusedxml.ElementTree import ParseError 25 from defusedxml.ElementTree import ParseError
26 26
27from glance.async.flows import ovf_process 27from glance.async_.flows import ovf_process
28import glance.tests.utils as test_utils 28import glance.tests.utils as test_utils
29from oslo_config import cfg 29from oslo_config import cfg
30 30
diff --git a/glance/tests/unit/async/flows/test_web_download.py b/glance/tests/unit/async_/flows/test_web_download.py
index ca62f0a..5384320 100644
--- a/glance/tests/unit/async/flows/test_web_download.py
+++ b/glance/tests/unit/async_/flows/test_web_download.py
@@ -19,7 +19,7 @@ from glance_store._drivers import filesystem
19from glance_store import backend 19from glance_store import backend
20from oslo_config import cfg 20from oslo_config import cfg
21 21
22from glance.async.flows._internal_plugins import web_download 22from glance.async_.flows._internal_plugins import web_download
23 23
24import glance.common.exception 24import glance.common.exception
25import glance.common.scripts.utils as script_utils 25import glance.common.scripts.utils as script_utils
diff --git a/glance/tests/unit/async/test_async.py b/glance/tests/unit/async_/test_async.py
index 8efa48a..d6a1212 100644
--- a/glance/tests/unit/async/test_async.py
+++ b/glance/tests/unit/async_/test_async.py
@@ -16,7 +16,7 @@
16 16
17import mock 17import mock
18 18
19import glance.async 19import glance.async_
20import glance.tests.utils as test_utils 20import glance.tests.utils as test_utils
21 21
22 22
@@ -28,10 +28,10 @@ class TestTaskExecutor(test_utils.BaseTestCase):
28 self.task_repo = mock.Mock() 28 self.task_repo = mock.Mock()
29 self.image_repo = mock.Mock() 29 self.image_repo = mock.Mock()
30 self.image_factory = mock.Mock() 30 self.image_factory = mock.Mock()
31 self.executor = glance.async.TaskExecutor(self.context, 31 self.executor = glance.async_.TaskExecutor(self.context,
32 self.task_repo, 32 self.task_repo,
33 self.image_repo, 33 self.image_repo,
34 self.image_factory) 34 self.image_factory)
35 35
36 def test_begin_processing(self): 36 def test_begin_processing(self):
37 # setup 37 # setup
@@ -40,7 +40,7 @@ class TestTaskExecutor(test_utils.BaseTestCase):
40 task = mock.Mock() 40 task = mock.Mock()
41 41
42 with mock.patch.object( 42 with mock.patch.object(
43 glance.async.TaskExecutor, 43 glance.async_.TaskExecutor,
44 '_run') as mock_run: 44 '_run') as mock_run:
45 self.task_repo.get.return_value = task 45 self.task_repo.get.return_value = task
46 self.executor.begin_processing(task_id) 46 self.executor.begin_processing(task_id)
diff --git a/glance/tests/unit/async/test_taskflow_executor.py b/glance/tests/unit/async_/test_taskflow_executor.py
index c1a4ef6..222ad4d 100644
--- a/glance/tests/unit/async/test_taskflow_executor.py
+++ b/glance/tests/unit/async_/test_taskflow_executor.py
@@ -19,7 +19,7 @@ import glance_store
19from oslo_config import cfg 19from oslo_config import cfg
20from taskflow import engines 20from taskflow import engines
21 21
22from glance.async import taskflow_executor 22from glance.async_ import taskflow_executor
23from glance.common.scripts.image_import import main as image_import 23from glance.common.scripts.image_import import main as image_import
24from glance import domain 24from glance import domain
25import glance.tests.utils as test_utils 25import glance.tests.utils as test_utils
diff --git a/glance/tests/unit/test_domain.py b/glance/tests/unit/test_domain.py
index 5ab5cf7..97037f3 100644
--- a/glance/tests/unit/test_domain.py
+++ b/glance/tests/unit/test_domain.py
@@ -21,8 +21,8 @@ import mock
21from oslo_config import cfg 21from oslo_config import cfg
22import oslo_utils.importutils 22import oslo_utils.importutils
23 23
24import glance.async 24import glance.async_
25from glance.async import taskflow_executor 25from glance.async_ import taskflow_executor
26from glance.common import exception 26from glance.common import exception
27from glance.common import timeutils 27from glance.common import timeutils
28from glance import domain 28from glance import domain
@@ -467,12 +467,12 @@ class TestTask(test_utils.BaseTestCase):
467 self.task.expires_at 467 self.task.expires_at
468 ) 468 )
469 469
470 @mock.patch.object(glance.async.TaskExecutor, 'begin_processing') 470 @mock.patch.object(glance.async_.TaskExecutor, 'begin_processing')
471 def test_run(self, mock_begin_processing): 471 def test_run(self, mock_begin_processing):
472 executor = glance.async.TaskExecutor(context=mock.ANY, 472 executor = glance.async_.TaskExecutor(context=mock.ANY,
473 task_repo=mock.ANY, 473 task_repo=mock.ANY,
474 image_repo=mock.ANY, 474 image_repo=mock.ANY,
475 image_factory=mock.ANY) 475 image_factory=mock.ANY)
476 self.task.run(executor) 476 self.task.run(executor)
477 477
478 mock_begin_processing.assert_called_once_with(self.task.task_id) 478 mock_begin_processing.assert_called_once_with(self.task.task_id)
diff --git a/glance/tests/unit/test_notifier.py b/glance/tests/unit/test_notifier.py
index 04f56f3..346ef5a 100644
--- a/glance/tests/unit/test_notifier.py
+++ b/glance/tests/unit/test_notifier.py
@@ -22,7 +22,7 @@ from oslo_config import cfg
22import oslo_messaging 22import oslo_messaging
23import webob 23import webob
24 24
25import glance.async 25import glance.async_
26from glance.common import exception 26from glance.common import exception
27from glance.common import timeutils 27from glance.common import timeutils
28import glance.context 28import glance.context
@@ -681,7 +681,7 @@ class TestTaskNotifications(utils.BaseTestCase):
681 self.assertEqual(0, len(output_logs)) 681 self.assertEqual(0, len(output_logs))
682 682
683 def test_task_run_notification(self): 683 def test_task_run_notification(self):
684 with mock.patch('glance.async.TaskExecutor') as mock_executor: 684 with mock.patch('glance.async_.TaskExecutor') as mock_executor:
685 executor = mock_executor.return_value 685 executor = mock_executor.return_value
686 executor._run.return_value = mock.Mock() 686 executor._run.return_value = mock.Mock()
687 self.task_proxy.run(executor=mock_executor) 687 self.task_proxy.run(executor=mock_executor)
@@ -694,7 +694,7 @@ class TestTaskNotifications(utils.BaseTestCase):
694 694
695 def test_task_run_notification_disabled(self): 695 def test_task_run_notification_disabled(self):
696 self.config(disabled_notifications=['task.run']) 696 self.config(disabled_notifications=['task.run'])
697 with mock.patch('glance.async.TaskExecutor') as mock_executor: 697 with mock.patch('glance.async_.TaskExecutor') as mock_executor:
698 executor = mock_executor.return_value 698 executor = mock_executor.return_value
699 executor._run.return_value = mock.Mock() 699 executor._run.return_value = mock.Mock()
700 self.task_proxy.run(executor=mock_executor) 700 self.task_proxy.run(executor=mock_executor)
diff --git a/setup.cfg b/setup.cfg
index cbf994b..653fc31 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -63,21 +63,21 @@ glance.database.metadata_backend =
63 sqlalchemy = glance.db.sqlalchemy.metadata 63 sqlalchemy = glance.db.sqlalchemy.metadata
64 64
65glance.flows = 65glance.flows =
66 api_image_import = glance.async.flows.api_image_import:get_flow 66 api_image_import = glance.async_.flows.api_image_import:get_flow
67 import = glance.async.flows.base_import:get_flow 67 import = glance.async_.flows.base_import:get_flow
68 68
69glance.flows.import = 69glance.flows.import =
70 convert = glance.async.flows.convert:get_flow 70 convert = glance.async_.flows.convert:get_flow
71 introspect = glance.async.flows.introspect:get_flow 71 introspect = glance.async_.flows.introspect:get_flow
72 ovf_process = glance.async.flows.ovf_process:get_flow 72 ovf_process = glance.async_.flows.ovf_process:get_flow
73 73
74glance.image_import.plugins = 74glance.image_import.plugins =
75 no_op = glance.async.flows.plugins.no_op:get_flow 75 no_op = glance.async_.flows.plugins.no_op:get_flow
76 inject_image_metadata=glance.async.flows.plugins.inject_image_metadata:get_flow 76 inject_image_metadata=glance.async_.flows.plugins.inject_image_metadata:get_flow
77 image_conversion=glance.async.flows.plugins.image_conversion:get_flow 77 image_conversion=glance.async_.flows.plugins.image_conversion:get_flow
78 78
79glance.image_import.internal_plugins = 79glance.image_import.internal_plugins =
80 web_download = glance.async.flows._internal_plugins.web_download:get_flow 80 web_download = glance.async_.flows._internal_plugins.web_download:get_flow
81 81
82 82
83[egg_info] 83[egg_info]