[Scenario] Split Scenarios - P6
Move under plugins/openstack: * Designate * Neutron * Nova * VM Implements: blueprint split-plugins Change-Id: Iaaa2e7f0b35931fd11480737524d9e09371f721a
This commit is contained in:
parent
b2b7e20047
commit
827e41ef98
|
@ -14,7 +14,6 @@
|
|||
|
||||
import itertools
|
||||
|
||||
from rally.benchmark.scenarios.nova import utils as nova_utils
|
||||
from rally.common import log
|
||||
from rally import exceptions
|
||||
from rally import osclients
|
||||
|
@ -23,6 +22,7 @@ from rally.plugins.openstack.scenarios.cinder import utils as cinder_utils
|
|||
from rally.plugins.openstack.scenarios.ec2 import utils as ec2_utils
|
||||
from rally.plugins.openstack.scenarios.glance import utils as glance_utils
|
||||
from rally.plugins.openstack.scenarios.heat import utils as heat_utils
|
||||
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||
from rally.plugins.openstack.scenarios.sahara import utils as sahara_utils
|
||||
from rally.verification.tempest import config as tempest_conf
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.context import base
|
||||
from rally.benchmark.scenarios.nova import utils as nova_utils
|
||||
from rally.benchmark import types as types
|
||||
from rally.common.i18n import _
|
||||
from rally.common import log as logging
|
||||
|
@ -21,6 +20,7 @@ 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.nova import utils as nova_utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
|
@ -18,8 +18,6 @@ import abc
|
|||
import six
|
||||
|
||||
from rally.benchmark.context import base
|
||||
from rally.benchmark.scenarios.nova import utils as nova_utils
|
||||
from rally.benchmark.scenarios.vm import vmtasks
|
||||
from rally.benchmark import types
|
||||
from rally.common import broker
|
||||
from rally.common.i18n import _
|
||||
|
@ -27,6 +25,8 @@ from rally.common import log as logging
|
|||
from rally.common import utils
|
||||
from rally import consts
|
||||
from rally import osclients
|
||||
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||
from rally.plugins.openstack.scenarios.vm import vmtasks
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
import random
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
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
|
||||
from rally.plugins.openstack.scenarios.cinder import utils
|
||||
from rally.plugins.openstack.scenarios.glance import utils as glance_utils
|
||||
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.designate import utils
|
||||
from rally.benchmark import validation
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.designate import utils
|
||||
|
||||
|
||||
class DesignateBasic(utils.DesignateScenario):
|
|
@ -14,11 +14,11 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
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
|
||||
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||
|
||||
|
||||
class GlanceImages(utils.GlanceScenario, nova_utils.NovaScenario):
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.vm import utils as vm_utils
|
||||
from rally.benchmark import validation
|
||||
from rally.common import log as logging
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.murano import utils
|
||||
from rally.plugins.openstack.scenarios.vm import utils as vm_utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.neutron import utils
|
||||
from rally.benchmark import validation
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.neutron import utils
|
||||
|
||||
|
||||
class NeutronNetworks(utils.NeutronScenario):
|
|
@ -14,9 +14,9 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.nova import utils
|
||||
from rally.benchmark import validation
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.nova import utils
|
||||
|
||||
|
||||
class NovaFloatingIpsBulk(utils.NovaScenario):
|
|
@ -14,10 +14,10 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.nova import utils
|
||||
from rally.benchmark import validation
|
||||
from rally.common import log as logging
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.nova import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -14,10 +14,10 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.nova import utils
|
||||
from rally.benchmark import types
|
||||
from rally.benchmark import validation
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.nova import utils
|
||||
|
||||
|
||||
class NovaKeypair(utils.NovaScenario):
|
|
@ -14,12 +14,12 @@
|
|||
# under the License.
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.nova import utils
|
||||
from rally.benchmark import types
|
||||
from rally.benchmark import validation
|
||||
from rally.common.i18n import _
|
||||
from rally import consts
|
||||
from rally import exceptions
|
||||
from rally.plugins.openstack.scenarios.nova import utils
|
||||
|
||||
|
||||
class NovaSecurityGroupException(exceptions.RallyException):
|
||||
|
@ -140,4 +140,4 @@ class NovaSecGroup(utils.NovaScenario):
|
|||
|
||||
self.assertEqual(sorted([sg.id for sg in security_groups]),
|
||||
sorted([sg.id for sg in attached_security_groups]),
|
||||
error_message)
|
||||
error_message)
|
|
@ -16,7 +16,6 @@
|
|||
import jsonschema
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
from rally.benchmark.scenarios.nova import utils
|
||||
from rally.benchmark.scenarios import utils as scenario_utils
|
||||
from rally.benchmark import types as types
|
||||
from rally.benchmark import validation
|
||||
|
@ -25,7 +24,7 @@ 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
|
||||
|
||||
from rally.plugins.openstack.scenarios.nova import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -16,13 +16,13 @@
|
|||
import json
|
||||
|
||||
from rally.benchmark.scenarios import base
|
||||
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
|
||||
from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||
from rally.plugins.openstack.scenarios.vm import utils as vm_utils
|
||||
|
||||
|
||||
class VMTasks(nova_utils.NovaScenario, vm_utils.VMScenario,
|
|
@ -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"
|
||||
TYP = "rally.benchmark.types"
|
||||
|
||||
|
||||
|
|
|
@ -16,10 +16,11 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.designate import basic
|
||||
from rally.plugins.openstack.scenarios.designate import basic
|
||||
from tests.unit import test
|
||||
|
||||
DESIGNATE_BASIC = "rally.benchmark.scenarios.designate.basic.DesignateBasic"
|
||||
DESIGNATE_BASIC = ("rally.plugins.openstack.scenarios.designate.basic"
|
||||
".DesignateBasic")
|
||||
|
||||
|
||||
class DesignateBasicTestCase(test.TestCase):
|
|
@ -16,11 +16,10 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.designate import utils
|
||||
from rally.plugins.openstack.scenarios.designate import utils
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
DESIGNATE_UTILS = "rally.benchmark.scenarios.designate.utils."
|
||||
DESIGNATE_UTILS = "rally.plugins.openstack.scenarios.designate.utils."
|
||||
|
||||
|
||||
class DesignateScenarioTestCase(test.TestCase):
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.nova import servers
|
||||
from rally import objects
|
||||
from rally import osclients
|
||||
from rally.plugins.openstack.scenarios.glance import images
|
||||
from rally.plugins.openstack.scenarios.nova import servers
|
||||
from tests.unit import fakes
|
||||
from tests.unit import test
|
||||
|
||||
|
|
|
@ -15,10 +15,11 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.neutron import network
|
||||
from rally.plugins.openstack.scenarios.neutron import network
|
||||
from tests.unit import test
|
||||
|
||||
NEUTRON_NETWORKS = "rally.benchmark.scenarios.neutron.network.NeutronNetworks"
|
||||
NEUTRON_NETWORKS = ("rally.plugins.openstack.scenarios.neutron.network"
|
||||
".NeutronNetworks")
|
||||
|
||||
|
||||
class NeutronNetworksTestCase(test.TestCase):
|
|
@ -15,12 +15,12 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.neutron import utils
|
||||
from rally.plugins.openstack.scenarios.neutron import utils
|
||||
from tests.unit import fakes
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
NEUTRON_UTILS = "rally.benchmark.scenarios.neutron.utils."
|
||||
NEUTRON_UTILS = "rally.plugins.openstack.scenarios.neutron.utils."
|
||||
|
||||
|
||||
class NeutronScenarioTestCase(test.TestCase):
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.nova import floating_ips_bulk
|
||||
from rally.plugins.openstack.scenarios.nova import floating_ips_bulk
|
||||
from tests.unit import test
|
||||
|
||||
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.nova import hypervisors
|
||||
from rally.plugins.openstack.scenarios.nova import hypervisors
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
NOVA_HYPERVISORS_MODULE = "rally.benchmark.scenarios.nova.hypervisors"
|
||||
NOVA_HYPERVISORS_MODULE = "rally.plugins.openstack.scenarios.nova.hypervisors"
|
||||
NOVA_HYPERVISORS = NOVA_HYPERVISORS_MODULE + ".NovaHypervisors"
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.nova import keypairs
|
||||
from rally.plugins.openstack.scenarios.nova import keypairs
|
||||
from tests.unit import test
|
||||
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.nova import security_group
|
||||
from rally.plugins.openstack.scenarios.nova import security_group
|
||||
from tests.unit import fakes
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
SECGROUP = "rally.benchmark.scenarios.nova.security_group"
|
||||
SECGROUP = "rally.plugins.openstack.scenarios.nova.security_group"
|
||||
|
||||
|
||||
class FakeNeutronScenario():
|
|
@ -15,15 +15,15 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.nova import servers
|
||||
from rally import exceptions as rally_exceptions
|
||||
from rally import objects
|
||||
from rally import osclients
|
||||
from rally.plugins.openstack.scenarios.nova import servers
|
||||
from tests.unit import fakes
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
NOVA_SERVERS_MODULE = "rally.benchmark.scenarios.nova.servers"
|
||||
NOVA_SERVERS_MODULE = "rally.plugins.openstack.scenarios.nova.servers"
|
||||
NOVA_SERVERS = NOVA_SERVERS_MODULE + ".NovaServers"
|
||||
|
||||
|
||||
|
@ -341,7 +341,8 @@ class NovaServersTestCase(test.TestCase):
|
|||
scenario._boot_server.assert_called_once_with(
|
||||
"img", 0, auto_assign_nic=False, **expected_kwargs)
|
||||
|
||||
@mock.patch("rally.benchmark.scenarios.nova.servers.NovaServers.clients")
|
||||
@mock.patch("rally.plugins.openstack.scenarios"
|
||||
".nova.servers.NovaServers.clients")
|
||||
@mock.patch("rally.benchmark.runners.base.osclients")
|
||||
def test_boot_server_no_nics(self, mock_osclients, mock_nova_clients):
|
||||
mock_nova_clients.return_value = fakes.FakeNovaClient()
|
|
@ -17,15 +17,14 @@ import mock
|
|||
from oslo_config import cfg
|
||||
from oslotest import mockpatch
|
||||
|
||||
from rally.benchmark.scenarios.nova import utils
|
||||
from rally.benchmark import utils as butils
|
||||
from rally import exceptions as rally_exceptions
|
||||
from rally.plugins.openstack.scenarios.nova import utils
|
||||
from tests.unit import fakes
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
BM_UTILS = "rally.benchmark.utils"
|
||||
NOVA_UTILS = "rally.benchmark.scenarios.nova.utils"
|
||||
NOVA_UTILS = "rally.plugins.openstack.scenarios.nova.utils"
|
||||
SCN = "rally.benchmark.scenarios.base"
|
||||
CONF = cfg.CONF
|
||||
|
|
@ -16,17 +16,15 @@
|
|||
|
||||
import subprocess
|
||||
|
||||
|
||||
import mock
|
||||
from oslotest import mockpatch
|
||||
import six
|
||||
|
||||
from rally.benchmark.scenarios.vm import utils
|
||||
from rally import exceptions
|
||||
from rally.plugins.openstack.scenarios.vm import utils
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
VMTASKS_UTILS = "rally.benchmark.scenarios.vm.utils"
|
||||
VMTASKS_UTILS = "rally.plugins.openstack.scenarios.vm.utils"
|
||||
|
||||
|
||||
class VMScenarioTestCase(test.TestCase):
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
import mock
|
||||
|
||||
from rally.benchmark.scenarios.vm import vmtasks
|
||||
from rally import exceptions
|
||||
from rally.plugins.openstack.scenarios.vm import vmtasks
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ class VMTasksTestCase(test.TestCase):
|
|||
self.scenario._delete_server_with_fip.assert_called_once_with(
|
||||
"foo_server", self.ip, force_delete=False)
|
||||
|
||||
@mock.patch("rally.benchmark.scenarios.vm.vmtasks.json")
|
||||
@mock.patch("rally.plugins.openstack.scenarios.vm.vmtasks.json")
|
||||
def test_boot_runcommand_delete_json_fails(self, mock_json):
|
||||
mock_json.loads.side_effect = ValueError()
|
||||
self.assertRaises(exceptions.ScriptError,
|
Loading…
Reference in New Issue