Merge "Rename rally/benchmark to rally/task"

This commit is contained in:
Jenkins 2015-07-02 00:28:21 +00:00 committed by Gerrit Code Review
commit b94ec1d62d
74 changed files with 268 additions and 268 deletions

View File

@ -17,7 +17,7 @@
import random
import time
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
# This is used to test relative import
from test_relative_import import zzz

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark import utils
from rally.task import utils
def resource(service, resource, order=0, admin_required=False,

View File

@ -13,7 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark import context
from rally.common.i18n import _
from rally.common import log as logging
from rally.common import utils
@ -24,6 +23,7 @@ from rally.plugins.openstack.context.quotas import designate_quotas
from rally.plugins.openstack.context.quotas import manila_quotas
from rally.plugins.openstack.context.quotas import neutron_quotas
from rally.plugins.openstack.context.quotas import nova_quotas
from rally.task import context
LOG = logging.getLogger(__name__)

View File

@ -15,8 +15,6 @@
from oslo_config import cfg
from rally.benchmark import context
from rally.benchmark import utils as bench_utils
from rally.common.i18n import _
from rally.common import log as logging
from rally.common import utils as rutils
@ -25,6 +23,8 @@ 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
from rally.task import context
from rally.task import utils as bench_utils
CONF = cfg.CONF

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark import context
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 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
from rally.task import context
LOG = logging.getLogger(__name__)

View File

@ -17,8 +17,6 @@ import abc
import six
from rally.benchmark import context
from rally.benchmark import types
from rally.common import broker
from rally.common.i18n import _
from rally.common import log as logging
@ -27,6 +25,8 @@ 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
from rally.task import context
from rally.task import types
LOG = logging.getLogger(__name__)

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally.task.scenarios import base
from rally.task import validation
class Authenticate(base.Scenario):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils as ceiloutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerAlarms(ceiloutils.CeilometerScenario):

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils as cutils
from rally.plugins.openstack.scenarios.keystone import utils as kutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerEvents(cutils.CeilometerScenario, kutils.KeystoneScenario):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils as ceiloutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerMeters(ceiloutils.CeilometerScenario):

View File

@ -14,10 +14,10 @@
import json
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils as ceiloutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerQueries(ceiloutils.CeilometerScenario):

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally import exceptions
from rally.plugins.openstack.scenarios.ceilometer import utils as ceiloutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerResource(ceiloutils.CeilometerScenario):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils as ceiloutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerSamples(ceiloutils.CeilometerScenario):

View File

@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerStats(utils.CeilometerScenario):

View File

@ -12,11 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.ceilometer import utils as cutils
from rally.plugins.openstack.scenarios.keystone import utils as kutils
from rally.task.scenarios import base
from rally.task import validation
class CeilometerTraits(cutils.CeilometerScenario, kutils.KeystoneScenario):

View File

@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.task.scenarios import base
from rally.task import utils as bench_utils
class CeilometerScenario(base.Scenario):

View File

@ -18,9 +18,9 @@ import time
from oslo_config import cfg
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally import exceptions
from rally.task.scenarios import base
from rally.task import utils as bench_utils
CINDER_BENCHMARK_OPTS = [
cfg.FloatOpt("cinder_volume_create_prepoll_delay",

View File

@ -15,15 +15,15 @@
import random
from rally.benchmark.scenarios import base
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 import exceptions
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
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
LOG = logging.getLogger(__name__)

View File

@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.designate import utils
from rally.task.scenarios import base
from rally.task import validation
class DesignateBasic(utils.DesignateScenario):

View File

@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class DesignateScenario(base.Scenario):

View File

@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
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.ec2 import utils
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
LOG = logging.getLogger(__name__)

View File

@ -16,8 +16,8 @@ import time
from oslo_config import cfg
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.task.scenarios import base
from rally.task import utils
EC2_BENCHMARK_OPTS = [
@ -72,7 +72,7 @@ class EC2Scenario(base.Scenario):
server = reservation.instances[0]
time.sleep(CONF.benchmark.ec2_server_boot_prepoll_delay)
server = bench_utils.wait_for(
server = utils.wait_for(
server,
is_ready=ec2_resource_is("RUNNING"),
update_resource=self._update_resource,

View File

@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
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
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
class GlanceImages(utils.GlanceScenario, nova_utils.NovaScenario):

View File

@ -18,8 +18,8 @@ import time
from oslo_config import cfg
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.task.scenarios import base
from rally.task import utils
GLANCE_BENCHMARK_OPTS = [
@ -95,10 +95,10 @@ class GlanceScenario(base.Scenario):
time.sleep(CONF.benchmark.glance_image_create_prepoll_delay)
image = bench_utils.wait_for(
image = utils.wait_for(
image,
is_ready=bench_utils.resource_is("active"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("active"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.glance_image_create_timeout,
check_interval=CONF.benchmark.
glance_image_create_poll_interval)
@ -118,8 +118,8 @@ class GlanceScenario(base.Scenario):
:param image: Image object
"""
image.delete()
bench_utils.wait_for_delete(
utils.wait_for_delete(
image,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.glance_image_delete_timeout,
check_interval=CONF.benchmark.glance_image_delete_poll_interval)

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import types
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.heat import utils
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
class HeatStacks(utils.HeatScenario):

View File

@ -17,8 +17,8 @@ import time
from oslo_config import cfg
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.task.scenarios import base
from rally.task import utils
HEAT_BENCHMARK_OPTS = [
@ -133,10 +133,10 @@ class HeatScenario(base.Scenario):
time.sleep(CONF.benchmark.heat_stack_create_prepoll_delay)
stack = bench_utils.wait_for(
stack = utils.wait_for(
stack,
is_ready=bench_utils.resource_is("CREATE_COMPLETE"),
update_resource=bench_utils.get_from_manager(["CREATE_FAILED"]),
is_ready=utils.resource_is("CREATE_COMPLETE"),
update_resource=utils.get_from_manager(["CREATE_FAILED"]),
timeout=CONF.benchmark.heat_stack_create_timeout,
check_interval=CONF.benchmark.heat_stack_create_poll_interval)
@ -167,10 +167,10 @@ class HeatScenario(base.Scenario):
self.clients("heat").stacks.update(stack.id, **kw)
time.sleep(CONF.benchmark.heat_stack_update_prepoll_delay)
stack = bench_utils.wait_for(
stack = utils.wait_for(
stack,
is_ready=bench_utils.resource_is("UPDATE_COMPLETE"),
update_resource=bench_utils.get_from_manager(["UPDATE_FAILED"]),
is_ready=utils.resource_is("UPDATE_COMPLETE"),
update_resource=utils.get_from_manager(["UPDATE_FAILED"]),
timeout=CONF.benchmark.heat_stack_update_timeout,
check_interval=CONF.benchmark.heat_stack_update_poll_interval)
return stack
@ -184,10 +184,10 @@ class HeatScenario(base.Scenario):
:param stack: stack that needs to be checked
"""
self.clients("heat").actions.check(stack.id)
bench_utils.wait_for(
utils.wait_for(
stack,
is_ready=bench_utils.resource_is("CHECK_COMPLETE"),
update_resource=bench_utils.get_from_manager(["CHECK_FAILED"]),
is_ready=utils.resource_is("CHECK_COMPLETE"),
update_resource=utils.get_from_manager(["CHECK_FAILED"]),
timeout=CONF.benchmark.heat_stack_check_timeout,
check_interval=CONF.benchmark.heat_stack_check_poll_interval)
@ -200,9 +200,9 @@ class HeatScenario(base.Scenario):
:param stack: stack object
"""
stack.delete()
bench_utils.wait_for_delete(
utils.wait_for_delete(
stack,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.heat_stack_delete_timeout,
check_interval=CONF.benchmark.heat_stack_delete_poll_interval)
@ -214,10 +214,10 @@ class HeatScenario(base.Scenario):
"""
self.clients("heat").actions.suspend(stack.id)
bench_utils.wait_for(
utils.wait_for(
stack,
is_ready=bench_utils.resource_is("SUSPEND_COMPLETE"),
update_resource=bench_utils.get_from_manager(
is_ready=utils.resource_is("SUSPEND_COMPLETE"),
update_resource=utils.get_from_manager(
["SUSPEND_FAILED"]),
timeout=CONF.benchmark.heat_stack_suspend_timeout,
check_interval=CONF.benchmark.heat_stack_suspend_poll_interval)
@ -230,10 +230,10 @@ class HeatScenario(base.Scenario):
"""
self.clients("heat").actions.resume(stack.id)
bench_utils.wait_for(
utils.wait_for(
stack,
is_ready=bench_utils.resource_is("RESUME_COMPLETE"),
update_resource=bench_utils.get_from_manager(
is_ready=utils.resource_is("RESUME_COMPLETE"),
update_resource=utils.get_from_manager(
["RESUME_FAILED"]),
timeout=CONF.benchmark.heat_stack_resume_timeout,
check_interval=CONF.benchmark.heat_stack_resume_poll_interval)
@ -247,10 +247,10 @@ class HeatScenario(base.Scenario):
"""
snapshot = self.clients("heat").stacks.snapshot(
stack.id)
bench_utils.wait_for(
utils.wait_for(
stack,
is_ready=bench_utils.resource_is("SNAPSHOT_COMPLETE"),
update_resource=bench_utils.get_from_manager(
is_ready=utils.resource_is("SNAPSHOT_COMPLETE"),
update_resource=utils.get_from_manager(
["SNAPSHOT_FAILED"]),
timeout=CONF.benchmark.heat_stack_snapshot_timeout,
check_interval=CONF.benchmark.heat_stack_snapshot_poll_interval)
@ -264,10 +264,10 @@ class HeatScenario(base.Scenario):
:param snapshot_id: id of given snapshot
"""
self.clients("heat").stacks.restore(stack.id, snapshot_id)
bench_utils.wait_for(
utils.wait_for(
stack,
is_ready=bench_utils.resource_is("RESTORE_COMPLETE"),
update_resource=bench_utils.get_from_manager(
is_ready=utils.resource_is("RESTORE_COMPLETE"),
update_resource=utils.get_from_manager(
["RESTORE_FAILED"]),
timeout=CONF.benchmark.heat_stack_restore_timeout,
check_interval=CONF.benchmark.heat_stack_restore_poll_interval

View File

@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally.plugins.openstack.scenarios.keystone import utils as kutils
from rally.task.scenarios import base
from rally.task import validation
class KeystoneBasic(kutils.KeystoneScenario):

View File

@ -15,7 +15,7 @@
import uuid
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
def is_temporary(resource):

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.manila import utils
from rally.task.scenarios import base
from rally.task import validation
class ManilaShares(utils.ManilaScenario):

View File

@ -17,8 +17,8 @@ import time
from oslo_config import cfg
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.task.scenarios import base
from rally.task import utils
MANILA_BENCHMARK_OPTS = [
@ -77,10 +77,10 @@ class ManilaScenario(base.Scenario):
share = self.clients("manila").shares.create(
share_proto, size, **kwargs)
time.sleep(CONF.benchmark.manila_share_create_prepoll_delay)
share = bench_utils.wait_for(
share = utils.wait_for(
share,
is_ready=bench_utils.resource_is("available"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("available"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.manila_share_create_timeout,
check_interval=CONF.benchmark.manila_share_create_poll_interval,
)
@ -94,9 +94,9 @@ class ManilaScenario(base.Scenario):
"""
share.delete()
error_statuses = ("error_deleting", )
bench_utils.wait_for_delete(
utils.wait_for_delete(
share,
update_resource=bench_utils.get_from_manager(error_statuses),
update_resource=utils.get_from_manager(error_statuses),
timeout=CONF.benchmark.manila_share_delete_timeout,
check_interval=CONF.benchmark.manila_share_delete_poll_interval)
@ -141,9 +141,9 @@ class ManilaScenario(base.Scenario):
:param share_network: instance of :class:`ShareNetwork`.
"""
share_network.delete()
bench_utils.wait_for_delete(
utils.wait_for_delete(
share_network,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.manila_share_delete_timeout,
check_interval=CONF.benchmark.manila_share_delete_poll_interval)

View File

@ -15,7 +15,7 @@
import yaml
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class MistralScenario(base.Scenario):

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import types as types
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.mistral import utils
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
class MistralWorkbooks(utils.MistralScenario):

View File

@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
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
from rally.task.scenarios import base
from rally.task import validation
LOG = logging.getLogger(__name__)

View File

@ -17,8 +17,8 @@ import uuid
from oslo_config import cfg
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.task.scenarios import base
from rally.task import utils
CONF = cfg.CONF
@ -65,9 +65,9 @@ class MuranoScenario(base.Scenario):
:param environment: Environment instance
"""
self.clients("murano").environments.delete(environment.id)
bench_utils.wait_for_delete(
utils.wait_for_delete(
environment,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.delete_environment_timeout,
check_interval=CONF.benchmark.delete_environment_check_interval
)
@ -118,9 +118,9 @@ class MuranoScenario(base.Scenario):
"""
self.clients("murano").sessions.deploy(environment.id,
session.id)
bench_utils.wait_for(
environment, is_ready=bench_utils.resource_is("READY"),
update_resource=bench_utils.get_from_manager(["DEPLOY FAILURE"]),
utils.wait_for(
environment, is_ready=utils.resource_is("READY"),
update_resource=utils.get_from_manager(["DEPLOY FAILURE"]),
timeout=CONF.benchmark.deploy_environment_timeout,
check_interval=CONF.benchmark.deploy_environment_check_interval
)

View File

@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.neutron import utils
from rally.task.scenarios import base
from rally.task import validation
class NeutronLoadbalancerV1(utils.NeutronScenario):

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.neutron import utils
from rally.task.scenarios import base
from rally.task import validation
class NeutronNetworks(utils.NeutronScenario):

View File

@ -15,9 +15,9 @@
from oslo_utils import uuidutils as uid
from rally.benchmark.scenarios import base
from rally.common import log as logging
from rally.plugins.openstack.wrappers import network as network_wrapper
from rally.task.scenarios import base
LOG = logging.getLogger(__name__)

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally.common import log as logging
from rally import consts
from rally.plugins.openstack.scenarios.nova import utils
from rally.task.scenarios import base
from rally.task import validation
LOG = logging.getLogger(__name__)

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import types
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.nova import utils
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
class NovaKeypair(utils.NovaScenario):

View File

@ -15,16 +15,16 @@
import jsonschema
from rally.benchmark.scenarios import base
from rally.benchmark import types as types
from rally.benchmark import utils as bench_utils
from rally.benchmark import validation
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
from rally.plugins.openstack.wrappers import network as network_wrapper
from rally.task.scenarios import base
from rally.task import types
from rally.task import utils as task_utils
from rally.task import validation
LOG = logging.getLogger(__name__)
@ -301,7 +301,7 @@ class NovaServers(utils.NovaScenario,
def _bind_actions(self):
actions = ["hard_reboot", "soft_reboot", "stop_start",
"rescue_unrescue"]
action_builder = bench_utils.ActionBuilder(actions)
action_builder = task_utils.ActionBuilder(actions)
action_builder.bind_action("hard_reboot", self._reboot_server)
action_builder.bind_action("soft_reboot", self._soft_reboot_server)
action_builder.bind_action("stop_start",

View File

@ -19,10 +19,10 @@ import time
from oslo_config import cfg
import six
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally import exceptions
from rally.plugins.openstack.wrappers import network as network_wrapper
from rally.task.scenarios import base
from rally.task import utils
NOVA_BENCHMARK_OPTS = []
option_names_and_defaults = [
@ -136,10 +136,10 @@ class NovaScenario(base.Scenario):
server_name, image_id, flavor_id, **kwargs)
time.sleep(CONF.benchmark.nova_server_boot_prepoll_delay)
server = bench_utils.wait_for(
server = utils.wait_for(
server,
is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_boot_timeout,
check_interval=CONF.benchmark.nova_server_boot_poll_interval
)
@ -148,9 +148,9 @@ class NovaScenario(base.Scenario):
def _do_server_reboot(self, server, reboottype):
server.reboot(reboot_type=reboottype)
time.sleep(CONF.benchmark.nova_server_reboot_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_reboot_timeout,
check_interval=CONF.benchmark.nova_server_reboot_poll_interval
)
@ -187,10 +187,10 @@ class NovaScenario(base.Scenario):
"""
server.rebuild(image, **kwargs)
time.sleep(CONF.benchmark.nova_server_rebuild_prepoll_delay)
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_rebuild_timeout,
check_interval=CONF.benchmark.nova_server_rebuild_poll_interval
)
@ -205,9 +205,9 @@ class NovaScenario(base.Scenario):
:param server: The server to start and wait to become ACTIVE.
"""
server.start()
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_start_timeout,
check_interval=CONF.benchmark.nova_server_start_poll_interval
)
@ -222,9 +222,9 @@ class NovaScenario(base.Scenario):
:param server: The server to stop.
"""
server.stop()
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("SHUTOFF"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("SHUTOFF"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_stop_timeout,
check_interval=CONF.benchmark.nova_server_stop_poll_interval
)
@ -240,9 +240,9 @@ class NovaScenario(base.Scenario):
"""
server.rescue()
time.sleep(CONF.benchmark.nova_server_rescue_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("RESCUE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("RESCUE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_rescue_timeout,
check_interval=CONF.benchmark.nova_server_rescue_poll_interval
)
@ -257,9 +257,9 @@ class NovaScenario(base.Scenario):
"""
server.unrescue()
time.sleep(CONF.benchmark.nova_server_unrescue_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_unrescue_timeout,
check_interval=CONF.benchmark.nova_server_unrescue_poll_interval
)
@ -275,9 +275,9 @@ class NovaScenario(base.Scenario):
"""
server.suspend()
time.sleep(CONF.benchmark.nova_server_suspend_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("SUSPENDED"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("SUSPENDED"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_suspend_timeout,
check_interval=CONF.benchmark.nova_server_suspend_poll_interval
)
@ -293,9 +293,9 @@ class NovaScenario(base.Scenario):
"""
server.resume()
time.sleep(CONF.benchmark.nova_server_resume_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_resume_timeout,
check_interval=CONF.benchmark.nova_server_resume_poll_interval
)
@ -311,9 +311,9 @@ class NovaScenario(base.Scenario):
"""
server.pause()
time.sleep(CONF.benchmark.nova_server_pause_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("PAUSED"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("PAUSED"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_pause_timeout,
check_interval=CONF.benchmark.nova_server_pause_poll_interval
)
@ -329,9 +329,9 @@ class NovaScenario(base.Scenario):
"""
server.unpause()
time.sleep(CONF.benchmark.nova_server_unpause_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_unpause_timeout,
check_interval=CONF.benchmark.nova_server_unpause_poll_interval
)
@ -347,9 +347,9 @@ class NovaScenario(base.Scenario):
"""
server.shelve()
time.sleep(CONF.benchmark.nova_server_shelve_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("SHELVED_OFFLOADED"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("SHELVED_OFFLOADED"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_shelve_timeout,
check_interval=CONF.benchmark.nova_server_shelve_poll_interval
)
@ -364,9 +364,9 @@ class NovaScenario(base.Scenario):
"""
server.unshelve()
time.sleep(CONF.benchmark.nova_server_unshelve_prepoll_delay)
bench_utils.wait_for(
server, is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
utils.wait_for(
server, is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_unshelve_timeout,
check_interval=CONF.benchmark.nova_server_unshelve_poll_interval
)
@ -386,9 +386,9 @@ class NovaScenario(base.Scenario):
else:
server.delete()
bench_utils.wait_for_delete(
utils.wait_for_delete(
server,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_delete_timeout,
check_interval=CONF.benchmark.nova_server_delete_poll_interval
)
@ -408,9 +408,9 @@ class NovaScenario(base.Scenario):
server.delete()
for server in servers:
bench_utils.wait_for_delete(
utils.wait_for_delete(
server,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_delete_timeout,
check_interval=CONF.
benchmark.nova_server_delete_poll_interval
@ -426,9 +426,9 @@ class NovaScenario(base.Scenario):
"""
image.delete()
check_interval = CONF.benchmark.nova_server_image_delete_poll_interval
bench_utils.wait_for_delete(
utils.wait_for_delete(
image,
update_resource=bench_utils.get_from_manager(),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_image_delete_timeout,
check_interval=check_interval
)
@ -448,10 +448,10 @@ class NovaScenario(base.Scenario):
server.name)
image = self.clients("nova").images.get(image_uuid)
check_interval = CONF.benchmark.nova_server_image_create_poll_interval
image = bench_utils.wait_for(
image = utils.wait_for(
image,
is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_image_create_timeout,
check_interval=check_interval
)
@ -511,10 +511,10 @@ class NovaScenario(base.Scenario):
servers = filter(lambda server: server.name.startswith(name_prefix),
self.clients("nova").servers.list())
time.sleep(CONF.benchmark.nova_server_boot_prepoll_delay)
servers = [bench_utils.wait_for(
servers = [utils.wait_for(
server,
is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.
is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.
get_from_manager(),
timeout=CONF.benchmark.nova_server_boot_timeout,
check_interval=CONF.benchmark.nova_server_boot_poll_interval
@ -531,10 +531,10 @@ class NovaScenario(base.Scenario):
associated with (optional)
"""
server.add_floating_ip(address, fixed_address=fixed_address)
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=self.check_ip_address(address),
update_resource=bench_utils.get_from_manager()
update_resource=utils.get_from_manager()
)
# Update server data
server.addresses = server.manager.get(server.id).addresses
@ -547,10 +547,10 @@ class NovaScenario(base.Scenario):
:param address: The ip address or FloatingIP to remove
"""
server.remove_floating_ip(address)
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=self.check_ip_address(address, must_exist=False),
update_resource=bench_utils.get_from_manager()
update_resource=utils.get_from_manager()
)
# Update server data
server.addresses = server.manager.get(server.id).addresses
@ -575,10 +575,10 @@ class NovaScenario(base.Scenario):
@base.atomic_action_timer("nova.resize")
def _resize(self, server, flavor):
server.resize(flavor)
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=bench_utils.resource_is("VERIFY_RESIZE"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("VERIFY_RESIZE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_resize_timeout,
check_interval=CONF.benchmark.nova_server_resize_poll_interval
)
@ -586,10 +586,10 @@ class NovaScenario(base.Scenario):
@base.atomic_action_timer("nova.resize_confirm")
def _resize_confirm(self, server, status="ACTIVE"):
server.confirm_resize()
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=bench_utils.resource_is(status),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is(status),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_resize_confirm_timeout,
check_interval=(
CONF.benchmark.nova_server_resize_confirm_poll_interval)
@ -598,10 +598,10 @@ class NovaScenario(base.Scenario):
@base.atomic_action_timer("nova.resize_revert")
def _resize_revert(self, server, status="ACTIVE"):
server.revert_resize()
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=bench_utils.resource_is(status),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is(status),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_resize_revert_timeout,
check_interval=(
CONF.benchmark.nova_server_resize_revert_poll_interval)
@ -614,10 +614,10 @@ class NovaScenario(base.Scenario):
self.clients("nova").volumes.create_server_volume(server_id,
volume_id,
device)
bench_utils.wait_for(
utils.wait_for(
volume,
is_ready=bench_utils.resource_is("in-use"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("in-use"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_resize_revert_timeout,
check_interval=(
CONF.benchmark.nova_server_resize_revert_poll_interval)
@ -629,10 +629,10 @@ class NovaScenario(base.Scenario):
volume_id = volume.id
self.clients("nova").volumes.delete_server_volume(server_id,
volume_id)
bench_utils.wait_for(
utils.wait_for(
volume,
is_ready=bench_utils.resource_is("available"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("available"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_detach_volume_timeout,
check_interval=CONF.benchmark.nova_detach_volume_poll_interval
)
@ -655,10 +655,10 @@ class NovaScenario(base.Scenario):
server_admin.live_migrate(target_host,
block_migration=block_migration,
disk_over_commit=disk_over_commit)
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=bench_utils.resource_is("ACTIVE"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("ACTIVE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_live_migrate_timeout,
check_interval=(
CONF.benchmark.nova_server_live_migrate_poll_interval)
@ -705,10 +705,10 @@ class NovaScenario(base.Scenario):
server_admin = self.admin_clients("nova").servers.get(server.id)
host_pre_migrate = getattr(server_admin, "OS-EXT-SRV-ATTR:host")
server_admin.migrate()
bench_utils.wait_for(
utils.wait_for(
server,
is_ready=bench_utils.resource_is("VERIFY_RESIZE"),
update_resource=bench_utils.get_from_manager(),
is_ready=utils.resource_is("VERIFY_RESIZE"),
update_resource=utils.get_from_manager(),
timeout=CONF.benchmark.nova_server_migrate_timeout,
check_interval=(
CONF.benchmark.nova_server_migrate_poll_interval)

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.quotas import utils
from rally.task.scenarios import base
from rally.task import validation
class Quotas(utils.QuotasScenario):

View File

@ -15,7 +15,7 @@
import random
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class QuotasScenario(base.Scenario):

View File

@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
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
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
LOG = logging.getLogger(__name__)

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally.common import log as logging
from rally import consts
from rally.plugins.openstack.scenarios.sahara import utils
from rally.task.scenarios import base
from rally.task import validation
LOG = logging.getLogger(__name__)

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.benchmark import types
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.sahara import utils
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
class SaharaNodeGroupTemplates(utils.SaharaScenario):

View File

@ -19,13 +19,13 @@ from oslo_config import cfg
from oslo_utils import uuidutils
from saharaclient.api import base as sahara_base
from rally.benchmark.scenarios import base
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
from rally.task.scenarios import base
from rally.task import utils
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@ -108,7 +108,7 @@ class SaharaScenario(base.Scenario):
self.clients("sahara").node_group_templates.delete(node_group.id)
def _wait_active(self, cluster_object):
bench_utils.wait_for(
utils.wait_for(
resource=cluster_object, ready_statuses=["active"],
failure_statuses=["error"], update_resource=self._update_cluster,
timeout=CONF.benchmark.cluster_create_timeout,
@ -392,7 +392,7 @@ class SaharaScenario(base.Scenario):
LOG.debug("Deleting cluster `%s`" % cluster.name)
self.clients("sahara").clusters.delete(cluster.id)
bench_utils.wait_for(
utils.wait_for(
resource=cluster,
timeout=CONF.benchmark.cluster_delete_timeout,
check_interval=CONF.benchmark.cluster_check_interval,
@ -458,7 +458,7 @@ class SaharaScenario(base.Scenario):
output_id=output_id,
configs=configs)
bench_utils.wait_for(
utils.wait_for(
resource=job_execution.id,
is_ready=self._job_execution_is_finished,
timeout=CONF.benchmark.job_execution_timeout,

View File

@ -15,10 +15,10 @@
import tempfile
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally import consts
from rally.plugins.openstack.scenarios.swift import utils
from rally.task.scenarios import base
from rally.task import validation
class SwiftObjects(utils.SwiftScenario):

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class SwiftScenario(base.Scenario):

View File

@ -19,13 +19,13 @@ import sys
import netaddr
import six
from rally.benchmark.scenarios import base
from rally.benchmark import utils as bench_utils
from rally.benchmark import validation
from rally.common.i18n import _
from rally.common import log as logging
from rally.common import sshutils
from rally.plugins.openstack.wrappers import network as network_wrapper
from rally.task.scenarios import base
from rally.task import utils
from rally.task import validation
LOG = logging.getLogger(__name__)
@ -129,10 +129,10 @@ class VMScenario(base.Scenario):
@base.atomic_action_timer("vm.wait_for_ping")
def _wait_for_ping(self, server_ip):
server_ip = netaddr.IPAddress(server_ip)
bench_utils.wait_for(
utils.wait_for(
server_ip,
is_ready=bench_utils.resource_is(ICMP_UP_STATUS,
self._ping_ip_address),
is_ready=utils.resource_is(ICMP_UP_STATUS,
self._ping_ip_address),
timeout=120
)

View File

@ -15,14 +15,14 @@
import json
from rally.benchmark.scenarios import base
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
from rally.task.scenarios import base
from rally.task import types
from rally.task import validation
class VMTasks(nova_utils.NovaScenario, vm_utils.VMScenario,

View File

@ -14,9 +14,9 @@
import random
from rally.benchmark.scenarios import base
from rally.benchmark import validation
from rally.plugins.openstack.scenarios.zaqar import utils as zutils
from rally.task.scenarios import base
from rally.task import validation
class ZaqarBasic(zutils.ZaqarScenario):

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class ZaqarScenario(base.Scenario):

View File

@ -18,12 +18,12 @@ import abc
import netaddr
import six
from rally.benchmark import utils as bench_utils
from rally.common.i18n import _
from rally.common import log as logging
from rally.common import utils
from rally import consts
from rally import exceptions
from rally.task import utils as task_utils
from neutronclient.common import exceptions as neutron_exceptions
from novaclient import exceptions as nova_exceptions
@ -170,7 +170,7 @@ class NovaNetworkWrapper(NetworkWrapper):
self.client.floating_ips.delete(fip_id)
if not wait:
return
bench_utils.wait_for_delete(
task_utils.wait_for_delete(
fip_id,
update_resource=lambda i: self._get_floating_ip(i, do_raise=True))

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class FakeScenarioPlugin1(base.Scenario):

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.task.scenarios import base
class FakeScenarioPlugin2(base.Scenario):

View File

@ -21,8 +21,8 @@ import traceback
import yaml
from rally.benchmark.scenarios import base
from rally.benchmark import engine
from rally.task.scenarios import base
from rally.task import engine
from tests.unit import test
@ -32,7 +32,7 @@ class TaskSampleTestCase(test.TestCase):
os.pardir, os.pardir, os.pardir,
"samples", "tasks")
@mock.patch("rally.benchmark.engine.BenchmarkEngine"
@mock.patch("rally.task.engine.BenchmarkEngine"
"._validate_config_semantic")
def test_schema_is_valid(self,
mock_benchmark_engine__validate_config_semantic):

View File

@ -27,11 +27,11 @@ from novaclient import exceptions as nova_exceptions
import six
from swiftclient import exceptions as swift_exceptions
from rally.benchmark import context
from rally.benchmark.scenarios import base
from rally.common import utils as rally_utils
from rally import consts
from rally import objects
from rally.task import context
from rally.task.scenarios import base
def generate_uuid():

View File

@ -19,9 +19,9 @@ from rally.plugins.openstack.context.sahara import sahara_image
from tests.unit import test
BASE_CTX = "rally.benchmark.context"
BASE_CTX = "rally.task.context"
CTX = "rally.plugins.openstack.context.sahara.sahara_image"
BASE_SCN = "rally.benchmark.scenarios"
BASE_SCN = "rally.task.scenarios"
SCN = "rally.plugins.openstack.scenarios"

View File

@ -17,8 +17,8 @@
import mock
from rally.benchmark import context
from rally.plugins.openstack.context.vm import custom_image
from rally.task import context
from tests.unit import test

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.benchmark.scenarios import base
from rally.plugins.openstack.scenarios.authenticate import authenticate
from rally.task.scenarios import base
from tests.unit import test

View File

@ -20,7 +20,7 @@ from oslotest import mockpatch
from rally.plugins.openstack.scenarios.ceilometer import utils
from tests.unit import test
BM_UTILS = "rally.benchmark.utils"
BM_UTILS = "rally.task.utils"
CEILOMETER_UTILS = "rally.plugins.openstack.scenarios.ceilometer.utils"

View File

@ -22,7 +22,7 @@ from rally.plugins.openstack.scenarios.cinder import utils
from tests.unit import fakes
from tests.unit import test
BM_UTILS = "rally.benchmark.utils"
BM_UTILS = "rally.task.utils"
CINDER_UTILS = "rally.plugins.openstack.scenarios.cinder.utils"

View File

@ -23,7 +23,7 @@ UTILS = "rally.plugins.openstack.scenarios.ec2.utils."
class EC2ServersTestCase(test.ClientsTestCase):
@mock.patch("rally.benchmark.utils.wait_for",
@mock.patch("rally.task.utils.wait_for",
return_value="running_server")
@mock.patch(UTILS + "ec2_resource_is", return_value="foo_state")
@mock.patch(UTILS + "time")

View File

@ -47,7 +47,7 @@ class EC2ScenarioTestCase(test.ClientsTestCase):
self.res_is = mockpatch.Patch(EC2_UTILS + ".ec2_resource_is")
self.update_res = mockpatch.Patch(
EC2_UTILS + ".EC2Scenario._update_resource")
self.wait_for = mockpatch.Patch(EC2_UTILS + ".bench_utils.wait_for")
self.wait_for = mockpatch.Patch(EC2_UTILS + ".utils.wait_for")
self.useFixture(self.wait_for)
self.useFixture(self.res_is)
self.useFixture(self.update_res)

View File

@ -20,7 +20,7 @@ from oslotest import mockpatch
from rally.plugins.openstack.scenarios.glance import utils
from tests.unit import test
BM_UTILS = "rally.benchmark.utils"
BM_UTILS = "rally.task.utils"
GLANCE_UTILS = "rally.plugins.openstack.scenarios.glance.utils"
@ -32,9 +32,9 @@ class GlanceScenarioTestCase(test.ClientsTestCase):
self.image1 = mock.Mock()
self.res_is = mockpatch.Patch(BM_UTILS + ".resource_is")
self.get_fm = mockpatch.Patch(BM_UTILS + ".get_from_manager")
self.wait_for = mockpatch.Patch(GLANCE_UTILS + ".bench_utils.wait_for")
self.wait_for = mockpatch.Patch(GLANCE_UTILS + ".utils.wait_for")
self.wait_for_delete = mockpatch.Patch(
GLANCE_UTILS + ".bench_utils.wait_for_delete")
GLANCE_UTILS + ".utils.wait_for_delete")
self.useFixture(self.wait_for)
self.useFixture(self.wait_for_delete)
self.useFixture(self.res_is)

View File

@ -20,7 +20,7 @@ from rally import exceptions
from rally.plugins.openstack.scenarios.heat import utils
from tests.unit import test
BM_UTILS = "rally.benchmark.utils"
BM_UTILS = "rally.task.utils"
HEAT_UTILS = "rally.plugins.openstack.scenarios.heat.utils"
CONF = utils.CONF
@ -32,9 +32,9 @@ class HeatScenarioTestCase(test.ClientsTestCase):
self.stack = mock.Mock()
self.res_is = mockpatch.Patch(BM_UTILS + ".resource_is")
self.get_fm = mockpatch.Patch(BM_UTILS + ".get_from_manager")
self.wait_for = mockpatch.Patch(HEAT_UTILS + ".bench_utils.wait_for")
self.wait_for = mockpatch.Patch(HEAT_UTILS + ".utils.wait_for")
self.wait_for_delete = mockpatch.Patch(
HEAT_UTILS + ".bench_utils.wait_for_delete")
HEAT_UTILS + ".utils.wait_for_delete")
self.useFixture(self.wait_for)
self.useFixture(self.wait_for_delete)
self.useFixture(self.res_is)

View File

@ -19,7 +19,7 @@ import mock
from rally.plugins.openstack.scenarios.manila import utils
from tests.unit import test
BM_UTILS = "rally.benchmark.utils."
BM_UTILS = "rally.task.utils."
@ddt.ddt

View File

@ -18,7 +18,7 @@ import mock
from rally.plugins.openstack.scenarios.murano import environments
from tests.unit import test
CTX = "rally.benchmark.context"
CTX = "rally.task.context"
MURANO_SCENARIO = ("rally.plugins.openstack.scenarios.murano."
"environments.MuranoEnvironments")

View File

@ -19,7 +19,7 @@ from oslotest import mockpatch
from rally.plugins.openstack.scenarios.murano import utils
from tests.unit import test
BM_UTILS = "rally.benchmark.utils"
BM_UTILS = "rally.task.utils"
MRN_UTILS = "rally.plugins.openstack.scenarios.murano.utils"
@ -29,9 +29,9 @@ class MuranoScenarioTestCase(test.ClientsTestCase):
super(MuranoScenarioTestCase, self).setUp()
self.res_is = mockpatch.Patch(BM_UTILS + ".resource_is")
self.get_fm = mockpatch.Patch(BM_UTILS + ".get_from_manager")
self.wait_for = mockpatch.Patch(MRN_UTILS + ".bench_utils.wait_for")
self.wait_for = mockpatch.Patch(MRN_UTILS + ".utils.wait_for")
self.wait_for_delete = mockpatch.Patch(
MRN_UTILS + ".bench_utils.wait_for_delete")
MRN_UTILS + ".utils.wait_for_delete")
self.useFixture(self.wait_for)
self.useFixture(self.wait_for_delete)
self.useFixture(self.res_is)

View File

@ -22,7 +22,7 @@ from rally.plugins.openstack.scenarios.nova import utils
from tests.unit import fakes
from tests.unit import test
BM_UTILS = "rally.benchmark.utils"
BM_UTILS = "rally.task.utils"
NOVA_UTILS = "rally.plugins.openstack.scenarios.nova.utils"
CONF = cfg.CONF
@ -39,9 +39,9 @@ class NovaScenarioTestCase(test.ClientsTestCase):
self.keypair = mock.Mock()
self.res_is = mockpatch.Patch(BM_UTILS + ".resource_is")
self.get_fm = mockpatch.Patch(BM_UTILS + ".get_from_manager")
self.wait_for = mockpatch.Patch(NOVA_UTILS + ".bench_utils.wait_for")
self.wait_for = mockpatch.Patch(NOVA_UTILS + ".utils.wait_for")
self.wait_for_delete = mockpatch.Patch(NOVA_UTILS +
".bench_utils.wait_for_delete")
".utils.wait_for_delete")
self.useFixture(self.wait_for_delete)
self.useFixture(self.wait_for)
self.useFixture(self.res_is)

View File

@ -31,7 +31,7 @@ class VMScenarioTestCase(test.TestCase):
def setUp(self):
super(VMScenarioTestCase, self).setUp()
self.wait_for = mockpatch.Patch(VMTASKS_UTILS +
".bench_utils.wait_for")
".utils.wait_for")
self.useFixture(self.wait_for)
@mock.patch("%s.open" % VMTASKS_UTILS,
@ -92,7 +92,7 @@ class VMScenarioTestCase(test.TestCase):
vm_scenario._wait_for_ssh(ssh)
ssh.wait.assert_called_once_with()
@mock.patch(VMTASKS_UTILS + ".bench_utils.resource_is")
@mock.patch(VMTASKS_UTILS + ".utils.resource_is")
@mock.patch(VMTASKS_UTILS + ".VMScenario._ping_ip_address",
return_value=True)
def test__wait_for_ping(self, mock_vm_scenario__ping_ip_address,

View File

@ -19,8 +19,8 @@ import mock
import yaml
from rally import api
from rally.benchmark import engine
from rally.common.plugin import discover
from rally.task import engine
from tests.unit import test
@ -28,7 +28,7 @@ class RallyJobsTestCase(test.TestCase):
rally_jobs_path = os.path.join(
os.path.dirname(__file__), "..", "..", "..", "rally-jobs")
@mock.patch("rally.benchmark.engine.BenchmarkEngine"
@mock.patch("rally.task.engine.BenchmarkEngine"
"._validate_config_semantic")
def test_schema_is_valid(
self, mock_benchmark_engine__validate_config_semantic):

View File

@ -94,9 +94,9 @@ class ClientsTestCase(TestCase):
super(ClientsTestCase, self).setUp()
self._clients = {}
self._client_mocks = [
mock.patch("rally.benchmark.scenarios.base.Scenario.clients",
mock.patch("rally.task.scenarios.base.Scenario.clients",
mock.Mock(side_effect=self.clients)),
mock.patch("rally.benchmark.scenarios.base.Scenario.admin_clients",
mock.patch("rally.task.scenarios.base.Scenario.admin_clients",
mock.Mock(side_effect=self.admin_clients))
]
for patcher in self._client_mocks: