From d60e9c5c60d8e736feea08c2222bf7a106fd4a35 Mon Sep 17 00:00:00 2001 From: Yair Fried Date: Sun, 17 May 2015 15:46:09 +0300 Subject: [PATCH] [Scenario] Split Scenarios - P3 Move under plugins/openstack: * Sahara * Swift * Glance * Cinder Implements: blueprint split-plugins Change-Id: I095d4efe181308feffbd49c59a1c52fa2ce0ca59 --- rally/benchmark/scenarios/nova/servers.py | 2 +- rally/benchmark/scenarios/vm/vmtasks.py | 2 +- rally/common/opts.py | 7 ++++--- rally/plugins/openstack/context/images.py | 2 +- .../plugins/openstack/context/sahara/sahara_cluster.py | 2 +- rally/plugins/openstack/context/sahara/sahara_image.py | 2 +- rally/plugins/openstack/context/volumes.py | 2 +- .../openstack}/scenarios/cinder/__init__.py | 0 .../openstack}/scenarios/cinder/utils.py | 0 .../openstack}/scenarios/cinder/volumes.py | 10 +++++----- .../openstack}/scenarios/glance/__init__.py | 0 .../openstack}/scenarios/glance/images.py | 2 +- .../openstack}/scenarios/glance/utils.py | 0 .../openstack}/scenarios/sahara/__init__.py | 0 .../openstack}/scenarios/sahara/clusters.py | 2 +- .../openstack}/scenarios/sahara/consts.py | 0 .../openstack}/scenarios/sahara/jobs.py | 2 +- .../scenarios/sahara/node_group_templates.py | 2 +- .../openstack}/scenarios/sahara/utils.py | 2 +- .../openstack}/scenarios/swift/__init__.py | 0 .../openstack}/scenarios/swift/objects.py | 2 +- .../openstack}/scenarios/swift/utils.py | 0 .../openstack/context/sahara/test_sahara_cluster.py | 1 - .../openstack/context/sahara/test_sahara_edp.py | 1 - .../openstack/context/sahara/test_sahara_image.py | 2 +- tests/unit/plugins/openstack/context/test_images.py | 2 +- tests/unit/plugins/openstack/context/test_volumes.py | 2 +- .../openstack}/scenarios/cinder/__init__.py | 0 .../openstack}/scenarios/cinder/test_utils.py | 8 ++++---- .../openstack}/scenarios/cinder/test_volumes.py | 5 +++-- .../openstack}/scenarios/glance/__init__.py | 0 .../openstack}/scenarios/glance/test_images.py | 7 ++++--- .../openstack}/scenarios/glance/test_utils.py | 4 ++-- .../openstack}/scenarios/sahara/__init__.py | 0 .../openstack}/scenarios/sahara/test_clusters.py | 7 ++++--- .../openstack}/scenarios/sahara/test_jobs.py | 7 +++---- .../scenarios/sahara/test_node_group_templates.py | 7 ++++--- .../openstack}/scenarios/sahara/test_utils.py | 4 ++-- .../openstack}/scenarios/swift/__init__.py | 0 .../openstack}/scenarios/swift/test_objects.py | 2 +- .../openstack}/scenarios/swift/test_utils.py | 4 ++-- 41 files changed, 53 insertions(+), 51 deletions(-) rename rally/{benchmark => plugins/openstack}/scenarios/cinder/__init__.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/cinder/utils.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/cinder/volumes.py (99%) rename rally/{benchmark => plugins/openstack}/scenarios/glance/__init__.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/glance/images.py (98%) rename rally/{benchmark => plugins/openstack}/scenarios/glance/utils.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/sahara/__init__.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/sahara/clusters.py (99%) rename rally/{benchmark => plugins/openstack}/scenarios/sahara/consts.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/sahara/jobs.py (98%) rename rally/{benchmark => plugins/openstack}/scenarios/sahara/node_group_templates.py (98%) rename rally/{benchmark => plugins/openstack}/scenarios/sahara/utils.py (99%) rename rally/{benchmark => plugins/openstack}/scenarios/swift/__init__.py (100%) rename rally/{benchmark => plugins/openstack}/scenarios/swift/objects.py (98%) rename rally/{benchmark => plugins/openstack}/scenarios/swift/utils.py (100%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/cinder/__init__.py (100%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/cinder/test_utils.py (97%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/cinder/test_volumes.py (99%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/glance/__init__.py (100%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/glance/test_images.py (94%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/glance/test_utils.py (97%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/sahara/__init__.py (100%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/sahara/test_clusters.py (94%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/sahara/test_jobs.py (97%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/sahara/test_node_group_templates.py (91%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/sahara/test_utils.py (99%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/swift/__init__.py (100%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/swift/test_objects.py (99%) rename tests/unit/{benchmark => plugins/openstack}/scenarios/swift/test_utils.py (98%) diff --git a/rally/benchmark/scenarios/nova/servers.py b/rally/benchmark/scenarios/nova/servers.py index 0a6d3acb35..ea6af325fa 100644 --- a/rally/benchmark/scenarios/nova/servers.py +++ b/rally/benchmark/scenarios/nova/servers.py @@ -16,7 +16,6 @@ import jsonschema from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.cinder import utils as cinder_utils from rally.benchmark.scenarios.nova import utils from rally.benchmark.scenarios import utils as scenario_utils from rally.benchmark import types as types @@ -25,6 +24,7 @@ from rally.benchmark.wrappers import network as network_wrapper from rally.common import log as logging from rally import consts from rally import exceptions as rally_exceptions +from rally.plugins.openstack.scenarios.cinder import utils as cinder_utils LOG = logging.getLogger(__name__) diff --git a/rally/benchmark/scenarios/vm/vmtasks.py b/rally/benchmark/scenarios/vm/vmtasks.py index 58a69ba307..be079b7cce 100644 --- a/rally/benchmark/scenarios/vm/vmtasks.py +++ b/rally/benchmark/scenarios/vm/vmtasks.py @@ -16,13 +16,13 @@ import json from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.cinder import utils as cinder_utils from rally.benchmark.scenarios.nova import utils as nova_utils from rally.benchmark.scenarios.vm import utils as vm_utils from rally.benchmark import types as types from rally.benchmark import validation from rally import consts from rally import exceptions +from rally.plugins.openstack.scenarios.cinder import utils as cinder_utils class VMTasks(nova_utils.NovaScenario, vm_utils.VMScenario, diff --git a/rally/common/opts.py b/rally/common/opts.py index 7edd36c9c2..5c009d1533 100644 --- a/rally/common/opts.py +++ b/rally/common/opts.py @@ -14,16 +14,17 @@ import itertools -from rally.benchmark.scenarios.cinder import utils as cinder_utils + from rally.benchmark.scenarios.ec2 import utils as ec2_utils -from rally.benchmark.scenarios.glance import utils as glance_utils from rally.benchmark.scenarios.heat import utils as heat_utils from rally.benchmark.scenarios.nova import utils as nova_utils -from rally.benchmark.scenarios.sahara import utils as sahara_utils from rally.common import log from rally import exceptions from rally import osclients from rally.plugins.openstack.context import users +from rally.plugins.openstack.scenarios.cinder import utils as cinder_utils +from rally.plugins.openstack.scenarios.glance import utils as glance_utils +from rally.plugins.openstack.scenarios.sahara import utils as sahara_utils from rally.verification.tempest import config as tempest_conf diff --git a/rally/plugins/openstack/context/images.py b/rally/plugins/openstack/context/images.py index 7e8fb9f435..2759313fb2 100644 --- a/rally/plugins/openstack/context/images.py +++ b/rally/plugins/openstack/context/images.py @@ -13,13 +13,13 @@ # under the License. from rally.benchmark.context import base -from rally.benchmark.scenarios.glance import utils as glance_utils from rally.common.i18n import _ from rally.common import log as logging from rally.common import utils as rutils from rally import consts from rally import osclients from rally.plugins.openstack.context.cleanup import manager as resource_manager +from rally.plugins.openstack.scenarios.glance import utils as glance_utils LOG = logging.getLogger(__name__) diff --git a/rally/plugins/openstack/context/sahara/sahara_cluster.py b/rally/plugins/openstack/context/sahara/sahara_cluster.py index bd31d8dfdb..33b0de47b2 100644 --- a/rally/plugins/openstack/context/sahara/sahara_cluster.py +++ b/rally/plugins/openstack/context/sahara/sahara_cluster.py @@ -16,7 +16,6 @@ from oslo_config import cfg from rally.benchmark.context import base -from rally.benchmark.scenarios.sahara import utils from rally.benchmark import utils as bench_utils from rally.common.i18n import _ from rally.common import log as logging @@ -25,6 +24,7 @@ from rally import consts from rally import exceptions from rally import osclients from rally.plugins.openstack.context.cleanup import manager as resource_manager +from rally.plugins.openstack.scenarios.sahara import utils CONF = cfg.CONF diff --git a/rally/plugins/openstack/context/sahara/sahara_image.py b/rally/plugins/openstack/context/sahara/sahara_image.py index 03b9033ba8..92b36cb5fb 100644 --- a/rally/plugins/openstack/context/sahara/sahara_image.py +++ b/rally/plugins/openstack/context/sahara/sahara_image.py @@ -13,7 +13,6 @@ # under the License. from rally.benchmark.context import base -from rally.benchmark.scenarios.glance import utils as glance_utils from rally.common.i18n import _ from rally.common import log as logging from rally.common import utils as rutils @@ -21,6 +20,7 @@ from rally import consts from rally import exceptions from rally import osclients from rally.plugins.openstack.context.cleanup import manager as resource_manager +from rally.plugins.openstack.scenarios.glance import utils as glance_utils LOG = logging.getLogger(__name__) diff --git a/rally/plugins/openstack/context/volumes.py b/rally/plugins/openstack/context/volumes.py index 3fd49af9d7..e5025c0fdd 100644 --- a/rally/plugins/openstack/context/volumes.py +++ b/rally/plugins/openstack/context/volumes.py @@ -14,13 +14,13 @@ from rally.benchmark.context import base from rally.benchmark.scenarios import base as scenario_base -from rally.benchmark.scenarios.cinder import utils as cinder_utils from rally.common.i18n import _ from rally.common import log as logging from rally.common import utils as rutils from rally import consts from rally import osclients from rally.plugins.openstack.context.cleanup import manager as resource_manager +from rally.plugins.openstack.scenarios.cinder import utils as cinder_utils LOG = logging.getLogger(__name__) diff --git a/rally/benchmark/scenarios/cinder/__init__.py b/rally/plugins/openstack/scenarios/cinder/__init__.py similarity index 100% rename from rally/benchmark/scenarios/cinder/__init__.py rename to rally/plugins/openstack/scenarios/cinder/__init__.py diff --git a/rally/benchmark/scenarios/cinder/utils.py b/rally/plugins/openstack/scenarios/cinder/utils.py similarity index 100% rename from rally/benchmark/scenarios/cinder/utils.py rename to rally/plugins/openstack/scenarios/cinder/utils.py diff --git a/rally/benchmark/scenarios/cinder/volumes.py b/rally/plugins/openstack/scenarios/cinder/volumes.py similarity index 99% rename from rally/benchmark/scenarios/cinder/volumes.py rename to rally/plugins/openstack/scenarios/cinder/volumes.py index a39b947653..8e762c64f0 100644 --- a/rally/benchmark/scenarios/cinder/volumes.py +++ b/rally/plugins/openstack/scenarios/cinder/volumes.py @@ -13,16 +13,16 @@ # License for the specific language governing permissions and limitations # under the License. +import random + from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.cinder import utils -from rally.benchmark.scenarios.glance import utils as glance_utils from rally.benchmark.scenarios.nova import utils as nova_utils from rally.benchmark import types as types from rally.benchmark import validation from rally.common import log as logging from rally import consts - -import random +from rally.plugins.openstack.scenarios.cinder import utils +from rally.plugins.openstack.scenarios.glance import utils as glance_utils LOG = logging.getLogger(__name__) @@ -430,4 +430,4 @@ class CinderVolumes(utils.CinderScenario, if do_delete: self._delete_volume(volume) - self._delete_backup(backup) \ No newline at end of file + self._delete_backup(backup) diff --git a/rally/benchmark/scenarios/glance/__init__.py b/rally/plugins/openstack/scenarios/glance/__init__.py similarity index 100% rename from rally/benchmark/scenarios/glance/__init__.py rename to rally/plugins/openstack/scenarios/glance/__init__.py diff --git a/rally/benchmark/scenarios/glance/images.py b/rally/plugins/openstack/scenarios/glance/images.py similarity index 98% rename from rally/benchmark/scenarios/glance/images.py rename to rally/plugins/openstack/scenarios/glance/images.py index c443ceaad6..750f64fb9e 100644 --- a/rally/benchmark/scenarios/glance/images.py +++ b/rally/plugins/openstack/scenarios/glance/images.py @@ -14,11 +14,11 @@ # under the License. from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.glance import utils from rally.benchmark.scenarios.nova import utils as nova_utils from rally.benchmark import types as types from rally.benchmark import validation from rally import consts +from rally.plugins.openstack.scenarios.glance import utils class GlanceImages(utils.GlanceScenario, nova_utils.NovaScenario): diff --git a/rally/benchmark/scenarios/glance/utils.py b/rally/plugins/openstack/scenarios/glance/utils.py similarity index 100% rename from rally/benchmark/scenarios/glance/utils.py rename to rally/plugins/openstack/scenarios/glance/utils.py diff --git a/rally/benchmark/scenarios/sahara/__init__.py b/rally/plugins/openstack/scenarios/sahara/__init__.py similarity index 100% rename from rally/benchmark/scenarios/sahara/__init__.py rename to rally/plugins/openstack/scenarios/sahara/__init__.py diff --git a/rally/benchmark/scenarios/sahara/clusters.py b/rally/plugins/openstack/scenarios/sahara/clusters.py similarity index 99% rename from rally/benchmark/scenarios/sahara/clusters.py rename to rally/plugins/openstack/scenarios/sahara/clusters.py index 113c824a03..c4ac9bccf6 100644 --- a/rally/benchmark/scenarios/sahara/clusters.py +++ b/rally/plugins/openstack/scenarios/sahara/clusters.py @@ -14,11 +14,11 @@ # under the License. from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.sahara import utils from rally.benchmark import types from rally.benchmark import validation from rally.common import log as logging from rally import consts +from rally.plugins.openstack.scenarios.sahara import utils LOG = logging.getLogger(__name__) diff --git a/rally/benchmark/scenarios/sahara/consts.py b/rally/plugins/openstack/scenarios/sahara/consts.py similarity index 100% rename from rally/benchmark/scenarios/sahara/consts.py rename to rally/plugins/openstack/scenarios/sahara/consts.py diff --git a/rally/benchmark/scenarios/sahara/jobs.py b/rally/plugins/openstack/scenarios/sahara/jobs.py similarity index 98% rename from rally/benchmark/scenarios/sahara/jobs.py rename to rally/plugins/openstack/scenarios/sahara/jobs.py index a4824a04fe..fec986a49f 100644 --- a/rally/benchmark/scenarios/sahara/jobs.py +++ b/rally/plugins/openstack/scenarios/sahara/jobs.py @@ -14,10 +14,10 @@ # under the License. from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.sahara import utils from rally.benchmark import validation from rally.common import log as logging from rally import consts +from rally.plugins.openstack.scenarios.sahara import utils LOG = logging.getLogger(__name__) diff --git a/rally/benchmark/scenarios/sahara/node_group_templates.py b/rally/plugins/openstack/scenarios/sahara/node_group_templates.py similarity index 98% rename from rally/benchmark/scenarios/sahara/node_group_templates.py rename to rally/plugins/openstack/scenarios/sahara/node_group_templates.py index a734bd47ba..ffed4a9b3a 100644 --- a/rally/benchmark/scenarios/sahara/node_group_templates.py +++ b/rally/plugins/openstack/scenarios/sahara/node_group_templates.py @@ -14,10 +14,10 @@ # under the License. from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.sahara import utils from rally.benchmark import types from rally.benchmark import validation from rally import consts +from rally.plugins.openstack.scenarios.sahara import utils class SaharaNodeGroupTemplates(utils.SaharaScenario): diff --git a/rally/benchmark/scenarios/sahara/utils.py b/rally/plugins/openstack/scenarios/sahara/utils.py similarity index 99% rename from rally/benchmark/scenarios/sahara/utils.py rename to rally/plugins/openstack/scenarios/sahara/utils.py index 53d6bf6102..8a547ee19c 100644 --- a/rally/benchmark/scenarios/sahara/utils.py +++ b/rally/plugins/openstack/scenarios/sahara/utils.py @@ -20,12 +20,12 @@ from oslo_utils import uuidutils from saharaclient.api import base as sahara_base from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.sahara import consts as sahara_consts from rally.benchmark import utils as bench_utils from rally.common.i18n import _ from rally.common import log as logging from rally import consts from rally import exceptions +from rally.plugins.openstack.scenarios.sahara import consts as sahara_consts LOG = logging.getLogger(__name__) CONF = cfg.CONF diff --git a/rally/benchmark/scenarios/swift/__init__.py b/rally/plugins/openstack/scenarios/swift/__init__.py similarity index 100% rename from rally/benchmark/scenarios/swift/__init__.py rename to rally/plugins/openstack/scenarios/swift/__init__.py diff --git a/rally/benchmark/scenarios/swift/objects.py b/rally/plugins/openstack/scenarios/swift/objects.py similarity index 98% rename from rally/benchmark/scenarios/swift/objects.py rename to rally/plugins/openstack/scenarios/swift/objects.py index 383c2854be..c3975c7a9e 100644 --- a/rally/benchmark/scenarios/swift/objects.py +++ b/rally/plugins/openstack/scenarios/swift/objects.py @@ -16,9 +16,9 @@ import tempfile from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.swift import utils from rally.benchmark import validation from rally import consts +from rally.plugins.openstack.scenarios.swift import utils class SwiftObjects(utils.SwiftScenario): diff --git a/rally/benchmark/scenarios/swift/utils.py b/rally/plugins/openstack/scenarios/swift/utils.py similarity index 100% rename from rally/benchmark/scenarios/swift/utils.py rename to rally/plugins/openstack/scenarios/swift/utils.py diff --git a/tests/unit/plugins/openstack/context/sahara/test_sahara_cluster.py b/tests/unit/plugins/openstack/context/sahara/test_sahara_cluster.py index f03fa7bcb7..555ca95ce3 100644 --- a/tests/unit/plugins/openstack/context/sahara/test_sahara_cluster.py +++ b/tests/unit/plugins/openstack/context/sahara/test_sahara_cluster.py @@ -22,7 +22,6 @@ from tests.unit import test CONF = cfg.CONF CTX = "rally.plugins.openstack.context.sahara" -SCN = "rally.benchmark.scenarios" class SaharaClusterTestCase(test.TestCase): diff --git a/tests/unit/plugins/openstack/context/sahara/test_sahara_edp.py b/tests/unit/plugins/openstack/context/sahara/test_sahara_edp.py index dd28a0f641..8a4a479cec 100644 --- a/tests/unit/plugins/openstack/context/sahara/test_sahara_edp.py +++ b/tests/unit/plugins/openstack/context/sahara/test_sahara_edp.py @@ -18,7 +18,6 @@ from rally.plugins.openstack.context.sahara import sahara_edp from tests.unit import test CTX = "rally.plugins.openstack.context.sahara" -SCN = "rally.benchmark.scenarios" class SaharaEDPTestCase(test.TestCase): diff --git a/tests/unit/plugins/openstack/context/sahara/test_sahara_image.py b/tests/unit/plugins/openstack/context/sahara/test_sahara_image.py index f764d54f71..5c89541a09 100644 --- a/tests/unit/plugins/openstack/context/sahara/test_sahara_image.py +++ b/tests/unit/plugins/openstack/context/sahara/test_sahara_image.py @@ -22,7 +22,7 @@ from tests.unit import test BASE_CTX = "rally.benchmark.context" CTX = "rally.plugins.openstack.context.sahara.sahara_image" BASE_SCN = "rally.benchmark.scenarios" -SCN = "rally.benchmark.scenarios" +SCN = "rally.plugins.openstack.scenarios" class SaharaImageTestCase(test.TestCase): diff --git a/tests/unit/plugins/openstack/context/test_images.py b/tests/unit/plugins/openstack/context/test_images.py index 289521934e..3f2641604c 100644 --- a/tests/unit/plugins/openstack/context/test_images.py +++ b/tests/unit/plugins/openstack/context/test_images.py @@ -23,7 +23,7 @@ from tests.unit import fakes from tests.unit import test CTX = "rally.plugins.openstack.context" -SCN = "rally.benchmark.scenarios" +SCN = "rally.plugins.openstack.scenarios" class ImageGeneratorTestCase(test.TestCase): diff --git a/tests/unit/plugins/openstack/context/test_volumes.py b/tests/unit/plugins/openstack/context/test_volumes.py index 672eccf82d..ee111dd3e6 100644 --- a/tests/unit/plugins/openstack/context/test_volumes.py +++ b/tests/unit/plugins/openstack/context/test_volumes.py @@ -22,7 +22,7 @@ from tests.unit import fakes from tests.unit import test CTX = "rally.plugins.openstack.context" -SCN = "rally.benchmark.scenarios" +SCN = "rally.plugins.openstack.scenarios" class VolumeGeneratorTestCase(test.TestCase): diff --git a/tests/unit/benchmark/scenarios/cinder/__init__.py b/tests/unit/plugins/openstack/scenarios/cinder/__init__.py similarity index 100% rename from tests/unit/benchmark/scenarios/cinder/__init__.py rename to tests/unit/plugins/openstack/scenarios/cinder/__init__.py diff --git a/tests/unit/benchmark/scenarios/cinder/test_utils.py b/tests/unit/plugins/openstack/scenarios/cinder/test_utils.py similarity index 97% rename from tests/unit/benchmark/scenarios/cinder/test_utils.py rename to tests/unit/plugins/openstack/scenarios/cinder/test_utils.py index 79db06e884..ba3e536058 100644 --- a/tests/unit/benchmark/scenarios/cinder/test_utils.py +++ b/tests/unit/plugins/openstack/scenarios/cinder/test_utils.py @@ -17,11 +17,11 @@ import mock from oslo_config import cfg from oslotest import mockpatch -from rally.benchmark.scenarios.cinder import utils +from rally.plugins.openstack.scenarios.cinder import utils from tests.unit import test BM_UTILS = "rally.benchmark.utils" -CINDER_UTILS = "rally.benchmark.scenarios.cinder.utils" +CINDER_UTILS = "rally.plugins.openstack.scenarios.cinder.utils" class CinderScenarioTestCase(test.TestCase): @@ -77,7 +77,7 @@ class CinderScenarioTestCase(test.TestCase): self._test_atomic_action_timer(self.scenario.atomic_actions(), "cinder.create_volume") - @mock.patch("rally.benchmark.scenarios.cinder.utils.random") + @mock.patch("rally.plugins.openstack.scenarios.cinder.utils.random") @mock.patch(CINDER_UTILS + ".CinderScenario.clients") def test__create_volume_with_size_range(self, mock_clients, mock_random): CONF = cfg.CONF @@ -117,7 +117,7 @@ class CinderScenarioTestCase(test.TestCase): self._test_atomic_action_timer(self.scenario.atomic_actions(), "cinder.delete_volume") - @mock.patch("rally.benchmark.scenarios.cinder.utils.random") + @mock.patch("rally.plugins.openstack.scenarios.cinder.utils.random") @mock.patch(CINDER_UTILS + ".CinderScenario.clients") def test__extend_volume_with_size_range(self, mock_clients, mock_random): CONF = cfg.CONF diff --git a/tests/unit/benchmark/scenarios/cinder/test_volumes.py b/tests/unit/plugins/openstack/scenarios/cinder/test_volumes.py similarity index 99% rename from tests/unit/benchmark/scenarios/cinder/test_volumes.py rename to tests/unit/plugins/openstack/scenarios/cinder/test_volumes.py index 8c963fa5ce..09c7b3f766 100644 --- a/tests/unit/benchmark/scenarios/cinder/test_volumes.py +++ b/tests/unit/plugins/openstack/scenarios/cinder/test_volumes.py @@ -15,11 +15,12 @@ import mock -from rally.benchmark.scenarios.cinder import volumes +from rally.plugins.openstack.scenarios.cinder import volumes from tests.unit import fakes from tests.unit import test -CINDER_VOLUMES = "rally.benchmark.scenarios.cinder.volumes.CinderVolumes" +CINDER_VOLUMES = ("rally.plugins.openstack.scenarios.cinder.volumes" + ".CinderVolumes") class fake_type(object): diff --git a/tests/unit/benchmark/scenarios/glance/__init__.py b/tests/unit/plugins/openstack/scenarios/glance/__init__.py similarity index 100% rename from tests/unit/benchmark/scenarios/glance/__init__.py rename to tests/unit/plugins/openstack/scenarios/glance/__init__.py diff --git a/tests/unit/benchmark/scenarios/glance/test_images.py b/tests/unit/plugins/openstack/scenarios/glance/test_images.py similarity index 94% rename from tests/unit/benchmark/scenarios/glance/test_images.py rename to tests/unit/plugins/openstack/scenarios/glance/test_images.py index a1adccbff1..ba3bf5a8e3 100644 --- a/tests/unit/benchmark/scenarios/glance/test_images.py +++ b/tests/unit/plugins/openstack/scenarios/glance/test_images.py @@ -15,14 +15,14 @@ import mock -from rally.benchmark.scenarios.glance import images from rally.benchmark.scenarios.nova import servers from rally import objects from rally import osclients +from rally.plugins.openstack.scenarios.glance import images from tests.unit import fakes from tests.unit import test -GLANCE_IMAGES = "rally.benchmark.scenarios.glance.images.GlanceImages" +GLANCE_IMAGES = "rally.plugins.openstack.scenarios.glance.images.GlanceImages" class GlanceImagesTestCase(test.TestCase): @@ -87,7 +87,8 @@ class GlanceImagesTestCase(test.TestCase): mock_boot_servers.return_value = fake_servers mock_random_name.return_value = "random_name" kwargs = {"fakearg": "f"} - with mock.patch("rally.benchmark.scenarios.glance.utils.time.sleep"): + with mock.patch("rally.plugins.openstack.scenarios." + "glance.utils.time.sleep"): glance_scenario.create_image_and_boot_instances("cf", "url", "df", "fid", 5, **kwargs) diff --git a/tests/unit/benchmark/scenarios/glance/test_utils.py b/tests/unit/plugins/openstack/scenarios/glance/test_utils.py similarity index 97% rename from tests/unit/benchmark/scenarios/glance/test_utils.py rename to tests/unit/plugins/openstack/scenarios/glance/test_utils.py index 9e9ac80e5f..78f7dc515d 100644 --- a/tests/unit/benchmark/scenarios/glance/test_utils.py +++ b/tests/unit/plugins/openstack/scenarios/glance/test_utils.py @@ -17,14 +17,14 @@ import tempfile import mock from oslotest import mockpatch -from rally.benchmark.scenarios.glance import utils from rally.benchmark import utils as butils from rally import exceptions as rally_exceptions +from rally.plugins.openstack.scenarios.glance import utils from tests.unit import fakes from tests.unit import test BM_UTILS = "rally.benchmark.utils" -GLANCE_UTILS = "rally.benchmark.scenarios.glance.utils" +GLANCE_UTILS = "rally.plugins.openstack.scenarios.glance.utils" class GlanceScenarioTestCase(test.TestCase): diff --git a/tests/unit/benchmark/scenarios/sahara/__init__.py b/tests/unit/plugins/openstack/scenarios/sahara/__init__.py similarity index 100% rename from tests/unit/benchmark/scenarios/sahara/__init__.py rename to tests/unit/plugins/openstack/scenarios/sahara/__init__.py diff --git a/tests/unit/benchmark/scenarios/sahara/test_clusters.py b/tests/unit/plugins/openstack/scenarios/sahara/test_clusters.py similarity index 94% rename from tests/unit/benchmark/scenarios/sahara/test_clusters.py rename to tests/unit/plugins/openstack/scenarios/sahara/test_clusters.py index 3048320e82..bb0c538941 100644 --- a/tests/unit/benchmark/scenarios/sahara/test_clusters.py +++ b/tests/unit/plugins/openstack/scenarios/sahara/test_clusters.py @@ -15,11 +15,12 @@ import mock -from rally.benchmark.scenarios.sahara import clusters +from rally.plugins.openstack.scenarios.sahara import clusters from tests.unit import test -SAHARA_CLUSTERS = "rally.benchmark.scenarios.sahara.clusters.SaharaClusters" -SAHARA_UTILS = "rally.benchmark.scenarios.sahara.utils" +SAHARA_CLUSTERS = ("rally.plugins.openstack.scenarios.sahara.clusters" + ".SaharaClusters") +SAHARA_UTILS = "rally.plugins.openstack.scenarios.sahara.utils" class SaharaClustersTestCase(test.TestCase): diff --git a/tests/unit/benchmark/scenarios/sahara/test_jobs.py b/tests/unit/plugins/openstack/scenarios/sahara/test_jobs.py similarity index 97% rename from tests/unit/benchmark/scenarios/sahara/test_jobs.py rename to tests/unit/plugins/openstack/scenarios/sahara/test_jobs.py index f1bece2592..a73ff20b8e 100644 --- a/tests/unit/benchmark/scenarios/sahara/test_jobs.py +++ b/tests/unit/plugins/openstack/scenarios/sahara/test_jobs.py @@ -16,14 +16,13 @@ import mock from oslo_config import cfg -from rally.benchmark.scenarios.sahara import jobs +from rally.plugins.openstack.scenarios.sahara import jobs from tests.unit import test - CONF = cfg.CONF -SAHARA_JOB = "rally.benchmark.scenarios.sahara.jobs.SaharaJob" -SAHARA_UTILS = "rally.benchmark.scenarios.sahara.utils" +SAHARA_JOB = "rally.plugins.openstack.scenarios.sahara.jobs.SaharaJob" +SAHARA_UTILS = "rally.plugins.openstack.scenarios.sahara.utils" class SaharaJobTestCase(test.TestCase): diff --git a/tests/unit/benchmark/scenarios/sahara/test_node_group_templates.py b/tests/unit/plugins/openstack/scenarios/sahara/test_node_group_templates.py similarity index 91% rename from tests/unit/benchmark/scenarios/sahara/test_node_group_templates.py rename to tests/unit/plugins/openstack/scenarios/sahara/test_node_group_templates.py index 49aad81b9e..dbac44ae56 100644 --- a/tests/unit/benchmark/scenarios/sahara/test_node_group_templates.py +++ b/tests/unit/plugins/openstack/scenarios/sahara/test_node_group_templates.py @@ -15,10 +15,11 @@ import mock -from rally.benchmark.scenarios.sahara import node_group_templates as ngts +from rally.plugins.openstack.scenarios.sahara import (node_group_templates + as ngts) from tests.unit import test -SAHARA_NGTS = ("rally.benchmark.scenarios.sahara.node_group_templates" +SAHARA_NGTS = ("rally.plugins.openstack.scenarios.sahara.node_group_templates" ".SaharaNodeGroupTemplates") @@ -74,4 +75,4 @@ class SaharaNodeGroupTemplatesTestCase(test.TestCase): mock_delete.assert_has_calls(calls=[ mock.call(mock_create_master.return_value), - mock.call(mock_create_worker.return_value)]) \ No newline at end of file + mock.call(mock_create_worker.return_value)]) diff --git a/tests/unit/benchmark/scenarios/sahara/test_utils.py b/tests/unit/plugins/openstack/scenarios/sahara/test_utils.py similarity index 99% rename from tests/unit/benchmark/scenarios/sahara/test_utils.py rename to tests/unit/plugins/openstack/scenarios/sahara/test_utils.py index 6469a0094d..91c790c0c8 100644 --- a/tests/unit/benchmark/scenarios/sahara/test_utils.py +++ b/tests/unit/plugins/openstack/scenarios/sahara/test_utils.py @@ -18,14 +18,14 @@ from oslo_config import cfg from oslo_utils import uuidutils from saharaclient.api import base as sahara_base -from rally.benchmark.scenarios.sahara import utils from rally import consts from rally import exceptions +from rally.plugins.openstack.scenarios.sahara import utils from tests.unit import test CONF = cfg.CONF -SAHARA_UTILS = "rally.benchmark.scenarios.sahara.utils" +SAHARA_UTILS = "rally.plugins.openstack.scenarios.sahara.utils" class SaharaUtilsTestCase(test.TestCase): diff --git a/tests/unit/benchmark/scenarios/swift/__init__.py b/tests/unit/plugins/openstack/scenarios/swift/__init__.py similarity index 100% rename from tests/unit/benchmark/scenarios/swift/__init__.py rename to tests/unit/plugins/openstack/scenarios/swift/__init__.py diff --git a/tests/unit/benchmark/scenarios/swift/test_objects.py b/tests/unit/plugins/openstack/scenarios/swift/test_objects.py similarity index 99% rename from tests/unit/benchmark/scenarios/swift/test_objects.py rename to tests/unit/plugins/openstack/scenarios/swift/test_objects.py index 737c1e1043..42a388297e 100644 --- a/tests/unit/benchmark/scenarios/swift/test_objects.py +++ b/tests/unit/plugins/openstack/scenarios/swift/test_objects.py @@ -15,7 +15,7 @@ import mock -from rally.benchmark.scenarios.swift import objects +from rally.plugins.openstack.scenarios.swift import objects from tests.unit import fakes from tests.unit import test diff --git a/tests/unit/benchmark/scenarios/swift/test_utils.py b/tests/unit/plugins/openstack/scenarios/swift/test_utils.py similarity index 98% rename from tests/unit/benchmark/scenarios/swift/test_utils.py rename to tests/unit/plugins/openstack/scenarios/swift/test_utils.py index e51b5118d7..49ce56a3a6 100644 --- a/tests/unit/benchmark/scenarios/swift/test_utils.py +++ b/tests/unit/plugins/openstack/scenarios/swift/test_utils.py @@ -15,10 +15,10 @@ import mock -from rally.benchmark.scenarios.swift import utils +from rally.plugins.openstack.scenarios.swift import utils from tests.unit import test -SWIFT_UTILS = "rally.benchmark.scenarios.swift.utils" +SWIFT_UTILS = "rally.plugins.openstack.scenarios.swift.utils" class SwiftScenarioTestCase(test.TestCase):