From fda172a4ce97a57d30eb706731f5ad170971ae1f Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Tue, 20 Feb 2018 16:51:45 +0200 Subject: [PATCH] Fix the order of imports Change-Id: I99a6f09bd5e4385f9a7710f374a1eb41bad28c74 --- rally_openstack/cleanup/resources.py | 18 +++++++++++------- rally_openstack/contexts/api_versions.py | 3 ++- rally_openstack/contexts/ceilometer/samples.py | 6 +++--- .../contexts/cinder/volume_types.py | 3 ++- rally_openstack/contexts/cinder/volumes.py | 3 ++- rally_openstack/contexts/cleanup/admin.py | 3 ++- rally_openstack/contexts/cleanup/base.py | 1 + rally_openstack/contexts/cleanup/user.py | 3 ++- rally_openstack/contexts/dataplane/heat.py | 3 ++- rally_openstack/contexts/designate/zones.py | 3 ++- rally_openstack/contexts/ec2/servers.py | 3 ++- rally_openstack/contexts/glance/images.py | 4 +++- rally_openstack/contexts/heat/stacks.py | 3 ++- rally_openstack/contexts/keystone/roles.py | 3 ++- rally_openstack/contexts/keystone/users.py | 3 ++- rally_openstack/contexts/magnum/ca_certs.py | 3 ++- .../contexts/magnum/cluster_templates.py | 3 ++- rally_openstack/contexts/magnum/clusters.py | 3 ++- .../manila/manila_security_services.py | 4 +++- .../contexts/manila/manila_share_networks.py | 4 +++- .../contexts/manila/manila_shares.py | 3 ++- rally_openstack/contexts/monasca/metrics.py | 3 ++- .../contexts/murano/murano_environments.py | 3 ++- .../contexts/murano/murano_packages.py | 3 ++- rally_openstack/contexts/network/allow_ssh.py | 3 ++- .../contexts/network/existing_network.py | 3 ++- rally_openstack/contexts/network/networks.py | 3 ++- rally_openstack/contexts/network/routers.py | 3 ++- rally_openstack/contexts/neutron/lbaas.py | 3 ++- rally_openstack/contexts/nova/flavors.py | 4 +++- rally_openstack/contexts/nova/keypairs.py | 3 ++- rally_openstack/contexts/nova/servers.py | 3 ++- rally_openstack/contexts/quotas/quotas.py | 3 ++- .../contexts/sahara/sahara_cluster.py | 5 +++-- .../contexts/sahara/sahara_image.py | 3 ++- .../sahara/sahara_input_data_sources.py | 3 ++- .../contexts/sahara/sahara_job_binaries.py | 3 ++- .../sahara/sahara_output_data_sources.py | 3 ++- rally_openstack/contexts/senlin/profiles.py | 3 ++- rally_openstack/contexts/swift/objects.py | 3 ++- rally_openstack/contexts/swift/utils.py | 1 + rally_openstack/contexts/vm/custom_image.py | 4 +++- .../contexts/vm/image_command_customizer.py | 3 ++- .../contexts/watcher/audit_templates.py | 3 ++- rally_openstack/scenario.py | 8 +++++--- .../scenarios/authenticate/authenticate.py | 3 ++- rally_openstack/scenarios/ceilometer/alarms.py | 3 ++- rally_openstack/scenarios/ceilometer/events.py | 3 ++- rally_openstack/scenarios/ceilometer/meters.py | 3 ++- .../scenarios/ceilometer/queries.py | 3 ++- .../scenarios/ceilometer/resources.py | 3 ++- .../scenarios/ceilometer/samples.py | 3 ++- rally_openstack/scenarios/ceilometer/stats.py | 3 ++- rally_openstack/scenarios/ceilometer/traits.py | 3 ++- rally_openstack/scenarios/ceilometer/utils.py | 6 +++--- rally_openstack/scenarios/cinder/qos_specs.py | 3 ++- rally_openstack/scenarios/cinder/utils.py | 6 ++++-- .../scenarios/cinder/volume_backups.py | 3 ++- .../scenarios/cinder/volume_types.py | 3 ++- rally_openstack/scenarios/cinder/volumes.py | 8 +++++--- rally_openstack/scenarios/designate/basic.py | 4 +++- rally_openstack/scenarios/designate/utils.py | 3 ++- rally_openstack/scenarios/ec2/servers.py | 5 +++-- rally_openstack/scenarios/ec2/utils.py | 3 ++- rally_openstack/scenarios/glance/images.py | 5 +++-- rally_openstack/scenarios/glance/utils.py | 5 +++-- .../scenarios/gnocchi/capabilities.py | 3 ++- rally_openstack/scenarios/gnocchi/status.py | 4 +++- rally_openstack/scenarios/heat/stacks.py | 5 +++-- rally_openstack/scenarios/heat/utils.py | 6 +++--- rally_openstack/scenarios/ironic/nodes.py | 3 ++- rally_openstack/scenarios/ironic/utils.py | 3 ++- rally_openstack/scenarios/keystone/basic.py | 3 ++- rally_openstack/scenarios/keystone/utils.py | 3 ++- .../scenarios/magnum/cluster_templates.py | 3 ++- rally_openstack/scenarios/magnum/clusters.py | 4 +++- rally_openstack/scenarios/magnum/k8s_pods.py | 4 ++-- rally_openstack/scenarios/magnum/utils.py | 4 +++- rally_openstack/scenarios/manila/shares.py | 3 ++- rally_openstack/scenarios/manila/utils.py | 5 +++-- .../scenarios/mistral/executions.py | 6 +++--- rally_openstack/scenarios/mistral/utils.py | 6 +++--- rally_openstack/scenarios/mistral/workbooks.py | 5 +++-- rally_openstack/scenarios/monasca/metrics.py | 3 ++- rally_openstack/scenarios/monasca/utils.py | 3 ++- .../scenarios/murano/environments.py | 3 ++- rally_openstack/scenarios/murano/packages.py | 5 +++-- rally_openstack/scenarios/murano/utils.py | 6 +++--- rally_openstack/scenarios/neutron/bgpvpn.py | 4 +++- .../scenarios/neutron/loadbalancer_v1.py | 3 ++- .../scenarios/neutron/loadbalancer_v2.py | 3 ++- rally_openstack/scenarios/neutron/network.py | 3 ++- .../scenarios/neutron/security_groups.py | 3 ++- rally_openstack/scenarios/neutron/utils.py | 5 +++-- rally_openstack/scenarios/nova/agents.py | 3 ++- rally_openstack/scenarios/nova/aggregates.py | 5 +++-- .../scenarios/nova/availability_zones.py | 3 ++- rally_openstack/scenarios/nova/flavors.py | 3 ++- rally_openstack/scenarios/nova/hosts.py | 3 ++- rally_openstack/scenarios/nova/hypervisors.py | 3 ++- rally_openstack/scenarios/nova/images.py | 3 ++- rally_openstack/scenarios/nova/keypairs.py | 5 +++-- .../scenarios/nova/server_groups.py | 3 ++- rally_openstack/scenarios/nova/servers.py | 6 +++--- rally_openstack/scenarios/nova/services.py | 3 ++- rally_openstack/scenarios/nova/utils.py | 6 ++++-- rally_openstack/scenarios/quotas/quotas.py | 4 +++- rally_openstack/scenarios/quotas/utils.py | 3 ++- rally_openstack/scenarios/sahara/clusters.py | 6 ++++-- rally_openstack/scenarios/sahara/jobs.py | 4 +++- .../scenarios/sahara/node_group_templates.py | 5 +++-- rally_openstack/scenarios/sahara/utils.py | 9 +++++---- rally_openstack/scenarios/senlin/clusters.py | 3 ++- rally_openstack/scenarios/senlin/utils.py | 3 ++- rally_openstack/scenarios/swift/objects.py | 3 ++- rally_openstack/scenarios/swift/utils.py | 3 ++- rally_openstack/scenarios/vm/utils.py | 8 ++++---- rally_openstack/scenarios/vm/vmtasks.py | 5 +++-- rally_openstack/scenarios/watcher/basic.py | 5 +++-- rally_openstack/scenarios/watcher/utils.py | 3 ++- rally_openstack/scenarios/zaqar/basic.py | 1 + rally_openstack/scenarios/zaqar/utils.py | 3 ++- .../services/identity/keystone_common.py | 3 ++- .../services/identity/keystone_v2.py | 3 ++- .../services/identity/keystone_v3.py | 3 ++- .../services/image/glance_common.py | 7 ++++--- rally_openstack/services/image/glance_v1.py | 6 ++++-- rally_openstack/services/image/glance_v2.py | 9 +++++---- .../services/storage/cinder_common.py | 6 ++++-- rally_openstack/services/storage/cinder_v1.py | 4 +++- rally_openstack/services/storage/cinder_v2.py | 4 +++- rally_openstack/types.py | 3 ++- .../verification/tempest/context.py | 12 ++++++------ .../verification/tempest/manager.py | 5 +++-- tests/unit/contexts/cinder/test_volumes.py | 2 +- tests/unit/contexts/cleanup/test_admin.py | 4 ++-- tests/unit/contexts/cleanup/test_user.py | 4 ++-- tests/unit/contexts/quotas/test_quotas.py | 4 ++-- tests/unit/contexts/test_api_versions.py | 4 ++-- tests/unit/contexts/vm/test_custom_image.py | 2 +- tests/unit/doc/test_task_samples.py | 4 ++-- tests/unit/hook/test_fault_injection.py | 4 ++-- tox.ini | 2 +- 143 files changed, 355 insertions(+), 207 deletions(-) diff --git a/rally_openstack/cleanup/resources.py b/rally_openstack/cleanup/resources.py index 7c4885b0..2a1cf3d2 100644 --- a/rally_openstack/cleanup/resources.py +++ b/rally_openstack/cleanup/resources.py @@ -13,21 +13,17 @@ # License for the specific language governing permissions and limitations # under the License. -from boto import exception as boto_exception -from neutronclient.common import exceptions as neutron_exceptions -from novaclient import exceptions as nova_exc -from saharaclient.api import base as saharaclient_base - from rally.common import cfg from rally.common import logging +from rally.task import utils as task_utils + from rally_openstack.cleanup import base from rally_openstack.services.identity import identity from rally_openstack.services.image import glance_v2 from rally_openstack.services.image import image -from rally.task import utils as task_utils + CONF = cfg.CONF - LOG = logging.getLogger(__name__) @@ -178,6 +174,8 @@ class NovaFlavors(base.ResourceManager): pass def is_deleted(self): + from novaclient import exceptions as nova_exc + try: self._manager().get(self.name()) except nova_exc.NotFound: @@ -211,6 +209,8 @@ class EC2Mixin(object): class EC2Server(EC2Mixin, base.ResourceManager): def is_deleted(self): + from boto import exception as boto_exception + try: instances = self._manager().get_only_instances( instance_ids=[self.id()]) @@ -405,6 +405,8 @@ class NeutronPort(NeutronMixin): self._manager().remove_interface_router( self.raw_resource["device_id"], {"port_id": self.id()}) else: + from neutronclient.common import exceptions as neutron_exceptions + try: self._manager().delete_port(self.id()) except neutron_exceptions.PortNotFoundClient: @@ -616,6 +618,8 @@ class SaharaCluster(base.ResourceManager): # saharaclient/api/base.py#L145 def is_deleted(self): + from saharaclient.api import base as saharaclient_base + try: self._manager().get(self.id()) return False diff --git a/rally_openstack/contexts/api_versions.py b/rally_openstack/contexts/api_versions.py index 537be0ff..601fe802 100644 --- a/rally_openstack/contexts/api_versions.py +++ b/rally_openstack/contexts/api_versions.py @@ -15,9 +15,10 @@ import random from rally.common import validation from rally import consts from rally import exceptions -from rally_openstack import osclients from rally.task import context +from rally_openstack import osclients + @validation.configure("check_api_versions") class CheckOpenStackAPIVersionsValidator(validation.Validator): diff --git a/rally_openstack/contexts/ceilometer/samples.py b/rally_openstack/contexts/ceilometer/samples.py index 2dd3dfe4..be423337 100644 --- a/rally_openstack/contexts/ceilometer/samples.py +++ b/rally_openstack/contexts/ceilometer/samples.py @@ -14,15 +14,15 @@ import time -from six import moves - from rally.common import logging from rally.common import utils as rutils from rally.common import validation from rally import consts from rally import exceptions -from rally_openstack.scenarios.ceilometer import utils as ceilo_utils from rally.task import context +from six import moves + +from rally_openstack.scenarios.ceilometer import utils as ceilo_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/cinder/volume_types.py b/rally_openstack/contexts/cinder/volume_types.py index 51d606c5..af209aad 100644 --- a/rally_openstack/contexts/cinder/volume_types.py +++ b/rally_openstack/contexts/cinder/volume_types.py @@ -16,10 +16,11 @@ from rally.common import logging from rally.common import utils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.services.storage import block -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/cinder/volumes.py b/rally_openstack/contexts/cinder/volumes.py index 5109f1cf..88a4fce3 100644 --- a/rally_openstack/contexts/cinder/volumes.py +++ b/rally_openstack/contexts/cinder/volumes.py @@ -14,10 +14,11 @@ from rally.common import utils as rutils from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.services.storage import block -from rally.task import context @context.configure(name="volumes", platform="openstack", order=420) diff --git a/rally_openstack/contexts/cleanup/admin.py b/rally_openstack/contexts/cleanup/admin.py index 5f3ae0e2..b89bbff2 100644 --- a/rally_openstack/contexts/cleanup/admin.py +++ b/rally_openstack/contexts/cleanup/admin.py @@ -16,10 +16,11 @@ import sys from rally.common import validation +from rally.task import context + from rally_openstack.cleanup import manager from rally_openstack.contexts.cleanup import base from rally_openstack import scenario -from rally.task import context @validation.add(name="check_cleanup_resources", admin_required=True) diff --git a/rally_openstack/contexts/cleanup/base.py b/rally_openstack/contexts/cleanup/base.py index 2631731a..d5e97d61 100644 --- a/rally_openstack/contexts/cleanup/base.py +++ b/rally_openstack/contexts/cleanup/base.py @@ -15,6 +15,7 @@ from rally.common import validation from rally import consts + from rally_openstack.cleanup import manager diff --git a/rally_openstack/contexts/cleanup/user.py b/rally_openstack/contexts/cleanup/user.py index 111f3bbe..f9ebd741 100644 --- a/rally_openstack/contexts/cleanup/user.py +++ b/rally_openstack/contexts/cleanup/user.py @@ -16,10 +16,11 @@ import sys from rally.common import validation +from rally.task import context + from rally_openstack.cleanup import manager from rally_openstack.contexts.cleanup import base from rally_openstack import scenario -from rally.task import context @validation.add(name="check_cleanup_resources", admin_required=False) diff --git a/rally_openstack/contexts/dataplane/heat.py b/rally_openstack/contexts/dataplane/heat.py index e77eaa6b..4442d401 100644 --- a/rally_openstack/contexts/dataplane/heat.py +++ b/rally_openstack/contexts/dataplane/heat.py @@ -19,10 +19,11 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts from rally import exceptions +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.heat import utils as heat_utils -from rally.task import context def get_data(filename_or_resource): diff --git a/rally_openstack/contexts/designate/zones.py b/rally_openstack/contexts/designate/zones.py index 2a8507cb..9e03a379 100644 --- a/rally_openstack/contexts/designate/zones.py +++ b/rally_openstack/contexts/designate/zones.py @@ -15,9 +15,10 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.scenarios.designate import utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/ec2/servers.py b/rally_openstack/contexts/ec2/servers.py index 39984d9e..31336b14 100644 --- a/rally_openstack/contexts/ec2/servers.py +++ b/rally_openstack/contexts/ec2/servers.py @@ -15,11 +15,12 @@ from rally.common import logging from rally.common import utils as rutils from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.ec2 import utils as ec2_utils from rally_openstack import types -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/glance/images.py b/rally_openstack/contexts/glance/images.py index 6ea05922..93cf40c1 100644 --- a/rally_openstack/contexts/glance/images.py +++ b/rally_openstack/contexts/glance/images.py @@ -17,10 +17,12 @@ from rally.common import logging from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.services.image import image -from rally.task import context + CONF = cfg.CONF diff --git a/rally_openstack/contexts/heat/stacks.py b/rally_openstack/contexts/heat/stacks.py index 86e3ed47..5ebd15e9 100644 --- a/rally_openstack/contexts/heat/stacks.py +++ b/rally_openstack/contexts/heat/stacks.py @@ -16,9 +16,10 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.scenarios.heat import utils as heat_utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/keystone/roles.py b/rally_openstack/contexts/keystone/roles.py index 162574fb..8c637966 100644 --- a/rally_openstack/contexts/keystone/roles.py +++ b/rally_openstack/contexts/keystone/roles.py @@ -19,9 +19,10 @@ from rally.common import logging from rally.common import validation from rally import consts from rally import exceptions +from rally.task import context + from rally_openstack import osclients from rally_openstack.services.identity import identity -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/keystone/users.py b/rally_openstack/contexts/keystone/users.py index f3de4fe1..7394a9af 100644 --- a/rally_openstack/contexts/keystone/users.py +++ b/rally_openstack/contexts/keystone/users.py @@ -23,11 +23,12 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts from rally import exceptions +from rally.task import context + from rally_openstack import credential from rally_openstack import osclients from rally_openstack.services.identity import identity from rally_openstack.wrappers import network -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/magnum/ca_certs.py b/rally_openstack/contexts/magnum/ca_certs.py index f710ba97..59eda5ce 100644 --- a/rally_openstack/contexts/magnum/ca_certs.py +++ b/rally_openstack/contexts/magnum/ca_certs.py @@ -24,9 +24,10 @@ from cryptography.x509 import oid from rally.common import utils as rutils from rally.common import validation from rally import consts -from rally_openstack.scenarios.magnum import utils as magnum_utils from rally.task import context +from rally_openstack.scenarios.magnum import utils as magnum_utils + @validation.add("required_platform", platform="openstack", users=True) @context.configure(name="ca_certs", platform="openstack", order=490) diff --git a/rally_openstack/contexts/magnum/cluster_templates.py b/rally_openstack/contexts/magnum/cluster_templates.py index 53109d24..0723c2e6 100644 --- a/rally_openstack/contexts/magnum/cluster_templates.py +++ b/rally_openstack/contexts/magnum/cluster_templates.py @@ -15,9 +15,10 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.scenarios.magnum import utils as magnum_utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/magnum/clusters.py b/rally_openstack/contexts/magnum/clusters.py index f2f4e94c..6de2e041 100644 --- a/rally_openstack/contexts/magnum/clusters.py +++ b/rally_openstack/contexts/magnum/clusters.py @@ -15,10 +15,11 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.scenarios.magnum import utils as magnum_utils from rally_openstack.scenarios.nova import utils as nova_utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/manila/manila_security_services.py b/rally_openstack/contexts/manila/manila_security_services.py index ae94de4a..c7c86c8e 100644 --- a/rally_openstack/contexts/manila/manila_security_services.py +++ b/rally_openstack/contexts/manila/manila_security_services.py @@ -17,10 +17,12 @@ from rally.common import cfg from rally.common import utils from rally.common import validation from rally import consts as rally_consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.contexts.manila import consts from rally_openstack.scenarios.manila import utils as manila_utils -from rally.task import context + CONF = cfg.CONF CONTEXT_NAME = consts.SECURITY_SERVICES_CONTEXT_NAME diff --git a/rally_openstack/contexts/manila/manila_share_networks.py b/rally_openstack/contexts/manila/manila_share_networks.py index 749e3531..f036e046 100644 --- a/rally_openstack/contexts/manila/manila_share_networks.py +++ b/rally_openstack/contexts/manila/manila_share_networks.py @@ -19,10 +19,12 @@ from rally.common import utils from rally.common import validation from rally import consts as rally_consts from rally import exceptions +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.contexts.manila import consts from rally_openstack.scenarios.manila import utils as manila_utils -from rally.task import context + CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/manila/manila_shares.py b/rally_openstack/contexts/manila/manila_shares.py index b04320ba..3f0b6613 100644 --- a/rally_openstack/contexts/manila/manila_shares.py +++ b/rally_openstack/contexts/manila/manila_shares.py @@ -17,10 +17,11 @@ from rally.common import cfg from rally.common import utils from rally.common import validation from rally import consts as rally_consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.contexts.manila import consts from rally_openstack.scenarios.manila import utils as manila_utils -from rally.task import context CONF = cfg.CONF CONTEXT_NAME = consts.SHARES_CONTEXT_NAME diff --git a/rally_openstack/contexts/monasca/metrics.py b/rally_openstack/contexts/monasca/metrics.py index bc98be09..4a190811 100644 --- a/rally_openstack/contexts/monasca/metrics.py +++ b/rally_openstack/contexts/monasca/metrics.py @@ -17,9 +17,10 @@ from six import moves from rally.common import utils as rutils from rally.common import validation from rally import consts -from rally_openstack.scenarios.monasca import utils as monasca_utils from rally.task import context +from rally_openstack.scenarios.monasca import utils as monasca_utils + @validation.add("required_platform", platform="openstack", users=True) @context.configure(name="monasca_metrics", platform="openstack", order=510) diff --git a/rally_openstack/contexts/murano/murano_environments.py b/rally_openstack/contexts/murano/murano_environments.py index 6578ff94..51c18fd6 100644 --- a/rally_openstack/contexts/murano/murano_environments.py +++ b/rally_openstack/contexts/murano/murano_environments.py @@ -16,9 +16,10 @@ from rally.common import utils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.scenarios.murano import utils as murano_utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/murano/murano_packages.py b/rally_openstack/contexts/murano/murano_packages.py index b44690e1..409119a7 100644 --- a/rally_openstack/contexts/murano/murano_packages.py +++ b/rally_openstack/contexts/murano/murano_packages.py @@ -21,9 +21,10 @@ from rally.common import utils from rally.common import validation from rally import consts from rally import exceptions +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/network/allow_ssh.py b/rally_openstack/contexts/network/allow_ssh.py index 9116b784..6e659397 100644 --- a/rally_openstack/contexts/network/allow_ssh.py +++ b/rally_openstack/contexts/network/allow_ssh.py @@ -16,9 +16,10 @@ from rally.common import logging from rally.common import utils from rally.common import validation +from rally.task import context + from rally_openstack import osclients from rally_openstack.wrappers import network -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/network/existing_network.py b/rally_openstack/contexts/network/existing_network.py index 6a8dc72b..b3f59f3d 100644 --- a/rally_openstack/contexts/network/existing_network.py +++ b/rally_openstack/contexts/network/existing_network.py @@ -15,9 +15,10 @@ from rally.common import utils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack import osclients from rally_openstack.wrappers import network as network_wrapper -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/network/networks.py b/rally_openstack/contexts/network/networks.py index 2a98a5ef..e965397f 100644 --- a/rally_openstack/contexts/network/networks.py +++ b/rally_openstack/contexts/network/networks.py @@ -17,9 +17,10 @@ from rally.common import logging from rally.common import utils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack import osclients from rally_openstack.wrappers import network as network_wrapper -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/network/routers.py b/rally_openstack/contexts/network/routers.py index a187b597..6b851f21 100644 --- a/rally_openstack/contexts/network/routers.py +++ b/rally_openstack/contexts/network/routers.py @@ -16,9 +16,10 @@ from rally.common import utils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack.scenarios.neutron import utils as neutron_utils -from rally.task import context @validation.add("required_platform", platform="openstack", admin=True, diff --git a/rally_openstack/contexts/neutron/lbaas.py b/rally_openstack/contexts/neutron/lbaas.py index f557f797..868828db 100644 --- a/rally_openstack/contexts/neutron/lbaas.py +++ b/rally_openstack/contexts/neutron/lbaas.py @@ -14,9 +14,10 @@ from rally.common import logging from rally.common import utils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack import osclients from rally_openstack.wrappers import network as network_wrapper -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/nova/flavors.py b/rally_openstack/contexts/nova/flavors.py index 245158ce..6dd67245 100644 --- a/rally_openstack/contexts/nova/flavors.py +++ b/rally_openstack/contexts/nova/flavors.py @@ -17,9 +17,11 @@ from rally.common import logging from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients -from rally.task import context + LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/nova/keypairs.py b/rally_openstack/contexts/nova/keypairs.py index 19f81d46..e0663154 100644 --- a/rally_openstack/contexts/nova/keypairs.py +++ b/rally_openstack/contexts/nova/keypairs.py @@ -14,9 +14,10 @@ # under the License. from rally.common import validation +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/nova/servers.py b/rally_openstack/contexts/nova/servers.py index 77bd9a63..8654503c 100755 --- a/rally_openstack/contexts/nova/servers.py +++ b/rally_openstack/contexts/nova/servers.py @@ -15,11 +15,12 @@ from rally.common import logging from rally.common import utils as rutils from rally.common import validation +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.nova import utils as nova_utils from rally_openstack import types -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/quotas/quotas.py b/rally_openstack/contexts/quotas/quotas.py index 7f75ee24..c184c907 100644 --- a/rally_openstack/contexts/quotas/quotas.py +++ b/rally_openstack/contexts/quotas/quotas.py @@ -16,13 +16,14 @@ from rally.common import logging from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.contexts.quotas import cinder_quotas from rally_openstack.contexts.quotas import designate_quotas from rally_openstack.contexts.quotas import manila_quotas from rally_openstack.contexts.quotas import neutron_quotas from rally_openstack.contexts.quotas import nova_quotas from rally_openstack import osclients -from rally.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/sahara/sahara_cluster.py b/rally_openstack/contexts/sahara/sahara_cluster.py index 0021472f..b1cf206c 100644 --- a/rally_openstack/contexts/sahara/sahara_cluster.py +++ b/rally_openstack/contexts/sahara/sahara_cluster.py @@ -18,11 +18,12 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts from rally import exceptions -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack.scenarios.sahara import utils from rally.task import context from rally.task import utils as bench_utils +from rally_openstack.cleanup import manager as resource_manager +from rally_openstack.scenarios.sahara import utils + CONF = cfg.CONF diff --git a/rally_openstack/contexts/sahara/sahara_image.py b/rally_openstack/contexts/sahara/sahara_image.py index 700b7df1..9cffed61 100644 --- a/rally_openstack/contexts/sahara/sahara_image.py +++ b/rally_openstack/contexts/sahara/sahara_image.py @@ -16,11 +16,12 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts from rally import exceptions +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.sahara import utils from rally_openstack.services.image import image as image_services -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/sahara/sahara_input_data_sources.py b/rally_openstack/contexts/sahara/sahara_input_data_sources.py index c9e4a43c..f6c94571 100644 --- a/rally_openstack/contexts/sahara/sahara_input_data_sources.py +++ b/rally_openstack/contexts/sahara/sahara_input_data_sources.py @@ -19,11 +19,12 @@ from six.moves.urllib import parse from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.sahara import utils from rally_openstack.scenarios.swift import utils as swift_utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/sahara/sahara_job_binaries.py b/rally_openstack/contexts/sahara/sahara_job_binaries.py index 4ea6333b..c367b2ec 100644 --- a/rally_openstack/contexts/sahara/sahara_job_binaries.py +++ b/rally_openstack/contexts/sahara/sahara_job_binaries.py @@ -19,10 +19,11 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts from rally import exceptions +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.sahara import utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/sahara/sahara_output_data_sources.py b/rally_openstack/contexts/sahara/sahara_output_data_sources.py index 2479a150..ecb30bfe 100644 --- a/rally_openstack/contexts/sahara/sahara_output_data_sources.py +++ b/rally_openstack/contexts/sahara/sahara_output_data_sources.py @@ -16,11 +16,12 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.sahara import utils from rally_openstack.scenarios.swift import utils as swift_utils -from rally.task import context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/senlin/profiles.py b/rally_openstack/contexts/senlin/profiles.py index 826610ac..88504435 100644 --- a/rally_openstack/contexts/senlin/profiles.py +++ b/rally_openstack/contexts/senlin/profiles.py @@ -13,9 +13,10 @@ from rally.common import utils as rutils from rally.common import validation from rally import consts -from rally_openstack.scenarios.senlin import utils as senlin_utils from rally.task import context +from rally_openstack.scenarios.senlin import utils as senlin_utils + @validation.add("required_platform", platform="openstack", users=True) @context.configure(name="profiles", platform="openstack", order=190) diff --git a/rally_openstack/contexts/swift/objects.py b/rally_openstack/contexts/swift/objects.py index d0a77c69..8079c0e1 100644 --- a/rally_openstack/contexts/swift/objects.py +++ b/rally_openstack/contexts/swift/objects.py @@ -17,9 +17,10 @@ from rally.common import logging from rally.common import validation from rally import consts from rally import exceptions -from rally_openstack.contexts.swift import utils as swift_utils from rally.task import context +from rally_openstack.contexts.swift import utils as swift_utils + LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/swift/utils.py b/rally_openstack/contexts/swift/utils.py index 28ff1a58..a1bf5d0f 100644 --- a/rally_openstack/contexts/swift/utils.py +++ b/rally_openstack/contexts/swift/utils.py @@ -17,6 +17,7 @@ import tempfile from rally.common import broker from rally.common import utils as rutils + from rally_openstack.scenarios.swift import utils as swift_utils diff --git a/rally_openstack/contexts/vm/custom_image.py b/rally_openstack/contexts/vm/custom_image.py index 0a408567..db7c217a 100644 --- a/rally_openstack/contexts/vm/custom_image.py +++ b/rally_openstack/contexts/vm/custom_image.py @@ -21,11 +21,13 @@ from rally.common import broker from rally.common import logging from rally.common import utils from rally import consts +from rally.task import context + from rally_openstack import osclients from rally_openstack.scenarios.vm import vmtasks from rally_openstack.services.image import image from rally_openstack import types -from rally.task import context + LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/vm/image_command_customizer.py b/rally_openstack/contexts/vm/image_command_customizer.py index 4797fbc9..97521a13 100644 --- a/rally_openstack/contexts/vm/image_command_customizer.py +++ b/rally_openstack/contexts/vm/image_command_customizer.py @@ -17,9 +17,10 @@ import copy from rally.common import validation from rally import exceptions +import rally.task.context as context + from rally_openstack.contexts.vm import custom_image from rally_openstack.scenarios.vm import utils as vm_utils -import rally.task.context as context @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/watcher/audit_templates.py b/rally_openstack/contexts/watcher/audit_templates.py index 423ddce8..fa33162d 100644 --- a/rally_openstack/contexts/watcher/audit_templates.py +++ b/rally_openstack/contexts/watcher/audit_templates.py @@ -18,11 +18,12 @@ import six from rally.common import validation from rally import consts +from rally.task import context + from rally_openstack.cleanup import manager as resource_manager from rally_openstack import osclients from rally_openstack.scenarios.watcher import utils as watcher_utils from rally_openstack import types -from rally.task import context @validation.add("required_platform", platform="openstack", admin=True) diff --git a/rally_openstack/scenario.py b/rally_openstack/scenario.py index 0963aefb..c6090171 100644 --- a/rally_openstack/scenario.py +++ b/rally_openstack/scenario.py @@ -17,13 +17,14 @@ import functools import random from osprofiler import profiler - from rally.common import cfg from rally.common.plugin import plugin -from rally_openstack import osclients from rally.task import context from rally.task import scenario +from rally_openstack import osclients + + configure = functools.partial(scenario.configure, platform="openstack") CONF = cfg.CONF @@ -119,8 +120,9 @@ class OpenStackScenario(scenario.Scenario): """Inits the profiler.""" if not CONF.openstack.enable_profiler: return + if context is not None: - cred = None + profiler_hmac_key = None profiler_conn_str = None if context.get("admin"): diff --git a/rally_openstack/scenarios/authenticate/authenticate.py b/rally_openstack/scenarios/authenticate/authenticate.py index 733f0866..d68ef8fa 100644 --- a/rally_openstack/scenarios/authenticate/authenticate.py +++ b/rally_openstack/scenarios/authenticate/authenticate.py @@ -13,10 +13,11 @@ # under the License. from rally import consts -from rally_openstack import scenario from rally.task import atomic from rally.task import validation +from rally_openstack import scenario + """Scenarios for Authentication mechanism.""" diff --git a/rally_openstack/scenarios/ceilometer/alarms.py b/rally_openstack/scenarios/ceilometer/alarms.py index 9dcb6858..f8984245 100644 --- a/rally_openstack/scenarios/ceilometer/alarms.py +++ b/rally_openstack/scenarios/ceilometer/alarms.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as ceiloutils -from rally.task import validation @validation.add("required_services", diff --git a/rally_openstack/scenarios/ceilometer/events.py b/rally_openstack/scenarios/ceilometer/events.py index c96474c4..876d9caf 100644 --- a/rally_openstack/scenarios/ceilometer/events.py +++ b/rally_openstack/scenarios/ceilometer/events.py @@ -17,10 +17,11 @@ Scenarios for Ceilometer Events API. """ from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as cutils from rally_openstack.scenarios.keystone import basic as kbasic -from rally.task import validation # NOTE(idegtiarov): to work with event we need to create it, there are diff --git a/rally_openstack/scenarios/ceilometer/meters.py b/rally_openstack/scenarios/ceilometer/meters.py index 442b58a9..0b44dbab 100644 --- a/rally_openstack/scenarios/ceilometer/meters.py +++ b/rally_openstack/scenarios/ceilometer/meters.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as ceiloutils -from rally.task import validation """Scenarios for Ceilometer Meters API.""" diff --git a/rally_openstack/scenarios/ceilometer/queries.py b/rally_openstack/scenarios/ceilometer/queries.py index 545bbafd..6702bc99 100644 --- a/rally_openstack/scenarios/ceilometer/queries.py +++ b/rally_openstack/scenarios/ceilometer/queries.py @@ -15,9 +15,10 @@ import json from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as ceiloutils -from rally.task import validation """Scenarios for Ceilometer Queries API.""" diff --git a/rally_openstack/scenarios/ceilometer/resources.py b/rally_openstack/scenarios/ceilometer/resources.py index 92ae05c9..c08f5846 100644 --- a/rally_openstack/scenarios/ceilometer/resources.py +++ b/rally_openstack/scenarios/ceilometer/resources.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as ceiloutils -from rally.task import validation """Scenarios for Ceilometer Resource API.""" diff --git a/rally_openstack/scenarios/ceilometer/samples.py b/rally_openstack/scenarios/ceilometer/samples.py index f477c499..416d1ca2 100644 --- a/rally_openstack/scenarios/ceilometer/samples.py +++ b/rally_openstack/scenarios/ceilometer/samples.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as ceiloutils -from rally.task import validation """Scenarios for Ceilometer Samples API.""" diff --git a/rally_openstack/scenarios/ceilometer/stats.py b/rally_openstack/scenarios/ceilometer/stats.py index d5a1b208..1ba86a93 100644 --- a/rally_openstack/scenarios/ceilometer/stats.py +++ b/rally_openstack/scenarios/ceilometer/stats.py @@ -14,9 +14,10 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils -from rally.task import validation """Scenarios for Ceilometer Stats API.""" diff --git a/rally_openstack/scenarios/ceilometer/traits.py b/rally_openstack/scenarios/ceilometer/traits.py index 7d575b0c..ccc8be97 100644 --- a/rally_openstack/scenarios/ceilometer/traits.py +++ b/rally_openstack/scenarios/ceilometer/traits.py @@ -13,10 +13,11 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ceilometer import utils as cutils from rally_openstack.scenarios.keystone import basic as kbasic -from rally.task import validation """Scenarios for Ceilometer Events API.""" diff --git a/rally_openstack/scenarios/ceilometer/utils.py b/rally_openstack/scenarios/ceilometer/utils.py index 538f525e..8c35f39d 100644 --- a/rally_openstack/scenarios/ceilometer/utils.py +++ b/rally_openstack/scenarios/ceilometer/utils.py @@ -15,12 +15,12 @@ import datetime as dt import uuid -import six - from rally import exceptions -from rally_openstack import scenario from rally.task import atomic from rally.task import utils as bench_utils +import six + +from rally_openstack import scenario class CeilometerScenario(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/cinder/qos_specs.py b/rally_openstack/scenarios/cinder/qos_specs.py index 07b9d12c..3150594b 100644 --- a/rally_openstack/scenarios/cinder/qos_specs.py +++ b/rally_openstack/scenarios/cinder/qos_specs.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils -from rally.task import validation """Scenarios for Cinder QoS.""" diff --git a/rally_openstack/scenarios/cinder/utils.py b/rally_openstack/scenarios/cinder/utils.py index a1d35b47..c0eebe2f 100644 --- a/rally_openstack/scenarios/cinder/utils.py +++ b/rally_openstack/scenarios/cinder/utils.py @@ -18,12 +18,14 @@ import random from rally.common import cfg from rally.common import logging from rally import exceptions +from rally.task import atomic +from rally.task import utils as bench_utils + from rally_openstack import scenario from rally_openstack.services.storage import block from rally_openstack.wrappers import cinder as cinder_wrapper from rally_openstack.wrappers import glance as glance_wrapper -from rally.task import atomic -from rally.task import utils as bench_utils + CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/cinder/volume_backups.py b/rally_openstack/scenarios/cinder/volume_backups.py index 06fa77dd..00c06bdf 100644 --- a/rally_openstack/scenarios/cinder/volume_backups.py +++ b/rally_openstack/scenarios/cinder/volume_backups.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils -from rally.task import validation """Scenarios for Cinder Volume Backup.""" diff --git a/rally_openstack/scenarios/cinder/volume_types.py b/rally_openstack/scenarios/cinder/volume_types.py index 7d7a5a55..421246e9 100644 --- a/rally_openstack/scenarios/cinder/volume_types.py +++ b/rally_openstack/scenarios/cinder/volume_types.py @@ -14,10 +14,11 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils from rally_openstack.services.storage import cinder_v2 -from rally.task import validation LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/cinder/volumes.py b/rally_openstack/scenarios/cinder/volumes.py index 2625834f..621fdb4f 100644 --- a/rally_openstack/scenarios/cinder/volumes.py +++ b/rally_openstack/scenarios/cinder/volumes.py @@ -18,13 +18,15 @@ import random from rally.common import logging from rally import consts from rally import exceptions +from rally.task import atomic +from rally.task import types +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils from rally_openstack.scenarios.glance import images from rally_openstack.scenarios.nova import utils as nova_utils -from rally.task import atomic -from rally.task import types -from rally.task import validation + LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/designate/basic.py b/rally_openstack/scenarios/designate/basic.py index a669b0f9..4a1c2989 100644 --- a/rally_openstack/scenarios/designate/basic.py +++ b/rally_openstack/scenarios/designate/basic.py @@ -13,12 +13,14 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + import random from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.designate import utils -from rally.task import validation """Basic scenarios for Designate.""" diff --git a/rally_openstack/scenarios/designate/utils.py b/rally_openstack/scenarios/designate/utils.py index 652b01d0..2d48628c 100644 --- a/rally_openstack/scenarios/designate/utils.py +++ b/rally_openstack/scenarios/designate/utils.py @@ -14,9 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import scenario from rally.task import atomic +from rally_openstack import scenario + class DesignateScenario(scenario.OpenStackScenario): """Base class for Designate scenarios with basic atomic actions.""" diff --git a/rally_openstack/scenarios/ec2/servers.py b/rally_openstack/scenarios/ec2/servers.py index 6bab91ad..51259959 100644 --- a/rally_openstack/scenarios/ec2/servers.py +++ b/rally_openstack/scenarios/ec2/servers.py @@ -13,11 +13,12 @@ # under the License. from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ec2 import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.ec2 import utils + """Scenarios for servers using EC2.""" diff --git a/rally_openstack/scenarios/ec2/utils.py b/rally_openstack/scenarios/ec2/utils.py index 6c6af070..8221c506 100644 --- a/rally_openstack/scenarios/ec2/utils.py +++ b/rally_openstack/scenarios/ec2/utils.py @@ -14,10 +14,11 @@ from rally.common import cfg -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +from rally_openstack import scenario + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/glance/images.py b/rally_openstack/scenarios/glance/images.py index 6148444d..71df7236 100644 --- a/rally_openstack/scenarios/glance/images.py +++ b/rally_openstack/scenarios/glance/images.py @@ -15,12 +15,13 @@ from rally.common import logging from rally import consts +from rally.task import types +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils as nova_utils from rally_openstack.services.image import glance_v2 from rally_openstack.services.image import image -from rally.task import types -from rally.task import validation LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/glance/utils.py b/rally_openstack/scenarios/glance/utils.py index e35e7b3f..81b1ffc2 100644 --- a/rally_openstack/scenarios/glance/utils.py +++ b/rally_openstack/scenarios/glance/utils.py @@ -15,11 +15,12 @@ from rally.common import cfg from rally.common import logging -from rally_openstack import scenario -from rally_openstack.wrappers import glance as glance_wrapper from rally.task import atomic from rally.task import utils +from rally_openstack import scenario +from rally_openstack.wrappers import glance as glance_wrapper + CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/gnocchi/capabilities.py b/rally_openstack/scenarios/gnocchi/capabilities.py index 38b272ff..db67d74f 100644 --- a/rally_openstack/scenarios/gnocchi/capabilities.py +++ b/rally_openstack/scenarios/gnocchi/capabilities.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.gnocchi import utils as gnocchiutils -from rally.task import validation """Scenarios for Gnocchi capabilities.""" diff --git a/rally_openstack/scenarios/gnocchi/status.py b/rally_openstack/scenarios/gnocchi/status.py index d63d84ad..a20c53a6 100644 --- a/rally_openstack/scenarios/gnocchi/status.py +++ b/rally_openstack/scenarios/gnocchi/status.py @@ -13,9 +13,11 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.gnocchi import utils as gnocchiutils -from rally.task import validation + """Scenarios for Gnocchi status.""" diff --git a/rally_openstack/scenarios/heat/stacks.py b/rally_openstack/scenarios/heat/stacks.py index 462ccc26..47086ded 100644 --- a/rally_openstack/scenarios/heat/stacks.py +++ b/rally_openstack/scenarios/heat/stacks.py @@ -14,12 +14,13 @@ # under the License. from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.heat import utils from rally.task import atomic from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.heat import utils + """Scenarios for Heat stacks.""" diff --git a/rally_openstack/scenarios/heat/utils.py b/rally_openstack/scenarios/heat/utils.py index eb10183a..418bbfe7 100644 --- a/rally_openstack/scenarios/heat/utils.py +++ b/rally_openstack/scenarios/heat/utils.py @@ -13,14 +13,14 @@ # License for the specific language governing permissions and limitations # under the License. -import requests - from rally.common import cfg from rally.common import logging from rally import exceptions -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +import requests + +from rally_openstack import scenario LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/ironic/nodes.py b/rally_openstack/scenarios/ironic/nodes.py index ecc84b8d..77cfcba3 100644 --- a/rally_openstack/scenarios/ironic/nodes.py +++ b/rally_openstack/scenarios/ironic/nodes.py @@ -15,9 +15,10 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.ironic import utils -from rally.task import validation """Scenarios for ironic nodes.""" diff --git a/rally_openstack/scenarios/ironic/utils.py b/rally_openstack/scenarios/ironic/utils.py index ecffdbd7..799b3e0c 100644 --- a/rally_openstack/scenarios/ironic/utils.py +++ b/rally_openstack/scenarios/ironic/utils.py @@ -16,10 +16,11 @@ import string from rally.common import cfg -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +from rally_openstack import scenario + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/keystone/basic.py b/rally_openstack/scenarios/keystone/basic.py index 1783a9cf..4307805b 100755 --- a/rally_openstack/scenarios/keystone/basic.py +++ b/rally_openstack/scenarios/keystone/basic.py @@ -14,9 +14,10 @@ # under the License. from rally.common import logging +from rally.task import validation + from rally_openstack import scenario from rally_openstack.services.identity import identity -from rally.task import validation class KeystoneBasic(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/keystone/utils.py b/rally_openstack/scenarios/keystone/utils.py index c9abb7f6..a787a65b 100644 --- a/rally_openstack/scenarios/keystone/utils.py +++ b/rally_openstack/scenarios/keystone/utils.py @@ -16,9 +16,10 @@ import uuid from rally.common import logging +from rally.task import atomic + from rally_openstack import scenario from rally_openstack.wrappers import keystone as keystone_wrapper -from rally.task import atomic LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/magnum/cluster_templates.py b/rally_openstack/scenarios/magnum/cluster_templates.py index cc30ec4e..27616416 100644 --- a/rally_openstack/scenarios/magnum/cluster_templates.py +++ b/rally_openstack/scenarios/magnum/cluster_templates.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.magnum import utils -from rally.task import validation """Scenarios for Magnum cluster_templates.""" diff --git a/rally_openstack/scenarios/magnum/clusters.py b/rally_openstack/scenarios/magnum/clusters.py index 992b2bfb..94111a33 100644 --- a/rally_openstack/scenarios/magnum/clusters.py +++ b/rally_openstack/scenarios/magnum/clusters.py @@ -13,10 +13,12 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.magnum import utils from rally_openstack.scenarios.nova import utils as nova_utils -from rally.task import validation + """Scenarios for Magnum clusters.""" diff --git a/rally_openstack/scenarios/magnum/k8s_pods.py b/rally_openstack/scenarios/magnum/k8s_pods.py index 66227a61..d750138f 100644 --- a/rally_openstack/scenarios/magnum/k8s_pods.py +++ b/rally_openstack/scenarios/magnum/k8s_pods.py @@ -12,12 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. +from rally import consts +from rally.task import validation import yaml -from rally import consts from rally_openstack import scenario from rally_openstack.scenarios.magnum import utils -from rally.task import validation """Scenarios for Kubernetes pods and rcs.""" diff --git a/rally_openstack/scenarios/magnum/utils.py b/rally_openstack/scenarios/magnum/utils.py index aea9bfc4..c666fd46 100644 --- a/rally_openstack/scenarios/magnum/utils.py +++ b/rally_openstack/scenarios/magnum/utils.py @@ -25,10 +25,12 @@ from kubernetes.client.rest import ApiException from rally.common import cfg from rally.common import utils as common_utils from rally import exceptions -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +from rally_openstack import scenario + + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/manila/shares.py b/rally_openstack/scenarios/manila/shares.py index 9482a58e..a20bfa74 100644 --- a/rally_openstack/scenarios/manila/shares.py +++ b/rally_openstack/scenarios/manila/shares.py @@ -15,10 +15,11 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack.contexts.manila import consts as manila_consts from rally_openstack import scenario from rally_openstack.scenarios.manila import utils -from rally.task import validation """Scenarios for Manila shares.""" diff --git a/rally_openstack/scenarios/manila/utils.py b/rally_openstack/scenarios/manila/utils.py index 2eefc76d..9b6ce4fc 100644 --- a/rally_openstack/scenarios/manila/utils.py +++ b/rally_openstack/scenarios/manila/utils.py @@ -17,11 +17,12 @@ import random from rally.common import cfg from rally import exceptions -from rally_openstack.contexts.manila import consts -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +from rally_openstack.contexts.manila import consts +from rally_openstack import scenario + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/mistral/executions.py b/rally_openstack/scenarios/mistral/executions.py index 290aa57a..c39c4426 100644 --- a/rally_openstack/scenarios/mistral/executions.py +++ b/rally_openstack/scenarios/mistral/executions.py @@ -14,14 +14,14 @@ import json +from rally import consts +from rally.task import types +from rally.task import validation import six import yaml -from rally import consts from rally_openstack import scenario from rally_openstack.scenarios.mistral import utils -from rally.task import types -from rally.task import validation """Scenarios for Mistral execution.""" diff --git a/rally_openstack/scenarios/mistral/utils.py b/rally_openstack/scenarios/mistral/utils.py index 5b6de77f..243fe9c3 100644 --- a/rally_openstack/scenarios/mistral/utils.py +++ b/rally_openstack/scenarios/mistral/utils.py @@ -14,12 +14,12 @@ # under the License. -import yaml - from rally.common import cfg -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +import yaml + +from rally_openstack import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/mistral/workbooks.py b/rally_openstack/scenarios/mistral/workbooks.py index aaa1e672..8532c853 100644 --- a/rally_openstack/scenarios/mistral/workbooks.py +++ b/rally_openstack/scenarios/mistral/workbooks.py @@ -14,11 +14,12 @@ # under the License. from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.mistral import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.mistral import utils + """Scenarios for Mistral workbook.""" diff --git a/rally_openstack/scenarios/monasca/metrics.py b/rally_openstack/scenarios/monasca/metrics.py index 1ecf6803..deb388b3 100644 --- a/rally_openstack/scenarios/monasca/metrics.py +++ b/rally_openstack/scenarios/monasca/metrics.py @@ -13,9 +13,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.monasca import utils as monascautils -from rally.task import validation """Scenarios for monasca Metrics API.""" diff --git a/rally_openstack/scenarios/monasca/utils.py b/rally_openstack/scenarios/monasca/utils.py index 9ac2dbd4..cff63630 100644 --- a/rally_openstack/scenarios/monasca/utils.py +++ b/rally_openstack/scenarios/monasca/utils.py @@ -17,9 +17,10 @@ import time import uuid from rally.common import cfg -from rally_openstack import scenario from rally.task import atomic +from rally_openstack import scenario + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/murano/environments.py b/rally_openstack/scenarios/murano/environments.py index b426c57b..a97ecb95 100644 --- a/rally_openstack/scenarios/murano/environments.py +++ b/rally_openstack/scenarios/murano/environments.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.murano import utils -from rally.task import validation """Scenarios for Murano environments.""" diff --git a/rally_openstack/scenarios/murano/packages.py b/rally_openstack/scenarios/murano/packages.py index 17dbeaa1..b413e55f 100644 --- a/rally_openstack/scenarios/murano/packages.py +++ b/rally_openstack/scenarios/murano/packages.py @@ -17,11 +17,12 @@ import os from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.murano import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.murano import utils + """Scenarios for Murano packages.""" diff --git a/rally_openstack/scenarios/murano/utils.py b/rally_openstack/scenarios/murano/utils.py index eeff7723..6ba099b1 100644 --- a/rally_openstack/scenarios/murano/utils.py +++ b/rally_openstack/scenarios/murano/utils.py @@ -19,14 +19,14 @@ import tempfile import uuid import zipfile -import yaml - from rally.common import cfg from rally.common import fileutils from rally.common import utils as common_utils -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +import yaml + +from rally_openstack import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/neutron/bgpvpn.py b/rally_openstack/scenarios/neutron/bgpvpn.py index 2d1e9be8..516549d5 100644 --- a/rally_openstack/scenarios/neutron/bgpvpn.py +++ b/rally_openstack/scenarios/neutron/bgpvpn.py @@ -9,12 +9,14 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + import random from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.neutron import utils -from rally.task import validation def _create_random_route_target(): diff --git a/rally_openstack/scenarios/neutron/loadbalancer_v1.py b/rally_openstack/scenarios/neutron/loadbalancer_v1.py index 7187daae..60b6e30c 100644 --- a/rally_openstack/scenarios/neutron/loadbalancer_v1.py +++ b/rally_openstack/scenarios/neutron/loadbalancer_v1.py @@ -13,9 +13,10 @@ import random from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.neutron import utils -from rally.task import validation """Scenarios for Neutron Loadbalancer v1.""" diff --git a/rally_openstack/scenarios/neutron/loadbalancer_v2.py b/rally_openstack/scenarios/neutron/loadbalancer_v2.py index fc2993f9..08703c0e 100755 --- a/rally_openstack/scenarios/neutron/loadbalancer_v2.py +++ b/rally_openstack/scenarios/neutron/loadbalancer_v2.py @@ -11,9 +11,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.neutron import utils -from rally.task import validation """Scenarios for Neutron Loadbalancer v2.""" diff --git a/rally_openstack/scenarios/neutron/network.py b/rally_openstack/scenarios/neutron/network.py index e95d5636..61a9978f 100644 --- a/rally_openstack/scenarios/neutron/network.py +++ b/rally_openstack/scenarios/neutron/network.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.neutron import utils -from rally.task import validation """Scenarios for Neutron.""" diff --git a/rally_openstack/scenarios/neutron/security_groups.py b/rally_openstack/scenarios/neutron/security_groups.py index 6807cf6b..d21cae51 100644 --- a/rally_openstack/scenarios/neutron/security_groups.py +++ b/rally_openstack/scenarios/neutron/security_groups.py @@ -11,9 +11,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.neutron import utils -from rally.task import validation """Scenarios for Neutron Security Groups.""" diff --git a/rally_openstack/scenarios/neutron/utils.py b/rally_openstack/scenarios/neutron/utils.py index e306bc4f..3fa27043 100644 --- a/rally_openstack/scenarios/neutron/utils.py +++ b/rally_openstack/scenarios/neutron/utils.py @@ -18,11 +18,12 @@ import random from rally.common import cfg from rally.common import logging from rally import exceptions -from rally_openstack import scenario -from rally_openstack.wrappers import network as network_wrapper from rally.task import atomic from rally.task import utils +from rally_openstack import scenario +from rally_openstack.wrappers import network as network_wrapper + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/nova/agents.py b/rally_openstack/scenarios/nova/agents.py index 31626ad7..d0af5a91 100644 --- a/rally_openstack/scenarios/nova/agents.py +++ b/rally_openstack/scenarios/nova/agents.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova agents.""" diff --git a/rally_openstack/scenarios/nova/aggregates.py b/rally_openstack/scenarios/nova/aggregates.py index a89b4701..12534d9a 100644 --- a/rally_openstack/scenarios/nova/aggregates.py +++ b/rally_openstack/scenarios/nova/aggregates.py @@ -15,11 +15,12 @@ from rally import consts from rally import exceptions -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.nova import utils + """Scenarios for Nova aggregates.""" diff --git a/rally_openstack/scenarios/nova/availability_zones.py b/rally_openstack/scenarios/nova/availability_zones.py index 430929ba..4843fa44 100644 --- a/rally_openstack/scenarios/nova/availability_zones.py +++ b/rally_openstack/scenarios/nova/availability_zones.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova availability-zones.""" diff --git a/rally_openstack/scenarios/nova/flavors.py b/rally_openstack/scenarios/nova/flavors.py index 24a3b09a..ec6a1932 100644 --- a/rally_openstack/scenarios/nova/flavors.py +++ b/rally_openstack/scenarios/nova/flavors.py @@ -15,9 +15,10 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova flavors.""" diff --git a/rally_openstack/scenarios/nova/hosts.py b/rally_openstack/scenarios/nova/hosts.py index 94f06db1..2365b176 100644 --- a/rally_openstack/scenarios/nova/hosts.py +++ b/rally_openstack/scenarios/nova/hosts.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova hosts.""" diff --git a/rally_openstack/scenarios/nova/hypervisors.py b/rally_openstack/scenarios/nova/hypervisors.py index bb8769fb..46202bdd 100644 --- a/rally_openstack/scenarios/nova/hypervisors.py +++ b/rally_openstack/scenarios/nova/hypervisors.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova hypervisors.""" diff --git a/rally_openstack/scenarios/nova/images.py b/rally_openstack/scenarios/nova/images.py index b87f9d2d..d57e4e5e 100644 --- a/rally_openstack/scenarios/nova/images.py +++ b/rally_openstack/scenarios/nova/images.py @@ -15,9 +15,10 @@ from rally.common.plugin import plugin from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova images.""" diff --git a/rally_openstack/scenarios/nova/keypairs.py b/rally_openstack/scenarios/nova/keypairs.py index 72fd7eb0..1a29c310 100644 --- a/rally_openstack/scenarios/nova/keypairs.py +++ b/rally_openstack/scenarios/nova/keypairs.py @@ -15,11 +15,12 @@ from rally.common import logging from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.nova import utils + """Scenarios for Nova keypairs.""" diff --git a/rally_openstack/scenarios/nova/server_groups.py b/rally_openstack/scenarios/nova/server_groups.py index 0ad6d8f8..36a8bc28 100755 --- a/rally_openstack/scenarios/nova/server_groups.py +++ b/rally_openstack/scenarios/nova/server_groups.py @@ -15,9 +15,10 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/nova/servers.py b/rally_openstack/scenarios/nova/servers.py index dc09556c..c313d538 100644 --- a/rally_openstack/scenarios/nova/servers.py +++ b/rally_openstack/scenarios/nova/servers.py @@ -14,17 +14,17 @@ # under the License. import jsonschema - from rally.common import logging from rally import consts from rally import exceptions as rally_exceptions +from rally.task import types +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils from rally_openstack.scenarios.neutron import utils as neutron_utils from rally_openstack.scenarios.nova import utils from rally_openstack.wrappers import network as network_wrapper -from rally.task import types -from rally.task import validation """Scenarios for Nova servers.""" diff --git a/rally_openstack/scenarios/nova/services.py b/rally_openstack/scenarios/nova/services.py index 29b21f63..6a568216 100644 --- a/rally_openstack/scenarios/nova/services.py +++ b/rally_openstack/scenarios/nova/services.py @@ -14,9 +14,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.nova import utils -from rally.task import validation """Scenarios for Nova agents.""" diff --git a/rally_openstack/scenarios/nova/utils.py b/rally_openstack/scenarios/nova/utils.py index b2d74f26..8aab188b 100644 --- a/rally_openstack/scenarios/nova/utils.py +++ b/rally_openstack/scenarios/nova/utils.py @@ -17,11 +17,13 @@ from rally.common import cfg from rally.common import logging from rally import exceptions +from rally.task import atomic +from rally.task import utils + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils from rally_openstack.services.image import image as image_service -from rally.task import atomic -from rally.task import utils + CONF = cfg.CONF LOG = logging.getLogger(__file__) diff --git a/rally_openstack/scenarios/quotas/quotas.py b/rally_openstack/scenarios/quotas/quotas.py index 4b858bfd..bd87d82f 100644 --- a/rally_openstack/scenarios/quotas/quotas.py +++ b/rally_openstack/scenarios/quotas/quotas.py @@ -14,9 +14,11 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.quotas import utils -from rally.task import validation + """Scenarios for quotas.""" diff --git a/rally_openstack/scenarios/quotas/utils.py b/rally_openstack/scenarios/quotas/utils.py index f2d8f72b..eeeae724 100644 --- a/rally_openstack/scenarios/quotas/utils.py +++ b/rally_openstack/scenarios/quotas/utils.py @@ -15,9 +15,10 @@ import random -from rally_openstack import scenario from rally.task import atomic +from rally_openstack import scenario + class QuotasScenario(scenario.OpenStackScenario): """Base class for quotas scenarios with basic atomic actions.""" diff --git a/rally_openstack/scenarios/sahara/clusters.py b/rally_openstack/scenarios/sahara/clusters.py index 9c90b78d..ddbc16d3 100644 --- a/rally_openstack/scenarios/sahara/clusters.py +++ b/rally_openstack/scenarios/sahara/clusters.py @@ -15,11 +15,13 @@ from rally.common import logging from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.sahara import utils + + LOG = logging.getLogger(__name__) """Scenarios for Sahara clusters.""" diff --git a/rally_openstack/scenarios/sahara/jobs.py b/rally_openstack/scenarios/sahara/jobs.py index 1faac12d..c6bec750 100644 --- a/rally_openstack/scenarios/sahara/jobs.py +++ b/rally_openstack/scenarios/sahara/jobs.py @@ -15,9 +15,11 @@ from rally.common import logging from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.sahara import utils -from rally.task import validation + LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/sahara/node_group_templates.py b/rally_openstack/scenarios/sahara/node_group_templates.py index ae8f9619..a783db99 100644 --- a/rally_openstack/scenarios/sahara/node_group_templates.py +++ b/rally_openstack/scenarios/sahara/node_group_templates.py @@ -14,11 +14,12 @@ # under the License. from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.sahara import utils + """Scenarios for Sahara node group templates.""" diff --git a/rally_openstack/scenarios/sahara/utils.py b/rally_openstack/scenarios/sahara/utils.py index 0fa703d8..178be32a 100644 --- a/rally_openstack/scenarios/sahara/utils.py +++ b/rally_openstack/scenarios/sahara/utils.py @@ -16,18 +16,17 @@ import random from oslo_utils import uuidutils -from saharaclient.api import base as sahara_base - from rally.common import cfg from rally.common import logging from rally.common import utils as rutils from rally import consts from rally import exceptions -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import consts as sahara_consts from rally.task import atomic from rally.task import utils +from rally_openstack import scenario +from rally_openstack.scenarios.sahara import consts as sahara_consts + LOG = logging.getLogger(__name__) CONF = cfg.CONF @@ -463,6 +462,8 @@ class SaharaScenario(scenario.OpenStackScenario): is_ready=self._is_cluster_deleted) def _is_cluster_deleted(self, cluster): + from saharaclient.api import base as sahara_base + LOG.debug("Checking cluster `%s` to be deleted. Status: `%s`" % (cluster.name, cluster.status)) try: diff --git a/rally_openstack/scenarios/senlin/clusters.py b/rally_openstack/scenarios/senlin/clusters.py index 5f074772..21908bdd 100644 --- a/rally_openstack/scenarios/senlin/clusters.py +++ b/rally_openstack/scenarios/senlin/clusters.py @@ -11,9 +11,10 @@ # under the License. from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.senlin import utils -from rally.task import validation """Scenarios for Senlin clusters.""" diff --git a/rally_openstack/scenarios/senlin/utils.py b/rally_openstack/scenarios/senlin/utils.py index b452f388..8cc78d9e 100644 --- a/rally_openstack/scenarios/senlin/utils.py +++ b/rally_openstack/scenarios/senlin/utils.py @@ -12,10 +12,11 @@ from rally.common import cfg from rally import exceptions -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +from rally_openstack import scenario + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/swift/objects.py b/rally_openstack/scenarios/swift/objects.py index 27dea127..2b9d39b2 100644 --- a/rally_openstack/scenarios/swift/objects.py +++ b/rally_openstack/scenarios/swift/objects.py @@ -16,9 +16,10 @@ import tempfile from rally import consts +from rally.task import validation + from rally_openstack import scenario from rally_openstack.scenarios.swift import utils -from rally.task import validation """Scenarios for Swift Objects.""" diff --git a/rally_openstack/scenarios/swift/utils.py b/rally_openstack/scenarios/swift/utils.py index 9eaca1b8..ac077cea 100644 --- a/rally_openstack/scenarios/swift/utils.py +++ b/rally_openstack/scenarios/swift/utils.py @@ -13,9 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import scenario from rally.task import atomic +from rally_openstack import scenario + class SwiftScenario(scenario.OpenStackScenario): """Base class for Swift scenarios with basic atomic actions.""" diff --git a/rally_openstack/scenarios/vm/utils.py b/rally_openstack/scenarios/vm/utils.py index 04838e46..9d37d7f8 100644 --- a/rally_openstack/scenarios/vm/utils.py +++ b/rally_openstack/scenarios/vm/utils.py @@ -18,15 +18,15 @@ import subprocess import sys import netaddr -import six - from rally.common import cfg from rally.common import logging from rally.common import sshutils -from rally_openstack.scenarios.nova import utils as nova_utils -from rally_openstack.wrappers import network as network_wrapper from rally.task import atomic from rally.task import utils +import six + +from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.wrappers import network as network_wrapper LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/vm/vmtasks.py b/rally_openstack/scenarios/vm/vmtasks.py index 05110c3a..ee80307e 100644 --- a/rally_openstack/scenarios/vm/vmtasks.py +++ b/rally_openstack/scenarios/vm/vmtasks.py @@ -23,12 +23,13 @@ from rally.common import validation from rally import consts from rally import exceptions from rally.plugins.common import validators +from rally.task import atomic +from rally.task import types + from rally_openstack import scenario from rally_openstack.scenarios.cinder import utils as cinder_utils from rally_openstack.scenarios.vm import utils as vm_utils from rally_openstack.services import heat -from rally.task import atomic -from rally.task import types """Scenarios that are to be run inside VM instances.""" diff --git a/rally_openstack/scenarios/watcher/basic.py b/rally_openstack/scenarios/watcher/basic.py index 2991530b..275b9a59 100644 --- a/rally_openstack/scenarios/watcher/basic.py +++ b/rally_openstack/scenarios/watcher/basic.py @@ -12,11 +12,12 @@ from rally.common import logging from rally import consts -from rally_openstack import scenario -from rally_openstack.scenarios.watcher import utils from rally.task import types from rally.task import validation +from rally_openstack import scenario +from rally_openstack.scenarios.watcher import utils + """Scenarios for Watcher servers.""" diff --git a/rally_openstack/scenarios/watcher/utils.py b/rally_openstack/scenarios/watcher/utils.py index 0e626d73..4c3f8d63 100644 --- a/rally_openstack/scenarios/watcher/utils.py +++ b/rally_openstack/scenarios/watcher/utils.py @@ -11,10 +11,11 @@ # under the License. from rally.common import cfg -from rally_openstack import scenario from rally.task import atomic from rally.task import utils +from rally_openstack import scenario + CONF = cfg.CONF diff --git a/rally_openstack/scenarios/zaqar/basic.py b/rally_openstack/scenarios/zaqar/basic.py index 728d719f..ed46c1d5 100644 --- a/rally_openstack/scenarios/zaqar/basic.py +++ b/rally_openstack/scenarios/zaqar/basic.py @@ -15,6 +15,7 @@ import random from rally.common import logging + from rally_openstack import scenario from rally_openstack.scenarios.zaqar import utils as zutils diff --git a/rally_openstack/scenarios/zaqar/utils.py b/rally_openstack/scenarios/zaqar/utils.py index 715d2d05..326eeafe 100644 --- a/rally_openstack/scenarios/zaqar/utils.py +++ b/rally_openstack/scenarios/zaqar/utils.py @@ -12,9 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import scenario from rally.task import atomic +from rally_openstack import scenario + class ZaqarScenario(scenario.OpenStackScenario): """Base class for Zaqar scenarios with basic atomic actions.""" diff --git a/rally_openstack/services/identity/keystone_common.py b/rally_openstack/services/identity/keystone_common.py index 113a0421..bbaabc47 100644 --- a/rally_openstack/services/identity/keystone_common.py +++ b/rally_openstack/services/identity/keystone_common.py @@ -12,9 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. +from rally.task import atomic + from rally_openstack import osclients from rally_openstack.services.identity import identity -from rally.task import atomic class UnifiedKeystoneMixin(object): diff --git a/rally_openstack/services/identity/keystone_v2.py b/rally_openstack/services/identity/keystone_v2.py index ef649c0a..09b81562 100644 --- a/rally_openstack/services/identity/keystone_v2.py +++ b/rally_openstack/services/identity/keystone_v2.py @@ -14,10 +14,11 @@ import uuid +from rally.task import atomic + from rally_openstack import service from rally_openstack.services.identity import identity from rally_openstack.services.identity import keystone_common -from rally.task import atomic @service.service("keystone", service_type="identity", version="2") diff --git a/rally_openstack/services/identity/keystone_v3.py b/rally_openstack/services/identity/keystone_v3.py index 434ed232..37684923 100644 --- a/rally_openstack/services/identity/keystone_v3.py +++ b/rally_openstack/services/identity/keystone_v3.py @@ -14,10 +14,11 @@ from rally.common import logging from rally import exceptions +from rally.task import atomic + from rally_openstack import service from rally_openstack.services.identity import identity from rally_openstack.services.identity import keystone_common -from rally.task import atomic LOG = logging.getLogger(__name__) diff --git a/rally_openstack/services/image/glance_common.py b/rally_openstack/services/image/glance_common.py index 14406a3d..9c8b6b0c 100644 --- a/rally_openstack/services/image/glance_common.py +++ b/rally_openstack/services/image/glance_common.py @@ -12,12 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from glanceclient import exc as glance_exc - from rally import exceptions -from rally_openstack.services.image import image as image_service from rally.task import atomic +from rally_openstack.services.image import image as image_service + class GlanceMixin(object): @@ -29,6 +28,8 @@ class GlanceMixin(object): :param image: ID or object with ID of image to obtain. """ + from glanceclient import exc as glance_exc + image_id = getattr(image, "id", image) try: aname = "glance_v%s.get_image" % self.version diff --git a/rally_openstack/services/image/glance_v1.py b/rally_openstack/services/image/glance_v1.py index 26a627ca..2717e7c6 100644 --- a/rally_openstack/services/image/glance_v1.py +++ b/rally_openstack/services/image/glance_v1.py @@ -16,11 +16,13 @@ import os from rally.common import cfg from rally.common import utils as rutils +from rally.task import atomic +from rally.task import utils + from rally_openstack import service from rally_openstack.services.image import glance_common from rally_openstack.services.image import image -from rally.task import atomic -from rally.task import utils + CONF = cfg.CONF diff --git a/rally_openstack/services/image/glance_v2.py b/rally_openstack/services/image/glance_v2.py index bc7e644d..070076ad 100644 --- a/rally_openstack/services/image/glance_v2.py +++ b/rally_openstack/services/image/glance_v2.py @@ -15,15 +15,16 @@ import os import time -import requests - from rally.common import cfg from rally.common import utils as rutils +from rally.task import atomic +from rally.task import utils +import requests + from rally_openstack import service from rally_openstack.services.image import glance_common from rally_openstack.services.image import image -from rally.task import atomic -from rally.task import utils + CONF = cfg.CONF diff --git a/rally_openstack/services/storage/cinder_common.py b/rally_openstack/services/storage/cinder_common.py index 86265c07..f53ccb9a 100644 --- a/rally_openstack/services/storage/cinder_common.py +++ b/rally_openstack/services/storage/cinder_common.py @@ -15,11 +15,13 @@ import random from rally import exceptions -from rally_openstack.services.image import image -from rally_openstack.services.storage import block from rally.task import atomic from rally.task import utils as bench_utils +from rally_openstack.services.image import image +from rally_openstack.services.storage import block + + CONF = block.CONF diff --git a/rally_openstack/services/storage/cinder_v1.py b/rally_openstack/services/storage/cinder_v1.py index 7f7b9f4d..eb611260 100644 --- a/rally_openstack/services/storage/cinder_v1.py +++ b/rally_openstack/services/storage/cinder_v1.py @@ -15,10 +15,12 @@ import random from rally.common import utils as rutils +from rally.task import atomic + from rally_openstack import service from rally_openstack.services.storage import block from rally_openstack.services.storage import cinder_common -from rally.task import atomic + CONF = block.CONF diff --git a/rally_openstack/services/storage/cinder_v2.py b/rally_openstack/services/storage/cinder_v2.py index 3ccef8d8..212df253 100644 --- a/rally_openstack/services/storage/cinder_v2.py +++ b/rally_openstack/services/storage/cinder_v2.py @@ -15,10 +15,12 @@ import random from rally.common import utils as rutils +from rally.task import atomic + from rally_openstack import service from rally_openstack.services.storage import block from rally_openstack.services.storage import cinder_common -from rally.task import atomic + CONF = block.CONF diff --git a/rally_openstack/types.py b/rally_openstack/types.py index f8395528..a744a407 100644 --- a/rally_openstack/types.py +++ b/rally_openstack/types.py @@ -16,9 +16,10 @@ import copy from rally.common.plugin import plugin from rally import exceptions -from rally_openstack.services.image import image from rally.task import types +from rally_openstack.services.image import image + @plugin.configure(name="nova_flavor") class Flavor(types.ResourceType): diff --git a/rally_openstack/verification/tempest/context.py b/rally_openstack/verification/tempest/context.py index 199ed09c..2fdd09e7 100644 --- a/rally_openstack/verification/tempest/context.py +++ b/rally_openstack/verification/tempest/context.py @@ -16,17 +16,17 @@ import os import re -import requests -from six.moves import configparser - from rally.common import logging from rally import exceptions -from rally_openstack.services.image import image -from rally_openstack.verification.tempest import config as conf -from rally_openstack.wrappers import network from rally.task import utils as task_utils from rally.verification import context from rally.verification import utils +import requests +from six.moves import configparser + +from rally_openstack.services.image import image +from rally_openstack.verification.tempest import config as conf +from rally_openstack.wrappers import network LOG = logging.getLogger(__name__) diff --git a/rally_openstack/verification/tempest/manager.py b/rally_openstack/verification/tempest/manager.py index dbf97970..76eaa2da 100644 --- a/rally_openstack/verification/tempest/manager.py +++ b/rally_openstack/verification/tempest/manager.py @@ -20,11 +20,12 @@ import subprocess from rally.common import yamlutils as yaml from rally import exceptions from rally.plugins.common.verification import testr -from rally_openstack.verification.tempest import config -from rally_openstack.verification.tempest import consts from rally.verification import manager from rally.verification import utils +from rally_openstack.verification.tempest import config +from rally_openstack.verification.tempest import consts + AVAILABLE_SETS = (list(consts.TempestTestSets) + list(consts.TempestApiTestSets) + diff --git a/tests/unit/contexts/cinder/test_volumes.py b/tests/unit/contexts/cinder/test_volumes.py index ed359e01..2e835899 100644 --- a/tests/unit/contexts/cinder/test_volumes.py +++ b/tests/unit/contexts/cinder/test_volumes.py @@ -16,9 +16,9 @@ import copy import ddt import mock +from rally.task import context from rally_openstack.contexts.cinder import volumes -from rally.task import context from tests.unit import test CTX = "rally_openstack.contexts" diff --git a/tests/unit/contexts/cleanup/test_admin.py b/tests/unit/contexts/cleanup/test_admin.py index 6332d2b8..926bcb07 100644 --- a/tests/unit/contexts/cleanup/test_admin.py +++ b/tests/unit/contexts/cleanup/test_admin.py @@ -15,11 +15,11 @@ import ddt import mock - from rally.common import utils +from rally.task import context + from rally_openstack.contexts.cleanup import admin from rally_openstack import scenario -from rally.task import context from tests.unit import test diff --git a/tests/unit/contexts/cleanup/test_user.py b/tests/unit/contexts/cleanup/test_user.py index cddb285d..46b6783d 100644 --- a/tests/unit/contexts/cleanup/test_user.py +++ b/tests/unit/contexts/cleanup/test_user.py @@ -15,11 +15,11 @@ import ddt import mock - from rally.common import utils +from rally.task import context + from rally_openstack.contexts.cleanup import user from rally_openstack import scenario -from rally.task import context from tests.unit import test diff --git a/tests/unit/contexts/quotas/test_quotas.py b/tests/unit/contexts/quotas/test_quotas.py index 0d092235..d5d6beb4 100644 --- a/tests/unit/contexts/quotas/test_quotas.py +++ b/tests/unit/contexts/quotas/test_quotas.py @@ -17,10 +17,10 @@ import copy import ddt import mock - from rally.common import logging -from rally_openstack.contexts.quotas import quotas from rally.task import context + +from rally_openstack.contexts.quotas import quotas from tests.unit import test QUOTAS_PATH = "rally_openstack.contexts.quotas" diff --git a/tests/unit/contexts/test_api_versions.py b/tests/unit/contexts/test_api_versions.py index 7b665f0e..11a16fc2 100644 --- a/tests/unit/contexts/test_api_versions.py +++ b/tests/unit/contexts/test_api_versions.py @@ -12,11 +12,11 @@ import ddt import mock - from rally.common import utils from rally import exceptions -from rally_openstack.contexts import api_versions from rally.task import context + +from rally_openstack.contexts import api_versions from tests.unit import test diff --git a/tests/unit/contexts/vm/test_custom_image.py b/tests/unit/contexts/vm/test_custom_image.py index 5f355dec..018184ce 100644 --- a/tests/unit/contexts/vm/test_custom_image.py +++ b/tests/unit/contexts/vm/test_custom_image.py @@ -14,9 +14,9 @@ # under the License. import mock +from rally.task import context from rally_openstack.contexts.vm import custom_image -from rally.task import context from tests.unit import test diff --git a/tests/unit/doc/test_task_samples.py b/tests/unit/doc/test_task_samples.py index 5faaaf83..a329685f 100644 --- a/tests/unit/doc/test_task_samples.py +++ b/tests/unit/doc/test_task_samples.py @@ -19,14 +19,14 @@ import os import traceback import mock -import yaml from rally import api from rally.task import context from rally.task import engine from rally.task import scenario -from tests.unit import test +import yaml import rally_openstack +from tests.unit import test RALLY_PATH = os.path.dirname(os.path.dirname(rally_openstack.__file__)) diff --git a/tests/unit/hook/test_fault_injection.py b/tests/unit/hook/test_fault_injection.py index 21189772..2be9b8d5 100644 --- a/tests/unit/hook/test_fault_injection.py +++ b/tests/unit/hook/test_fault_injection.py @@ -18,10 +18,10 @@ import ddt import mock import os_faults from os_faults.api import error - from rally import consts -from rally_openstack.hook import fault_injection from rally.task import hook + +from rally_openstack.hook import fault_injection from tests.unit import fakes from tests.unit import test diff --git a/tox.ini b/tox.ini index 06c84df5..d612f622 100644 --- a/tox.ini +++ b/tox.ini @@ -84,7 +84,7 @@ deps = requests[security] commands = python {toxinidir}/tests/ci/sync_requirements.py {posargs} [flake8] -ignore = H703,H105,H306 +ignore = H703,H105 show-source = true exclude=.venv,.git,.tox,dist,*lib/python*,*egg,tools,build,setup.py