From d2f4e9717d3b93b82ed9fa341594f87a248c278e Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Thu, 26 Mar 2020 16:02:04 +0200 Subject: [PATCH] Restruct the project Move all modules under the next structure: - rally_openstack.common - rally_openstack.enviromnet - rally_openstack.task - rally_openstack.verification Change-Id: I41702d017cd49b117da3b8e12b19c7327229ae32 --- CHANGELOG.rst | 24 +++ rally_openstack/__init__.py | 8 + rally_openstack/_compat.py | 199 ++++++++++++++++++ rally_openstack/{cfg => common}/__init__.py | 0 .../{cleanup => common/cfg}/__init__.py | 0 rally_openstack/{ => common}/cfg/cinder.py | 0 rally_openstack/{ => common}/cfg/cleanup.py | 0 rally_openstack/{ => common}/cfg/glance.py | 0 rally_openstack/{ => common}/cfg/heat.py | 0 rally_openstack/{ => common}/cfg/ironic.py | 0 .../{ => common}/cfg/keystone_roles.py | 0 .../{ => common}/cfg/keystone_users.py | 0 rally_openstack/{ => common}/cfg/magnum.py | 0 rally_openstack/{ => common}/cfg/manila.py | 0 rally_openstack/{ => common}/cfg/mistral.py | 0 rally_openstack/{ => common}/cfg/monasca.py | 0 rally_openstack/{ => common}/cfg/murano.py | 0 rally_openstack/{ => common}/cfg/neutron.py | 0 rally_openstack/{ => common}/cfg/nova.py | 0 rally_openstack/{ => common}/cfg/octavia.py | 0 rally_openstack/{ => common}/cfg/opts.py | 46 ++-- rally_openstack/{ => common}/cfg/osclients.py | 0 rally_openstack/{ => common}/cfg/profiler.py | 0 rally_openstack/{ => common}/cfg/sahara.py | 0 rally_openstack/{ => common}/cfg/senlin.py | 0 rally_openstack/{ => common}/cfg/tempest.py | 0 rally_openstack/{ => common}/cfg/vm.py | 0 rally_openstack/{ => common}/cfg/watcher.py | 0 rally_openstack/{ => common}/consts.py | 0 rally_openstack/{ => common}/credential.py | 2 +- rally_openstack/{ => common}/exceptions.py | 0 rally_openstack/{ => common}/osclients.py | 6 +- rally_openstack/{ => common}/service.py | 0 .../{contexts => common/services}/__init__.py | 0 .../services/gnocchi}/__init__.py | 0 .../{ => common}/services/gnocchi/metric.py | 0 .../services/grafana}/__init__.py | 0 .../{ => common}/services/grafana/grafana.py | 0 .../services/heat}/__init__.py | 0 .../{ => common}/services/heat/main.py | 0 .../services/identity}/__init__.py | 0 .../services/identity/identity.py | 0 .../services/identity/keystone_common.py | 4 +- .../services/identity/keystone_v2.py | 6 +- .../services/identity/keystone_v3.py | 6 +- .../services/image}/__init__.py | 0 .../services/image/glance_common.py | 2 +- .../{ => common}/services/image/glance_v1.py | 6 +- .../{ => common}/services/image/glance_v2.py | 6 +- .../{ => common}/services/image/image.py | 0 .../services/key_manager}/__init__.py | 0 .../services/key_manager/barbican.py | 0 .../services/loadbalancer}/__init__.py | 0 .../services/loadbalancer/octavia.py | 0 .../services/storage}/__init__.py | 0 .../{ => common}/services/storage/block.py | 0 .../services/storage/cinder_common.py | 4 +- .../services/storage/cinder_v1.py | 6 +- .../services/storage/cinder_v2.py | 6 +- .../services/storage/cinder_v3.py | 6 +- rally_openstack/{ => common}/validators.py | 8 +- .../magnum => common/wrappers}/__init__.py | 0 .../{ => common}/wrappers/network.py | 2 +- .../manila => environment}/__init__.py | 0 .../platforms}/__init__.py | 0 .../{ => environment}/platforms/existing.py | 2 +- .../murano => task/cleanup}/__init__.py | 0 rally_openstack/{ => task}/cleanup/base.py | 0 rally_openstack/{ => task}/cleanup/manager.py | 2 +- .../{ => task}/cleanup/resources.py | 12 +- .../network => task/contexts}/__init__.py | 0 .../{ => task}/contexts/api_versions.py | 4 +- .../contexts/ceilometer}/__init__.py | 0 .../{ => task}/contexts/ceilometer/samples.py | 4 +- .../nova => task/contexts/cinder}/__init__.py | 0 .../contexts/cinder/volume_types.py | 8 +- .../{ => task}/contexts/cinder/volumes.py | 8 +- .../contexts/cleanup}/__init__.py | 0 .../{ => task}/contexts/cleanup/admin.py | 6 +- .../{ => task}/contexts/cleanup/base.py | 4 +- .../{ => task}/contexts/cleanup/user.py | 6 +- .../contexts/dataplane}/__init__.py | 0 .../{ => task}/contexts/dataplane/heat.py | 8 +- .../contexts/designate}/__init__.py | 0 .../{ => task}/contexts/designate/zones.py | 6 +- .../contexts/glance}/__init__.py | 0 .../{ => task}/contexts/glance/images.py | 8 +- .../vm => task/contexts/heat}/__init__.py | 0 .../{ => task}/contexts/heat/stacks.py | 6 +- .../contexts/keystone}/__init__.py | 0 .../{ => task}/contexts/keystone/roles.py | 6 +- .../{ => task}/contexts/keystone/users.py | 10 +- .../contexts/magnum}/__init__.py | 0 .../{ => task}/contexts/magnum/ca_certs.py | 4 +- .../contexts/magnum/cluster_templates.py | 6 +- .../{ => task}/contexts/magnum/clusters.py | 8 +- .../contexts/manila}/__init__.py | 0 .../{ => task}/contexts/manila/consts.py | 0 .../manila/manila_security_services.py | 8 +- .../contexts/manila/manila_share_networks.py | 8 +- .../contexts/manila/manila_shares.py | 8 +- .../contexts/monasca}/__init__.py | 0 .../{ => task}/contexts/monasca/metrics.py | 4 +- .../contexts/murano}/__init__.py | 0 .../contexts/murano/murano_environments.py | 6 +- .../contexts/murano/murano_packages.py | 8 +- .../contexts/network}/__init__.py | 0 .../{ => task}/contexts/network/allow_ssh.py | 4 +- .../contexts/network/existing_network.py | 6 +- .../contexts/network/networking_agents.py | 4 +- .../{ => task}/contexts/network/networks.py | 6 +- .../{ => task}/contexts/network/routers.py | 6 +- .../contexts/neutron}/__init__.py | 0 .../{ => task}/contexts/neutron/lbaas.py | 6 +- .../contexts/nova}/__init__.py | 0 .../{ => task}/contexts/nova/flavors.py | 6 +- .../{ => task}/contexts/nova/keypairs.py | 4 +- .../{ => task}/contexts/nova/servers.py | 6 +- .../contexts/quotas}/__init__.py | 0 .../contexts/quotas/cinder_quotas.py | 0 .../contexts/quotas/designate_quotas.py | 0 .../contexts/quotas/manila_quotas.py | 0 .../contexts/quotas/neutron_quotas.py | 0 .../{ => task}/contexts/quotas/nova_quotas.py | 0 .../{ => task}/contexts/quotas/quotas.py | 14 +- .../contexts/sahara}/__init__.py | 0 .../contexts/sahara/sahara_cluster.py | 6 +- .../contexts/sahara/sahara_image.py | 10 +- .../sahara/sahara_input_data_sources.py | 10 +- .../contexts/sahara/sahara_job_binaries.py | 8 +- .../sahara/sahara_output_data_sources.py | 10 +- .../contexts/senlin}/__init__.py | 0 .../{ => task}/contexts/senlin/profiles.py | 4 +- .../contexts/swift}/__init__.py | 0 .../{ => task}/contexts/swift/objects.py | 4 +- .../{ => task}/contexts/swift/utils.py | 2 +- .../gnocchi => task/contexts/vm}/__init__.py | 0 .../{ => task}/contexts/vm/custom_image.py | 10 +- .../contexts/vm/image_command_customizer.py | 4 +- .../contexts/watcher}/__init__.py | 0 .../contexts/watcher/audit_templates.py | 8 +- .../heat => task/hooks}/__init__.py | 0 .../{hook => task/hooks}/fault_injection.py | 2 +- rally_openstack/{ => task}/scenario.py | 2 +- .../ironic => task/scenarios}/__init__.py | 0 .../scenarios/authenticate}/__init__.py | 0 .../scenarios/authenticate/authenticate.py | 4 +- .../scenarios/barbican}/__init__.py | 0 .../scenarios/barbican/containers.py | 6 +- .../{ => task}/scenarios/barbican/orders.py | 6 +- .../{ => task}/scenarios/barbican/secrets.py | 6 +- .../{ => task}/scenarios/barbican/utils.py | 4 +- .../scenarios/ceilometer}/__init__.py | 0 .../{ => task}/scenarios/ceilometer/alarms.py | 6 +- .../{ => task}/scenarios/ceilometer/events.py | 8 +- .../{ => task}/scenarios/ceilometer/meters.py | 6 +- .../scenarios/ceilometer/queries.py | 6 +- .../scenarios/ceilometer/resources.py | 6 +- .../scenarios/ceilometer/samples.py | 6 +- .../{ => task}/scenarios/ceilometer/stats.py | 6 +- .../{ => task}/scenarios/ceilometer/traits.py | 8 +- .../{ => task}/scenarios/ceilometer/utils.py | 2 +- .../scenarios/cinder}/__init__.py | 0 .../{ => task}/scenarios/cinder/qos_specs.py | 6 +- .../{ => task}/scenarios/cinder/utils.py | 4 +- .../scenarios/cinder/volume_backups.py | 6 +- .../scenarios/cinder/volume_types.py | 8 +- .../{ => task}/scenarios/cinder/volumes.py | 10 +- .../scenarios/designate}/__init__.py | 0 .../{ => task}/scenarios/designate/basic.py | 6 +- .../{ => task}/scenarios/designate/utils.py | 2 +- rally_openstack/{ => task}/scenarios/dummy.py | 2 +- .../scenarios/elasticsearch}/__init__.py | 0 .../scenarios/elasticsearch/logging.py | 6 +- .../scenarios/glance}/__init__.py | 0 .../{ => task}/scenarios/glance/images.py | 10 +- .../scenarios/gnocchi}/__init__.py | 0 .../scenarios/gnocchi/archive_policy.py | 6 +- .../scenarios/gnocchi/archive_policy_rule.py | 6 +- .../scenarios/gnocchi/capabilities.py | 6 +- .../{ => task}/scenarios/gnocchi/metric.py | 6 +- .../{ => task}/scenarios/gnocchi/resource.py | 6 +- .../scenarios/gnocchi/resource_type.py | 6 +- .../{ => task}/scenarios/gnocchi/status.py | 6 +- .../{ => task}/scenarios/gnocchi/utils.py | 4 +- .../scenarios/grafana}/__init__.py | 0 .../{ => task}/scenarios/grafana/metrics.py | 6 +- .../scenarios/heat}/__init__.py | 0 .../{ => task}/scenarios/heat/stacks.py | 6 +- .../{ => task}/scenarios/heat/utils.py | 2 +- .../scenarios/ironic}/__init__.py | 0 .../{ => task}/scenarios/ironic/nodes.py | 6 +- .../{ => task}/scenarios/ironic/utils.py | 2 +- .../scenarios/keystone}/__init__.py | 0 .../{ => task}/scenarios/keystone/basic.py | 4 +- .../scenarios/magnum}/__init__.py | 0 .../scenarios/magnum/cluster_templates.py | 6 +- .../{ => task}/scenarios/magnum/clusters.py | 8 +- .../{ => task}/scenarios/magnum/k8s_pods.py | 6 +- .../{ => task}/scenarios/magnum/utils.py | 2 +- .../vm => task/scenarios/manila}/__init__.py | 0 .../{ => task}/scenarios/manila/shares.py | 8 +- .../{ => task}/scenarios/manila/utils.py | 4 +- .../scenarios/mistral}/__init__.py | 0 .../scenarios/mistral/executions.py | 6 +- .../{ => task}/scenarios/mistral/utils.py | 2 +- .../{ => task}/scenarios/mistral/workbooks.py | 6 +- .../scenarios/monasca}/__init__.py | 0 .../{ => task}/scenarios/monasca/metrics.py | 6 +- .../{ => task}/scenarios/monasca/utils.py | 2 +- .../scenarios/murano}/__init__.py | 0 .../scenarios/murano/environments.py | 6 +- .../{ => task}/scenarios/murano/packages.py | 6 +- .../{ => task}/scenarios/murano/utils.py | 2 +- .../scenarios/neutron}/__init__.py | 0 .../{ => task}/scenarios/neutron/bgpvpn.py | 6 +- .../scenarios/neutron/loadbalancer_v1.py | 6 +- .../scenarios/neutron/loadbalancer_v2.py | 6 +- .../{ => task}/scenarios/neutron/network.py | 6 +- .../scenarios/neutron/security_groups.py | 6 +- .../{ => task}/scenarios/neutron/trunk.py | 8 +- .../{ => task}/scenarios/neutron/utils.py | 4 +- .../scenarios/nova}/__init__.py | 0 .../{ => task}/scenarios/nova/agents.py | 6 +- .../{ => task}/scenarios/nova/aggregates.py | 6 +- .../scenarios/nova/availability_zones.py | 6 +- .../{ => task}/scenarios/nova/flavors.py | 6 +- .../{ => task}/scenarios/nova/hypervisors.py | 6 +- .../{ => task}/scenarios/nova/keypairs.py | 6 +- .../scenarios/nova/server_groups.py | 6 +- .../{ => task}/scenarios/nova/servers.py | 12 +- .../{ => task}/scenarios/nova/services.py | 6 +- .../{ => task}/scenarios/nova/utils.py | 6 +- .../scenarios/octavia}/__init__.py | 0 .../scenarios/octavia/loadbalancers.py | 6 +- .../{ => task}/scenarios/octavia/pools.py | 6 +- .../{ => task}/scenarios/octavia/utils.py | 4 +- .../scenarios/quotas}/__init__.py | 0 .../{ => task}/scenarios/quotas/quotas.py | 6 +- .../{ => task}/scenarios/quotas/utils.py | 2 +- .../scenarios/sahara}/__init__.py | 0 .../{ => task}/scenarios/sahara/clusters.py | 6 +- .../{ => task}/scenarios/sahara/consts.py | 0 .../{ => task}/scenarios/sahara/jobs.py | 6 +- .../scenarios/sahara/node_group_templates.py | 6 +- .../{ => task}/scenarios/sahara/utils.py | 6 +- .../scenarios/senlin}/__init__.py | 0 .../{ => task}/scenarios/senlin/clusters.py | 6 +- .../{ => task}/scenarios/senlin/utils.py | 2 +- .../scenarios/swift}/__init__.py | 0 .../{ => task}/scenarios/swift/objects.py | 6 +- .../{ => task}/scenarios/swift/utils.py | 2 +- .../storage => task/scenarios/vm}/__init__.py | 0 .../{ => task}/scenarios/vm/utils.py | 4 +- .../{ => task}/scenarios/vm/vmtasks.py | 10 +- .../scenarios/vm/workloads}/__init__.py | 0 .../scenarios/vm/workloads}/siege.py | 0 .../scenarios/watcher}/__init__.py | 0 .../{ => task}/scenarios/watcher/basic.py | 6 +- .../{ => task}/scenarios/watcher/utils.py | 2 +- .../task/scenarios/zaqar}/__init__.py | 0 .../{ => task}/scenarios/zaqar/basic.py | 4 +- .../{ => task}/scenarios/zaqar/utils.py | 2 +- rally_openstack/{ => task}/types.py | 6 +- .../task/ui}/__init__.py | 0 .../task/ui/charts}/__init__.py | 0 .../ui/charts}/osprofilerchart.py | 0 .../verification/tempest/context.py | 4 +- .../tasks/scenarios/workload/wordpress.json | 2 +- .../tasks/scenarios/workload/wordpress.yaml | 2 +- setup.cfg | 4 +- tests/ci/osresources.py | 4 +- .../functional/extra/fake_dir/fake_plugin.py | 4 +- tests/functional/test_task_samples.py | 2 +- .../{contexts/cinder => common}/__init__.py | 0 .../cleanup => common/services}/__init__.py | 0 .../services/barbican}/__init__.py | 0 .../services/barbican/test_secrets.py | 2 +- .../services/gnocchi}/__init__.py | 0 .../services/gnocchi/test_metric.py | 2 +- .../services/heat}/__init__.py | 0 .../{ => common}/services/heat/test_main.py | 14 +- .../services/identity}/__init__.py | 0 .../services/identity/test_identity.py | 4 +- .../services/identity/test_keystone_common.py | 8 +- .../services/identity/test_keystone_v2.py | 6 +- .../services/identity/test_keystone_v3.py | 6 +- .../services/image}/__init__.py | 0 .../services/image/test_glance_common.py | 6 +- .../services/image/test_glance_v1.py | 6 +- .../services/image/test_glance_v2.py | 4 +- .../{ => common}/services/image/test_image.py | 8 +- .../services/loadbalancer}/__init__.py | 0 .../services/loadbalancer/test_octavia.py | 4 +- .../services/storage}/__init__.py | 0 .../services/storage/test_block.py | 4 +- .../services/storage/test_cinder_common.py | 10 +- .../services/storage/test_cinder_v1.py | 4 +- .../services/storage/test_cinder_v2.py | 4 +- .../services/storage/test_cinder_v3.py | 4 +- tests/unit/{ => common}/test_credential.py | 4 +- tests/unit/{ => common}/test_osclients.py | 8 +- tests/unit/{ => common}/test_validators.py | 10 +- .../monasca => common/wrappers}/__init__.py | 0 .../{ => common}/wrappers/test_network.py | 18 +- .../murano => environment}/__init__.py | 0 .../platforms}/__init__.py | 0 .../platforms/test_existing.py | 16 +- tests/unit/fakes.py | 4 +- .../neutron => task/cleanup}/__init__.py | 0 tests/unit/{ => task}/cleanup/test_base.py | 2 +- tests/unit/{ => task}/cleanup/test_manager.py | 4 +- .../unit/{ => task}/cleanup/test_resources.py | 12 +- .../nova => task/contexts}/__init__.py | 0 .../contexts/ceilometer}/__init__.py | 0 .../contexts/ceilometer/test_samples.py | 8 +- .../contexts/cinder}/__init__.py | 0 .../contexts/cinder/test_volume_types.py | 6 +- .../contexts/cinder/test_volumes.py | 8 +- .../contexts/cleanup}/__init__.py | 0 .../{ => task}/contexts/cleanup/test_admin.py | 8 +- .../{ => task}/contexts/cleanup/test_user.py | 8 +- .../contexts/dataplane}/__init__.py | 0 .../contexts/dataplane/test_heat.py | 4 +- .../contexts/designate}/__init__.py | 0 .../contexts/designate/test_zones.py | 8 +- .../contexts/glance}/__init__.py | 0 .../{ => task}/contexts/glance/test_images.py | 10 +- .../{hook => task/contexts/heat}/__init__.py | 0 .../{ => task}/contexts/heat/test_stacks.py | 8 +- .../contexts/keystone}/__init__.py | 0 .../contexts/keystone/test_roles.py | 4 +- .../contexts/keystone/test_users.py | 8 +- .../contexts/magnum}/__init__.py | 0 .../contexts/magnum/test_ca_certs.py | 6 +- .../contexts/magnum/test_cluster_templates.py | 8 +- .../contexts/magnum/test_clusters.py | 8 +- .../contexts/manila}/__init__.py | 0 .../manila/test_manila_security_services.py | 6 +- .../manila/test_manila_share_networks.py | 20 +- .../contexts/manila/test_manila_shares.py | 10 +- .../contexts/monasca}/__init__.py | 0 .../contexts/monasca/test_metrics.py | 6 +- .../contexts/murano}/__init__.py | 0 .../murano/test_murano_environments.py | 8 +- .../contexts/murano/test_murano_packages.py | 4 +- .../contexts/network}/__init__.py | 0 .../contexts/network/test_allow_ssh.py | 8 +- .../contexts/network/test_existing_network.py | 8 +- .../contexts/network/test_network.py | 12 +- .../network/test_networking_agents.py | 6 +- .../contexts/network/test_routers.py | 8 +- .../contexts/neutron}/__init__.py | 0 .../{ => task}/contexts/neutron/test_lbaas.py | 18 +- .../glance => task/contexts/nova}/__init__.py | 0 .../{ => task}/contexts/nova/test_flavors.py | 4 +- .../{ => task}/contexts/nova/test_keypairs.py | 6 +- .../{ => task}/contexts/nova/test_servers.py | 10 +- .../contexts/quotas}/__init__.py | 0 .../contexts/quotas/test_cinder_quotas.py | 2 +- .../contexts/quotas/test_designate_quotas.py | 2 +- .../contexts/quotas/test_manila_quotas.py | 2 +- .../contexts/quotas/test_neutron_quotas.py | 2 +- .../contexts/quotas/test_nova_quotas.py | 2 +- .../{ => task}/contexts/quotas/test_quotas.py | 12 +- .../heat => task/contexts/sahara}/__init__.py | 0 .../contexts/sahara/test_sahara_cluster.py | 6 +- .../contexts/sahara/test_sahara_image.py | 8 +- .../sahara/test_sahara_input_data_sources.py | 6 +- .../sahara/test_sahara_job_binaries.py | 6 +- .../sahara/test_sahara_output_data_sources.py | 6 +- .../contexts/senlin}/__init__.py | 0 .../contexts/senlin/test_profiles.py | 4 +- .../contexts/swift}/__init__.py | 0 .../{ => task}/contexts/swift/test_objects.py | 16 +- .../{ => task}/contexts/swift/test_utils.py | 10 +- .../{ => task}/contexts/test_api_versions.py | 4 +- .../contexts/vm}/__init__.py | 0 .../contexts/vm/test_custom_image.py | 4 +- .../vm/test_image_command_customizer.py | 4 +- .../contexts/watcher}/__init__.py | 0 .../contexts/watcher/test_audit_templates.py | 10 +- .../manila => task/hooks}/__init__.py | 0 .../hooks}/test_fault_injection.py | 2 +- .../mistral => task/scenarios}/__init__.py | 0 .../scenarios/authenticate}/__init__.py | 0 .../authenticate/test_authenticate.py | 2 +- .../scenarios/barbican}/__init__.py | 0 .../scenarios/barbican/test_containers.py | 6 +- .../scenarios/barbican/test_orders.py | 6 +- .../scenarios/barbican/test_secrets.py | 6 +- .../scenarios/barbican/test_utils.py | 6 +- .../scenarios/ceilometer}/__init__.py | 0 .../scenarios/ceilometer/test_alarms.py | 2 +- .../scenarios/ceilometer/test_events.py | 4 +- .../scenarios/ceilometer/test_meters.py | 4 +- .../scenarios/ceilometer/test_queries.py | 2 +- .../scenarios/ceilometer/test_resources.py | 4 +- .../scenarios/ceilometer/test_samples.py | 4 +- .../scenarios/ceilometer/test_stats.py | 2 +- .../scenarios/ceilometer/test_traits.py | 4 +- .../scenarios/ceilometer/test_utils.py | 4 +- .../scenarios/cinder}/__init__.py | 0 .../scenarios/cinder/test_qos_specs.py | 4 +- .../{ => task}/scenarios/cinder/test_utils.py | 4 +- .../scenarios/cinder/test_volume_backups.py | 4 +- .../scenarios/cinder/test_volume_types.py | 6 +- .../scenarios/cinder/test_volumes.py | 8 +- .../scenarios/designate}/__init__.py | 0 .../scenarios/designate/test_basic.py | 4 +- .../scenarios/designate/test_utils.py | 4 +- .../scenarios/glance}/__init__.py | 0 .../scenarios/glance/test_images.py | 8 +- .../scenarios/gnocchi}/__init__.py | 0 .../scenarios/gnocchi/test_archive_policy.py | 4 +- .../gnocchi/test_archive_policy_rule.py | 4 +- .../scenarios/gnocchi/test_capabilities.py | 4 +- .../scenarios/gnocchi/test_metric.py | 4 +- .../scenarios/gnocchi/test_resource.py | 4 +- .../scenarios/gnocchi/test_resource_type.py | 4 +- .../scenarios/gnocchi/test_status.py | 4 +- .../scenarios/gnocchi/test_utils.py | 4 +- .../swift => task/scenarios/heat}/__init__.py | 0 .../{ => task}/scenarios/heat/test_stacks.py | 4 +- .../{ => task}/scenarios/heat/test_utils.py | 4 +- .../vm => task/scenarios/ironic}/__init__.py | 0 .../{ => task}/scenarios/ironic/test_nodes.py | 2 +- .../{ => task}/scenarios/ironic/test_utils.py | 4 +- .../scenarios/keystone}/__init__.py | 0 .../scenarios/keystone/test_basic.py | 4 +- .../scenarios/loadbalancer}/__init__.py | 0 .../loadbalancer/test_loadbalancers.py | 4 +- .../scenarios/loadbalancer/test_pools.py | 4 +- .../scenarios/loadbalancer/test_utils.py | 4 +- .../scenarios/magnum}/__init__.py | 0 .../magnum/test_cluster_templates.py | 2 +- .../scenarios/magnum/test_clusters.py | 2 +- .../scenarios/magnum/test_k8s_pods.py | 10 +- .../{ => task}/scenarios/magnum/test_utils.py | 4 +- .../scenarios/manila}/__init__.py | 0 .../scenarios/manila/test_shares.py | 2 +- .../{ => task}/scenarios/manila/test_utils.py | 4 +- .../scenarios/mistral}/__init__.py | 0 .../scenarios/mistral/test_executions.py | 6 +- .../scenarios/mistral/test_utils.py | 4 +- .../scenarios/mistral/test_workbooks.py | 4 +- .../scenarios/monasca}/__init__.py | 0 .../scenarios/monasca/test_metrics.py | 2 +- .../scenarios/monasca/test_utils.py | 2 +- .../scenarios/murano}/__init__.py | 0 .../scenarios/murano/test_environments.py | 4 +- .../scenarios/murano/test_packages.py | 4 +- .../{ => task}/scenarios/murano/test_utils.py | 4 +- .../scenarios/neutron}/__init__.py | 0 .../scenarios/neutron/test_bgpvpn.py | 2 +- .../scenarios/neutron/test_loadbalancer_v1.py | 2 +- .../scenarios/neutron/test_loadbalancer_v2.py | 2 +- .../scenarios/neutron/test_network.py | 4 +- .../scenarios/neutron/test_security_groups.py | 2 +- .../scenarios/neutron/test_trunk.py | 2 +- .../scenarios/neutron/test_utils.py | 4 +- .../scenarios/nova}/__init__.py | 0 .../{ => task}/scenarios/nova/test_agents.py | 2 +- .../scenarios/nova/test_aggregates.py | 2 +- .../scenarios/nova/test_availability_zones.py | 2 +- .../{ => task}/scenarios/nova/test_flavors.py | 2 +- .../scenarios/nova/test_hypervisors.py | 2 +- .../scenarios/nova/test_keypairs.py | 2 +- .../scenarios/nova/test_server_groups.py | 4 +- .../{ => task}/scenarios/nova/test_servers.py | 22 +- .../scenarios/nova/test_services.py | 2 +- .../{ => task}/scenarios/nova/test_utils.py | 10 +- .../scenarios/quotas}/__init__.py | 0 .../scenarios/quotas/test_quotas.py | 2 +- .../{ => task}/scenarios/quotas/test_utils.py | 2 +- .../scenarios/sahara}/__init__.py | 0 .../scenarios/sahara/test_clusters.py | 4 +- .../{ => task}/scenarios/sahara/test_jobs.py | 4 +- .../sahara/test_node_group_templates.py | 4 +- .../{ => task}/scenarios/sahara/test_utils.py | 6 +- .../scenarios/senlin}/__init__.py | 0 .../scenarios/senlin/test_clusters.py | 2 +- .../{ => task}/scenarios/senlin/test_utils.py | 4 +- tests/unit/task/scenarios/swift/__init__.py | 0 .../scenarios/swift/test_objects.py | 2 +- .../{ => task}/scenarios/swift/test_utils.py | 4 +- tests/unit/task/scenarios/vm/__init__.py | 0 .../{ => task}/scenarios/vm/test_utils.py | 4 +- .../{ => task}/scenarios/vm/test_vmtasks.py | 6 +- .../task/scenarios/vm/workloads/__init__.py | 0 .../scenarios/vm/workloads}/test_siege.py | 14 +- tests/unit/task/scenarios/watcher/__init__.py | 0 .../scenarios/watcher/test_basic.py | 2 +- .../scenarios/watcher/test_utils.py | 2 +- tests/unit/task/scenarios/zaqar/__init__.py | 0 .../{ => task}/scenarios/zaqar/test_basic.py | 4 +- .../{ => task}/scenarios/zaqar/test_utils.py | 4 +- tests/unit/{ => task}/test_scenario.py | 6 +- tests/unit/{ => task}/test_types.py | 4 +- tests/unit/task/ui/__init__.py | 0 .../ui/charts}/test_osprofilerchart.py | 4 +- tests/unit/test.py | 2 +- .../unit/verification/tempest/test_config.py | 2 +- .../unit/verification/tempest/test_context.py | 16 +- 504 files changed, 1148 insertions(+), 915 deletions(-) create mode 100644 rally_openstack/_compat.py rename rally_openstack/{cfg => common}/__init__.py (100%) rename rally_openstack/{cleanup => common/cfg}/__init__.py (100%) rename rally_openstack/{ => common}/cfg/cinder.py (100%) rename rally_openstack/{ => common}/cfg/cleanup.py (100%) rename rally_openstack/{ => common}/cfg/glance.py (100%) rename rally_openstack/{ => common}/cfg/heat.py (100%) rename rally_openstack/{ => common}/cfg/ironic.py (100%) rename rally_openstack/{ => common}/cfg/keystone_roles.py (100%) rename rally_openstack/{ => common}/cfg/keystone_users.py (100%) rename rally_openstack/{ => common}/cfg/magnum.py (100%) rename rally_openstack/{ => common}/cfg/manila.py (100%) rename rally_openstack/{ => common}/cfg/mistral.py (100%) rename rally_openstack/{ => common}/cfg/monasca.py (100%) rename rally_openstack/{ => common}/cfg/murano.py (100%) rename rally_openstack/{ => common}/cfg/neutron.py (100%) rename rally_openstack/{ => common}/cfg/nova.py (100%) rename rally_openstack/{ => common}/cfg/octavia.py (100%) rename rally_openstack/{ => common}/cfg/opts.py (54%) rename rally_openstack/{ => common}/cfg/osclients.py (100%) rename rally_openstack/{ => common}/cfg/profiler.py (100%) rename rally_openstack/{ => common}/cfg/sahara.py (100%) rename rally_openstack/{ => common}/cfg/senlin.py (100%) rename rally_openstack/{ => common}/cfg/tempest.py (100%) rename rally_openstack/{ => common}/cfg/vm.py (100%) rename rally_openstack/{ => common}/cfg/watcher.py (100%) rename rally_openstack/{ => common}/consts.py (100%) rename rally_openstack/{ => common}/credential.py (98%) rename rally_openstack/{ => common}/exceptions.py (100%) rename rally_openstack/{ => common}/osclients.py (99%) rename rally_openstack/{ => common}/service.py (100%) rename rally_openstack/{contexts => common/services}/__init__.py (100%) rename rally_openstack/{contexts/ceilometer => common/services/gnocchi}/__init__.py (100%) rename rally_openstack/{ => common}/services/gnocchi/metric.py (100%) rename rally_openstack/{contexts/cinder => common/services/grafana}/__init__.py (100%) rename rally_openstack/{ => common}/services/grafana/grafana.py (100%) rename rally_openstack/{contexts/cleanup => common/services/heat}/__init__.py (100%) rename rally_openstack/{ => common}/services/heat/main.py (100%) rename rally_openstack/{contexts/dataplane => common/services/identity}/__init__.py (100%) rename rally_openstack/{ => common}/services/identity/identity.py (100%) rename rally_openstack/{ => common}/services/identity/keystone_common.py (98%) rename rally_openstack/{ => common}/services/identity/keystone_v2.py (98%) rename rally_openstack/{ => common}/services/identity/keystone_v3.py (98%) rename rally_openstack/{contexts/designate => common/services/image}/__init__.py (100%) rename rally_openstack/{ => common}/services/image/glance_common.py (97%) rename rally_openstack/{ => common}/services/image/glance_v1.py (98%) rename rally_openstack/{ => common}/services/image/glance_v2.py (98%) rename rally_openstack/{ => common}/services/image/image.py (100%) rename rally_openstack/{contexts/glance => common/services/key_manager}/__init__.py (100%) rename rally_openstack/{ => common}/services/key_manager/barbican.py (100%) rename rally_openstack/{contexts/heat => common/services/loadbalancer}/__init__.py (100%) rename rally_openstack/{ => common}/services/loadbalancer/octavia.py (100%) rename rally_openstack/{contexts/keystone => common/services/storage}/__init__.py (100%) rename rally_openstack/{ => common}/services/storage/block.py (100%) rename rally_openstack/{ => common}/services/storage/cinder_common.py (99%) rename rally_openstack/{ => common}/services/storage/cinder_v1.py (98%) rename rally_openstack/{ => common}/services/storage/cinder_v2.py (98%) rename rally_openstack/{ => common}/services/storage/cinder_v3.py (99%) rename rally_openstack/{ => common}/validators.py (99%) rename rally_openstack/{contexts/magnum => common/wrappers}/__init__.py (100%) rename rally_openstack/{ => common}/wrappers/network.py (99%) rename rally_openstack/{contexts/manila => environment}/__init__.py (100%) rename rally_openstack/{contexts/monasca => environment/platforms}/__init__.py (100%) rename rally_openstack/{ => environment}/platforms/existing.py (99%) rename rally_openstack/{contexts/murano => task/cleanup}/__init__.py (100%) rename rally_openstack/{ => task}/cleanup/base.py (100%) rename rally_openstack/{ => task}/cleanup/manager.py (99%) rename rally_openstack/{ => task}/cleanup/resources.py (98%) rename rally_openstack/{contexts/network => task/contexts}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/api_versions.py (99%) rename rally_openstack/{contexts/neutron => task/contexts/ceilometer}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/ceilometer/samples.py (98%) rename rally_openstack/{contexts/nova => task/contexts/cinder}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/cinder/volume_types.py (90%) rename rally_openstack/{ => task}/contexts/cinder/volumes.py (92%) rename rally_openstack/{contexts/quotas => task/contexts/cleanup}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/cleanup/admin.py (90%) rename rally_openstack/{ => task}/contexts/cleanup/base.py (94%) rename rally_openstack/{ => task}/contexts/cleanup/user.py (90%) rename rally_openstack/{contexts/sahara => task/contexts/dataplane}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/dataplane/heat.py (96%) rename rally_openstack/{contexts/senlin => task/contexts/designate}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/designate/zones.py (92%) rename rally_openstack/{contexts/swift => task/contexts/glance}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/glance/images.py (97%) rename rally_openstack/{contexts/vm => task/contexts/heat}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/heat/stacks.py (94%) rename rally_openstack/{contexts/watcher => task/contexts/keystone}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/keystone/roles.py (96%) rename rally_openstack/{ => task}/contexts/keystone/users.py (98%) rename rally_openstack/{embedcharts => task/contexts/magnum}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/magnum/ca_certs.py (97%) rename rally_openstack/{ => task}/contexts/magnum/cluster_templates.py (95%) rename rally_openstack/{ => task}/contexts/magnum/clusters.py (91%) rename rally_openstack/{hook => task/contexts/manila}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/manila/consts.py (100%) rename rally_openstack/{ => task}/contexts/manila/manila_security_services.py (92%) rename rally_openstack/{ => task}/contexts/manila/manila_share_networks.py (96%) rename rally_openstack/{ => task}/contexts/manila/manila_shares.py (92%) rename rally_openstack/{platforms => task/contexts/monasca}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/monasca/metrics.py (96%) rename rally_openstack/{scenarios => task/contexts/murano}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/murano/murano_environments.py (92%) rename rally_openstack/{ => task}/contexts/murano/murano_packages.py (92%) rename rally_openstack/{scenarios/authenticate => task/contexts/network}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/network/allow_ssh.py (98%) rename rally_openstack/{ => task}/contexts/network/existing_network.py (90%) rename rally_openstack/{ => task}/contexts/network/networking_agents.py (94%) rename rally_openstack/{ => task}/contexts/network/networks.py (96%) rename rally_openstack/{ => task}/contexts/network/routers.py (95%) rename rally_openstack/{scenarios/barbican => task/contexts/neutron}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/neutron/lbaas.py (95%) rename rally_openstack/{scenarios/ceilometer => task/contexts/nova}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/nova/flavors.py (96%) rename rally_openstack/{ => task}/contexts/nova/keypairs.py (95%) rename rally_openstack/{ => task}/contexts/nova/servers.py (96%) rename rally_openstack/{scenarios/cinder => task/contexts/quotas}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/quotas/cinder_quotas.py (100%) rename rally_openstack/{ => task}/contexts/quotas/designate_quotas.py (100%) rename rally_openstack/{ => task}/contexts/quotas/manila_quotas.py (100%) rename rally_openstack/{ => task}/contexts/quotas/neutron_quotas.py (100%) rename rally_openstack/{ => task}/contexts/quotas/nova_quotas.py (100%) rename rally_openstack/{ => task}/contexts/quotas/quotas.py (91%) rename rally_openstack/{scenarios/designate => task/contexts/sahara}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/sahara/sahara_cluster.py (97%) rename rally_openstack/{ => task}/contexts/sahara/sahara_image.py (94%) rename rally_openstack/{ => task}/contexts/sahara/sahara_input_data_sources.py (94%) rename rally_openstack/{ => task}/contexts/sahara/sahara_job_binaries.py (95%) rename rally_openstack/{ => task}/contexts/sahara/sahara_output_data_sources.py (93%) rename rally_openstack/{scenarios/elasticsearch => task/contexts/senlin}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/senlin/profiles.py (95%) rename rally_openstack/{scenarios/glance => task/contexts/swift}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/swift/objects.py (97%) rename rally_openstack/{ => task}/contexts/swift/utils.py (98%) rename rally_openstack/{scenarios/gnocchi => task/contexts/vm}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/vm/custom_image.py (97%) rename rally_openstack/{ => task}/contexts/vm/image_command_customizer.py (97%) rename rally_openstack/{scenarios/grafana => task/contexts/watcher}/__init__.py (100%) rename rally_openstack/{ => task}/contexts/watcher/audit_templates.py (94%) rename rally_openstack/{scenarios/heat => task/hooks}/__init__.py (100%) rename rally_openstack/{hook => task/hooks}/fault_injection.py (98%) rename rally_openstack/{ => task}/scenario.py (99%) rename rally_openstack/{scenarios/ironic => task/scenarios}/__init__.py (100%) rename rally_openstack/{scenarios/keystone => task/scenarios/authenticate}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/authenticate/authenticate.py (98%) rename rally_openstack/{scenarios/magnum => task/scenarios/barbican}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/barbican/containers.py (95%) rename rally_openstack/{ => task}/scenarios/barbican/orders.py (94%) rename rally_openstack/{ => task}/scenarios/barbican/secrets.py (97%) rename rally_openstack/{ => task}/scenarios/barbican/utils.py (92%) rename rally_openstack/{scenarios/manila => task/scenarios/ceilometer}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/ceilometer/alarms.py (98%) rename rally_openstack/{ => task}/scenarios/ceilometer/events.py (94%) rename rally_openstack/{ => task}/scenarios/ceilometer/meters.py (94%) rename rally_openstack/{ => task}/scenarios/ceilometer/queries.py (96%) rename rally_openstack/{ => task}/scenarios/ceilometer/resources.py (96%) rename rally_openstack/{ => task}/scenarios/ceilometer/samples.py (94%) rename rally_openstack/{ => task}/scenarios/ceilometer/stats.py (95%) rename rally_openstack/{ => task}/scenarios/ceilometer/traits.py (92%) rename rally_openstack/{ => task}/scenarios/ceilometer/utils.py (99%) rename rally_openstack/{scenarios/mistral => task/scenarios/cinder}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/cinder/qos_specs.py (97%) rename rally_openstack/{ => task}/scenarios/cinder/utils.py (93%) rename rally_openstack/{ => task}/scenarios/cinder/volume_backups.py (94%) rename rally_openstack/{ => task}/scenarios/cinder/volume_types.py (98%) rename rally_openstack/{ => task}/scenarios/cinder/volumes.py (99%) rename rally_openstack/{scenarios/monasca => task/scenarios/designate}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/designate/basic.py (98%) rename rally_openstack/{ => task}/scenarios/designate/utils.py (99%) rename rally_openstack/{ => task}/scenarios/dummy.py (95%) rename rally_openstack/{scenarios/murano => task/scenarios/elasticsearch}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/elasticsearch/logging.py (96%) rename rally_openstack/{scenarios/neutron => task/scenarios/glance}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/glance/images.py (98%) rename rally_openstack/{scenarios/nova => task/scenarios/gnocchi}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/gnocchi/archive_policy.py (94%) rename rally_openstack/{ => task}/scenarios/gnocchi/archive_policy_rule.py (94%) rename rally_openstack/{ => task}/scenarios/gnocchi/capabilities.py (87%) rename rally_openstack/{ => task}/scenarios/gnocchi/metric.py (94%) rename rally_openstack/{ => task}/scenarios/gnocchi/resource.py (92%) rename rally_openstack/{ => task}/scenarios/gnocchi/resource_type.py (93%) rename rally_openstack/{ => task}/scenarios/gnocchi/status.py (87%) rename rally_openstack/{ => task}/scenarios/gnocchi/utils.py (92%) rename rally_openstack/{scenarios/octavia => task/scenarios/grafana}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/grafana/metrics.py (97%) rename rally_openstack/{scenarios/quotas => task/scenarios/heat}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/heat/stacks.py (99%) rename rally_openstack/{ => task}/scenarios/heat/utils.py (99%) rename rally_openstack/{scenarios/sahara => task/scenarios/ironic}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/ironic/nodes.py (96%) rename rally_openstack/{ => task}/scenarios/ironic/utils.py (99%) rename rally_openstack/{scenarios/senlin => task/scenarios/keystone}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/keystone/basic.py (99%) rename rally_openstack/{scenarios/swift => task/scenarios/magnum}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/magnum/cluster_templates.py (92%) rename rally_openstack/{ => task}/scenarios/magnum/clusters.py (93%) rename rally_openstack/{ => task}/scenarios/magnum/k8s_pods.py (94%) rename rally_openstack/{ => task}/scenarios/magnum/utils.py (99%) rename rally_openstack/{scenarios/vm => task/scenarios/manila}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/manila/shares.py (98%) rename rally_openstack/{ => task}/scenarios/manila/utils.py (99%) rename rally_openstack/{scenarios/watcher => task/scenarios/mistral}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/mistral/executions.py (96%) rename rally_openstack/{ => task}/scenarios/mistral/utils.py (99%) rename rally_openstack/{ => task}/scenarios/mistral/workbooks.py (94%) rename rally_openstack/{scenarios/zaqar => task/scenarios/monasca}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/monasca/metrics.py (88%) rename rally_openstack/{ => task}/scenarios/monasca/utils.py (97%) rename rally_openstack/{services => task/scenarios/murano}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/murano/environments.py (95%) rename rally_openstack/{ => task}/scenarios/murano/packages.py (97%) rename rally_openstack/{ => task}/scenarios/murano/utils.py (99%) rename rally_openstack/{services/gnocchi => task/scenarios/neutron}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/neutron/bgpvpn.py (99%) rename rally_openstack/{ => task}/scenarios/neutron/loadbalancer_v1.py (98%) rename rally_openstack/{ => task}/scenarios/neutron/loadbalancer_v2.py (93%) rename rally_openstack/{ => task}/scenarios/neutron/network.py (99%) rename rally_openstack/{ => task}/scenarios/neutron/security_groups.py (98%) rename rally_openstack/{ => task}/scenarios/neutron/trunk.py (97%) rename rally_openstack/{ => task}/scenarios/neutron/utils.py (99%) rename rally_openstack/{services/grafana => task/scenarios/nova}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/nova/agents.py (90%) rename rally_openstack/{ => task}/scenarios/nova/aggregates.py (98%) rename rally_openstack/{ => task}/scenarios/nova/availability_zones.py (90%) rename rally_openstack/{ => task}/scenarios/nova/flavors.py (98%) rename rally_openstack/{ => task}/scenarios/nova/hypervisors.py (97%) rename rally_openstack/{ => task}/scenarios/nova/keypairs.py (97%) rename rally_openstack/{ => task}/scenarios/nova/server_groups.py (97%) rename rally_openstack/{ => task}/scenarios/nova/servers.py (99%) rename rally_openstack/{ => task}/scenarios/nova/services.py (90%) rename rally_openstack/{ => task}/scenarios/nova/utils.py (99%) rename rally_openstack/{services/heat => task/scenarios/octavia}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/octavia/loadbalancers.py (98%) rename rally_openstack/{ => task}/scenarios/octavia/pools.py (97%) rename rally_openstack/{ => task}/scenarios/octavia/utils.py (92%) rename rally_openstack/{services/identity => task/scenarios/quotas}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/quotas/quotas.py (97%) rename rally_openstack/{ => task}/scenarios/quotas/utils.py (98%) rename rally_openstack/{services/image => task/scenarios/sahara}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/sahara/clusters.py (98%) rename rally_openstack/{ => task}/scenarios/sahara/consts.py (100%) rename rally_openstack/{ => task}/scenarios/sahara/jobs.py (97%) rename rally_openstack/{ => task}/scenarios/sahara/node_group_templates.py (97%) rename rally_openstack/{ => task}/scenarios/sahara/utils.py (99%) rename rally_openstack/{services/key_manager => task/scenarios/senlin}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/senlin/clusters.py (93%) rename rally_openstack/{ => task}/scenarios/senlin/utils.py (99%) rename rally_openstack/{services/loadbalancer => task/scenarios/swift}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/swift/objects.py (97%) rename rally_openstack/{ => task}/scenarios/swift/utils.py (99%) rename rally_openstack/{services/storage => task/scenarios/vm}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/vm/utils.py (98%) rename rally_openstack/{ => task}/scenarios/vm/vmtasks.py (98%) rename rally_openstack/{workload => task/scenarios/vm/workloads}/__init__.py (100%) rename rally_openstack/{workload => task/scenarios/vm/workloads}/siege.py (100%) rename rally_openstack/{wrappers => task/scenarios/watcher}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/watcher/basic.py (96%) rename rally_openstack/{ => task}/scenarios/watcher/utils.py (98%) rename {tests/unit/cleanup => rally_openstack/task/scenarios/zaqar}/__init__.py (100%) rename rally_openstack/{ => task}/scenarios/zaqar/basic.py (95%) rename rally_openstack/{ => task}/scenarios/zaqar/utils.py (98%) rename rally_openstack/{ => task}/types.py (98%) rename {tests/unit/contexts => rally_openstack/task/ui}/__init__.py (100%) rename {tests/unit/contexts/ceilometer => rally_openstack/task/ui/charts}/__init__.py (100%) rename rally_openstack/{embedcharts => task/ui/charts}/osprofilerchart.py (100%) rename tests/unit/{contexts/cinder => common}/__init__.py (100%) rename tests/unit/{contexts/cleanup => common/services}/__init__.py (100%) rename tests/unit/{contexts/dataplane => common/services/barbican}/__init__.py (100%) rename tests/unit/{ => common}/services/barbican/test_secrets.py (99%) rename tests/unit/{contexts/designate => common/services/gnocchi}/__init__.py (100%) rename tests/unit/{ => common}/services/gnocchi/test_metric.py (99%) rename tests/unit/{contexts/glance => common/services/heat}/__init__.py (100%) rename tests/unit/{ => common}/services/heat/test_main.py (89%) rename tests/unit/{contexts/heat => common/services/identity}/__init__.py (100%) rename tests/unit/{ => common}/services/identity/test_identity.py (98%) rename tests/unit/{ => common}/services/identity/test_keystone_common.py (97%) rename tests/unit/{ => common}/services/identity/test_keystone_v2.py (99%) rename tests/unit/{ => common}/services/identity/test_keystone_v3.py (99%) rename tests/unit/{contexts/keystone => common/services/image}/__init__.py (100%) rename tests/unit/{ => common}/services/image/test_glance_common.py (96%) rename tests/unit/{ => common}/services/image/test_glance_v1.py (97%) rename tests/unit/{ => common}/services/image/test_glance_v2.py (98%) rename tests/unit/{ => common}/services/image/test_image.py (95%) rename tests/unit/{contexts/magnum => common/services/loadbalancer}/__init__.py (100%) rename tests/unit/{ => common}/services/loadbalancer/test_octavia.py (99%) rename tests/unit/{contexts/manila => common/services/storage}/__init__.py (100%) rename tests/unit/{ => common}/services/storage/test_block.py (99%) rename tests/unit/{ => common}/services/storage/test_cinder_common.py (99%) rename tests/unit/{ => common}/services/storage/test_cinder_v1.py (99%) rename tests/unit/{ => common}/services/storage/test_cinder_v2.py (99%) rename tests/unit/{ => common}/services/storage/test_cinder_v3.py (99%) rename tests/unit/{ => common}/test_credential.py (95%) rename tests/unit/{ => common}/test_osclients.py (99%) rename tests/unit/{ => common}/test_validators.py (99%) rename tests/unit/{contexts/monasca => common/wrappers}/__init__.py (100%) rename tests/unit/{ => common}/wrappers/test_network.py (97%) rename tests/unit/{contexts/murano => environment}/__init__.py (100%) rename tests/unit/{contexts/network => environment/platforms}/__init__.py (100%) rename tests/unit/{ => environment}/platforms/test_existing.py (97%) rename tests/unit/{contexts/neutron => task/cleanup}/__init__.py (100%) rename tests/unit/{ => task}/cleanup/test_base.py (98%) rename tests/unit/{ => task}/cleanup/test_manager.py (99%) rename tests/unit/{ => task}/cleanup/test_resources.py (99%) rename tests/unit/{contexts/nova => task/contexts}/__init__.py (100%) rename tests/unit/{contexts/quotas => task/contexts/ceilometer}/__init__.py (100%) rename tests/unit/{ => task}/contexts/ceilometer/test_samples.py (96%) rename tests/unit/{contexts/sahara => task/contexts/cinder}/__init__.py (100%) rename tests/unit/{ => task}/contexts/cinder/test_volume_types.py (92%) rename tests/unit/{ => task}/contexts/cinder/test_volumes.py (95%) rename tests/unit/{contexts/senlin => task/contexts/cleanup}/__init__.py (100%) rename tests/unit/{ => task}/contexts/cleanup/test_admin.py (93%) rename tests/unit/{ => task}/contexts/cleanup/test_user.py (93%) rename tests/unit/{contexts/swift => task/contexts/dataplane}/__init__.py (100%) rename tests/unit/{ => task}/contexts/dataplane/test_heat.py (97%) rename tests/unit/{contexts/vm => task/contexts/designate}/__init__.py (100%) rename tests/unit/{ => task}/contexts/designate/test_zones.py (95%) rename tests/unit/{contexts/watcher => task/contexts/glance}/__init__.py (100%) rename tests/unit/{ => task}/contexts/glance/test_images.py (97%) rename tests/unit/{hook => task/contexts/heat}/__init__.py (100%) rename tests/unit/{ => task}/contexts/heat/test_stacks.py (94%) rename tests/unit/{platforms => task/contexts/keystone}/__init__.py (100%) rename tests/unit/{ => task}/contexts/keystone/test_roles.py (98%) rename tests/unit/{ => task}/contexts/keystone/test_users.py (99%) rename tests/unit/{scenarios => task/contexts/magnum}/__init__.py (100%) rename tests/unit/{ => task}/contexts/magnum/test_ca_certs.py (98%) rename tests/unit/{ => task}/contexts/magnum/test_cluster_templates.py (94%) rename tests/unit/{ => task}/contexts/magnum/test_clusters.py (96%) rename tests/unit/{scenarios/authenticate => task/contexts/manila}/__init__.py (100%) rename tests/unit/{ => task}/contexts/manila/test_manila_security_services.py (96%) rename tests/unit/{ => task}/contexts/manila/test_manila_share_networks.py (96%) rename tests/unit/{ => task}/contexts/manila/test_manila_shares.py (96%) rename tests/unit/{scenarios/barbican => task/contexts/monasca}/__init__.py (100%) rename tests/unit/{ => task}/contexts/monasca/test_metrics.py (95%) rename tests/unit/{scenarios/ceilometer => task/contexts/murano}/__init__.py (100%) rename tests/unit/{ => task}/contexts/murano/test_murano_environments.py (92%) rename tests/unit/{ => task}/contexts/murano/test_murano_packages.py (97%) rename tests/unit/{scenarios/cinder => task/contexts/network}/__init__.py (100%) rename tests/unit/{ => task}/contexts/network/test_allow_ssh.py (94%) rename tests/unit/{ => task}/contexts/network/test_existing_network.py (91%) rename tests/unit/{ => task}/contexts/network/test_network.py (92%) rename tests/unit/{ => task}/contexts/network/test_networking_agents.py (90%) rename tests/unit/{ => task}/contexts/network/test_routers.py (92%) rename tests/unit/{scenarios/designate => task/contexts/neutron}/__init__.py (100%) rename tests/unit/{ => task}/contexts/neutron/test_lbaas.py (92%) rename tests/unit/{scenarios/glance => task/contexts/nova}/__init__.py (100%) rename tests/unit/{ => task}/contexts/nova/test_flavors.py (97%) rename tests/unit/{ => task}/contexts/nova/test_keypairs.py (95%) rename tests/unit/{ => task}/contexts/nova/test_servers.py (96%) rename tests/unit/{scenarios/gnocchi => task/contexts/quotas}/__init__.py (100%) rename tests/unit/{ => task}/contexts/quotas/test_cinder_quotas.py (97%) rename tests/unit/{ => task}/contexts/quotas/test_designate_quotas.py (96%) rename tests/unit/{ => task}/contexts/quotas/test_manila_quotas.py (97%) rename tests/unit/{ => task}/contexts/quotas/test_neutron_quotas.py (97%) rename tests/unit/{ => task}/contexts/quotas/test_nova_quotas.py (97%) rename tests/unit/{ => task}/contexts/quotas/test_quotas.py (97%) rename tests/unit/{scenarios/heat => task/contexts/sahara}/__init__.py (100%) rename tests/unit/{ => task}/contexts/sahara/test_sahara_cluster.py (96%) rename tests/unit/{ => task}/contexts/sahara/test_sahara_image.py (96%) rename tests/unit/{ => task}/contexts/sahara/test_sahara_input_data_sources.py (97%) rename tests/unit/{ => task}/contexts/sahara/test_sahara_job_binaries.py (96%) rename tests/unit/{ => task}/contexts/sahara/test_sahara_output_data_sources.py (96%) rename tests/unit/{scenarios/ironic => task/contexts/senlin}/__init__.py (100%) rename tests/unit/{ => task}/contexts/senlin/test_profiles.py (96%) rename tests/unit/{scenarios/keystone => task/contexts/swift}/__init__.py (100%) rename tests/unit/{ => task}/contexts/swift/test_objects.py (94%) rename tests/unit/{ => task}/contexts/swift/test_utils.py (96%) rename tests/unit/{ => task}/contexts/test_api_versions.py (97%) rename tests/unit/{scenarios/loadbalancer => task/contexts/vm}/__init__.py (100%) rename tests/unit/{ => task}/contexts/vm/test_custom_image.py (98%) rename tests/unit/{ => task}/contexts/vm/test_image_command_customizer.py (96%) rename tests/unit/{scenarios/magnum => task/contexts/watcher}/__init__.py (100%) rename tests/unit/{ => task}/contexts/watcher/test_audit_templates.py (92%) rename tests/unit/{scenarios/manila => task/hooks}/__init__.py (100%) rename tests/unit/{hook => task/hooks}/test_fault_injection.py (98%) rename tests/unit/{scenarios/mistral => task/scenarios}/__init__.py (100%) rename tests/unit/{scenarios/monasca => task/scenarios/authenticate}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/authenticate/test_authenticate.py (98%) rename tests/unit/{scenarios/murano => task/scenarios/barbican}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/barbican/test_containers.py (95%) rename tests/unit/{ => task}/scenarios/barbican/test_orders.py (94%) rename tests/unit/{ => task}/scenarios/barbican/test_secrets.py (95%) rename tests/unit/{ => task}/scenarios/barbican/test_utils.py (89%) rename tests/unit/{scenarios/neutron => task/scenarios/ceilometer}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/ceilometer/test_alarms.py (98%) rename tests/unit/{ => task}/scenarios/ceilometer/test_events.py (96%) rename tests/unit/{ => task}/scenarios/ceilometer/test_meters.py (96%) rename tests/unit/{ => task}/scenarios/ceilometer/test_queries.py (98%) rename tests/unit/{ => task}/scenarios/ceilometer/test_resources.py (97%) rename tests/unit/{ => task}/scenarios/ceilometer/test_samples.py (96%) rename tests/unit/{ => task}/scenarios/ceilometer/test_stats.py (96%) rename tests/unit/{ => task}/scenarios/ceilometer/test_traits.py (94%) rename tests/unit/{ => task}/scenarios/ceilometer/test_utils.py (99%) rename tests/unit/{scenarios/nova => task/scenarios/cinder}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/cinder/test_qos_specs.py (97%) rename tests/unit/{ => task}/scenarios/cinder/test_utils.py (94%) rename tests/unit/{ => task}/scenarios/cinder/test_volume_backups.py (93%) rename tests/unit/{ => task}/scenarios/cinder/test_volume_types.py (98%) rename tests/unit/{ => task}/scenarios/cinder/test_volumes.py (99%) rename tests/unit/{scenarios/quotas => task/scenarios/designate}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/designate/test_basic.py (99%) rename tests/unit/{ => task}/scenarios/designate/test_utils.py (98%) rename tests/unit/{scenarios/sahara => task/scenarios/glance}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/glance/test_images.py (97%) rename tests/unit/{scenarios/senlin => task/scenarios/gnocchi}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/gnocchi/test_archive_policy.py (95%) rename tests/unit/{ => task}/scenarios/gnocchi/test_archive_policy_rule.py (94%) rename tests/unit/{ => task}/scenarios/gnocchi/test_capabilities.py (91%) rename tests/unit/{ => task}/scenarios/gnocchi/test_metric.py (94%) rename tests/unit/{ => task}/scenarios/gnocchi/test_resource.py (94%) rename tests/unit/{ => task}/scenarios/gnocchi/test_resource_type.py (94%) rename tests/unit/{ => task}/scenarios/gnocchi/test_status.py (91%) rename tests/unit/{ => task}/scenarios/gnocchi/test_utils.py (92%) rename tests/unit/{scenarios/swift => task/scenarios/heat}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/heat/test_stacks.py (99%) rename tests/unit/{ => task}/scenarios/heat/test_utils.py (99%) rename tests/unit/{scenarios/vm => task/scenarios/ironic}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/ironic/test_nodes.py (98%) rename tests/unit/{ => task}/scenarios/ironic/test_utils.py (96%) rename tests/unit/{scenarios/watcher => task/scenarios/keystone}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/keystone/test_basic.py (99%) rename tests/unit/{scenarios/zaqar => task/scenarios/loadbalancer}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/loadbalancer/test_loadbalancers.py (97%) rename tests/unit/{ => task}/scenarios/loadbalancer/test_pools.py (97%) rename tests/unit/{ => task}/scenarios/loadbalancer/test_utils.py (92%) rename tests/unit/{services => task/scenarios/magnum}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/magnum/test_cluster_templates.py (94%) rename tests/unit/{ => task}/scenarios/magnum/test_clusters.py (98%) rename tests/unit/{ => task}/scenarios/magnum/test_k8s_pods.py (90%) rename tests/unit/{ => task}/scenarios/magnum/test_utils.py (99%) rename tests/unit/{services/barbican => task/scenarios/manila}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/manila/test_shares.py (99%) rename tests/unit/{ => task}/scenarios/manila/test_utils.py (99%) rename tests/unit/{services/gnocchi => task/scenarios/mistral}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/mistral/test_executions.py (97%) rename tests/unit/{ => task}/scenarios/mistral/test_utils.py (98%) rename tests/unit/{ => task}/scenarios/mistral/test_workbooks.py (94%) rename tests/unit/{services/heat => task/scenarios/monasca}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/monasca/test_metrics.py (94%) rename tests/unit/{ => task}/scenarios/monasca/test_utils.py (96%) rename tests/unit/{services/identity => task/scenarios/murano}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/murano/test_environments.py (97%) rename tests/unit/{ => task}/scenarios/murano/test_packages.py (96%) rename tests/unit/{ => task}/scenarios/murano/test_utils.py (98%) rename tests/unit/{services/image => task/scenarios/neutron}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/neutron/test_bgpvpn.py (99%) rename tests/unit/{ => task}/scenarios/neutron/test_loadbalancer_v1.py (99%) rename tests/unit/{ => task}/scenarios/neutron/test_loadbalancer_v2.py (96%) rename tests/unit/{ => task}/scenarios/neutron/test_network.py (99%) rename tests/unit/{ => task}/scenarios/neutron/test_security_groups.py (99%) rename tests/unit/{ => task}/scenarios/neutron/test_trunk.py (99%) rename tests/unit/{ => task}/scenarios/neutron/test_utils.py (99%) rename tests/unit/{services/loadbalancer => task/scenarios/nova}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/nova/test_agents.py (94%) rename tests/unit/{ => task}/scenarios/nova/test_aggregates.py (99%) rename tests/unit/{ => task}/scenarios/nova/test_availability_zones.py (93%) rename tests/unit/{ => task}/scenarios/nova/test_flavors.py (99%) rename tests/unit/{ => task}/scenarios/nova/test_hypervisors.py (97%) rename tests/unit/{ => task}/scenarios/nova/test_keypairs.py (98%) rename tests/unit/{ => task}/scenarios/nova/test_server_groups.py (98%) rename tests/unit/{ => task}/scenarios/nova/test_servers.py (98%) rename tests/unit/{ => task}/scenarios/nova/test_services.py (94%) rename tests/unit/{ => task}/scenarios/nova/test_utils.py (99%) rename tests/unit/{services/storage => task/scenarios/quotas}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/quotas/test_quotas.py (98%) rename tests/unit/{ => task}/scenarios/quotas/test_utils.py (98%) rename tests/unit/{workload => task/scenarios/sahara}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/sahara/test_clusters.py (98%) rename tests/unit/{ => task}/scenarios/sahara/test_jobs.py (98%) rename tests/unit/{ => task}/scenarios/sahara/test_node_group_templates.py (95%) rename tests/unit/{ => task}/scenarios/sahara/test_utils.py (99%) rename tests/unit/{wrappers => task/scenarios/senlin}/__init__.py (100%) rename tests/unit/{ => task}/scenarios/senlin/test_clusters.py (95%) rename tests/unit/{ => task}/scenarios/senlin/test_utils.py (98%) create mode 100644 tests/unit/task/scenarios/swift/__init__.py rename tests/unit/{ => task}/scenarios/swift/test_objects.py (99%) rename tests/unit/{ => task}/scenarios/swift/test_utils.py (98%) create mode 100644 tests/unit/task/scenarios/vm/__init__.py rename tests/unit/{ => task}/scenarios/vm/test_utils.py (99%) rename tests/unit/{ => task}/scenarios/vm/test_vmtasks.py (99%) create mode 100644 tests/unit/task/scenarios/vm/workloads/__init__.py rename tests/unit/{workload => task/scenarios/vm/workloads}/test_siege.py (87%) create mode 100644 tests/unit/task/scenarios/watcher/__init__.py rename tests/unit/{ => task}/scenarios/watcher/test_basic.py (97%) rename tests/unit/{ => task}/scenarios/watcher/test_utils.py (98%) create mode 100644 tests/unit/task/scenarios/zaqar/__init__.py rename tests/unit/{ => task}/scenarios/zaqar/test_basic.py (94%) rename tests/unit/{ => task}/scenarios/zaqar/test_utils.py (96%) rename tests/unit/{ => task}/test_scenario.py (97%) rename tests/unit/{ => task}/test_types.py (99%) create mode 100644 tests/unit/task/ui/__init__.py rename tests/unit/{embedcharts => task/ui/charts}/test_osprofilerchart.py (98%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e20f492b..92f80ca8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -34,6 +34,30 @@ Changed * Bump min supported Rally framework version (rally>=3.0.0) +Deprecated +~~~~~~~~~~ + +* a huge project restructure had happened. Old paths are deprecated now. + + rally_openstack.cfg -> rally_openstack.common.cfg + rally_openstack.cleanup -> rally_openstack.task.cleanup + rally_openstack.consts -> rally_openstack.common.consts + rally_openstack.contexts -> rally_openstack.task.contexts + rally_openstack.credential -> rally_openstack.common.credential + rally_openstack.embedcharts -> rally_openstack.task.ui.charts + rally_openstack.exceptions -> rally_openstack.common.exceptions + rally_openstack.hook -> rally_openstack.task.hooks + rally_openstack.osclients -> rally_openstack.common.osclients + rally_openstack.platforms -> rally_openstack.environment.platforms + rally_openstack.scenario -> rally_openstack.task.scenario + rally_openstack.scenarios -> rally_openstack.task.scenarios + rally_openstack.service -> rally_openstack.common.service + rally_openstack.services -> rally_openstack.common.services + rally_openstack.types -> rally_openstack.task.types + rally_openstack.validators -> rally_openstack.common.validators + rally_openstack.wrappers -> rally_openstack.common.wrappers + + Removed ~~~~~~~ diff --git a/rally_openstack/__init__.py b/rally_openstack/__init__.py index 6ff34694..a6a173f6 100644 --- a/rally_openstack/__init__.py +++ b/rally_openstack/__init__.py @@ -15,9 +15,17 @@ import pbr.version from rally.common import version as __rally_version__ +from rally_openstack import _compat + __rally_version__ = __rally_version__.version_info.semantic_version() __rally_version__ = __rally_version__.version_tuple() __version_info__ = pbr.version.VersionInfo("rally-openstack") __version__ = __version_info__.version_string() __version_tuple__ = __version_info__.semantic_version().version_tuple() + + +# WARNING: IF YOU ARE LOOKING FOR SOME PHYSICALLY UNEXISTING MODULES THAT CAN +# BE IMPORTED (FOR BACKWARD COMPATIBILITY), PLEASE CHECK THE NEXT FUNCTION +# HAPPY DEBUGGING!! +_compat.init() diff --git a/rally_openstack/_compat.py b/rally_openstack/_compat.py new file mode 100644 index 00000000..7184f422 --- /dev/null +++ b/rally_openstack/_compat.py @@ -0,0 +1,199 @@ +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# 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 importlib +import importlib.abc +import importlib.machinery +import importlib.util +import sys +import warnings + + +class _MoveSpec(object): + def __init__(self, deprecated, new, release): + """init moved module info + + :param deprecated: a module name that is deprecated + :param new: a module name that should be used instead + :param release: A release when the module was deprecated + """ + self.deprecated = deprecated + self.new = new + self.deprecated_path = self.deprecated.replace(".", "/") + self.new_path = self.new.replace(".", "/") + self.release = release + + def get_new_name(self, fullname): + """Get the new name for deprecated module.""" + return fullname.replace(self.deprecated, self.new) + + def get_deprecated_path(self, path): + """Get a path to the deprecated module.""" + return path.replace(self.new_path, self.deprecated_path) + + +_MOVES = [ + _MoveSpec( + deprecated="rally_openstack.embedcharts", + new="rally_openstack.task.ui.charts", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.cleanup", + new="rally_openstack.task.cleanup", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.contexts", + new="rally_openstack.task.contexts", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.hook", + new="rally_openstack.task.hooks", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.scenario", + new="rally_openstack.task.scenario", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.scenarios", + new="rally_openstack.task.scenarios", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.types", + new="rally_openstack.task.types", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.platforms", + new="rally_openstack.environment.platforms", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.service", + new="rally_openstack.common.service", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.services", + new="rally_openstack.common.services", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.validators", + new="rally_openstack.common.validators", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.wrappers", + new="rally_openstack.common.wrappers", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.credential", + new="rally_openstack.common.credential", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.osclients", + new="rally_openstack.common.osclients", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.consts", + new="rally_openstack.common.consts", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.exceptions", + new="rally_openstack.common.exceptions", + release="2.0.0" + ), + _MoveSpec( + deprecated="rally_openstack.cfg", + new="rally_openstack.common.cfg", + release="2.0.0" + ), +] + + +class ModuleLoader(object): + + def __init__(self, move_spec): + self.move_spec = move_spec + + def create_module(self, spec): + # Python interpreter will use the default module creator in case of + # None return value. + return None + + def exec_module(self, module): + """Module executor.""" + full_name = self.move_spec.get_new_name(module.__name__) + + original_module = importlib.import_module(full_name) + + if original_module.__file__.endswith("__init__.py"): + # NOTE(andreykurilin): In case we need to list submodules the + # next code can be used: + # + # import pkgutil + # + # for m in pkgutil.iter_modules(original_module.__path__): + # module.__dict__[m.name] = importlib.import_module( + # f"{full_name}.{m.name}") + + module.__path__ = [ + self.move_spec.get_deprecated_path(original_module.__path__[0]) + ] + for item in dir(original_module): + if item.startswith("_"): + continue + module.__dict__[item] = original_module.__dict__[item] + module.__file__ = self.move_spec.get_deprecated_path( + original_module.__file__) + + return module + + +class ModulesMovementsHandler(importlib.abc.MetaPathFinder): + + @classmethod + def _process_spec(cls, fullname, spec): + """Make module spec and print warning message if needed.""" + if spec.deprecated == fullname: + warnings.warn( + f"Module {fullname} is deprecated since rally-openstack " + f"{spec.release}. Use {spec.get_new_name(fullname)} instead.", + stacklevel=3 + ) + + return importlib.machinery.ModuleSpec(fullname, ModuleLoader(spec)) + + @classmethod + def find_spec(cls, fullname, path=None, target=None): + """This functions is what gets executed by the loader.""" + for spec in _MOVES: + if spec.deprecated in fullname: + return cls._process_spec(fullname, spec) + + +def init(): + """Adds our custom module loader.""" + + sys.meta_path.append(ModulesMovementsHandler()) diff --git a/rally_openstack/cfg/__init__.py b/rally_openstack/common/__init__.py similarity index 100% rename from rally_openstack/cfg/__init__.py rename to rally_openstack/common/__init__.py diff --git a/rally_openstack/cleanup/__init__.py b/rally_openstack/common/cfg/__init__.py similarity index 100% rename from rally_openstack/cleanup/__init__.py rename to rally_openstack/common/cfg/__init__.py diff --git a/rally_openstack/cfg/cinder.py b/rally_openstack/common/cfg/cinder.py similarity index 100% rename from rally_openstack/cfg/cinder.py rename to rally_openstack/common/cfg/cinder.py diff --git a/rally_openstack/cfg/cleanup.py b/rally_openstack/common/cfg/cleanup.py similarity index 100% rename from rally_openstack/cfg/cleanup.py rename to rally_openstack/common/cfg/cleanup.py diff --git a/rally_openstack/cfg/glance.py b/rally_openstack/common/cfg/glance.py similarity index 100% rename from rally_openstack/cfg/glance.py rename to rally_openstack/common/cfg/glance.py diff --git a/rally_openstack/cfg/heat.py b/rally_openstack/common/cfg/heat.py similarity index 100% rename from rally_openstack/cfg/heat.py rename to rally_openstack/common/cfg/heat.py diff --git a/rally_openstack/cfg/ironic.py b/rally_openstack/common/cfg/ironic.py similarity index 100% rename from rally_openstack/cfg/ironic.py rename to rally_openstack/common/cfg/ironic.py diff --git a/rally_openstack/cfg/keystone_roles.py b/rally_openstack/common/cfg/keystone_roles.py similarity index 100% rename from rally_openstack/cfg/keystone_roles.py rename to rally_openstack/common/cfg/keystone_roles.py diff --git a/rally_openstack/cfg/keystone_users.py b/rally_openstack/common/cfg/keystone_users.py similarity index 100% rename from rally_openstack/cfg/keystone_users.py rename to rally_openstack/common/cfg/keystone_users.py diff --git a/rally_openstack/cfg/magnum.py b/rally_openstack/common/cfg/magnum.py similarity index 100% rename from rally_openstack/cfg/magnum.py rename to rally_openstack/common/cfg/magnum.py diff --git a/rally_openstack/cfg/manila.py b/rally_openstack/common/cfg/manila.py similarity index 100% rename from rally_openstack/cfg/manila.py rename to rally_openstack/common/cfg/manila.py diff --git a/rally_openstack/cfg/mistral.py b/rally_openstack/common/cfg/mistral.py similarity index 100% rename from rally_openstack/cfg/mistral.py rename to rally_openstack/common/cfg/mistral.py diff --git a/rally_openstack/cfg/monasca.py b/rally_openstack/common/cfg/monasca.py similarity index 100% rename from rally_openstack/cfg/monasca.py rename to rally_openstack/common/cfg/monasca.py diff --git a/rally_openstack/cfg/murano.py b/rally_openstack/common/cfg/murano.py similarity index 100% rename from rally_openstack/cfg/murano.py rename to rally_openstack/common/cfg/murano.py diff --git a/rally_openstack/cfg/neutron.py b/rally_openstack/common/cfg/neutron.py similarity index 100% rename from rally_openstack/cfg/neutron.py rename to rally_openstack/common/cfg/neutron.py diff --git a/rally_openstack/cfg/nova.py b/rally_openstack/common/cfg/nova.py similarity index 100% rename from rally_openstack/cfg/nova.py rename to rally_openstack/common/cfg/nova.py diff --git a/rally_openstack/cfg/octavia.py b/rally_openstack/common/cfg/octavia.py similarity index 100% rename from rally_openstack/cfg/octavia.py rename to rally_openstack/common/cfg/octavia.py diff --git a/rally_openstack/cfg/opts.py b/rally_openstack/common/cfg/opts.py similarity index 54% rename from rally_openstack/cfg/opts.py rename to rally_openstack/common/cfg/opts.py index 1e31eb1c..9c122caf 100644 --- a/rally_openstack/cfg/opts.py +++ b/rally_openstack/common/cfg/opts.py @@ -13,33 +13,33 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack.cfg import cinder -from rally_openstack.cfg import glance -from rally_openstack.cfg import heat -from rally_openstack.cfg import ironic -from rally_openstack.cfg import magnum -from rally_openstack.cfg import manila -from rally_openstack.cfg import mistral -from rally_openstack.cfg import monasca -from rally_openstack.cfg import murano -from rally_openstack.cfg import neutron -from rally_openstack.cfg import nova -from rally_openstack.cfg import octavia -from rally_openstack.cfg import osclients -from rally_openstack.cfg import profiler -from rally_openstack.cfg import sahara -from rally_openstack.cfg import senlin -from rally_openstack.cfg import vm -from rally_openstack.cfg import watcher +from rally_openstack.common.cfg import cinder +from rally_openstack.common.cfg import glance +from rally_openstack.common.cfg import heat +from rally_openstack.common.cfg import ironic +from rally_openstack.common.cfg import magnum +from rally_openstack.common.cfg import manila +from rally_openstack.common.cfg import mistral +from rally_openstack.common.cfg import monasca +from rally_openstack.common.cfg import murano +from rally_openstack.common.cfg import neutron +from rally_openstack.common.cfg import nova +from rally_openstack.common.cfg import octavia +from rally_openstack.common.cfg import osclients +from rally_openstack.common.cfg import profiler +from rally_openstack.common.cfg import sahara +from rally_openstack.common.cfg import senlin +from rally_openstack.common.cfg import vm +from rally_openstack.common.cfg import watcher -from rally_openstack.cfg import tempest +from rally_openstack.common.cfg import tempest -from rally_openstack.cfg import keystone_roles -from rally_openstack.cfg import keystone_users +from rally_openstack.common.cfg import keystone_roles +from rally_openstack.common.cfg import keystone_users -from rally_openstack.cfg import cleanup +from rally_openstack.common.cfg import cleanup -from rally_openstack.embedcharts import osprofilerchart +from rally_openstack.task.ui.charts import osprofilerchart def list_opts(): diff --git a/rally_openstack/cfg/osclients.py b/rally_openstack/common/cfg/osclients.py similarity index 100% rename from rally_openstack/cfg/osclients.py rename to rally_openstack/common/cfg/osclients.py diff --git a/rally_openstack/cfg/profiler.py b/rally_openstack/common/cfg/profiler.py similarity index 100% rename from rally_openstack/cfg/profiler.py rename to rally_openstack/common/cfg/profiler.py diff --git a/rally_openstack/cfg/sahara.py b/rally_openstack/common/cfg/sahara.py similarity index 100% rename from rally_openstack/cfg/sahara.py rename to rally_openstack/common/cfg/sahara.py diff --git a/rally_openstack/cfg/senlin.py b/rally_openstack/common/cfg/senlin.py similarity index 100% rename from rally_openstack/cfg/senlin.py rename to rally_openstack/common/cfg/senlin.py diff --git a/rally_openstack/cfg/tempest.py b/rally_openstack/common/cfg/tempest.py similarity index 100% rename from rally_openstack/cfg/tempest.py rename to rally_openstack/common/cfg/tempest.py diff --git a/rally_openstack/cfg/vm.py b/rally_openstack/common/cfg/vm.py similarity index 100% rename from rally_openstack/cfg/vm.py rename to rally_openstack/common/cfg/vm.py diff --git a/rally_openstack/cfg/watcher.py b/rally_openstack/common/cfg/watcher.py similarity index 100% rename from rally_openstack/cfg/watcher.py rename to rally_openstack/common/cfg/watcher.py diff --git a/rally_openstack/consts.py b/rally_openstack/common/consts.py similarity index 100% rename from rally_openstack/consts.py rename to rally_openstack/common/consts.py diff --git a/rally_openstack/credential.py b/rally_openstack/common/credential.py similarity index 98% rename from rally_openstack/credential.py rename to rally_openstack/common/credential.py index f3bbba8b..c0c36bb3 100644 --- a/rally_openstack/credential.py +++ b/rally_openstack/common/credential.py @@ -76,7 +76,7 @@ class OpenStackCredential(dict): # this method is mostly used by validation step. let's refactor it and # deprecated this def clients(self, api_info=None): - from rally_openstack import osclients + from rally_openstack.common import osclients return osclients.Clients(self, api_info=api_info, cache=self._clients_cache) diff --git a/rally_openstack/exceptions.py b/rally_openstack/common/exceptions.py similarity index 100% rename from rally_openstack/exceptions.py rename to rally_openstack/common/exceptions.py diff --git a/rally_openstack/osclients.py b/rally_openstack/common/osclients.py similarity index 99% rename from rally_openstack/osclients.py rename to rally_openstack/common/osclients.py index 40a3fa5a..29c083a3 100644 --- a/rally_openstack/osclients.py +++ b/rally_openstack/common/osclients.py @@ -23,8 +23,8 @@ from rally.common import logging from rally.common.plugin import plugin from rally import exceptions -from rally_openstack import consts -from rally_openstack import credential as oscred +from rally_openstack.common import consts +from rally_openstack.common import credential as oscred LOG = logging.getLogger(__name__) @@ -875,7 +875,7 @@ class Clients(object): @classmethod def create_from_env(cls): - from rally_openstack import credential + from rally_openstack.common import credential from rally_openstack.platforms import existing spec = existing.OpenStack.create_spec_from_sys_environ(os.environ) diff --git a/rally_openstack/service.py b/rally_openstack/common/service.py similarity index 100% rename from rally_openstack/service.py rename to rally_openstack/common/service.py diff --git a/rally_openstack/contexts/__init__.py b/rally_openstack/common/services/__init__.py similarity index 100% rename from rally_openstack/contexts/__init__.py rename to rally_openstack/common/services/__init__.py diff --git a/rally_openstack/contexts/ceilometer/__init__.py b/rally_openstack/common/services/gnocchi/__init__.py similarity index 100% rename from rally_openstack/contexts/ceilometer/__init__.py rename to rally_openstack/common/services/gnocchi/__init__.py diff --git a/rally_openstack/services/gnocchi/metric.py b/rally_openstack/common/services/gnocchi/metric.py similarity index 100% rename from rally_openstack/services/gnocchi/metric.py rename to rally_openstack/common/services/gnocchi/metric.py diff --git a/rally_openstack/contexts/cinder/__init__.py b/rally_openstack/common/services/grafana/__init__.py similarity index 100% rename from rally_openstack/contexts/cinder/__init__.py rename to rally_openstack/common/services/grafana/__init__.py diff --git a/rally_openstack/services/grafana/grafana.py b/rally_openstack/common/services/grafana/grafana.py similarity index 100% rename from rally_openstack/services/grafana/grafana.py rename to rally_openstack/common/services/grafana/grafana.py diff --git a/rally_openstack/contexts/cleanup/__init__.py b/rally_openstack/common/services/heat/__init__.py similarity index 100% rename from rally_openstack/contexts/cleanup/__init__.py rename to rally_openstack/common/services/heat/__init__.py diff --git a/rally_openstack/services/heat/main.py b/rally_openstack/common/services/heat/main.py similarity index 100% rename from rally_openstack/services/heat/main.py rename to rally_openstack/common/services/heat/main.py diff --git a/rally_openstack/contexts/dataplane/__init__.py b/rally_openstack/common/services/identity/__init__.py similarity index 100% rename from rally_openstack/contexts/dataplane/__init__.py rename to rally_openstack/common/services/identity/__init__.py diff --git a/rally_openstack/services/identity/identity.py b/rally_openstack/common/services/identity/identity.py similarity index 100% rename from rally_openstack/services/identity/identity.py rename to rally_openstack/common/services/identity/identity.py diff --git a/rally_openstack/services/identity/keystone_common.py b/rally_openstack/common/services/identity/keystone_common.py similarity index 98% rename from rally_openstack/services/identity/keystone_common.py rename to rally_openstack/common/services/identity/keystone_common.py index bbaabc47..6e6bd981 100644 --- a/rally_openstack/services/identity/keystone_common.py +++ b/rally_openstack/common/services/identity/keystone_common.py @@ -14,8 +14,8 @@ from rally.task import atomic -from rally_openstack import osclients -from rally_openstack.services.identity import identity +from rally_openstack.common import osclients +from rally_openstack.common.services.identity import identity class UnifiedKeystoneMixin(object): diff --git a/rally_openstack/services/identity/keystone_v2.py b/rally_openstack/common/services/identity/keystone_v2.py similarity index 98% rename from rally_openstack/services/identity/keystone_v2.py rename to rally_openstack/common/services/identity/keystone_v2.py index 09b81562..d8d4be5b 100644 --- a/rally_openstack/services/identity/keystone_v2.py +++ b/rally_openstack/common/services/identity/keystone_v2.py @@ -16,9 +16,9 @@ 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_openstack.common import service +from rally_openstack.common.services.identity import identity +from rally_openstack.common.services.identity import keystone_common @service.service("keystone", service_type="identity", version="2") diff --git a/rally_openstack/services/identity/keystone_v3.py b/rally_openstack/common/services/identity/keystone_v3.py similarity index 98% rename from rally_openstack/services/identity/keystone_v3.py rename to rally_openstack/common/services/identity/keystone_v3.py index 37684923..095a7494 100644 --- a/rally_openstack/services/identity/keystone_v3.py +++ b/rally_openstack/common/services/identity/keystone_v3.py @@ -16,9 +16,9 @@ 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_openstack.common import service +from rally_openstack.common.services.identity import identity +from rally_openstack.common.services.identity import keystone_common LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/designate/__init__.py b/rally_openstack/common/services/image/__init__.py similarity index 100% rename from rally_openstack/contexts/designate/__init__.py rename to rally_openstack/common/services/image/__init__.py diff --git a/rally_openstack/services/image/glance_common.py b/rally_openstack/common/services/image/glance_common.py similarity index 97% rename from rally_openstack/services/image/glance_common.py rename to rally_openstack/common/services/image/glance_common.py index 9c8b6b0c..8449c8e7 100644 --- a/rally_openstack/services/image/glance_common.py +++ b/rally_openstack/common/services/image/glance_common.py @@ -15,7 +15,7 @@ from rally import exceptions from rally.task import atomic -from rally_openstack.services.image import image as image_service +from rally_openstack.common.services.image import image as image_service class GlanceMixin(object): diff --git a/rally_openstack/services/image/glance_v1.py b/rally_openstack/common/services/image/glance_v1.py similarity index 98% rename from rally_openstack/services/image/glance_v1.py rename to rally_openstack/common/services/image/glance_v1.py index c667943e..d475f871 100644 --- a/rally_openstack/services/image/glance_v1.py +++ b/rally_openstack/common/services/image/glance_v1.py @@ -19,9 +19,9 @@ 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_openstack.common import service +from rally_openstack.common.services.image import glance_common +from rally_openstack.common.services.image import image CONF = cfg.CONF diff --git a/rally_openstack/services/image/glance_v2.py b/rally_openstack/common/services/image/glance_v2.py similarity index 98% rename from rally_openstack/services/image/glance_v2.py rename to rally_openstack/common/services/image/glance_v2.py index 7e6226c4..3a1162a0 100644 --- a/rally_openstack/services/image/glance_v2.py +++ b/rally_openstack/common/services/image/glance_v2.py @@ -21,9 +21,9 @@ 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_openstack.common import service +from rally_openstack.common.services.image import glance_common +from rally_openstack.common.services.image import image CONF = cfg.CONF diff --git a/rally_openstack/services/image/image.py b/rally_openstack/common/services/image/image.py similarity index 100% rename from rally_openstack/services/image/image.py rename to rally_openstack/common/services/image/image.py diff --git a/rally_openstack/contexts/glance/__init__.py b/rally_openstack/common/services/key_manager/__init__.py similarity index 100% rename from rally_openstack/contexts/glance/__init__.py rename to rally_openstack/common/services/key_manager/__init__.py diff --git a/rally_openstack/services/key_manager/barbican.py b/rally_openstack/common/services/key_manager/barbican.py similarity index 100% rename from rally_openstack/services/key_manager/barbican.py rename to rally_openstack/common/services/key_manager/barbican.py diff --git a/rally_openstack/contexts/heat/__init__.py b/rally_openstack/common/services/loadbalancer/__init__.py similarity index 100% rename from rally_openstack/contexts/heat/__init__.py rename to rally_openstack/common/services/loadbalancer/__init__.py diff --git a/rally_openstack/services/loadbalancer/octavia.py b/rally_openstack/common/services/loadbalancer/octavia.py similarity index 100% rename from rally_openstack/services/loadbalancer/octavia.py rename to rally_openstack/common/services/loadbalancer/octavia.py diff --git a/rally_openstack/contexts/keystone/__init__.py b/rally_openstack/common/services/storage/__init__.py similarity index 100% rename from rally_openstack/contexts/keystone/__init__.py rename to rally_openstack/common/services/storage/__init__.py diff --git a/rally_openstack/services/storage/block.py b/rally_openstack/common/services/storage/block.py similarity index 100% rename from rally_openstack/services/storage/block.py rename to rally_openstack/common/services/storage/block.py diff --git a/rally_openstack/services/storage/cinder_common.py b/rally_openstack/common/services/storage/cinder_common.py similarity index 99% rename from rally_openstack/services/storage/cinder_common.py rename to rally_openstack/common/services/storage/cinder_common.py index 1e1d1049..138e1307 100755 --- a/rally_openstack/services/storage/cinder_common.py +++ b/rally_openstack/common/services/storage/cinder_common.py @@ -18,8 +18,8 @@ from rally import exceptions 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 +from rally_openstack.common.services.image import image +from rally_openstack.common.services.storage import block CONF = block.CONF diff --git a/rally_openstack/services/storage/cinder_v1.py b/rally_openstack/common/services/storage/cinder_v1.py similarity index 98% rename from rally_openstack/services/storage/cinder_v1.py rename to rally_openstack/common/services/storage/cinder_v1.py index 4858e54b..98d85961 100755 --- a/rally_openstack/services/storage/cinder_v1.py +++ b/rally_openstack/common/services/storage/cinder_v1.py @@ -17,9 +17,9 @@ 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_openstack.common import service +from rally_openstack.common.services.storage import block +from rally_openstack.common.services.storage import cinder_common CONF = block.CONF diff --git a/rally_openstack/services/storage/cinder_v2.py b/rally_openstack/common/services/storage/cinder_v2.py similarity index 98% rename from rally_openstack/services/storage/cinder_v2.py rename to rally_openstack/common/services/storage/cinder_v2.py index 70888c01..8d14272e 100755 --- a/rally_openstack/services/storage/cinder_v2.py +++ b/rally_openstack/common/services/storage/cinder_v2.py @@ -17,9 +17,9 @@ 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_openstack.common import service +from rally_openstack.common.services.storage import block +from rally_openstack.common.services.storage import cinder_common CONF = block.CONF diff --git a/rally_openstack/services/storage/cinder_v3.py b/rally_openstack/common/services/storage/cinder_v3.py similarity index 99% rename from rally_openstack/services/storage/cinder_v3.py rename to rally_openstack/common/services/storage/cinder_v3.py index fa5c30fd..8f120740 100755 --- a/rally_openstack/services/storage/cinder_v3.py +++ b/rally_openstack/common/services/storage/cinder_v3.py @@ -17,9 +17,9 @@ 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_openstack.common import service +from rally_openstack.common.services.storage import block +from rally_openstack.common.services.storage import cinder_common CONF = block.CONF diff --git a/rally_openstack/validators.py b/rally_openstack/common/validators.py similarity index 99% rename from rally_openstack/validators.py rename to rally_openstack/common/validators.py index 68244df4..17e41721 100644 --- a/rally_openstack/validators.py +++ b/rally_openstack/common/validators.py @@ -25,10 +25,10 @@ from rally import exceptions from rally.plugins.common import validators from rally.task import types -from rally_openstack import consts -from rally_openstack.contexts.keystone import roles -from rally_openstack.contexts.nova import flavors as flavors_ctx -from rally_openstack import types as openstack_types +from rally_openstack.common import consts +from rally_openstack.task.contexts.keystone import roles +from rally_openstack.task.contexts.nova import flavors as flavors_ctx +from rally_openstack.task import types as openstack_types LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/magnum/__init__.py b/rally_openstack/common/wrappers/__init__.py similarity index 100% rename from rally_openstack/contexts/magnum/__init__.py rename to rally_openstack/common/wrappers/__init__.py diff --git a/rally_openstack/wrappers/network.py b/rally_openstack/common/wrappers/network.py similarity index 99% rename from rally_openstack/wrappers/network.py rename to rally_openstack/common/wrappers/network.py index f8bba394..48fd70cb 100644 --- a/rally_openstack/wrappers/network.py +++ b/rally_openstack/common/wrappers/network.py @@ -23,7 +23,7 @@ from rally.common import logging from rally.common import utils from rally import exceptions -from rally_openstack import consts +from rally_openstack.common import consts LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/manila/__init__.py b/rally_openstack/environment/__init__.py similarity index 100% rename from rally_openstack/contexts/manila/__init__.py rename to rally_openstack/environment/__init__.py diff --git a/rally_openstack/contexts/monasca/__init__.py b/rally_openstack/environment/platforms/__init__.py similarity index 100% rename from rally_openstack/contexts/monasca/__init__.py rename to rally_openstack/environment/platforms/__init__.py diff --git a/rally_openstack/platforms/existing.py b/rally_openstack/environment/platforms/existing.py similarity index 99% rename from rally_openstack/platforms/existing.py rename to rally_openstack/environment/platforms/existing.py index c59dbc94..2688132b 100644 --- a/rally_openstack/platforms/existing.py +++ b/rally_openstack/environment/platforms/existing.py @@ -19,7 +19,7 @@ import traceback from rally.common import cfg from rally.common import logging from rally.env import platform -from rally_openstack import osclients +from rally_openstack.common import osclients LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/murano/__init__.py b/rally_openstack/task/cleanup/__init__.py similarity index 100% rename from rally_openstack/contexts/murano/__init__.py rename to rally_openstack/task/cleanup/__init__.py diff --git a/rally_openstack/cleanup/base.py b/rally_openstack/task/cleanup/base.py similarity index 100% rename from rally_openstack/cleanup/base.py rename to rally_openstack/task/cleanup/base.py diff --git a/rally_openstack/cleanup/manager.py b/rally_openstack/task/cleanup/manager.py similarity index 99% rename from rally_openstack/cleanup/manager.py rename to rally_openstack/task/cleanup/manager.py index a56c364d..b9adcbbd 100644 --- a/rally_openstack/cleanup/manager.py +++ b/rally_openstack/task/cleanup/manager.py @@ -20,7 +20,7 @@ from rally.common import logging from rally.common.plugin import discover from rally.common.plugin import plugin from rally.common import utils as rutils -from rally_openstack.cleanup import base +from rally_openstack.task.cleanup import base LOG = logging.getLogger(__name__) diff --git a/rally_openstack/cleanup/resources.py b/rally_openstack/task/cleanup/resources.py similarity index 98% rename from rally_openstack/cleanup/resources.py rename to rally_openstack/task/cleanup/resources.py index 36105096..d8f37983 100644 --- a/rally_openstack/cleanup/resources.py +++ b/rally_openstack/task/cleanup/resources.py @@ -17,10 +17,10 @@ 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_openstack.common.services.identity import identity +from rally_openstack.common.services.image import glance_v2 +from rally_openstack.common.services.image import image +from rally_openstack.task.cleanup import base CONF = cfg.CONF @@ -293,8 +293,8 @@ class OctaviaMixIn(NeutronMixin): @property def _client(self): # TODO(andreykurilin): use proper helper class from - # rally_openstack.services as soon as it will have unified style - # of arguments across all methods + # rally_openstack.common.services as soon as it will have unified + # style of arguments across all methods client = self.admin or self.user return getattr(client, self._service)() diff --git a/rally_openstack/contexts/network/__init__.py b/rally_openstack/task/contexts/__init__.py similarity index 100% rename from rally_openstack/contexts/network/__init__.py rename to rally_openstack/task/contexts/__init__.py diff --git a/rally_openstack/contexts/api_versions.py b/rally_openstack/task/contexts/api_versions.py similarity index 99% rename from rally_openstack/contexts/api_versions.py rename to rally_openstack/task/contexts/api_versions.py index e0c25330..33ad9aa8 100644 --- a/rally_openstack/contexts/api_versions.py +++ b/rally_openstack/task/contexts/api_versions.py @@ -15,8 +15,8 @@ import random from rally.common import validation from rally import exceptions -from rally_openstack import consts -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import osclients from rally_openstack.task import context diff --git a/rally_openstack/contexts/neutron/__init__.py b/rally_openstack/task/contexts/ceilometer/__init__.py similarity index 100% rename from rally_openstack/contexts/neutron/__init__.py rename to rally_openstack/task/contexts/ceilometer/__init__.py diff --git a/rally_openstack/contexts/ceilometer/samples.py b/rally_openstack/task/contexts/ceilometer/samples.py similarity index 98% rename from rally_openstack/contexts/ceilometer/samples.py rename to rally_openstack/task/contexts/ceilometer/samples.py index 667f5e22..05bef665 100644 --- a/rally_openstack/contexts/ceilometer/samples.py +++ b/rally_openstack/task/contexts/ceilometer/samples.py @@ -18,9 +18,9 @@ from rally.common import logging from rally.common import validation from rally import exceptions -from rally_openstack import consts -from rally_openstack.scenarios.ceilometer import utils as ceilo_utils +from rally_openstack.common import consts from rally_openstack.task import context +from rally_openstack.task.scenarios.ceilometer import utils as ceilo_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/nova/__init__.py b/rally_openstack/task/contexts/cinder/__init__.py similarity index 100% rename from rally_openstack/contexts/nova/__init__.py rename to rally_openstack/task/contexts/cinder/__init__.py diff --git a/rally_openstack/contexts/cinder/volume_types.py b/rally_openstack/task/contexts/cinder/volume_types.py similarity index 90% rename from rally_openstack/contexts/cinder/volume_types.py rename to rally_openstack/task/contexts/cinder/volume_types.py index ca317cb5..8041b073 100644 --- a/rally_openstack/contexts/cinder/volume_types.py +++ b/rally_openstack/task/contexts/cinder/volume_types.py @@ -16,10 +16,10 @@ from rally.common import logging from rally.common import utils from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.services.storage import block +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.services.storage import block +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context diff --git a/rally_openstack/contexts/cinder/volumes.py b/rally_openstack/task/contexts/cinder/volumes.py similarity index 92% rename from rally_openstack/contexts/cinder/volumes.py rename to rally_openstack/task/contexts/cinder/volumes.py index 2be0f036..43f231da 100644 --- a/rally_openstack/contexts/cinder/volumes.py +++ b/rally_openstack/task/contexts/cinder/volumes.py @@ -12,10 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.services.storage import block +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.services.storage import block +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context diff --git a/rally_openstack/contexts/quotas/__init__.py b/rally_openstack/task/contexts/cleanup/__init__.py similarity index 100% rename from rally_openstack/contexts/quotas/__init__.py rename to rally_openstack/task/contexts/cleanup/__init__.py diff --git a/rally_openstack/contexts/cleanup/admin.py b/rally_openstack/task/contexts/cleanup/admin.py similarity index 90% rename from rally_openstack/contexts/cleanup/admin.py rename to rally_openstack/task/contexts/cleanup/admin.py index c4668500..8b4b9664 100644 --- a/rally_openstack/contexts/cleanup/admin.py +++ b/rally_openstack/task/contexts/cleanup/admin.py @@ -17,10 +17,10 @@ import sys from rally.common import validation -from rally_openstack.cleanup import manager -from rally_openstack.contexts.cleanup import base -from rally_openstack import scenario +from rally_openstack.task.cleanup import manager from rally_openstack.task import context +from rally_openstack.task.contexts.cleanup import base +from rally_openstack.task import scenario @validation.add(name="check_cleanup_resources", admin_required=True) diff --git a/rally_openstack/contexts/cleanup/base.py b/rally_openstack/task/contexts/cleanup/base.py similarity index 94% rename from rally_openstack/contexts/cleanup/base.py rename to rally_openstack/task/contexts/cleanup/base.py index fdd72785..723a0f4c 100644 --- a/rally_openstack/contexts/cleanup/base.py +++ b/rally_openstack/task/contexts/cleanup/base.py @@ -15,8 +15,8 @@ from rally.common import validation -from rally_openstack.cleanup import manager -from rally_openstack import consts +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager @validation.configure("check_cleanup_resources") diff --git a/rally_openstack/contexts/cleanup/user.py b/rally_openstack/task/contexts/cleanup/user.py similarity index 90% rename from rally_openstack/contexts/cleanup/user.py rename to rally_openstack/task/contexts/cleanup/user.py index 32f7fd19..37fa9aab 100644 --- a/rally_openstack/contexts/cleanup/user.py +++ b/rally_openstack/task/contexts/cleanup/user.py @@ -17,10 +17,10 @@ import sys from rally.common import validation -from rally_openstack.cleanup import manager -from rally_openstack.contexts.cleanup import base -from rally_openstack import scenario +from rally_openstack.task.cleanup import manager from rally_openstack.task import context +from rally_openstack.task.contexts.cleanup import base +from rally_openstack.task import scenario @validation.add(name="check_cleanup_resources", admin_required=False) diff --git a/rally_openstack/contexts/sahara/__init__.py b/rally_openstack/task/contexts/dataplane/__init__.py similarity index 100% rename from rally_openstack/contexts/sahara/__init__.py rename to rally_openstack/task/contexts/dataplane/__init__.py diff --git a/rally_openstack/contexts/dataplane/heat.py b/rally_openstack/task/contexts/dataplane/heat.py similarity index 96% rename from rally_openstack/contexts/dataplane/heat.py rename to rally_openstack/task/contexts/dataplane/heat.py index 1bd6f7bf..e94e7b3d 100644 --- a/rally_openstack/contexts/dataplane/heat.py +++ b/rally_openstack/task/contexts/dataplane/heat.py @@ -19,11 +19,11 @@ from rally.common import utils as rutils from rally.common import validation from rally import exceptions -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.heat import utils as heat_utils +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.heat import utils as heat_utils def get_data(filename_or_resource): diff --git a/rally_openstack/contexts/senlin/__init__.py b/rally_openstack/task/contexts/designate/__init__.py similarity index 100% rename from rally_openstack/contexts/senlin/__init__.py rename to rally_openstack/task/contexts/designate/__init__.py diff --git a/rally_openstack/contexts/designate/zones.py b/rally_openstack/task/contexts/designate/zones.py similarity index 92% rename from rally_openstack/contexts/designate/zones.py rename to rally_openstack/task/contexts/designate/zones.py index f32dc43b..5f1c5630 100644 --- a/rally_openstack/contexts/designate/zones.py +++ b/rally_openstack/task/contexts/designate/zones.py @@ -14,10 +14,10 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.designate import utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.designate import utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/swift/__init__.py b/rally_openstack/task/contexts/glance/__init__.py similarity index 100% rename from rally_openstack/contexts/swift/__init__.py rename to rally_openstack/task/contexts/glance/__init__.py diff --git a/rally_openstack/contexts/glance/images.py b/rally_openstack/task/contexts/glance/images.py similarity index 97% rename from rally_openstack/contexts/glance/images.py rename to rally_openstack/task/contexts/glance/images.py index 54372432..1ef4d507 100644 --- a/rally_openstack/contexts/glance/images.py +++ b/rally_openstack/task/contexts/glance/images.py @@ -17,10 +17,10 @@ from rally.common import logging from rally.common import utils as rutils from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.services.image import image +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.services.image import image +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context diff --git a/rally_openstack/contexts/vm/__init__.py b/rally_openstack/task/contexts/heat/__init__.py similarity index 100% rename from rally_openstack/contexts/vm/__init__.py rename to rally_openstack/task/contexts/heat/__init__.py diff --git a/rally_openstack/contexts/heat/stacks.py b/rally_openstack/task/contexts/heat/stacks.py similarity index 94% rename from rally_openstack/contexts/heat/stacks.py rename to rally_openstack/task/contexts/heat/stacks.py index 9f957640..afefacb6 100644 --- a/rally_openstack/contexts/heat/stacks.py +++ b/rally_openstack/task/contexts/heat/stacks.py @@ -15,10 +15,10 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.heat import utils as heat_utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.heat import utils as heat_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/watcher/__init__.py b/rally_openstack/task/contexts/keystone/__init__.py similarity index 100% rename from rally_openstack/contexts/watcher/__init__.py rename to rally_openstack/task/contexts/keystone/__init__.py diff --git a/rally_openstack/contexts/keystone/roles.py b/rally_openstack/task/contexts/keystone/roles.py similarity index 96% rename from rally_openstack/contexts/keystone/roles.py rename to rally_openstack/task/contexts/keystone/roles.py index f3b8e11b..3321ef14 100644 --- a/rally_openstack/contexts/keystone/roles.py +++ b/rally_openstack/task/contexts/keystone/roles.py @@ -19,9 +19,9 @@ from rally.common import logging from rally.common import validation from rally import exceptions -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.services.identity import identity +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.services.identity import identity from rally_openstack.task import context diff --git a/rally_openstack/contexts/keystone/users.py b/rally_openstack/task/contexts/keystone/users.py similarity index 98% rename from rally_openstack/contexts/keystone/users.py rename to rally_openstack/task/contexts/keystone/users.py index 6513bfa0..11dc956c 100644 --- a/rally_openstack/contexts/keystone/users.py +++ b/rally_openstack/task/contexts/keystone/users.py @@ -23,12 +23,12 @@ from rally.common import logging from rally.common import validation from rally import exceptions -from rally_openstack import consts -from rally_openstack import credential -from rally_openstack import osclients -from rally_openstack.services.identity import identity +from rally_openstack.common import consts +from rally_openstack.common import credential +from rally_openstack.common import osclients +from rally_openstack.common.services.identity import identity +from rally_openstack.common.wrappers import network from rally_openstack.task import context -from rally_openstack.wrappers import network LOG = logging.getLogger(__name__) diff --git a/rally_openstack/embedcharts/__init__.py b/rally_openstack/task/contexts/magnum/__init__.py similarity index 100% rename from rally_openstack/embedcharts/__init__.py rename to rally_openstack/task/contexts/magnum/__init__.py diff --git a/rally_openstack/contexts/magnum/ca_certs.py b/rally_openstack/task/contexts/magnum/ca_certs.py similarity index 97% rename from rally_openstack/contexts/magnum/ca_certs.py rename to rally_openstack/task/contexts/magnum/ca_certs.py index 93ae43b2..45054006 100644 --- a/rally_openstack/contexts/magnum/ca_certs.py +++ b/rally_openstack/task/contexts/magnum/ca_certs.py @@ -17,9 +17,9 @@ import os from rally.common import utils as rutils from rally.common import validation -from rally_openstack import consts -from rally_openstack.scenarios.magnum import utils as magnum_utils +from rally_openstack.common import consts from rally_openstack.task import context +from rally_openstack.task.scenarios.magnum import utils as magnum_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/magnum/cluster_templates.py b/rally_openstack/task/contexts/magnum/cluster_templates.py similarity index 95% rename from rally_openstack/contexts/magnum/cluster_templates.py rename to rally_openstack/task/contexts/magnum/cluster_templates.py index ed7b696d..36afefc5 100644 --- a/rally_openstack/contexts/magnum/cluster_templates.py +++ b/rally_openstack/task/contexts/magnum/cluster_templates.py @@ -14,10 +14,10 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.magnum import utils as magnum_utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.magnum import utils as magnum_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/magnum/clusters.py b/rally_openstack/task/contexts/magnum/clusters.py similarity index 91% rename from rally_openstack/contexts/magnum/clusters.py rename to rally_openstack/task/contexts/magnum/clusters.py index 34b2957b..e4c1c1a6 100644 --- a/rally_openstack/contexts/magnum/clusters.py +++ b/rally_openstack/task/contexts/magnum/clusters.py @@ -14,11 +14,11 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.magnum import utils as magnum_utils -from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.magnum import utils as magnum_utils +from rally_openstack.task.scenarios.nova import utils as nova_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/hook/__init__.py b/rally_openstack/task/contexts/manila/__init__.py similarity index 100% rename from rally_openstack/hook/__init__.py rename to rally_openstack/task/contexts/manila/__init__.py diff --git a/rally_openstack/contexts/manila/consts.py b/rally_openstack/task/contexts/manila/consts.py similarity index 100% rename from rally_openstack/contexts/manila/consts.py rename to rally_openstack/task/contexts/manila/consts.py diff --git a/rally_openstack/contexts/manila/manila_security_services.py b/rally_openstack/task/contexts/manila/manila_security_services.py similarity index 92% rename from rally_openstack/contexts/manila/manila_security_services.py rename to rally_openstack/task/contexts/manila/manila_security_services.py index 9f88af27..55d409e7 100644 --- a/rally_openstack/contexts/manila/manila_security_services.py +++ b/rally_openstack/task/contexts/manila/manila_security_services.py @@ -16,11 +16,11 @@ from rally.common import cfg from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts as rally_consts -from rally_openstack.contexts.manila import consts -from rally_openstack.scenarios.manila import utils as manila_utils +from rally_openstack.common import consts as rally_consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.scenarios.manila import utils as manila_utils CONF = cfg.CONF diff --git a/rally_openstack/contexts/manila/manila_share_networks.py b/rally_openstack/task/contexts/manila/manila_share_networks.py similarity index 96% rename from rally_openstack/contexts/manila/manila_share_networks.py rename to rally_openstack/task/contexts/manila/manila_share_networks.py index 16d627e4..81b3b693 100644 --- a/rally_openstack/contexts/manila/manila_share_networks.py +++ b/rally_openstack/task/contexts/manila/manila_share_networks.py @@ -18,11 +18,11 @@ from rally.common import logging from rally.common import validation from rally import exceptions -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts as rally_consts -from rally_openstack.contexts.manila import consts -from rally_openstack.scenarios.manila import utils as manila_utils +from rally_openstack.common import consts as rally_consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.scenarios.manila import utils as manila_utils CONF = cfg.CONF diff --git a/rally_openstack/contexts/manila/manila_shares.py b/rally_openstack/task/contexts/manila/manila_shares.py similarity index 92% rename from rally_openstack/contexts/manila/manila_shares.py rename to rally_openstack/task/contexts/manila/manila_shares.py index d1560a22..e270f683 100644 --- a/rally_openstack/contexts/manila/manila_shares.py +++ b/rally_openstack/task/contexts/manila/manila_shares.py @@ -16,11 +16,11 @@ from rally.common import cfg from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts as rally_consts -from rally_openstack.contexts.manila import consts -from rally_openstack.scenarios.manila import utils as manila_utils +from rally_openstack.common import consts as rally_consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.scenarios.manila import utils as manila_utils CONF = cfg.CONF CONTEXT_NAME = consts.SHARES_CONTEXT_NAME diff --git a/rally_openstack/platforms/__init__.py b/rally_openstack/task/contexts/monasca/__init__.py similarity index 100% rename from rally_openstack/platforms/__init__.py rename to rally_openstack/task/contexts/monasca/__init__.py diff --git a/rally_openstack/contexts/monasca/metrics.py b/rally_openstack/task/contexts/monasca/metrics.py similarity index 96% rename from rally_openstack/contexts/monasca/metrics.py rename to rally_openstack/task/contexts/monasca/metrics.py index f9672665..9025ba78 100644 --- a/rally_openstack/contexts/monasca/metrics.py +++ b/rally_openstack/task/contexts/monasca/metrics.py @@ -15,9 +15,9 @@ from rally.common import utils as rutils from rally.common import validation -from rally_openstack import consts -from rally_openstack.scenarios.monasca import utils as monasca_utils +from rally_openstack.common import consts from rally_openstack.task import context +from rally_openstack.task.scenarios.monasca import utils as monasca_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/scenarios/__init__.py b/rally_openstack/task/contexts/murano/__init__.py similarity index 100% rename from rally_openstack/scenarios/__init__.py rename to rally_openstack/task/contexts/murano/__init__.py diff --git a/rally_openstack/contexts/murano/murano_environments.py b/rally_openstack/task/contexts/murano/murano_environments.py similarity index 92% rename from rally_openstack/contexts/murano/murano_environments.py rename to rally_openstack/task/contexts/murano/murano_environments.py index 27f87d03..c8921247 100644 --- a/rally_openstack/contexts/murano/murano_environments.py +++ b/rally_openstack/task/contexts/murano/murano_environments.py @@ -15,10 +15,10 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.murano import utils as murano_utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.murano import utils as murano_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/murano/murano_packages.py b/rally_openstack/task/contexts/murano/murano_packages.py similarity index 92% rename from rally_openstack/contexts/murano/murano_packages.py rename to rally_openstack/task/contexts/murano/murano_packages.py index edf88a51..43a30ebf 100644 --- a/rally_openstack/contexts/murano/murano_packages.py +++ b/rally_openstack/task/contexts/murano/murano_packages.py @@ -19,11 +19,11 @@ import zipfile from rally.common import validation from rally import exceptions -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.murano import utils as mutils +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.murano import utils as mutils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/scenarios/authenticate/__init__.py b/rally_openstack/task/contexts/network/__init__.py similarity index 100% rename from rally_openstack/scenarios/authenticate/__init__.py rename to rally_openstack/task/contexts/network/__init__.py diff --git a/rally_openstack/contexts/network/allow_ssh.py b/rally_openstack/task/contexts/network/allow_ssh.py similarity index 98% rename from rally_openstack/contexts/network/allow_ssh.py rename to rally_openstack/task/contexts/network/allow_ssh.py index 5e5ee91c..c52aba93 100644 --- a/rally_openstack/contexts/network/allow_ssh.py +++ b/rally_openstack/task/contexts/network/allow_ssh.py @@ -16,9 +16,9 @@ from rally.common import logging from rally.common import validation -from rally_openstack import osclients +from rally_openstack.common import osclients +from rally_openstack.common.wrappers import network from rally_openstack.task import context -from rally_openstack.wrappers import network LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/network/existing_network.py b/rally_openstack/task/contexts/network/existing_network.py similarity index 90% rename from rally_openstack/contexts/network/existing_network.py rename to rally_openstack/task/contexts/network/existing_network.py index 00c10494..79602b9c 100644 --- a/rally_openstack/contexts/network/existing_network.py +++ b/rally_openstack/task/contexts/network/existing_network.py @@ -14,10 +14,10 @@ from rally.common import validation -from rally_openstack import consts -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.wrappers import network as network_wrapper from rally_openstack.task import context -from rally_openstack.wrappers import network as network_wrapper @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/network/networking_agents.py b/rally_openstack/task/contexts/network/networking_agents.py similarity index 94% rename from rally_openstack/contexts/network/networking_agents.py rename to rally_openstack/task/contexts/network/networking_agents.py index b5ee4401..f773fb4e 100644 --- a/rally_openstack/contexts/network/networking_agents.py +++ b/rally_openstack/task/contexts/network/networking_agents.py @@ -15,8 +15,8 @@ from rally.common import logging from rally.common import validation -from rally_openstack import consts -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import osclients from rally_openstack.task import context LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/network/networks.py b/rally_openstack/task/contexts/network/networks.py similarity index 96% rename from rally_openstack/contexts/network/networks.py rename to rally_openstack/task/contexts/network/networks.py index 08382189..9eb5fcd7 100644 --- a/rally_openstack/contexts/network/networks.py +++ b/rally_openstack/task/contexts/network/networks.py @@ -16,10 +16,10 @@ from rally.common import logging from rally.common import validation -from rally_openstack import consts -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.wrappers import network as network_wrapper from rally_openstack.task import context -from rally_openstack.wrappers import network as network_wrapper LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/network/routers.py b/rally_openstack/task/contexts/network/routers.py similarity index 95% rename from rally_openstack/contexts/network/routers.py rename to rally_openstack/task/contexts/network/routers.py index c6251944..9e400e1e 100644 --- a/rally_openstack/contexts/network/routers.py +++ b/rally_openstack/task/contexts/network/routers.py @@ -15,10 +15,10 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.neutron import utils as neutron_utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.neutron import utils as neutron_utils @validation.add("required_platform", platform="openstack", admin=True, diff --git a/rally_openstack/scenarios/barbican/__init__.py b/rally_openstack/task/contexts/neutron/__init__.py similarity index 100% rename from rally_openstack/scenarios/barbican/__init__.py rename to rally_openstack/task/contexts/neutron/__init__.py diff --git a/rally_openstack/contexts/neutron/lbaas.py b/rally_openstack/task/contexts/neutron/lbaas.py similarity index 95% rename from rally_openstack/contexts/neutron/lbaas.py rename to rally_openstack/task/contexts/neutron/lbaas.py index 614c39a2..16f2bbf1 100644 --- a/rally_openstack/contexts/neutron/lbaas.py +++ b/rally_openstack/task/contexts/neutron/lbaas.py @@ -13,10 +13,10 @@ from rally.common import logging from rally.common import validation -from rally_openstack import consts -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.wrappers import network as network_wrapper from rally_openstack.task import context -from rally_openstack.wrappers import network as network_wrapper LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/ceilometer/__init__.py b/rally_openstack/task/contexts/nova/__init__.py similarity index 100% rename from rally_openstack/scenarios/ceilometer/__init__.py rename to rally_openstack/task/contexts/nova/__init__.py diff --git a/rally_openstack/contexts/nova/flavors.py b/rally_openstack/task/contexts/nova/flavors.py similarity index 96% rename from rally_openstack/contexts/nova/flavors.py rename to rally_openstack/task/contexts/nova/flavors.py index 61192335..2a1b3412 100644 --- a/rally_openstack/contexts/nova/flavors.py +++ b/rally_openstack/task/contexts/nova/flavors.py @@ -17,9 +17,9 @@ from rally.common import logging from rally.common import utils as rutils from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context diff --git a/rally_openstack/contexts/nova/keypairs.py b/rally_openstack/task/contexts/nova/keypairs.py similarity index 95% rename from rally_openstack/contexts/nova/keypairs.py rename to rally_openstack/task/contexts/nova/keypairs.py index 8b4d53df..dff02225 100644 --- a/rally_openstack/contexts/nova/keypairs.py +++ b/rally_openstack/task/contexts/nova/keypairs.py @@ -15,8 +15,8 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import osclients +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context diff --git a/rally_openstack/contexts/nova/servers.py b/rally_openstack/task/contexts/nova/servers.py similarity index 96% rename from rally_openstack/contexts/nova/servers.py rename to rally_openstack/task/contexts/nova/servers.py index 567117f1..2a40fc77 100755 --- a/rally_openstack/contexts/nova/servers.py +++ b/rally_openstack/task/contexts/nova/servers.py @@ -15,10 +15,10 @@ from rally.common import logging from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context -from rally_openstack import types +from rally_openstack.task.scenarios.nova import utils as nova_utils +from rally_openstack.task import types LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/cinder/__init__.py b/rally_openstack/task/contexts/quotas/__init__.py similarity index 100% rename from rally_openstack/scenarios/cinder/__init__.py rename to rally_openstack/task/contexts/quotas/__init__.py diff --git a/rally_openstack/contexts/quotas/cinder_quotas.py b/rally_openstack/task/contexts/quotas/cinder_quotas.py similarity index 100% rename from rally_openstack/contexts/quotas/cinder_quotas.py rename to rally_openstack/task/contexts/quotas/cinder_quotas.py diff --git a/rally_openstack/contexts/quotas/designate_quotas.py b/rally_openstack/task/contexts/quotas/designate_quotas.py similarity index 100% rename from rally_openstack/contexts/quotas/designate_quotas.py rename to rally_openstack/task/contexts/quotas/designate_quotas.py diff --git a/rally_openstack/contexts/quotas/manila_quotas.py b/rally_openstack/task/contexts/quotas/manila_quotas.py similarity index 100% rename from rally_openstack/contexts/quotas/manila_quotas.py rename to rally_openstack/task/contexts/quotas/manila_quotas.py diff --git a/rally_openstack/contexts/quotas/neutron_quotas.py b/rally_openstack/task/contexts/quotas/neutron_quotas.py similarity index 100% rename from rally_openstack/contexts/quotas/neutron_quotas.py rename to rally_openstack/task/contexts/quotas/neutron_quotas.py diff --git a/rally_openstack/contexts/quotas/nova_quotas.py b/rally_openstack/task/contexts/quotas/nova_quotas.py similarity index 100% rename from rally_openstack/contexts/quotas/nova_quotas.py rename to rally_openstack/task/contexts/quotas/nova_quotas.py diff --git a/rally_openstack/contexts/quotas/quotas.py b/rally_openstack/task/contexts/quotas/quotas.py similarity index 91% rename from rally_openstack/contexts/quotas/quotas.py rename to rally_openstack/task/contexts/quotas/quotas.py index fe271220..728d1a77 100644 --- a/rally_openstack/contexts/quotas/quotas.py +++ b/rally_openstack/task/contexts/quotas/quotas.py @@ -16,14 +16,14 @@ from rally.common import logging from rally.common import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.common import osclients from rally_openstack.task import context +from rally_openstack.task.contexts.quotas import cinder_quotas +from rally_openstack.task.contexts.quotas import designate_quotas +from rally_openstack.task.contexts.quotas import manila_quotas +from rally_openstack.task.contexts.quotas import neutron_quotas +from rally_openstack.task.contexts.quotas import nova_quotas LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/designate/__init__.py b/rally_openstack/task/contexts/sahara/__init__.py similarity index 100% rename from rally_openstack/scenarios/designate/__init__.py rename to rally_openstack/task/contexts/sahara/__init__.py diff --git a/rally_openstack/contexts/sahara/sahara_cluster.py b/rally_openstack/task/contexts/sahara/sahara_cluster.py similarity index 97% rename from rally_openstack/contexts/sahara/sahara_cluster.py rename to rally_openstack/task/contexts/sahara/sahara_cluster.py index 6494fe49..b4684ed6 100644 --- a/rally_openstack/contexts/sahara/sahara_cluster.py +++ b/rally_openstack/task/contexts/sahara/sahara_cluster.py @@ -18,10 +18,10 @@ from rally.common import validation from rally import exceptions from rally.task import utils as bench_utils -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.sahara import utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.sahara import utils CONF = cfg.CONF diff --git a/rally_openstack/contexts/sahara/sahara_image.py b/rally_openstack/task/contexts/sahara/sahara_image.py similarity index 94% rename from rally_openstack/contexts/sahara/sahara_image.py rename to rally_openstack/task/contexts/sahara/sahara_image.py index eb916360..4e93b9b9 100644 --- a/rally_openstack/contexts/sahara/sahara_image.py +++ b/rally_openstack/task/contexts/sahara/sahara_image.py @@ -15,12 +15,12 @@ from rally.common import validation from rally import exceptions -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.sahara import utils -from rally_openstack.services.image import image as image_services +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.services.image import image as image_services +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.sahara import utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/sahara/sahara_input_data_sources.py b/rally_openstack/task/contexts/sahara/sahara_input_data_sources.py similarity index 94% rename from rally_openstack/contexts/sahara/sahara_input_data_sources.py rename to rally_openstack/task/contexts/sahara/sahara_input_data_sources.py index ad819fd0..ff12f0b0 100644 --- a/rally_openstack/contexts/sahara/sahara_input_data_sources.py +++ b/rally_openstack/task/contexts/sahara/sahara_input_data_sources.py @@ -19,12 +19,12 @@ import requests from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.sahara import utils -from rally_openstack.scenarios.swift import utils as swift_utils +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.sahara import utils +from rally_openstack.task.scenarios.swift import utils as swift_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/sahara/sahara_job_binaries.py b/rally_openstack/task/contexts/sahara/sahara_job_binaries.py similarity index 95% rename from rally_openstack/contexts/sahara/sahara_job_binaries.py rename to rally_openstack/task/contexts/sahara/sahara_job_binaries.py index cece0ba2..c0654648 100644 --- a/rally_openstack/contexts/sahara/sahara_job_binaries.py +++ b/rally_openstack/task/contexts/sahara/sahara_job_binaries.py @@ -18,11 +18,11 @@ import requests from rally.common import validation from rally import exceptions -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.sahara import utils +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.sahara import utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/contexts/sahara/sahara_output_data_sources.py b/rally_openstack/task/contexts/sahara/sahara_output_data_sources.py similarity index 93% rename from rally_openstack/contexts/sahara/sahara_output_data_sources.py rename to rally_openstack/task/contexts/sahara/sahara_output_data_sources.py index 89079b92..2725eb5e 100644 --- a/rally_openstack/contexts/sahara/sahara_output_data_sources.py +++ b/rally_openstack/task/contexts/sahara/sahara_output_data_sources.py @@ -15,12 +15,12 @@ from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.sahara import utils -from rally_openstack.scenarios.swift import utils as swift_utils +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context +from rally_openstack.task.scenarios.sahara import utils +from rally_openstack.task.scenarios.swift import utils as swift_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/scenarios/elasticsearch/__init__.py b/rally_openstack/task/contexts/senlin/__init__.py similarity index 100% rename from rally_openstack/scenarios/elasticsearch/__init__.py rename to rally_openstack/task/contexts/senlin/__init__.py diff --git a/rally_openstack/contexts/senlin/profiles.py b/rally_openstack/task/contexts/senlin/profiles.py similarity index 95% rename from rally_openstack/contexts/senlin/profiles.py rename to rally_openstack/task/contexts/senlin/profiles.py index 38a8b32d..cebd31c3 100644 --- a/rally_openstack/contexts/senlin/profiles.py +++ b/rally_openstack/task/contexts/senlin/profiles.py @@ -12,9 +12,9 @@ from rally.common import validation -from rally_openstack import consts -from rally_openstack.scenarios.senlin import utils as senlin_utils +from rally_openstack.common import consts from rally_openstack.task import context +from rally_openstack.task.scenarios.senlin import utils as senlin_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/scenarios/glance/__init__.py b/rally_openstack/task/contexts/swift/__init__.py similarity index 100% rename from rally_openstack/scenarios/glance/__init__.py rename to rally_openstack/task/contexts/swift/__init__.py diff --git a/rally_openstack/contexts/swift/objects.py b/rally_openstack/task/contexts/swift/objects.py similarity index 97% rename from rally_openstack/contexts/swift/objects.py rename to rally_openstack/task/contexts/swift/objects.py index eba99dff..f06c1726 100644 --- a/rally_openstack/contexts/swift/objects.py +++ b/rally_openstack/task/contexts/swift/objects.py @@ -17,9 +17,9 @@ from rally.common import logging from rally.common import validation from rally import exceptions -from rally_openstack import consts -from rally_openstack.contexts.swift import utils as swift_utils +from rally_openstack.common import consts from rally_openstack.task import context +from rally_openstack.task.contexts.swift import utils as swift_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/swift/utils.py b/rally_openstack/task/contexts/swift/utils.py similarity index 98% rename from rally_openstack/contexts/swift/utils.py rename to rally_openstack/task/contexts/swift/utils.py index d787900e..fe17aa92 100644 --- a/rally_openstack/contexts/swift/utils.py +++ b/rally_openstack/task/contexts/swift/utils.py @@ -17,7 +17,7 @@ import tempfile from rally.common import broker -from rally_openstack.scenarios.swift import utils as swift_utils +from rally_openstack.task.scenarios.swift import utils as swift_utils class SwiftObjectMixin(object): diff --git a/rally_openstack/scenarios/gnocchi/__init__.py b/rally_openstack/task/contexts/vm/__init__.py similarity index 100% rename from rally_openstack/scenarios/gnocchi/__init__.py rename to rally_openstack/task/contexts/vm/__init__.py diff --git a/rally_openstack/contexts/vm/custom_image.py b/rally_openstack/task/contexts/vm/custom_image.py similarity index 97% rename from rally_openstack/contexts/vm/custom_image.py rename to rally_openstack/task/contexts/vm/custom_image.py index 5c4ce435..169e5df9 100644 --- a/rally_openstack/contexts/vm/custom_image.py +++ b/rally_openstack/task/contexts/vm/custom_image.py @@ -19,12 +19,12 @@ from rally.common import broker from rally.common import logging from rally.common import utils -from rally_openstack import consts -from rally_openstack import osclients -from rally_openstack.scenarios.vm import vmtasks -from rally_openstack.services.image import image +from rally_openstack.common import consts +from rally_openstack.common import osclients +from rally_openstack.common.services.image import image from rally_openstack.task import context -from rally_openstack import types +from rally_openstack.task.scenarios.vm import vmtasks +from rally_openstack.task import types LOG = logging.getLogger(__name__) diff --git a/rally_openstack/contexts/vm/image_command_customizer.py b/rally_openstack/task/contexts/vm/image_command_customizer.py similarity index 97% rename from rally_openstack/contexts/vm/image_command_customizer.py rename to rally_openstack/task/contexts/vm/image_command_customizer.py index 356a69da..66124b8b 100644 --- a/rally_openstack/contexts/vm/image_command_customizer.py +++ b/rally_openstack/task/contexts/vm/image_command_customizer.py @@ -18,9 +18,9 @@ import copy from rally.common import validation from rally import exceptions -from rally_openstack.contexts.vm import custom_image -from rally_openstack.scenarios.vm import utils as vm_utils from rally_openstack.task import context +from rally_openstack.task.contexts.vm import custom_image +from rally_openstack.task.scenarios.vm import utils as vm_utils @validation.add("required_platform", platform="openstack", users=True) diff --git a/rally_openstack/scenarios/grafana/__init__.py b/rally_openstack/task/contexts/watcher/__init__.py similarity index 100% rename from rally_openstack/scenarios/grafana/__init__.py rename to rally_openstack/task/contexts/watcher/__init__.py diff --git a/rally_openstack/contexts/watcher/audit_templates.py b/rally_openstack/task/contexts/watcher/audit_templates.py similarity index 94% rename from rally_openstack/contexts/watcher/audit_templates.py rename to rally_openstack/task/contexts/watcher/audit_templates.py index 7a684e0c..fd31e4be 100644 --- a/rally_openstack/contexts/watcher/audit_templates.py +++ b/rally_openstack/task/contexts/watcher/audit_templates.py @@ -16,11 +16,11 @@ import random from rally.common import validation -from rally_openstack.cleanup import manager as resource_manager -from rally_openstack import consts -from rally_openstack.scenarios.watcher import utils as watcher_utils +from rally_openstack.common import consts +from rally_openstack.task.cleanup import manager as resource_manager from rally_openstack.task import context -from rally_openstack import types +from rally_openstack.task.scenarios.watcher import utils as watcher_utils +from rally_openstack.task import types @validation.add("required_platform", platform="openstack", admin=True) diff --git a/rally_openstack/scenarios/heat/__init__.py b/rally_openstack/task/hooks/__init__.py similarity index 100% rename from rally_openstack/scenarios/heat/__init__.py rename to rally_openstack/task/hooks/__init__.py diff --git a/rally_openstack/hook/fault_injection.py b/rally_openstack/task/hooks/fault_injection.py similarity index 98% rename from rally_openstack/hook/fault_injection.py rename to rally_openstack/task/hooks/fault_injection.py index 27643878..ff5634d3 100644 --- a/rally_openstack/hook/fault_injection.py +++ b/rally_openstack/task/hooks/fault_injection.py @@ -17,7 +17,7 @@ from rally.common import logging from rally.common import objects from rally.task import hook -from rally_openstack import consts +from rally_openstack.common import consts LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenario.py b/rally_openstack/task/scenario.py similarity index 99% rename from rally_openstack/scenario.py rename to rally_openstack/task/scenario.py index 4a7398ac..6ce01b56 100644 --- a/rally_openstack/scenario.py +++ b/rally_openstack/task/scenario.py @@ -22,7 +22,7 @@ from rally.common.plugin import plugin from rally.task import context from rally.task import scenario -from rally_openstack import osclients +from rally_openstack.common import osclients configure = functools.partial(scenario.configure, platform="openstack") diff --git a/rally_openstack/scenarios/ironic/__init__.py b/rally_openstack/task/scenarios/__init__.py similarity index 100% rename from rally_openstack/scenarios/ironic/__init__.py rename to rally_openstack/task/scenarios/__init__.py diff --git a/rally_openstack/scenarios/keystone/__init__.py b/rally_openstack/task/scenarios/authenticate/__init__.py similarity index 100% rename from rally_openstack/scenarios/keystone/__init__.py rename to rally_openstack/task/scenarios/authenticate/__init__.py diff --git a/rally_openstack/scenarios/authenticate/authenticate.py b/rally_openstack/task/scenarios/authenticate/authenticate.py similarity index 98% rename from rally_openstack/scenarios/authenticate/authenticate.py rename to rally_openstack/task/scenarios/authenticate/authenticate.py index 61465240..2c228361 100644 --- a/rally_openstack/scenarios/authenticate/authenticate.py +++ b/rally_openstack/task/scenarios/authenticate/authenticate.py @@ -12,12 +12,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import consts +from rally_openstack.common import consts from rally.task import atomic from rally.task import validation -from rally_openstack import scenario +from rally_openstack.task import scenario """Scenarios for Authentication mechanism.""" diff --git a/rally_openstack/scenarios/magnum/__init__.py b/rally_openstack/task/scenarios/barbican/__init__.py similarity index 100% rename from rally_openstack/scenarios/magnum/__init__.py rename to rally_openstack/task/scenarios/barbican/__init__.py diff --git a/rally_openstack/scenarios/barbican/containers.py b/rally_openstack/task/scenarios/barbican/containers.py similarity index 95% rename from rally_openstack/scenarios/barbican/containers.py rename to rally_openstack/task/scenarios/barbican/containers.py index 3c6f7d01..2f36ddd5 100644 --- a/rally_openstack/scenarios/barbican/containers.py +++ b/rally_openstack/task/scenarios/barbican/containers.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.barbican import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.barbican import utils """Scenarios for Barbican containers.""" diff --git a/rally_openstack/scenarios/barbican/orders.py b/rally_openstack/task/scenarios/barbican/orders.py similarity index 94% rename from rally_openstack/scenarios/barbican/orders.py rename to rally_openstack/task/scenarios/barbican/orders.py index 13186c70..fd7b9741 100644 --- a/rally_openstack/scenarios/barbican/orders.py +++ b/rally_openstack/task/scenarios/barbican/orders.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.barbican import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.barbican import utils """Scenarios for Barbican orders.""" diff --git a/rally_openstack/scenarios/barbican/secrets.py b/rally_openstack/task/scenarios/barbican/secrets.py similarity index 97% rename from rally_openstack/scenarios/barbican/secrets.py rename to rally_openstack/task/scenarios/barbican/secrets.py index c5853948..bdd132fb 100644 --- a/rally_openstack/scenarios/barbican/secrets.py +++ b/rally_openstack/task/scenarios/barbican/secrets.py @@ -18,9 +18,9 @@ import os from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.barbican import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.barbican import utils """Scenarios for Barbican secrets.""" diff --git a/rally_openstack/scenarios/barbican/utils.py b/rally_openstack/task/scenarios/barbican/utils.py similarity index 92% rename from rally_openstack/scenarios/barbican/utils.py rename to rally_openstack/task/scenarios/barbican/utils.py index b0ce73bd..40951d40 100644 --- a/rally_openstack/scenarios/barbican/utils.py +++ b/rally_openstack/task/scenarios/barbican/utils.py @@ -13,8 +13,8 @@ # under the License. -from rally_openstack import scenario -from rally_openstack.services.key_manager import barbican +from rally_openstack.common.services.key_manager import barbican +from rally_openstack.task import scenario class BarbicanBase(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/manila/__init__.py b/rally_openstack/task/scenarios/ceilometer/__init__.py similarity index 100% rename from rally_openstack/scenarios/manila/__init__.py rename to rally_openstack/task/scenarios/ceilometer/__init__.py diff --git a/rally_openstack/scenarios/ceilometer/alarms.py b/rally_openstack/task/scenarios/ceilometer/alarms.py similarity index 98% rename from rally_openstack/scenarios/ceilometer/alarms.py rename to rally_openstack/task/scenarios/ceilometer/alarms.py index b3f8097b..901face9 100644 --- a/rally_openstack/scenarios/ceilometer/alarms.py +++ b/rally_openstack/task/scenarios/ceilometer/alarms.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ceilometer import utils as ceiloutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as ceiloutils @validation.add("required_services", diff --git a/rally_openstack/scenarios/ceilometer/events.py b/rally_openstack/task/scenarios/ceilometer/events.py similarity index 94% rename from rally_openstack/scenarios/ceilometer/events.py rename to rally_openstack/task/scenarios/ceilometer/events.py index 355bdb7d..eeb8cebe 100644 --- a/rally_openstack/scenarios/ceilometer/events.py +++ b/rally_openstack/task/scenarios/ceilometer/events.py @@ -18,10 +18,10 @@ Scenarios for Ceilometer Events API. from rally.task import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as cutils +from rally_openstack.task.scenarios.keystone import basic as kbasic # 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/task/scenarios/ceilometer/meters.py similarity index 94% rename from rally_openstack/scenarios/ceilometer/meters.py rename to rally_openstack/task/scenarios/ceilometer/meters.py index 659616f2..41af52f6 100644 --- a/rally_openstack/scenarios/ceilometer/meters.py +++ b/rally_openstack/task/scenarios/ceilometer/meters.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ceilometer import utils as ceiloutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as ceiloutils """Scenarios for Ceilometer Meters API.""" diff --git a/rally_openstack/scenarios/ceilometer/queries.py b/rally_openstack/task/scenarios/ceilometer/queries.py similarity index 96% rename from rally_openstack/scenarios/ceilometer/queries.py rename to rally_openstack/task/scenarios/ceilometer/queries.py index 211eab27..aec51f5a 100644 --- a/rally_openstack/scenarios/ceilometer/queries.py +++ b/rally_openstack/task/scenarios/ceilometer/queries.py @@ -16,9 +16,9 @@ import json from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ceilometer import utils as ceiloutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as ceiloutils """Scenarios for Ceilometer Queries API.""" diff --git a/rally_openstack/scenarios/ceilometer/resources.py b/rally_openstack/task/scenarios/ceilometer/resources.py similarity index 96% rename from rally_openstack/scenarios/ceilometer/resources.py rename to rally_openstack/task/scenarios/ceilometer/resources.py index 30dda687..c42c07bf 100644 --- a/rally_openstack/scenarios/ceilometer/resources.py +++ b/rally_openstack/task/scenarios/ceilometer/resources.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ceilometer import utils as ceiloutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as ceiloutils """Scenarios for Ceilometer Resource API.""" diff --git a/rally_openstack/scenarios/ceilometer/samples.py b/rally_openstack/task/scenarios/ceilometer/samples.py similarity index 94% rename from rally_openstack/scenarios/ceilometer/samples.py rename to rally_openstack/task/scenarios/ceilometer/samples.py index eb9d655b..f247198a 100644 --- a/rally_openstack/scenarios/ceilometer/samples.py +++ b/rally_openstack/task/scenarios/ceilometer/samples.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ceilometer import utils as ceiloutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as ceiloutils """Scenarios for Ceilometer Samples API.""" diff --git a/rally_openstack/scenarios/ceilometer/stats.py b/rally_openstack/task/scenarios/ceilometer/stats.py similarity index 95% rename from rally_openstack/scenarios/ceilometer/stats.py rename to rally_openstack/task/scenarios/ceilometer/stats.py index df6b193a..23388bd9 100644 --- a/rally_openstack/scenarios/ceilometer/stats.py +++ b/rally_openstack/task/scenarios/ceilometer/stats.py @@ -15,9 +15,9 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ceilometer import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils """Scenarios for Ceilometer Stats API.""" diff --git a/rally_openstack/scenarios/ceilometer/traits.py b/rally_openstack/task/scenarios/ceilometer/traits.py similarity index 92% rename from rally_openstack/scenarios/ceilometer/traits.py rename to rally_openstack/task/scenarios/ceilometer/traits.py index a673f7d0..2af79143 100644 --- a/rally_openstack/scenarios/ceilometer/traits.py +++ b/rally_openstack/task/scenarios/ceilometer/traits.py @@ -14,10 +14,10 @@ from rally.task import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ceilometer import utils as cutils +from rally_openstack.task.scenarios.keystone import basic as kbasic """Scenarios for Ceilometer Events API.""" diff --git a/rally_openstack/scenarios/ceilometer/utils.py b/rally_openstack/task/scenarios/ceilometer/utils.py similarity index 99% rename from rally_openstack/scenarios/ceilometer/utils.py rename to rally_openstack/task/scenarios/ceilometer/utils.py index 97fc3fc8..c916feec 100644 --- a/rally_openstack/scenarios/ceilometer/utils.py +++ b/rally_openstack/task/scenarios/ceilometer/utils.py @@ -19,7 +19,7 @@ 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.task import scenario class CeilometerScenario(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/mistral/__init__.py b/rally_openstack/task/scenarios/cinder/__init__.py similarity index 100% rename from rally_openstack/scenarios/mistral/__init__.py rename to rally_openstack/task/scenarios/cinder/__init__.py diff --git a/rally_openstack/scenarios/cinder/qos_specs.py b/rally_openstack/task/scenarios/cinder/qos_specs.py similarity index 97% rename from rally_openstack/scenarios/cinder/qos_specs.py rename to rally_openstack/task/scenarios/cinder/qos_specs.py index cffab322..4e43345d 100644 --- a/rally_openstack/scenarios/cinder/qos_specs.py +++ b/rally_openstack/task/scenarios/cinder/qos_specs.py @@ -13,9 +13,9 @@ # under the License. from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.cinder import utils as cinder_utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils """Scenarios for Cinder QoS.""" diff --git a/rally_openstack/scenarios/cinder/utils.py b/rally_openstack/task/scenarios/cinder/utils.py similarity index 93% rename from rally_openstack/scenarios/cinder/utils.py rename to rally_openstack/task/scenarios/cinder/utils.py index a355d6bc..194dd3f1 100644 --- a/rally_openstack/scenarios/cinder/utils.py +++ b/rally_openstack/task/scenarios/cinder/utils.py @@ -18,8 +18,8 @@ import random from rally.common import cfg from rally.common import logging -from rally_openstack import scenario -from rally_openstack.services.storage import block +from rally_openstack.common.services.storage import block +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/cinder/volume_backups.py b/rally_openstack/task/scenarios/cinder/volume_backups.py similarity index 94% rename from rally_openstack/scenarios/cinder/volume_backups.py rename to rally_openstack/task/scenarios/cinder/volume_backups.py index aed94622..82493056 100644 --- a/rally_openstack/scenarios/cinder/volume_backups.py +++ b/rally_openstack/task/scenarios/cinder/volume_backups.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.cinder import utils as cinder_utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils """Scenarios for Cinder Volume Backup.""" diff --git a/rally_openstack/scenarios/cinder/volume_types.py b/rally_openstack/task/scenarios/cinder/volume_types.py similarity index 98% rename from rally_openstack/scenarios/cinder/volume_types.py rename to rally_openstack/task/scenarios/cinder/volume_types.py index 527200cb..ba33a8cc 100644 --- a/rally_openstack/scenarios/cinder/volume_types.py +++ b/rally_openstack/task/scenarios/cinder/volume_types.py @@ -15,10 +15,10 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.common.services.storage import cinder_v2 +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/cinder/volumes.py b/rally_openstack/task/scenarios/cinder/volumes.py similarity index 99% rename from rally_openstack/scenarios/cinder/volumes.py rename to rally_openstack/task/scenarios/cinder/volumes.py index 675d40fa..169907f8 100644 --- a/rally_openstack/scenarios/cinder/volumes.py +++ b/rally_openstack/task/scenarios/cinder/volumes.py @@ -21,11 +21,11 @@ from rally.task import atomic from rally.task import types from rally.task import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils +from rally_openstack.task.scenarios.glance import images +from rally_openstack.task.scenarios.nova import utils as nova_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/monasca/__init__.py b/rally_openstack/task/scenarios/designate/__init__.py similarity index 100% rename from rally_openstack/scenarios/monasca/__init__.py rename to rally_openstack/task/scenarios/designate/__init__.py diff --git a/rally_openstack/scenarios/designate/basic.py b/rally_openstack/task/scenarios/designate/basic.py similarity index 98% rename from rally_openstack/scenarios/designate/basic.py rename to rally_openstack/task/scenarios/designate/basic.py index 84436532..0a07c960 100644 --- a/rally_openstack/scenarios/designate/basic.py +++ b/rally_openstack/task/scenarios/designate/basic.py @@ -18,9 +18,9 @@ import random from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.designate import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.designate import utils """Basic scenarios for Designate.""" diff --git a/rally_openstack/scenarios/designate/utils.py b/rally_openstack/task/scenarios/designate/utils.py similarity index 99% rename from rally_openstack/scenarios/designate/utils.py rename to rally_openstack/task/scenarios/designate/utils.py index 2d48628c..bae162bf 100644 --- a/rally_openstack/scenarios/designate/utils.py +++ b/rally_openstack/task/scenarios/designate/utils.py @@ -16,7 +16,7 @@ from rally.task import atomic -from rally_openstack import scenario +from rally_openstack.task import scenario class DesignateScenario(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/dummy.py b/rally_openstack/task/scenarios/dummy.py similarity index 95% rename from rally_openstack/scenarios/dummy.py rename to rally_openstack/task/scenarios/dummy.py index 03bafd6d..e9233ab9 100644 --- a/rally_openstack/scenarios/dummy.py +++ b/rally_openstack/task/scenarios/dummy.py @@ -15,7 +15,7 @@ from rally.plugins.task.scenarios.dummy import dummy -from rally_openstack import scenario +from rally_openstack.task import scenario @scenario.configure(name="Dummy.openstack") diff --git a/rally_openstack/scenarios/murano/__init__.py b/rally_openstack/task/scenarios/elasticsearch/__init__.py similarity index 100% rename from rally_openstack/scenarios/murano/__init__.py rename to rally_openstack/task/scenarios/elasticsearch/__init__.py diff --git a/rally_openstack/scenarios/elasticsearch/logging.py b/rally_openstack/task/scenarios/elasticsearch/logging.py similarity index 96% rename from rally_openstack/scenarios/elasticsearch/logging.py rename to rally_openstack/task/scenarios/elasticsearch/logging.py index b56382fe..6cd8ae74 100644 --- a/rally_openstack/scenarios/elasticsearch/logging.py +++ b/rally_openstack/task/scenarios/elasticsearch/logging.py @@ -22,9 +22,9 @@ from rally.task import atomic from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils as nova_utils CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/neutron/__init__.py b/rally_openstack/task/scenarios/glance/__init__.py similarity index 100% rename from rally_openstack/scenarios/neutron/__init__.py rename to rally_openstack/task/scenarios/glance/__init__.py diff --git a/rally_openstack/scenarios/glance/images.py b/rally_openstack/task/scenarios/glance/images.py similarity index 98% rename from rally_openstack/scenarios/glance/images.py rename to rally_openstack/task/scenarios/glance/images.py index 37337c39..1a16b186 100644 --- a/rally_openstack/scenarios/glance/images.py +++ b/rally_openstack/task/scenarios/glance/images.py @@ -17,11 +17,11 @@ from rally.common import logging from rally.task import types from rally.task import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.common.services.image import glance_v2 +from rally_openstack.common.services.image import image +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils as nova_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/nova/__init__.py b/rally_openstack/task/scenarios/gnocchi/__init__.py similarity index 100% rename from rally_openstack/scenarios/nova/__init__.py rename to rally_openstack/task/scenarios/gnocchi/__init__.py diff --git a/rally_openstack/scenarios/gnocchi/archive_policy.py b/rally_openstack/task/scenarios/gnocchi/archive_policy.py similarity index 94% rename from rally_openstack/scenarios/gnocchi/archive_policy.py rename to rally_openstack/task/scenarios/gnocchi/archive_policy.py index f72076a7..b9b15588 100644 --- a/rally_openstack/scenarios/gnocchi/archive_policy.py +++ b/rally_openstack/task/scenarios/gnocchi/archive_policy.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi archive policy.""" diff --git a/rally_openstack/scenarios/gnocchi/archive_policy_rule.py b/rally_openstack/task/scenarios/gnocchi/archive_policy_rule.py similarity index 94% rename from rally_openstack/scenarios/gnocchi/archive_policy_rule.py rename to rally_openstack/task/scenarios/gnocchi/archive_policy_rule.py index 7b7711bc..502b6bde 100644 --- a/rally_openstack/scenarios/gnocchi/archive_policy_rule.py +++ b/rally_openstack/task/scenarios/gnocchi/archive_policy_rule.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi archive policy rule.""" diff --git a/rally_openstack/scenarios/gnocchi/capabilities.py b/rally_openstack/task/scenarios/gnocchi/capabilities.py similarity index 87% rename from rally_openstack/scenarios/gnocchi/capabilities.py rename to rally_openstack/task/scenarios/gnocchi/capabilities.py index 5eddf311..85471057 100644 --- a/rally_openstack/scenarios/gnocchi/capabilities.py +++ b/rally_openstack/task/scenarios/gnocchi/capabilities.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi capabilities.""" diff --git a/rally_openstack/scenarios/gnocchi/metric.py b/rally_openstack/task/scenarios/gnocchi/metric.py similarity index 94% rename from rally_openstack/scenarios/gnocchi/metric.py rename to rally_openstack/task/scenarios/gnocchi/metric.py index d93a184b..8888433f 100644 --- a/rally_openstack/scenarios/gnocchi/metric.py +++ b/rally_openstack/task/scenarios/gnocchi/metric.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi metric.""" diff --git a/rally_openstack/scenarios/gnocchi/resource.py b/rally_openstack/task/scenarios/gnocchi/resource.py similarity index 92% rename from rally_openstack/scenarios/gnocchi/resource.py rename to rally_openstack/task/scenarios/gnocchi/resource.py index 5df39fbe..c21e3658 100644 --- a/rally_openstack/scenarios/gnocchi/resource.py +++ b/rally_openstack/task/scenarios/gnocchi/resource.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi resource.""" diff --git a/rally_openstack/scenarios/gnocchi/resource_type.py b/rally_openstack/task/scenarios/gnocchi/resource_type.py similarity index 93% rename from rally_openstack/scenarios/gnocchi/resource_type.py rename to rally_openstack/task/scenarios/gnocchi/resource_type.py index a00c48ff..f6f1b040 100644 --- a/rally_openstack/scenarios/gnocchi/resource_type.py +++ b/rally_openstack/task/scenarios/gnocchi/resource_type.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi resource type.""" diff --git a/rally_openstack/scenarios/gnocchi/status.py b/rally_openstack/task/scenarios/gnocchi/status.py similarity index 87% rename from rally_openstack/scenarios/gnocchi/status.py rename to rally_openstack/task/scenarios/gnocchi/status.py index 3edc02e4..7e76800a 100644 --- a/rally_openstack/scenarios/gnocchi/status.py +++ b/rally_openstack/task/scenarios/gnocchi/status.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.gnocchi import utils as gnocchiutils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.gnocchi import utils as gnocchiutils """Scenarios for Gnocchi status.""" diff --git a/rally_openstack/scenarios/gnocchi/utils.py b/rally_openstack/task/scenarios/gnocchi/utils.py similarity index 92% rename from rally_openstack/scenarios/gnocchi/utils.py rename to rally_openstack/task/scenarios/gnocchi/utils.py index 059efb08..bdb3cdb6 100644 --- a/rally_openstack/scenarios/gnocchi/utils.py +++ b/rally_openstack/task/scenarios/gnocchi/utils.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import scenario -from rally_openstack.services.gnocchi import metric +from rally_openstack.common.services.gnocchi import metric +from rally_openstack.task import scenario class GnocchiBase(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/octavia/__init__.py b/rally_openstack/task/scenarios/grafana/__init__.py similarity index 100% rename from rally_openstack/scenarios/octavia/__init__.py rename to rally_openstack/task/scenarios/grafana/__init__.py diff --git a/rally_openstack/scenarios/grafana/metrics.py b/rally_openstack/task/scenarios/grafana/metrics.py similarity index 97% rename from rally_openstack/scenarios/grafana/metrics.py rename to rally_openstack/task/scenarios/grafana/metrics.py index f48c050b..11a7f12b 100644 --- a/rally_openstack/scenarios/grafana/metrics.py +++ b/rally_openstack/task/scenarios/grafana/metrics.py @@ -18,9 +18,9 @@ from rally.task import types from rally.task import utils from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.services.grafana import grafana as grafana_service +from rally_openstack.common import consts +from rally_openstack.common.services.grafana import grafana as grafana_service +from rally_openstack.task import scenario CONF = cfg.CONF LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/quotas/__init__.py b/rally_openstack/task/scenarios/heat/__init__.py similarity index 100% rename from rally_openstack/scenarios/quotas/__init__.py rename to rally_openstack/task/scenarios/heat/__init__.py diff --git a/rally_openstack/scenarios/heat/stacks.py b/rally_openstack/task/scenarios/heat/stacks.py similarity index 99% rename from rally_openstack/scenarios/heat/stacks.py rename to rally_openstack/task/scenarios/heat/stacks.py index a1b16765..1dccefd9 100644 --- a/rally_openstack/scenarios/heat/stacks.py +++ b/rally_openstack/task/scenarios/heat/stacks.py @@ -17,9 +17,9 @@ from rally.task import atomic from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.heat import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.heat import utils """Scenarios for Heat stacks.""" diff --git a/rally_openstack/scenarios/heat/utils.py b/rally_openstack/task/scenarios/heat/utils.py similarity index 99% rename from rally_openstack/scenarios/heat/utils.py rename to rally_openstack/task/scenarios/heat/utils.py index a3fb8cec..385e594c 100644 --- a/rally_openstack/scenarios/heat/utils.py +++ b/rally_openstack/task/scenarios/heat/utils.py @@ -20,7 +20,7 @@ from rally.task import atomic from rally.task import utils import requests -from rally_openstack import scenario +from rally_openstack.task import scenario LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/sahara/__init__.py b/rally_openstack/task/scenarios/ironic/__init__.py similarity index 100% rename from rally_openstack/scenarios/sahara/__init__.py rename to rally_openstack/task/scenarios/ironic/__init__.py diff --git a/rally_openstack/scenarios/ironic/nodes.py b/rally_openstack/task/scenarios/ironic/nodes.py similarity index 96% rename from rally_openstack/scenarios/ironic/nodes.py rename to rally_openstack/task/scenarios/ironic/nodes.py index 971985a2..0d46ece0 100644 --- a/rally_openstack/scenarios/ironic/nodes.py +++ b/rally_openstack/task/scenarios/ironic/nodes.py @@ -16,9 +16,9 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.ironic import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.ironic import utils """Scenarios for ironic nodes.""" diff --git a/rally_openstack/scenarios/ironic/utils.py b/rally_openstack/task/scenarios/ironic/utils.py similarity index 99% rename from rally_openstack/scenarios/ironic/utils.py rename to rally_openstack/task/scenarios/ironic/utils.py index 799b3e0c..fe8013b8 100644 --- a/rally_openstack/scenarios/ironic/utils.py +++ b/rally_openstack/task/scenarios/ironic/utils.py @@ -19,7 +19,7 @@ from rally.common import cfg from rally.task import atomic from rally.task import utils -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/senlin/__init__.py b/rally_openstack/task/scenarios/keystone/__init__.py similarity index 100% rename from rally_openstack/scenarios/senlin/__init__.py rename to rally_openstack/task/scenarios/keystone/__init__.py diff --git a/rally_openstack/scenarios/keystone/basic.py b/rally_openstack/task/scenarios/keystone/basic.py similarity index 99% rename from rally_openstack/scenarios/keystone/basic.py rename to rally_openstack/task/scenarios/keystone/basic.py index 4307805b..bb3212e9 100644 --- a/rally_openstack/scenarios/keystone/basic.py +++ b/rally_openstack/task/scenarios/keystone/basic.py @@ -16,8 +16,8 @@ from rally.common import logging from rally.task import validation -from rally_openstack import scenario -from rally_openstack.services.identity import identity +from rally_openstack.common.services.identity import identity +from rally_openstack.task import scenario class KeystoneBasic(scenario.OpenStackScenario): diff --git a/rally_openstack/scenarios/swift/__init__.py b/rally_openstack/task/scenarios/magnum/__init__.py similarity index 100% rename from rally_openstack/scenarios/swift/__init__.py rename to rally_openstack/task/scenarios/magnum/__init__.py diff --git a/rally_openstack/scenarios/magnum/cluster_templates.py b/rally_openstack/task/scenarios/magnum/cluster_templates.py similarity index 92% rename from rally_openstack/scenarios/magnum/cluster_templates.py rename to rally_openstack/task/scenarios/magnum/cluster_templates.py index e29ca7b8..0adbb1c2 100644 --- a/rally_openstack/scenarios/magnum/cluster_templates.py +++ b/rally_openstack/task/scenarios/magnum/cluster_templates.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.magnum import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.magnum import utils """Scenarios for Magnum cluster_templates.""" diff --git a/rally_openstack/scenarios/magnum/clusters.py b/rally_openstack/task/scenarios/magnum/clusters.py similarity index 93% rename from rally_openstack/scenarios/magnum/clusters.py rename to rally_openstack/task/scenarios/magnum/clusters.py index 90def1df..44bbcb65 100644 --- a/rally_openstack/scenarios/magnum/clusters.py +++ b/rally_openstack/task/scenarios/magnum/clusters.py @@ -14,10 +14,10 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.magnum import utils -from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.magnum import utils +from rally_openstack.task.scenarios.nova import utils as nova_utils """Scenarios for Magnum clusters.""" diff --git a/rally_openstack/scenarios/magnum/k8s_pods.py b/rally_openstack/task/scenarios/magnum/k8s_pods.py similarity index 94% rename from rally_openstack/scenarios/magnum/k8s_pods.py rename to rally_openstack/task/scenarios/magnum/k8s_pods.py index b50a9029..961893c3 100644 --- a/rally_openstack/scenarios/magnum/k8s_pods.py +++ b/rally_openstack/task/scenarios/magnum/k8s_pods.py @@ -16,9 +16,9 @@ import yaml from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.magnum import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.magnum import utils """Scenarios for Kubernetes pods and rcs.""" diff --git a/rally_openstack/scenarios/magnum/utils.py b/rally_openstack/task/scenarios/magnum/utils.py similarity index 99% rename from rally_openstack/scenarios/magnum/utils.py rename to rally_openstack/task/scenarios/magnum/utils.py index c71a73cf..49b1ffc2 100644 --- a/rally_openstack/scenarios/magnum/utils.py +++ b/rally_openstack/task/scenarios/magnum/utils.py @@ -28,7 +28,7 @@ from rally import exceptions from rally.task import atomic from rally.task import utils -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/vm/__init__.py b/rally_openstack/task/scenarios/manila/__init__.py similarity index 100% rename from rally_openstack/scenarios/vm/__init__.py rename to rally_openstack/task/scenarios/manila/__init__.py diff --git a/rally_openstack/scenarios/manila/shares.py b/rally_openstack/task/scenarios/manila/shares.py similarity index 98% rename from rally_openstack/scenarios/manila/shares.py rename to rally_openstack/task/scenarios/manila/shares.py index 1b374ca7..42046216 100644 --- a/rally_openstack/scenarios/manila/shares.py +++ b/rally_openstack/task/scenarios/manila/shares.py @@ -16,10 +16,10 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack.contexts.manila import consts as manila_consts -from rally_openstack import scenario -from rally_openstack.scenarios.manila import utils +from rally_openstack.common import consts +from rally_openstack.task.contexts.manila import consts as manila_consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.manila import utils """Scenarios for Manila shares.""" diff --git a/rally_openstack/scenarios/manila/utils.py b/rally_openstack/task/scenarios/manila/utils.py similarity index 99% rename from rally_openstack/scenarios/manila/utils.py rename to rally_openstack/task/scenarios/manila/utils.py index 967e2852..91e710c8 100644 --- a/rally_openstack/scenarios/manila/utils.py +++ b/rally_openstack/task/scenarios/manila/utils.py @@ -20,8 +20,8 @@ from rally import exceptions from rally.task import atomic from rally.task import utils -from rally_openstack.contexts.manila import consts -from rally_openstack import scenario +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/watcher/__init__.py b/rally_openstack/task/scenarios/mistral/__init__.py similarity index 100% rename from rally_openstack/scenarios/watcher/__init__.py rename to rally_openstack/task/scenarios/mistral/__init__.py diff --git a/rally_openstack/scenarios/mistral/executions.py b/rally_openstack/task/scenarios/mistral/executions.py similarity index 96% rename from rally_openstack/scenarios/mistral/executions.py rename to rally_openstack/task/scenarios/mistral/executions.py index 46b8d519..78129f8a 100644 --- a/rally_openstack/scenarios/mistral/executions.py +++ b/rally_openstack/task/scenarios/mistral/executions.py @@ -18,9 +18,9 @@ from rally.task import types from rally.task import validation import yaml -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.mistral import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.mistral import utils """Scenarios for Mistral execution.""" diff --git a/rally_openstack/scenarios/mistral/utils.py b/rally_openstack/task/scenarios/mistral/utils.py similarity index 99% rename from rally_openstack/scenarios/mistral/utils.py rename to rally_openstack/task/scenarios/mistral/utils.py index ebb5774e..c8c025fd 100644 --- a/rally_openstack/scenarios/mistral/utils.py +++ b/rally_openstack/task/scenarios/mistral/utils.py @@ -19,7 +19,7 @@ from rally.task import atomic from rally.task import utils import yaml -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/scenarios/mistral/workbooks.py b/rally_openstack/task/scenarios/mistral/workbooks.py similarity index 94% rename from rally_openstack/scenarios/mistral/workbooks.py rename to rally_openstack/task/scenarios/mistral/workbooks.py index 0e55492a..9ea03aa8 100644 --- a/rally_openstack/scenarios/mistral/workbooks.py +++ b/rally_openstack/task/scenarios/mistral/workbooks.py @@ -16,9 +16,9 @@ from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.mistral import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.mistral import utils """Scenarios for Mistral workbook.""" diff --git a/rally_openstack/scenarios/zaqar/__init__.py b/rally_openstack/task/scenarios/monasca/__init__.py similarity index 100% rename from rally_openstack/scenarios/zaqar/__init__.py rename to rally_openstack/task/scenarios/monasca/__init__.py diff --git a/rally_openstack/scenarios/monasca/metrics.py b/rally_openstack/task/scenarios/monasca/metrics.py similarity index 88% rename from rally_openstack/scenarios/monasca/metrics.py rename to rally_openstack/task/scenarios/monasca/metrics.py index 48571610..7bec1463 100644 --- a/rally_openstack/scenarios/monasca/metrics.py +++ b/rally_openstack/task/scenarios/monasca/metrics.py @@ -14,9 +14,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.monasca import utils as monascautils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.monasca import utils as monascautils """Scenarios for monasca Metrics API.""" diff --git a/rally_openstack/scenarios/monasca/utils.py b/rally_openstack/task/scenarios/monasca/utils.py similarity index 97% rename from rally_openstack/scenarios/monasca/utils.py rename to rally_openstack/task/scenarios/monasca/utils.py index cff63630..03bce8ef 100644 --- a/rally_openstack/scenarios/monasca/utils.py +++ b/rally_openstack/task/scenarios/monasca/utils.py @@ -19,7 +19,7 @@ import uuid from rally.common import cfg from rally.task import atomic -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/services/__init__.py b/rally_openstack/task/scenarios/murano/__init__.py similarity index 100% rename from rally_openstack/services/__init__.py rename to rally_openstack/task/scenarios/murano/__init__.py diff --git a/rally_openstack/scenarios/murano/environments.py b/rally_openstack/task/scenarios/murano/environments.py similarity index 95% rename from rally_openstack/scenarios/murano/environments.py rename to rally_openstack/task/scenarios/murano/environments.py index 42d13521..37dbbe40 100644 --- a/rally_openstack/scenarios/murano/environments.py +++ b/rally_openstack/task/scenarios/murano/environments.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.murano import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.murano import utils """Scenarios for Murano environments.""" diff --git a/rally_openstack/scenarios/murano/packages.py b/rally_openstack/task/scenarios/murano/packages.py similarity index 97% rename from rally_openstack/scenarios/murano/packages.py rename to rally_openstack/task/scenarios/murano/packages.py index bfc5dfc2..b082a0c8 100644 --- a/rally_openstack/scenarios/murano/packages.py +++ b/rally_openstack/task/scenarios/murano/packages.py @@ -19,9 +19,9 @@ import os from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.murano import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.murano import utils """Scenarios for Murano packages.""" diff --git a/rally_openstack/scenarios/murano/utils.py b/rally_openstack/task/scenarios/murano/utils.py similarity index 99% rename from rally_openstack/scenarios/murano/utils.py rename to rally_openstack/task/scenarios/murano/utils.py index 9d6b997e..acc69083 100644 --- a/rally_openstack/scenarios/murano/utils.py +++ b/rally_openstack/task/scenarios/murano/utils.py @@ -25,7 +25,7 @@ from rally.task import atomic from rally.task import utils import yaml -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/services/gnocchi/__init__.py b/rally_openstack/task/scenarios/neutron/__init__.py similarity index 100% rename from rally_openstack/services/gnocchi/__init__.py rename to rally_openstack/task/scenarios/neutron/__init__.py diff --git a/rally_openstack/scenarios/neutron/bgpvpn.py b/rally_openstack/task/scenarios/neutron/bgpvpn.py similarity index 99% rename from rally_openstack/scenarios/neutron/bgpvpn.py rename to rally_openstack/task/scenarios/neutron/bgpvpn.py index 693a42fd..9af2d63e 100644 --- a/rally_openstack/scenarios/neutron/bgpvpn.py +++ b/rally_openstack/task/scenarios/neutron/bgpvpn.py @@ -14,9 +14,9 @@ import random from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.neutron import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.neutron import utils """Scenarios for Neutron Networking-Bgpvpn.""" diff --git a/rally_openstack/scenarios/neutron/loadbalancer_v1.py b/rally_openstack/task/scenarios/neutron/loadbalancer_v1.py similarity index 98% rename from rally_openstack/scenarios/neutron/loadbalancer_v1.py rename to rally_openstack/task/scenarios/neutron/loadbalancer_v1.py index f7cdb180..a3229f7a 100644 --- a/rally_openstack/scenarios/neutron/loadbalancer_v1.py +++ b/rally_openstack/task/scenarios/neutron/loadbalancer_v1.py @@ -14,9 +14,9 @@ import random from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.neutron import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.neutron import utils """Scenarios for Neutron Loadbalancer v1.""" diff --git a/rally_openstack/scenarios/neutron/loadbalancer_v2.py b/rally_openstack/task/scenarios/neutron/loadbalancer_v2.py similarity index 93% rename from rally_openstack/scenarios/neutron/loadbalancer_v2.py rename to rally_openstack/task/scenarios/neutron/loadbalancer_v2.py index 20381f25..4fa410bc 100644 --- a/rally_openstack/scenarios/neutron/loadbalancer_v2.py +++ b/rally_openstack/task/scenarios/neutron/loadbalancer_v2.py @@ -12,9 +12,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.neutron import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.neutron import utils """Scenarios for Neutron Loadbalancer v2.""" diff --git a/rally_openstack/scenarios/neutron/network.py b/rally_openstack/task/scenarios/neutron/network.py similarity index 99% rename from rally_openstack/scenarios/neutron/network.py rename to rally_openstack/task/scenarios/neutron/network.py index 16988453..c10c980c 100644 --- a/rally_openstack/scenarios/neutron/network.py +++ b/rally_openstack/task/scenarios/neutron/network.py @@ -17,9 +17,9 @@ from rally.common import cfg from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.neutron import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.neutron import utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/neutron/security_groups.py b/rally_openstack/task/scenarios/neutron/security_groups.py similarity index 98% rename from rally_openstack/scenarios/neutron/security_groups.py rename to rally_openstack/task/scenarios/neutron/security_groups.py index ebbdfefb..85935cb3 100644 --- a/rally_openstack/scenarios/neutron/security_groups.py +++ b/rally_openstack/task/scenarios/neutron/security_groups.py @@ -12,9 +12,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.neutron import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.neutron import utils """Scenarios for Neutron Security Groups.""" diff --git a/rally_openstack/scenarios/neutron/trunk.py b/rally_openstack/task/scenarios/neutron/trunk.py similarity index 97% rename from rally_openstack/scenarios/neutron/trunk.py rename to rally_openstack/task/scenarios/neutron/trunk.py index 69206f68..5040a4d7 100644 --- a/rally_openstack/scenarios/neutron/trunk.py +++ b/rally_openstack/task/scenarios/neutron/trunk.py @@ -17,10 +17,10 @@ from rally.common import cfg from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.neutron import utils as neutron_utils -from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.neutron import utils as neutron_utils +from rally_openstack.task.scenarios.nova import utils as nova_utils CONF = cfg.CONF diff --git a/rally_openstack/scenarios/neutron/utils.py b/rally_openstack/task/scenarios/neutron/utils.py similarity index 99% rename from rally_openstack/scenarios/neutron/utils.py rename to rally_openstack/task/scenarios/neutron/utils.py index 11a3c2b0..13b70692 100644 --- a/rally_openstack/scenarios/neutron/utils.py +++ b/rally_openstack/task/scenarios/neutron/utils.py @@ -22,8 +22,8 @@ from rally import exceptions from rally.task import atomic from rally.task import utils -from rally_openstack import scenario -from rally_openstack.wrappers import network as network_wrapper +from rally_openstack.common.wrappers import network as network_wrapper +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/services/grafana/__init__.py b/rally_openstack/task/scenarios/nova/__init__.py similarity index 100% rename from rally_openstack/services/grafana/__init__.py rename to rally_openstack/task/scenarios/nova/__init__.py diff --git a/rally_openstack/scenarios/nova/agents.py b/rally_openstack/task/scenarios/nova/agents.py similarity index 90% rename from rally_openstack/scenarios/nova/agents.py rename to rally_openstack/task/scenarios/nova/agents.py index 5aab91c5..cd7f9b1f 100644 --- a/rally_openstack/scenarios/nova/agents.py +++ b/rally_openstack/task/scenarios/nova/agents.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova agents.""" diff --git a/rally_openstack/scenarios/nova/aggregates.py b/rally_openstack/task/scenarios/nova/aggregates.py similarity index 98% rename from rally_openstack/scenarios/nova/aggregates.py rename to rally_openstack/task/scenarios/nova/aggregates.py index 7871baba..95e78f0f 100644 --- a/rally_openstack/scenarios/nova/aggregates.py +++ b/rally_openstack/task/scenarios/nova/aggregates.py @@ -17,9 +17,9 @@ from rally import exceptions from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova aggregates.""" diff --git a/rally_openstack/scenarios/nova/availability_zones.py b/rally_openstack/task/scenarios/nova/availability_zones.py similarity index 90% rename from rally_openstack/scenarios/nova/availability_zones.py rename to rally_openstack/task/scenarios/nova/availability_zones.py index 57c4c60f..9ab0009c 100644 --- a/rally_openstack/scenarios/nova/availability_zones.py +++ b/rally_openstack/task/scenarios/nova/availability_zones.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova availability-zones.""" diff --git a/rally_openstack/scenarios/nova/flavors.py b/rally_openstack/task/scenarios/nova/flavors.py similarity index 98% rename from rally_openstack/scenarios/nova/flavors.py rename to rally_openstack/task/scenarios/nova/flavors.py index b0d3d2b9..51b0b064 100644 --- a/rally_openstack/scenarios/nova/flavors.py +++ b/rally_openstack/task/scenarios/nova/flavors.py @@ -16,9 +16,9 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova flavors.""" diff --git a/rally_openstack/scenarios/nova/hypervisors.py b/rally_openstack/task/scenarios/nova/hypervisors.py similarity index 97% rename from rally_openstack/scenarios/nova/hypervisors.py rename to rally_openstack/task/scenarios/nova/hypervisors.py index c76882bc..6769dc28 100644 --- a/rally_openstack/scenarios/nova/hypervisors.py +++ b/rally_openstack/task/scenarios/nova/hypervisors.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova hypervisors.""" diff --git a/rally_openstack/scenarios/nova/keypairs.py b/rally_openstack/task/scenarios/nova/keypairs.py similarity index 97% rename from rally_openstack/scenarios/nova/keypairs.py rename to rally_openstack/task/scenarios/nova/keypairs.py index 543de696..d96170bd 100644 --- a/rally_openstack/scenarios/nova/keypairs.py +++ b/rally_openstack/task/scenarios/nova/keypairs.py @@ -17,9 +17,9 @@ from rally.common import logging from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova keypairs.""" diff --git a/rally_openstack/scenarios/nova/server_groups.py b/rally_openstack/task/scenarios/nova/server_groups.py similarity index 97% rename from rally_openstack/scenarios/nova/server_groups.py rename to rally_openstack/task/scenarios/nova/server_groups.py index 2e75dd07..ca122ad1 100644 --- a/rally_openstack/scenarios/nova/server_groups.py +++ b/rally_openstack/task/scenarios/nova/server_groups.py @@ -16,9 +16,9 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/nova/servers.py b/rally_openstack/task/scenarios/nova/servers.py similarity index 99% rename from rally_openstack/scenarios/nova/servers.py rename to rally_openstack/task/scenarios/nova/servers.py index 55201d83..bee5acb8 100644 --- a/rally_openstack/scenarios/nova/servers.py +++ b/rally_openstack/task/scenarios/nova/servers.py @@ -19,12 +19,12 @@ from rally import exceptions as rally_exceptions from rally.task import types from rally.task import validation -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.common.wrappers import network as network_wrapper +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils +from rally_openstack.task.scenarios.neutron import utils as neutron_utils +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova servers.""" diff --git a/rally_openstack/scenarios/nova/services.py b/rally_openstack/task/scenarios/nova/services.py similarity index 90% rename from rally_openstack/scenarios/nova/services.py rename to rally_openstack/task/scenarios/nova/services.py index beb90564..baac6295 100644 --- a/rally_openstack/scenarios/nova/services.py +++ b/rally_openstack/task/scenarios/nova/services.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.nova import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.nova import utils """Scenarios for Nova agents.""" diff --git a/rally_openstack/scenarios/nova/utils.py b/rally_openstack/task/scenarios/nova/utils.py similarity index 99% rename from rally_openstack/scenarios/nova/utils.py rename to rally_openstack/task/scenarios/nova/utils.py index 6adac6e9..1b680210 100644 --- a/rally_openstack/scenarios/nova/utils.py +++ b/rally_openstack/task/scenarios/nova/utils.py @@ -20,9 +20,9 @@ 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_openstack.common.services.image import image as image_service +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils CONF = cfg.CONF diff --git a/rally_openstack/services/heat/__init__.py b/rally_openstack/task/scenarios/octavia/__init__.py similarity index 100% rename from rally_openstack/services/heat/__init__.py rename to rally_openstack/task/scenarios/octavia/__init__.py diff --git a/rally_openstack/scenarios/octavia/loadbalancers.py b/rally_openstack/task/scenarios/octavia/loadbalancers.py similarity index 98% rename from rally_openstack/scenarios/octavia/loadbalancers.py rename to rally_openstack/task/scenarios/octavia/loadbalancers.py index cdd2b59b..c80a4788 100644 --- a/rally_openstack/scenarios/octavia/loadbalancers.py +++ b/rally_openstack/task/scenarios/octavia/loadbalancers.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.octavia import utils as octavia_utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.octavia import utils as octavia_utils """Scenarios for Octavia Loadbalancer.""" diff --git a/rally_openstack/scenarios/octavia/pools.py b/rally_openstack/task/scenarios/octavia/pools.py similarity index 97% rename from rally_openstack/scenarios/octavia/pools.py rename to rally_openstack/task/scenarios/octavia/pools.py index ef9a8a53..53c0a02f 100644 --- a/rally_openstack/scenarios/octavia/pools.py +++ b/rally_openstack/task/scenarios/octavia/pools.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.octavia import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.octavia import utils """Scenarios for Octavia Loadbalancer pools.""" diff --git a/rally_openstack/scenarios/octavia/utils.py b/rally_openstack/task/scenarios/octavia/utils.py similarity index 92% rename from rally_openstack/scenarios/octavia/utils.py rename to rally_openstack/task/scenarios/octavia/utils.py index 5e9f0918..7e6e6e16 100644 --- a/rally_openstack/scenarios/octavia/utils.py +++ b/rally_openstack/task/scenarios/octavia/utils.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import scenario -from rally_openstack.services.loadbalancer import octavia +from rally_openstack.common.services.loadbalancer import octavia +from rally_openstack.task import scenario class OctaviaBase(scenario.OpenStackScenario): diff --git a/rally_openstack/services/identity/__init__.py b/rally_openstack/task/scenarios/quotas/__init__.py similarity index 100% rename from rally_openstack/services/identity/__init__.py rename to rally_openstack/task/scenarios/quotas/__init__.py diff --git a/rally_openstack/scenarios/quotas/quotas.py b/rally_openstack/task/scenarios/quotas/quotas.py similarity index 97% rename from rally_openstack/scenarios/quotas/quotas.py rename to rally_openstack/task/scenarios/quotas/quotas.py index 844deb35..3454ae59 100644 --- a/rally_openstack/scenarios/quotas/quotas.py +++ b/rally_openstack/task/scenarios/quotas/quotas.py @@ -15,9 +15,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.quotas import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.quotas import utils """Scenarios for quotas.""" diff --git a/rally_openstack/scenarios/quotas/utils.py b/rally_openstack/task/scenarios/quotas/utils.py similarity index 98% rename from rally_openstack/scenarios/quotas/utils.py rename to rally_openstack/task/scenarios/quotas/utils.py index eeeae724..3c3ede93 100644 --- a/rally_openstack/scenarios/quotas/utils.py +++ b/rally_openstack/task/scenarios/quotas/utils.py @@ -17,7 +17,7 @@ import random from rally.task import atomic -from rally_openstack import scenario +from rally_openstack.task import scenario class QuotasScenario(scenario.OpenStackScenario): diff --git a/rally_openstack/services/image/__init__.py b/rally_openstack/task/scenarios/sahara/__init__.py similarity index 100% rename from rally_openstack/services/image/__init__.py rename to rally_openstack/task/scenarios/sahara/__init__.py diff --git a/rally_openstack/scenarios/sahara/clusters.py b/rally_openstack/task/scenarios/sahara/clusters.py similarity index 98% rename from rally_openstack/scenarios/sahara/clusters.py rename to rally_openstack/task/scenarios/sahara/clusters.py index 1f01418a..5f5f8365 100644 --- a/rally_openstack/scenarios/sahara/clusters.py +++ b/rally_openstack/task/scenarios/sahara/clusters.py @@ -17,9 +17,9 @@ from rally.common import logging from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.sahara import utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/sahara/consts.py b/rally_openstack/task/scenarios/sahara/consts.py similarity index 100% rename from rally_openstack/scenarios/sahara/consts.py rename to rally_openstack/task/scenarios/sahara/consts.py diff --git a/rally_openstack/scenarios/sahara/jobs.py b/rally_openstack/task/scenarios/sahara/jobs.py similarity index 97% rename from rally_openstack/scenarios/sahara/jobs.py rename to rally_openstack/task/scenarios/sahara/jobs.py index 4f52a6ec..d29fdc1f 100644 --- a/rally_openstack/scenarios/sahara/jobs.py +++ b/rally_openstack/task/scenarios/sahara/jobs.py @@ -16,9 +16,9 @@ from rally.common import logging from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.sahara import utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/sahara/node_group_templates.py b/rally_openstack/task/scenarios/sahara/node_group_templates.py similarity index 97% rename from rally_openstack/scenarios/sahara/node_group_templates.py rename to rally_openstack/task/scenarios/sahara/node_group_templates.py index ccfc76f1..fc014921 100644 --- a/rally_openstack/scenarios/sahara/node_group_templates.py +++ b/rally_openstack/task/scenarios/sahara/node_group_templates.py @@ -16,9 +16,9 @@ from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.sahara import utils """Scenarios for Sahara node group templates.""" diff --git a/rally_openstack/scenarios/sahara/utils.py b/rally_openstack/task/scenarios/sahara/utils.py similarity index 99% rename from rally_openstack/scenarios/sahara/utils.py rename to rally_openstack/task/scenarios/sahara/utils.py index 63b3d058..12280ce8 100644 --- a/rally_openstack/scenarios/sahara/utils.py +++ b/rally_openstack/task/scenarios/sahara/utils.py @@ -23,9 +23,9 @@ from rally import exceptions from rally.task import atomic from rally.task import utils -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.sahara import consts as sahara_consts +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.sahara import consts as sahara_consts LOG = logging.getLogger(__name__) diff --git a/rally_openstack/services/key_manager/__init__.py b/rally_openstack/task/scenarios/senlin/__init__.py similarity index 100% rename from rally_openstack/services/key_manager/__init__.py rename to rally_openstack/task/scenarios/senlin/__init__.py diff --git a/rally_openstack/scenarios/senlin/clusters.py b/rally_openstack/task/scenarios/senlin/clusters.py similarity index 93% rename from rally_openstack/scenarios/senlin/clusters.py rename to rally_openstack/task/scenarios/senlin/clusters.py index 25ea2484..a848d07b 100644 --- a/rally_openstack/scenarios/senlin/clusters.py +++ b/rally_openstack/task/scenarios/senlin/clusters.py @@ -12,9 +12,9 @@ from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.senlin import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.senlin import utils """Scenarios for Senlin clusters.""" diff --git a/rally_openstack/scenarios/senlin/utils.py b/rally_openstack/task/scenarios/senlin/utils.py similarity index 99% rename from rally_openstack/scenarios/senlin/utils.py rename to rally_openstack/task/scenarios/senlin/utils.py index 56955ba8..0cf48644 100644 --- a/rally_openstack/scenarios/senlin/utils.py +++ b/rally_openstack/task/scenarios/senlin/utils.py @@ -15,7 +15,7 @@ from rally import exceptions from rally.task import atomic from rally.task import utils -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/rally_openstack/services/loadbalancer/__init__.py b/rally_openstack/task/scenarios/swift/__init__.py similarity index 100% rename from rally_openstack/services/loadbalancer/__init__.py rename to rally_openstack/task/scenarios/swift/__init__.py diff --git a/rally_openstack/scenarios/swift/objects.py b/rally_openstack/task/scenarios/swift/objects.py similarity index 97% rename from rally_openstack/scenarios/swift/objects.py rename to rally_openstack/task/scenarios/swift/objects.py index b683ebf6..b58d9917 100644 --- a/rally_openstack/scenarios/swift/objects.py +++ b/rally_openstack/task/scenarios/swift/objects.py @@ -17,9 +17,9 @@ import tempfile from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.swift import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.swift import utils """Scenarios for Swift Objects.""" diff --git a/rally_openstack/scenarios/swift/utils.py b/rally_openstack/task/scenarios/swift/utils.py similarity index 99% rename from rally_openstack/scenarios/swift/utils.py rename to rally_openstack/task/scenarios/swift/utils.py index ac077cea..ecf51f2e 100644 --- a/rally_openstack/scenarios/swift/utils.py +++ b/rally_openstack/task/scenarios/swift/utils.py @@ -15,7 +15,7 @@ from rally.task import atomic -from rally_openstack import scenario +from rally_openstack.task import scenario class SwiftScenario(scenario.OpenStackScenario): diff --git a/rally_openstack/services/storage/__init__.py b/rally_openstack/task/scenarios/vm/__init__.py similarity index 100% rename from rally_openstack/services/storage/__init__.py rename to rally_openstack/task/scenarios/vm/__init__.py diff --git a/rally_openstack/scenarios/vm/utils.py b/rally_openstack/task/scenarios/vm/utils.py similarity index 98% rename from rally_openstack/scenarios/vm/utils.py rename to rally_openstack/task/scenarios/vm/utils.py index b02c6e81..ea71eb9f 100644 --- a/rally_openstack/scenarios/vm/utils.py +++ b/rally_openstack/task/scenarios/vm/utils.py @@ -26,8 +26,8 @@ from rally.task import atomic from rally.task import utils from rally.utils import sshutils -from rally_openstack.scenarios.nova import utils as nova_utils -from rally_openstack.wrappers import network as network_wrapper +from rally_openstack.common.wrappers import network as network_wrapper +from rally_openstack.task.scenarios.nova import utils as nova_utils LOG = logging.getLogger(__name__) diff --git a/rally_openstack/scenarios/vm/vmtasks.py b/rally_openstack/task/scenarios/vm/vmtasks.py similarity index 98% rename from rally_openstack/scenarios/vm/vmtasks.py rename to rally_openstack/task/scenarios/vm/vmtasks.py index 51daf475..c4f91032 100644 --- a/rally_openstack/scenarios/vm/vmtasks.py +++ b/rally_openstack/task/scenarios/vm/vmtasks.py @@ -25,11 +25,11 @@ from rally.task import atomic from rally.task import types from rally.utils import sshutils -from rally_openstack import consts -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_openstack.common import consts +from rally_openstack.common.services import heat +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.cinder import utils as cinder_utils +from rally_openstack.task.scenarios.vm import utils as vm_utils """Scenarios that are to be run inside VM instances.""" diff --git a/rally_openstack/workload/__init__.py b/rally_openstack/task/scenarios/vm/workloads/__init__.py similarity index 100% rename from rally_openstack/workload/__init__.py rename to rally_openstack/task/scenarios/vm/workloads/__init__.py diff --git a/rally_openstack/workload/siege.py b/rally_openstack/task/scenarios/vm/workloads/siege.py similarity index 100% rename from rally_openstack/workload/siege.py rename to rally_openstack/task/scenarios/vm/workloads/siege.py diff --git a/rally_openstack/wrappers/__init__.py b/rally_openstack/task/scenarios/watcher/__init__.py similarity index 100% rename from rally_openstack/wrappers/__init__.py rename to rally_openstack/task/scenarios/watcher/__init__.py diff --git a/rally_openstack/scenarios/watcher/basic.py b/rally_openstack/task/scenarios/watcher/basic.py similarity index 96% rename from rally_openstack/scenarios/watcher/basic.py rename to rally_openstack/task/scenarios/watcher/basic.py index b50e305d..ce8ae7ff 100644 --- a/rally_openstack/scenarios/watcher/basic.py +++ b/rally_openstack/task/scenarios/watcher/basic.py @@ -14,9 +14,9 @@ from rally.common import logging from rally.task import types from rally.task import validation -from rally_openstack import consts -from rally_openstack import scenario -from rally_openstack.scenarios.watcher import utils +from rally_openstack.common import consts +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.watcher import utils """Scenarios for Watcher servers.""" diff --git a/rally_openstack/scenarios/watcher/utils.py b/rally_openstack/task/scenarios/watcher/utils.py similarity index 98% rename from rally_openstack/scenarios/watcher/utils.py rename to rally_openstack/task/scenarios/watcher/utils.py index 4c3f8d63..6c6e390e 100644 --- a/rally_openstack/scenarios/watcher/utils.py +++ b/rally_openstack/task/scenarios/watcher/utils.py @@ -14,7 +14,7 @@ from rally.common import cfg from rally.task import atomic from rally.task import utils -from rally_openstack import scenario +from rally_openstack.task import scenario CONF = cfg.CONF diff --git a/tests/unit/cleanup/__init__.py b/rally_openstack/task/scenarios/zaqar/__init__.py similarity index 100% rename from tests/unit/cleanup/__init__.py rename to rally_openstack/task/scenarios/zaqar/__init__.py diff --git a/rally_openstack/scenarios/zaqar/basic.py b/rally_openstack/task/scenarios/zaqar/basic.py similarity index 95% rename from rally_openstack/scenarios/zaqar/basic.py rename to rally_openstack/task/scenarios/zaqar/basic.py index ed46c1d5..ff370fe0 100644 --- a/rally_openstack/scenarios/zaqar/basic.py +++ b/rally_openstack/task/scenarios/zaqar/basic.py @@ -16,8 +16,8 @@ import random from rally.common import logging -from rally_openstack import scenario -from rally_openstack.scenarios.zaqar import utils as zutils +from rally_openstack.task import scenario +from rally_openstack.task.scenarios.zaqar import utils as zutils """Scenarios for Zaqar.""" diff --git a/rally_openstack/scenarios/zaqar/utils.py b/rally_openstack/task/scenarios/zaqar/utils.py similarity index 98% rename from rally_openstack/scenarios/zaqar/utils.py rename to rally_openstack/task/scenarios/zaqar/utils.py index 326eeafe..d0a49a87 100644 --- a/rally_openstack/scenarios/zaqar/utils.py +++ b/rally_openstack/task/scenarios/zaqar/utils.py @@ -14,7 +14,7 @@ from rally.task import atomic -from rally_openstack import scenario +from rally_openstack.task import scenario class ZaqarScenario(scenario.OpenStackScenario): diff --git a/rally_openstack/types.py b/rally_openstack/task/types.py similarity index 98% rename from rally_openstack/types.py rename to rally_openstack/task/types.py index 998f2d73..3f1ccfe6 100644 --- a/rally_openstack/types.py +++ b/rally_openstack/task/types.py @@ -21,9 +21,9 @@ from rally.common.plugin import plugin from rally import exceptions from rally.task import types -from rally_openstack import osclients -from rally_openstack.services.image import image -from rally_openstack.services.storage import block +from rally_openstack.common import osclients +from rally_openstack.common.services.image import image +from rally_openstack.common.services.storage import block LOG = logging.getLogger(__name__) diff --git a/tests/unit/contexts/__init__.py b/rally_openstack/task/ui/__init__.py similarity index 100% rename from tests/unit/contexts/__init__.py rename to rally_openstack/task/ui/__init__.py diff --git a/tests/unit/contexts/ceilometer/__init__.py b/rally_openstack/task/ui/charts/__init__.py similarity index 100% rename from tests/unit/contexts/ceilometer/__init__.py rename to rally_openstack/task/ui/charts/__init__.py diff --git a/rally_openstack/embedcharts/osprofilerchart.py b/rally_openstack/task/ui/charts/osprofilerchart.py similarity index 100% rename from rally_openstack/embedcharts/osprofilerchart.py rename to rally_openstack/task/ui/charts/osprofilerchart.py diff --git a/rally_openstack/verification/tempest/context.py b/rally_openstack/verification/tempest/context.py index ed82dcc9..c101f9db 100644 --- a/rally_openstack/verification/tempest/context.py +++ b/rally_openstack/verification/tempest/context.py @@ -25,9 +25,9 @@ from rally.task import utils as task_utils from rally.verification import context from rally.verification import utils -from rally_openstack.services.image import image +from rally_openstack.common.services.image import image +from rally_openstack.common.wrappers import network from rally_openstack.verification.tempest import config as conf -from rally_openstack.wrappers import network LOG = logging.getLogger(__name__) diff --git a/samples/tasks/scenarios/workload/wordpress.json b/samples/tasks/scenarios/workload/wordpress.json index 19ae433f..b0c4120e 100644 --- a/samples/tasks/scenarios/workload/wordpress.json +++ b/samples/tasks/scenarios/workload/wordpress.json @@ -14,7 +14,7 @@ "workload": { "username": "fedora", "resource": [ - "rally.plugins.workload", + "rally_openstack.task.scenarios.vm.workloads", "siege.py" ] }, diff --git a/samples/tasks/scenarios/workload/wordpress.yaml b/samples/tasks/scenarios/workload/wordpress.yaml index 9ed61af4..71ff9b09 100644 --- a/samples/tasks/scenarios/workload/wordpress.yaml +++ b/samples/tasks/scenarios/workload/wordpress.yaml @@ -4,7 +4,7 @@ - args: workload: - resource: ["rally.plugins.workload", "siege.py"] + resource: ["rally_openstack.task.scenarios.vm.workloads", "siege.py"] username: "fedora" template: rally-jobs/extra/workload/wordpress_heat_template.yaml files: diff --git a/setup.cfg b/setup.cfg index 423cd8f0..5dbd91ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,9 +33,9 @@ setup-hooks = [entry_points] rally_plugins = path = rally_openstack - options = rally_openstack.cfg.opts:list_opts + options = rally_openstack.common.cfg.opts:list_opts oslo.config.opts = - rally_openstack = rally_openstack.cfg.opts:list_opts + rally_openstack = rally_openstack.common.cfg.opts:list_opts [build_sphinx] all_files = 1 diff --git a/tests/ci/osresources.py b/tests/ci/osresources.py index 5c7693bb..dc8ef409 100755 --- a/tests/ci/osresources.py +++ b/tests/ci/osresources.py @@ -25,8 +25,8 @@ from rally.cli import cliutils from rally.common.plugin import discover from rally import plugins -from rally_openstack import consts -from rally_openstack import credential +from rally_openstack.common import consts +from rally_openstack.common import credential def skip_if_service(service): diff --git a/tests/functional/extra/fake_dir/fake_plugin.py b/tests/functional/extra/fake_dir/fake_plugin.py index 1d69702c..8dd24027 100644 --- a/tests/functional/extra/fake_dir/fake_plugin.py +++ b/tests/functional/extra/fake_dir/fake_plugin.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from rally_openstack import osclients -from rally_openstack import scenario +from rally_openstack.common import osclients +from rally_openstack.task import scenario @osclients.configure("fakedummy", default_version="1", diff --git a/tests/functional/test_task_samples.py b/tests/functional/test_task_samples.py index 197dea8f..6b6f4503 100644 --- a/tests/functional/test_task_samples.py +++ b/tests/functional/test_task_samples.py @@ -52,7 +52,7 @@ class TestTaskSamples(unittest.TestCase): @plugins.ensure_plugins_are_loaded def test_task_samples_are_valid(self): - from rally_openstack.contexts.keystone import users + from rally_openstack.task.contexts.keystone import users rally = utils.Rally(force_new_db=True) # let's use pre-created users to make TestTaskSamples quicker rapi = api.API(config_file=rally.config_filename) diff --git a/tests/unit/contexts/cinder/__init__.py b/tests/unit/common/__init__.py similarity index 100% rename from tests/unit/contexts/cinder/__init__.py rename to tests/unit/common/__init__.py diff --git a/tests/unit/contexts/cleanup/__init__.py b/tests/unit/common/services/__init__.py similarity index 100% rename from tests/unit/contexts/cleanup/__init__.py rename to tests/unit/common/services/__init__.py diff --git a/tests/unit/contexts/dataplane/__init__.py b/tests/unit/common/services/barbican/__init__.py similarity index 100% rename from tests/unit/contexts/dataplane/__init__.py rename to tests/unit/common/services/barbican/__init__.py diff --git a/tests/unit/services/barbican/test_secrets.py b/tests/unit/common/services/barbican/test_secrets.py similarity index 99% rename from tests/unit/services/barbican/test_secrets.py rename to tests/unit/common/services/barbican/test_secrets.py index 7a465eaf..780b7cb8 100644 --- a/tests/unit/services/barbican/test_secrets.py +++ b/tests/unit/common/services/barbican/test_secrets.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.services.key_manager import barbican +from rally_openstack.common.services.key_manager import barbican from tests.unit import test diff --git a/tests/unit/contexts/designate/__init__.py b/tests/unit/common/services/gnocchi/__init__.py similarity index 100% rename from tests/unit/contexts/designate/__init__.py rename to tests/unit/common/services/gnocchi/__init__.py diff --git a/tests/unit/services/gnocchi/test_metric.py b/tests/unit/common/services/gnocchi/test_metric.py similarity index 99% rename from tests/unit/services/gnocchi/test_metric.py rename to tests/unit/common/services/gnocchi/test_metric.py index ecd4eb44..4087f0c7 100644 --- a/tests/unit/services/gnocchi/test_metric.py +++ b/tests/unit/common/services/gnocchi/test_metric.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.services.gnocchi import metric +from rally_openstack.common.services.gnocchi import metric from tests.unit import test diff --git a/tests/unit/contexts/glance/__init__.py b/tests/unit/common/services/heat/__init__.py similarity index 100% rename from tests/unit/contexts/glance/__init__.py rename to tests/unit/common/services/heat/__init__.py diff --git a/tests/unit/services/heat/test_main.py b/tests/unit/common/services/heat/test_main.py similarity index 89% rename from tests/unit/services/heat/test_main.py rename to tests/unit/common/services/heat/test_main.py index 2c5027fe..74442f2b 100644 --- a/tests/unit/services/heat/test_main.py +++ b/tests/unit/common/services/heat/test_main.py @@ -13,7 +13,7 @@ from unittest import mock -from rally_openstack.services.heat import main +from rally_openstack.common.services.heat import main from tests.unit import test @@ -24,7 +24,7 @@ class Stack(main.Stack): class StackTestCase(test.ScenarioTestCase): - @mock.patch("rally_openstack.services.heat.main.open", + @mock.patch("rally_openstack.common.services.heat.main.open", create=True) def test___init__(self, mock_open): reads = [mock.Mock(), mock.Mock()] @@ -41,7 +41,7 @@ class StackTestCase(test.ScenarioTestCase): reads[0].read.assert_called_once_with() reads[1].read.assert_called_once_with() - @mock.patch("rally_openstack.services.heat.main.utils") + @mock.patch("rally_openstack.common.services.heat.main.utils") def test__wait(self, mock_utils): fake_stack = mock.Mock() stack = Stack() @@ -55,8 +55,8 @@ class StackTestCase(test.ScenarioTestCase): update_resource=mock_utils.get_from_manager()) @mock.patch("rally.task.atomic") - @mock.patch("rally_openstack.services.heat.main.open") - @mock.patch("rally_openstack.services.heat.main.Stack._wait") + @mock.patch("rally_openstack.common.services.heat.main.open") + @mock.patch("rally_openstack.common.services.heat.main.Stack._wait") def test_create(self, mock_stack__wait, mock_open, mock_task_atomic): mock_scenario = mock.MagicMock(_atomic_actions=[]) mock_scenario.generate_random_name.return_value = "fake_name" @@ -84,8 +84,8 @@ class StackTestCase(test.ScenarioTestCase): ["CREATE_FAILED"]) @mock.patch("rally.task.atomic") - @mock.patch("rally_openstack.services.heat.main.open") - @mock.patch("rally_openstack.services.heat.main.Stack._wait") + @mock.patch("rally_openstack.common.services.heat.main.open") + @mock.patch("rally_openstack.common.services.heat.main.Stack._wait") def test_update(self, mock_stack__wait, mock_open, mock_task_atomic): mock_scenario = mock.MagicMock( stack_id="fake_id", _atomic_actions=[]) diff --git a/tests/unit/contexts/heat/__init__.py b/tests/unit/common/services/identity/__init__.py similarity index 100% rename from tests/unit/contexts/heat/__init__.py rename to tests/unit/common/services/identity/__init__.py diff --git a/tests/unit/services/identity/test_identity.py b/tests/unit/common/services/identity/test_identity.py similarity index 98% rename from tests/unit/services/identity/test_identity.py rename to tests/unit/common/services/identity/test_identity.py index e701fb68..a8420ad3 100644 --- a/tests/unit/services/identity/test_identity.py +++ b/tests/unit/common/services/identity/test_identity.py @@ -16,7 +16,7 @@ from unittest import mock import ddt -from rally_openstack.services.identity import identity +from rally_openstack.common.services.identity import identity from tests.unit import test @@ -27,7 +27,7 @@ class IdentityTestCase(test.TestCase): self.clients = mock.MagicMock() def get_service_with_fake_impl(self): - path = "rally_openstack.services.identity.identity" + path = "rally_openstack.common.services.identity.identity" with mock.patch("%s.Identity.discover_impl" % path) as mock_discover: mock_discover.return_value = mock.MagicMock(), None service = identity.Identity(self.clients) diff --git a/tests/unit/services/identity/test_keystone_common.py b/tests/unit/common/services/identity/test_keystone_common.py similarity index 97% rename from tests/unit/services/identity/test_keystone_common.py rename to tests/unit/common/services/identity/test_keystone_common.py index 654086ac..643ac223 100644 --- a/tests/unit/services/identity/test_keystone_common.py +++ b/tests/unit/common/services/identity/test_keystone_common.py @@ -14,9 +14,9 @@ from unittest import mock -from rally_openstack import service -from rally_openstack.services.identity import identity -from rally_openstack.services.identity import keystone_common +from rally_openstack.common import service +from rally_openstack.common.services.identity import identity +from rally_openstack.common.services.identity import keystone_common from tests.unit import test @@ -265,7 +265,7 @@ class KeystoneMixinTestCase(test.TestCase): self.kc.ec2.delete.assert_called_once_with(user_id=user_id, access=access) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_fetch_token(self, mock_clients): expected_token = mock_clients.return_value.keystone.auth_ref.auth_token self.assertEqual(expected_token, self.service.fetch_token()) diff --git a/tests/unit/services/identity/test_keystone_v2.py b/tests/unit/common/services/identity/test_keystone_v2.py similarity index 99% rename from tests/unit/services/identity/test_keystone_v2.py rename to tests/unit/common/services/identity/test_keystone_v2.py index 8f07b58a..0e48908a 100644 --- a/tests/unit/services/identity/test_keystone_v2.py +++ b/tests/unit/common/services/identity/test_keystone_v2.py @@ -17,12 +17,12 @@ import uuid import ddt -from rally_openstack.services.identity import identity -from rally_openstack.services.identity import keystone_v2 +from rally_openstack.common.services.identity import identity +from rally_openstack.common.services.identity import keystone_v2 from tests.unit import test -PATH = "rally_openstack.services.identity.keystone_v2" +PATH = "rally_openstack.common.services.identity.keystone_v2" @ddt.ddt diff --git a/tests/unit/services/identity/test_keystone_v3.py b/tests/unit/common/services/identity/test_keystone_v3.py similarity index 99% rename from tests/unit/services/identity/test_keystone_v3.py rename to tests/unit/common/services/identity/test_keystone_v3.py index b8a20e4d..a4d002da 100644 --- a/tests/unit/services/identity/test_keystone_v3.py +++ b/tests/unit/common/services/identity/test_keystone_v3.py @@ -19,12 +19,12 @@ import ddt from rally import exceptions -from rally_openstack.services.identity import identity -from rally_openstack.services.identity import keystone_v3 +from rally_openstack.common.services.identity import identity +from rally_openstack.common.services.identity import keystone_v3 from tests.unit import test -PATH = "rally_openstack.services.identity.keystone_v3" +PATH = "rally_openstack.common.services.identity.keystone_v3" @ddt.ddt diff --git a/tests/unit/contexts/keystone/__init__.py b/tests/unit/common/services/image/__init__.py similarity index 100% rename from tests/unit/contexts/keystone/__init__.py rename to tests/unit/common/services/image/__init__.py diff --git a/tests/unit/services/image/test_glance_common.py b/tests/unit/common/services/image/test_glance_common.py similarity index 96% rename from tests/unit/services/image/test_glance_common.py rename to tests/unit/common/services/image/test_glance_common.py index 6161122f..12fb05ab 100644 --- a/tests/unit/services/image/test_glance_common.py +++ b/tests/unit/common/services/image/test_glance_common.py @@ -19,9 +19,9 @@ from glanceclient import exc as glance_exc from rally import exceptions -from rally_openstack import service -from rally_openstack.services.image import glance_common -from rally_openstack.services.image import image +from rally_openstack.common import service +from rally_openstack.common.services.image import glance_common +from rally_openstack.common.services.image import image from tests.unit import test diff --git a/tests/unit/services/image/test_glance_v1.py b/tests/unit/common/services/image/test_glance_v1.py similarity index 97% rename from tests/unit/services/image/test_glance_v1.py rename to tests/unit/common/services/image/test_glance_v1.py index 810c6b9c..295ca66b 100644 --- a/tests/unit/services/image/test_glance_v1.py +++ b/tests/unit/common/services/image/test_glance_v1.py @@ -17,12 +17,12 @@ from unittest import mock import ddt import fixtures -from rally_openstack.services.image import glance_v1 -from rally_openstack.services.image import image +from rally_openstack.common.services.image import glance_v1 +from rally_openstack.common.services.image import image from tests.unit import test -PATH = ("rally_openstack.services.image.glance_common." +PATH = ("rally_openstack.common.services.image.glance_common." "UnifiedGlanceMixin._unify_image") diff --git a/tests/unit/services/image/test_glance_v2.py b/tests/unit/common/services/image/test_glance_v2.py similarity index 98% rename from tests/unit/services/image/test_glance_v2.py rename to tests/unit/common/services/image/test_glance_v2.py index f05f3d7f..ca22cc90 100644 --- a/tests/unit/services/image/test_glance_v2.py +++ b/tests/unit/common/services/image/test_glance_v2.py @@ -17,11 +17,11 @@ from unittest import mock import ddt import fixtures -from rally_openstack.services.image import glance_v2 +from rally_openstack.common.services.image import glance_v2 from tests.unit import test -PATH = "rally_openstack.services.image" +PATH = "rally_openstack.common.services.image" @ddt.ddt diff --git a/tests/unit/services/image/test_image.py b/tests/unit/common/services/image/test_image.py similarity index 95% rename from tests/unit/services/image/test_image.py rename to tests/unit/common/services/image/test_image.py index b0892719..11415324 100644 --- a/tests/unit/services/image/test_image.py +++ b/tests/unit/common/services/image/test_image.py @@ -16,9 +16,9 @@ from unittest import mock import ddt -from rally_openstack.services.image import glance_v1 -from rally_openstack.services.image import glance_v2 -from rally_openstack.services.image import image +from rally_openstack.common.services.image import glance_v1 +from rally_openstack.common.services.image import glance_v2 +from rally_openstack.common.services.image import image from tests.unit import test @@ -30,7 +30,7 @@ class ImageTestCase(test.TestCase): self.clients = mock.MagicMock() def get_service_with_fake_impl(self): - path = "rally_openstack.services.image.image" + path = "rally_openstack.common.services.image.image" with mock.patch("%s.Image.discover_impl" % path) as mock_discover: mock_discover.return_value = mock.MagicMock(), None service = image.Image(self.clients) diff --git a/tests/unit/contexts/magnum/__init__.py b/tests/unit/common/services/loadbalancer/__init__.py similarity index 100% rename from tests/unit/contexts/magnum/__init__.py rename to tests/unit/common/services/loadbalancer/__init__.py diff --git a/tests/unit/services/loadbalancer/test_octavia.py b/tests/unit/common/services/loadbalancer/test_octavia.py similarity index 99% rename from tests/unit/services/loadbalancer/test_octavia.py rename to tests/unit/common/services/loadbalancer/test_octavia.py index 0e699999..eda49f2d 100644 --- a/tests/unit/services/loadbalancer/test_octavia.py +++ b/tests/unit/common/services/loadbalancer/test_octavia.py @@ -20,10 +20,10 @@ import fixtures from rally.common import cfg from rally import exceptions -from rally_openstack.services.loadbalancer import octavia +from rally_openstack.common.services.loadbalancer import octavia from tests.unit import test -BASE_PATH = "rally_openstack.services.loadbalancer" +BASE_PATH = "rally_openstack.common.services.loadbalancer" CONF = cfg.CONF diff --git a/tests/unit/contexts/manila/__init__.py b/tests/unit/common/services/storage/__init__.py similarity index 100% rename from tests/unit/contexts/manila/__init__.py rename to tests/unit/common/services/storage/__init__.py diff --git a/tests/unit/services/storage/test_block.py b/tests/unit/common/services/storage/test_block.py similarity index 99% rename from tests/unit/services/storage/test_block.py rename to tests/unit/common/services/storage/test_block.py index c807cdc6..37c84029 100755 --- a/tests/unit/services/storage/test_block.py +++ b/tests/unit/common/services/storage/test_block.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.services.storage import block +from rally_openstack.common.services.storage import block from tests.unit import test @@ -25,7 +25,7 @@ class BlockTestCase(test.TestCase): self.service = self._get_service_with_fake_impl() def _get_service_with_fake_impl(self): - path = "rally_openstack.services.storage.block" + path = "rally_openstack.common.services.storage.block" path = "%s.BlockStorage.discover_impl" % path with mock.patch(path) as mock_discover: mock_discover.return_value = mock.MagicMock(), None diff --git a/tests/unit/services/storage/test_cinder_common.py b/tests/unit/common/services/storage/test_cinder_common.py similarity index 99% rename from tests/unit/services/storage/test_cinder_common.py rename to tests/unit/common/services/storage/test_cinder_common.py index e55dc899..c1cec790 100755 --- a/tests/unit/services/storage/test_cinder_common.py +++ b/tests/unit/common/services/storage/test_cinder_common.py @@ -20,13 +20,13 @@ import ddt from rally.common import cfg from rally import exceptions -from rally_openstack import service -from rally_openstack.services.storage import block -from rally_openstack.services.storage import cinder_common +from rally_openstack.common import service +from rally_openstack.common.services.storage import block +from rally_openstack.common.services.storage import cinder_common from tests.unit import fakes from tests.unit import test -BASE_PATH = "rally_openstack.services.storage" +BASE_PATH = "rally_openstack.common.services.storage" CONF = cfg.CONF @@ -191,7 +191,7 @@ class CinderMixinTestCase(test.ScenarioTestCase): self.cinder.volumes.update_readonly_flag.assert_called_once_with( fake_volume, "fake_flag") - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test_upload_volume_to_image(self, mock_image): volume = mock.Mock() image = {"os-volume_upload_image": {"image_id": 1}} diff --git a/tests/unit/services/storage/test_cinder_v1.py b/tests/unit/common/services/storage/test_cinder_v1.py similarity index 99% rename from tests/unit/services/storage/test_cinder_v1.py rename to tests/unit/common/services/storage/test_cinder_v1.py index 8c305a83..68c56ad8 100755 --- a/tests/unit/services/storage/test_cinder_v1.py +++ b/tests/unit/common/services/storage/test_cinder_v1.py @@ -16,11 +16,11 @@ from unittest import mock from rally.common import cfg -from rally_openstack.services.storage import cinder_v1 +from rally_openstack.common.services.storage import cinder_v1 from tests.unit import fakes from tests.unit import test -BASE_PATH = "rally_openstack.services.storage" +BASE_PATH = "rally_openstack.common.services.storage" CONF = cfg.CONF diff --git a/tests/unit/services/storage/test_cinder_v2.py b/tests/unit/common/services/storage/test_cinder_v2.py similarity index 99% rename from tests/unit/services/storage/test_cinder_v2.py rename to tests/unit/common/services/storage/test_cinder_v2.py index cdc3e32a..e584af8d 100755 --- a/tests/unit/services/storage/test_cinder_v2.py +++ b/tests/unit/common/services/storage/test_cinder_v2.py @@ -16,11 +16,11 @@ from unittest import mock from rally.common import cfg -from rally_openstack.services.storage import cinder_v2 +from rally_openstack.common.services.storage import cinder_v2 from tests.unit import fakes from tests.unit import test -BASE_PATH = "rally_openstack.services.storage" +BASE_PATH = "rally_openstack.common.services.storage" CONF = cfg.CONF diff --git a/tests/unit/services/storage/test_cinder_v3.py b/tests/unit/common/services/storage/test_cinder_v3.py similarity index 99% rename from tests/unit/services/storage/test_cinder_v3.py rename to tests/unit/common/services/storage/test_cinder_v3.py index 6aa23687..3861810f 100755 --- a/tests/unit/services/storage/test_cinder_v3.py +++ b/tests/unit/common/services/storage/test_cinder_v3.py @@ -18,11 +18,11 @@ import ddt from rally.common import cfg -from rally_openstack.services.storage import cinder_v3 +from rally_openstack.common.services.storage import cinder_v3 from tests.unit import fakes from tests.unit import test -BASE_PATH = "rally_openstack.services.storage" +BASE_PATH = "rally_openstack.common.services.storage" CONF = cfg.CONF diff --git a/tests/unit/test_credential.py b/tests/unit/common/test_credential.py similarity index 95% rename from tests/unit/test_credential.py rename to tests/unit/common/test_credential.py index c1d0acea..3964e1e6 100644 --- a/tests/unit/test_credential.py +++ b/tests/unit/common/test_credential.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack import credential +from rally_openstack.common import credential from tests.unit import test @@ -47,7 +47,7 @@ class OpenStackCredentialTestCase(test.TestCase): "api_info": {}}, self.credential.to_dict()) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_clients(self, mock_clients): clients = self.credential.clients(api_info="fake_info") mock_clients.assert_called_once_with( diff --git a/tests/unit/test_osclients.py b/tests/unit/common/test_osclients.py similarity index 99% rename from tests/unit/test_osclients.py rename to tests/unit/common/test_osclients.py index ead52d98..29de4f77 100644 --- a/tests/unit/test_osclients.py +++ b/tests/unit/common/test_osclients.py @@ -20,13 +20,13 @@ import ddt from rally.common import cfg from rally import exceptions -from rally_openstack import consts -from rally_openstack import credential as oscredential -from rally_openstack import osclients +from rally_openstack.common import consts +from rally_openstack.common import credential as oscredential +from rally_openstack.common import osclients from tests.unit import fakes from tests.unit import test -PATH = "rally_openstack.osclients" +PATH = "rally_openstack.common.osclients" @osclients.configure("dummy", supported_versions=("0.1", "1"), diff --git a/tests/unit/test_validators.py b/tests/unit/common/test_validators.py similarity index 99% rename from tests/unit/test_validators.py rename to tests/unit/common/test_validators.py index 6b71b6a0..489c31cd 100644 --- a/tests/unit/test_validators.py +++ b/tests/unit/common/test_validators.py @@ -21,12 +21,12 @@ from glanceclient import exc as glance_exc from novaclient import exceptions as nova_exc from rally import exceptions -from rally_openstack import consts -from rally_openstack import validators +from rally_openstack.common import consts +from rally_openstack.common import validators from tests.unit import test -PATH = "rally_openstack.validators" +PATH = "rally_openstack.common.validators" context = { @@ -48,7 +48,7 @@ config = dict(args={"image": {"id": "fake_id", ) -@mock.patch("rally_openstack.contexts.keystone.roles.RoleGenerator") +@mock.patch("rally_openstack.task.contexts.keystone.roles.RoleGenerator") def test_with_roles_ctx(mock_role_generator): @validators.with_roles_ctx() @@ -729,7 +729,7 @@ class ValidateHeatTemplateValidatorTestCase(test.TestCase): @ddt.unpack @mock.patch("%s.os.path.exists" % PATH, return_value=True) - @mock.patch("rally_openstack.validators.open", + @mock.patch("rally_openstack.common.validators.open", side_effect=mock.mock_open(), create=True) def test_validate(self, mock_open, mock_exists, exception_msg): clients = self.context["users"][0]["credential"].clients() diff --git a/tests/unit/contexts/monasca/__init__.py b/tests/unit/common/wrappers/__init__.py similarity index 100% rename from tests/unit/contexts/monasca/__init__.py rename to tests/unit/common/wrappers/__init__.py diff --git a/tests/unit/wrappers/test_network.py b/tests/unit/common/wrappers/test_network.py similarity index 97% rename from tests/unit/wrappers/test_network.py rename to tests/unit/common/wrappers/test_network.py index 39c79eeb..5cc9620c 100644 --- a/tests/unit/wrappers/test_network.py +++ b/tests/unit/common/wrappers/test_network.py @@ -20,12 +20,12 @@ from neutronclient.common import exceptions as neutron_exceptions from rally.common import utils -from rally_openstack import consts -from rally_openstack.wrappers import network +from rally_openstack.common import consts +from rally_openstack.common.wrappers import network from tests.unit import test -SVC = "rally_openstack.wrappers.network." +SVC = "rally_openstack.common.wrappers.network." class Owner(utils.RandomNameGeneratorMixin): @@ -45,7 +45,7 @@ class NeutronWrapperTestCase(test.TestCase): def test_SUBNET_IP_VERSION(self): self.assertEqual(4, network.NeutronWrapper.SUBNET_IP_VERSION) - @mock.patch("rally_openstack.wrappers.network.generate_cidr") + @mock.patch("rally_openstack.common.wrappers.network.generate_cidr") def test__generate_cidr(self, mock_generate_cidr): cidrs = iter(range(5)) mock_generate_cidr.side_effect = ( @@ -233,7 +233,7 @@ class NeutronWrapperTestCase(test.TestCase): [mock.call("foo_router", {"subnet_id": "foo_subnet"}) for i in range(subnets_num)]) - @mock.patch("rally_openstack.wrappers.network.NeutronWrapper" + @mock.patch("rally_openstack.common.wrappers.network.NeutronWrapper" ".supports_extension", return_value=(False, "")) def test_delete_network(self, mock_neutron_wrapper_supports_extension): service = self.get_wrapper() @@ -256,7 +256,7 @@ class NeutronWrapperTestCase(test.TestCase): service.delete_v1_pool(pool["pool"]["id"]) service.client.delete_pool.assert_called_once_with("pool-id") - @mock.patch("rally_openstack.wrappers.network.NeutronWrapper" + @mock.patch("rally_openstack.common.wrappers.network.NeutronWrapper" ".supports_extension", return_value=(True, "")) def test_delete_network_with_dhcp_and_router_and_ports_and_subnets( self, mock_neutron_wrapper_supports_extension): @@ -295,7 +295,7 @@ class NeutronWrapperTestCase(test.TestCase): {"exception_type": KeyError, "should_raise": True}) @ddt.unpack - @mock.patch("rally_openstack.wrappers.network.NeutronWrapper" + @mock.patch("rally_openstack.common.wrappers.network.NeutronWrapper" ".supports_extension", return_value=(True, "")) def test_delete_network_with_router_throw_exception( self, mock_neutron_wrapper_supports_extension, exception_type, @@ -466,13 +466,13 @@ class NeutronWrapperTestCase(test.TestCase): class FunctionsTestCase(test.TestCase): def test_generate_cidr(self): - with mock.patch("rally_openstack.wrappers.network.cidr_incr", + with mock.patch("rally_openstack.common.wrappers.network.cidr_incr", iter(range(1, 4))): self.assertEqual("10.2.1.0/24", network.generate_cidr()) self.assertEqual("10.2.2.0/24", network.generate_cidr()) self.assertEqual("10.2.3.0/24", network.generate_cidr()) - with mock.patch("rally_openstack.wrappers.network.cidr_incr", + with mock.patch("rally_openstack.common.wrappers.network.cidr_incr", iter(range(1, 4))): start_cidr = "1.1.0.0/26" self.assertEqual("1.1.0.64/26", network.generate_cidr(start_cidr)) diff --git a/tests/unit/contexts/murano/__init__.py b/tests/unit/environment/__init__.py similarity index 100% rename from tests/unit/contexts/murano/__init__.py rename to tests/unit/environment/__init__.py diff --git a/tests/unit/contexts/network/__init__.py b/tests/unit/environment/platforms/__init__.py similarity index 100% rename from tests/unit/contexts/network/__init__.py rename to tests/unit/environment/platforms/__init__.py diff --git a/tests/unit/platforms/test_existing.py b/tests/unit/environment/platforms/test_existing.py similarity index 97% rename from tests/unit/platforms/test_existing.py rename to tests/unit/environment/platforms/test_existing.py index 54807519..99a1adf6 100644 --- a/tests/unit/platforms/test_existing.py +++ b/tests/unit/environment/platforms/test_existing.py @@ -274,7 +274,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): ) self._check_cleanup_schema(result1) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_health(self, mock_clients): pdata = { "admin": mock.MagicMock(), @@ -288,7 +288,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): mock.call(pdata["users"][1]), mock.call().keystone(), mock.call(pdata["admin"]), mock.call().verified_keystone()]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_failed_with_native_rally_exc(self, mock_clients): e = exceptions.RallyException("foo") mock_clients.return_value.keystone.side_effect = e @@ -304,7 +304,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): }, result) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_failed_admin(self, mock_clients): mock_clients.return_value.verified_keystone.side_effect = Exception pdata = {"admin": {"username": "balbab", "password": "12345"}, @@ -322,7 +322,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): result) self.assertIn("Traceback (most recent call last)", result["traceback"]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_failed_users(self, mock_clients): mock_clients.return_value.keystone.side_effect = Exception pdata = {"admin": None, @@ -340,7 +340,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): result) self.assertIn("Traceback (most recent call last)", result["traceback"]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_health_with_api_info(self, mock_clients): pdata = {"admin": mock.MagicMock(), "users": [], @@ -356,7 +356,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): .return_value), mock.call().fakeclient.create_client()]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_version_failed_with_api_info(self, mock_clients): pdata = {"admin": mock.MagicMock(), "users": [], @@ -373,7 +373,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): " Version is not supported.")}, result) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_check_unexpected_failed_with_api_info(self, mock_clients): pdata = {"admin": mock.MagicMock(), "users": [], @@ -393,7 +393,7 @@ class ExistingPlatformTestCase(PlatformBaseTestCase): "traceback": mock.ANY}, result) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_info(self, mock_clients): mock_clients.return_value.services.return_value = { "foo": "bar", diff --git a/tests/unit/fakes.py b/tests/unit/fakes.py index 090d81e3..662256da 100644 --- a/tests/unit/fakes.py +++ b/tests/unit/fakes.py @@ -32,8 +32,8 @@ from rally.common import utils as rally_utils from rally.task import context from rally.task import scenario -from rally_openstack import consts -from rally_openstack import credential +from rally_openstack.common import consts +from rally_openstack.common import credential def generate_uuid(): diff --git a/tests/unit/contexts/neutron/__init__.py b/tests/unit/task/cleanup/__init__.py similarity index 100% rename from tests/unit/contexts/neutron/__init__.py rename to tests/unit/task/cleanup/__init__.py diff --git a/tests/unit/cleanup/test_base.py b/tests/unit/task/cleanup/test_base.py similarity index 98% rename from tests/unit/cleanup/test_base.py rename to tests/unit/task/cleanup/test_base.py index e52a1e16..305ada0f 100644 --- a/tests/unit/cleanup/test_base.py +++ b/tests/unit/task/cleanup/test_base.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.cleanup import base +from rally_openstack.task.cleanup import base from tests.unit import test diff --git a/tests/unit/cleanup/test_manager.py b/tests/unit/task/cleanup/test_manager.py similarity index 99% rename from tests/unit/cleanup/test_manager.py rename to tests/unit/task/cleanup/test_manager.py index 8e4970e4..1b37d196 100644 --- a/tests/unit/cleanup/test_manager.py +++ b/tests/unit/task/cleanup/test_manager.py @@ -17,8 +17,8 @@ from unittest import mock from rally.common import utils -from rally_openstack.cleanup import base -from rally_openstack.cleanup import manager +from rally_openstack.task.cleanup import base +from rally_openstack.task.cleanup import manager from tests.unit import test diff --git a/tests/unit/cleanup/test_resources.py b/tests/unit/task/cleanup/test_resources.py similarity index 99% rename from tests/unit/cleanup/test_resources.py rename to tests/unit/task/cleanup/test_resources.py index eba9707f..1ede686d 100644 --- a/tests/unit/cleanup/test_resources.py +++ b/tests/unit/task/cleanup/test_resources.py @@ -21,11 +21,11 @@ from neutronclient.common import exceptions as neutron_exceptions from novaclient import exceptions as nova_exc from watcherclient.common.apiclient import exceptions as watcher_exceptions -from rally_openstack.cleanup import resources +from rally_openstack.task.cleanup import resources from tests.unit import test BASE = "rally_openstack.cleanup.resources" -GLANCE_V2_PATH = ("rally_openstack.services.image.glance_v2." +GLANCE_V2_PATH = ("rally_openstack.common.services.image.glance_v2." "GlanceV2Service") @@ -562,7 +562,7 @@ class NeutronQuotaTestCase(test.TestCase): @ddt.ddt class GlanceImageTestCase(test.TestCase): - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__client_admin(self, mock_image): admin = mock.Mock() glance = resources.GlanceImage(admin=admin) @@ -571,7 +571,7 @@ class GlanceImageTestCase(test.TestCase): mock_image.assert_called_once_with(admin) self.assertEqual(client, mock_image.return_value) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__client_user(self, mock_image): user = mock.Mock() glance = resources.GlanceImage(user=user) @@ -580,7 +580,7 @@ class GlanceImageTestCase(test.TestCase): mock_image.assert_called_once_with(user) self.assertEqual(wrapper, mock_image.return_value) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__client_admin_preferred(self, mock_image): admin = mock.Mock() user = mock.Mock() @@ -1039,7 +1039,7 @@ class CinderImageVolumeCacheTestCase(test.TestCase): self.id = id self.name = name - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test_list(self, mock_image): admin = mock.Mock() diff --git a/tests/unit/contexts/nova/__init__.py b/tests/unit/task/contexts/__init__.py similarity index 100% rename from tests/unit/contexts/nova/__init__.py rename to tests/unit/task/contexts/__init__.py diff --git a/tests/unit/contexts/quotas/__init__.py b/tests/unit/task/contexts/ceilometer/__init__.py similarity index 100% rename from tests/unit/contexts/quotas/__init__.py rename to tests/unit/task/contexts/ceilometer/__init__.py diff --git a/tests/unit/contexts/ceilometer/test_samples.py b/tests/unit/task/contexts/ceilometer/test_samples.py similarity index 96% rename from tests/unit/contexts/ceilometer/test_samples.py rename to tests/unit/task/contexts/ceilometer/test_samples.py index f8de38de..dc647a86 100644 --- a/tests/unit/contexts/ceilometer/test_samples.py +++ b/tests/unit/task/contexts/ceilometer/test_samples.py @@ -16,11 +16,11 @@ import copy from unittest import mock from rally import exceptions -from rally_openstack.contexts.ceilometer import samples -from rally_openstack.scenarios.ceilometer import utils as ceilo_utils +from rally_openstack.task.contexts.ceilometer import samples +from rally_openstack.task.scenarios.ceilometer import utils as ceilo_utils from tests.unit import test -CTX = "rally_openstack.contexts.ceilometer" +CTX = "rally_openstack.task.contexts.ceilometer" class CeilometerSampleGeneratorTestCase(test.TestCase): @@ -121,7 +121,7 @@ class CeilometerSampleGeneratorTestCase(test.TestCase): @mock.patch("%s.samples.ceilo_utils.CeilometerScenario._create_samples" % CTX) @mock.patch( - "rally_openstack.scenarios.ceilometer.utils.uuid") + "rally_openstack.task.scenarios.ceilometer.utils.uuid") def test_setup(self, mock_uuid, mock_create_samples, mock_get_resource): mock_uuid.uuid4.return_value = "fake_resource-id" tenants_count = 2 diff --git a/tests/unit/contexts/sahara/__init__.py b/tests/unit/task/contexts/cinder/__init__.py similarity index 100% rename from tests/unit/contexts/sahara/__init__.py rename to tests/unit/task/contexts/cinder/__init__.py diff --git a/tests/unit/contexts/cinder/test_volume_types.py b/tests/unit/task/contexts/cinder/test_volume_types.py similarity index 92% rename from tests/unit/contexts/cinder/test_volume_types.py rename to tests/unit/task/contexts/cinder/test_volume_types.py index 8dc11274..c6f24ec4 100644 --- a/tests/unit/contexts/cinder/test_volume_types.py +++ b/tests/unit/task/contexts/cinder/test_volume_types.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.contexts.cinder import volume_types +from rally_openstack.task.contexts.cinder import volume_types from tests.unit import test -CTX = "rally_openstack.contexts.cinder.volume_types" -SERVICE = "rally_openstack.services.storage" +CTX = "rally_openstack.task.contexts.cinder.volume_types" +SERVICE = "rally_openstack.common.services.storage" class VolumeTypeGeneratorTestCase(test.ContextTestCase): diff --git a/tests/unit/contexts/cinder/test_volumes.py b/tests/unit/task/contexts/cinder/test_volumes.py similarity index 95% rename from tests/unit/contexts/cinder/test_volumes.py rename to tests/unit/task/contexts/cinder/test_volumes.py index b9a2b102..551c4373 100644 --- a/tests/unit/contexts/cinder/test_volumes.py +++ b/tests/unit/task/contexts/cinder/test_volumes.py @@ -19,11 +19,11 @@ import ddt from rally.task import context -from rally_openstack.contexts.cinder import volumes +from rally_openstack.task.contexts.cinder import volumes from tests.unit import test -CTX = "rally_openstack.contexts" -SERVICE = "rally_openstack.services.storage" +CTX = "rally_openstack.task.contexts" +SERVICE = "rally_openstack.common.services.storage" @ddt.ddt @@ -61,7 +61,7 @@ class VolumeGeneratorTestCase(test.ScenarioTestCase): else: self.assertEqual(1, len(results)) - from rally_openstack.services.storage import block + from rally_openstack.common.services.storage import block created_volume = block.Volume(id="uuid", size=config["size"], name="vol", status="avaiable") diff --git a/tests/unit/contexts/senlin/__init__.py b/tests/unit/task/contexts/cleanup/__init__.py similarity index 100% rename from tests/unit/contexts/senlin/__init__.py rename to tests/unit/task/contexts/cleanup/__init__.py diff --git a/tests/unit/contexts/cleanup/test_admin.py b/tests/unit/task/contexts/cleanup/test_admin.py similarity index 93% rename from tests/unit/contexts/cleanup/test_admin.py rename to tests/unit/task/contexts/cleanup/test_admin.py index 0385cfc4..91725705 100644 --- a/tests/unit/contexts/cleanup/test_admin.py +++ b/tests/unit/task/contexts/cleanup/test_admin.py @@ -20,13 +20,13 @@ import ddt from rally.common import utils from rally.task import context -from rally_openstack.contexts.cleanup import admin -from rally_openstack import scenario +from rally_openstack.task.contexts.cleanup import admin +from rally_openstack.task import scenario from tests.unit import test -ADMIN = "rally_openstack.contexts.cleanup.admin" -BASE = "rally_openstack.contexts.cleanup.base" +ADMIN = "rally_openstack.task.contexts.cleanup.admin" +BASE = "rally_openstack.task.contexts.cleanup.base" @ddt.ddt diff --git a/tests/unit/contexts/cleanup/test_user.py b/tests/unit/task/contexts/cleanup/test_user.py similarity index 93% rename from tests/unit/contexts/cleanup/test_user.py rename to tests/unit/task/contexts/cleanup/test_user.py index ddc5c49d..1e761fd8 100644 --- a/tests/unit/contexts/cleanup/test_user.py +++ b/tests/unit/task/contexts/cleanup/test_user.py @@ -20,13 +20,13 @@ import ddt from rally.common import utils from rally.task import context -from rally_openstack.contexts.cleanup import user -from rally_openstack import scenario +from rally_openstack.task.contexts.cleanup import user +from rally_openstack.task import scenario from tests.unit import test -ADMIN = "rally_openstack.contexts.cleanup.admin" -BASE = "rally_openstack.contexts.cleanup.base" +ADMIN = "rally_openstack.task.contexts.cleanup.admin" +BASE = "rally_openstack.task.contexts.cleanup.base" @ddt.ddt diff --git a/tests/unit/contexts/swift/__init__.py b/tests/unit/task/contexts/dataplane/__init__.py similarity index 100% rename from tests/unit/contexts/swift/__init__.py rename to tests/unit/task/contexts/dataplane/__init__.py diff --git a/tests/unit/contexts/dataplane/test_heat.py b/tests/unit/task/contexts/dataplane/test_heat.py similarity index 97% rename from tests/unit/contexts/dataplane/test_heat.py rename to tests/unit/task/contexts/dataplane/test_heat.py index a908ec3d..c74ec182 100644 --- a/tests/unit/contexts/dataplane/test_heat.py +++ b/tests/unit/task/contexts/dataplane/test_heat.py @@ -16,10 +16,10 @@ import functools from unittest import mock -from rally_openstack.contexts.dataplane import heat as heat_dataplane +from rally_openstack.task.contexts.dataplane import heat as heat_dataplane from tests.unit import test -MOD = "rally_openstack.contexts.dataplane.heat." +MOD = "rally_openstack.task.contexts.dataplane.heat." class TestHeatWorkload(test.ScenarioTestCase): diff --git a/tests/unit/contexts/vm/__init__.py b/tests/unit/task/contexts/designate/__init__.py similarity index 100% rename from tests/unit/contexts/vm/__init__.py rename to tests/unit/task/contexts/designate/__init__.py diff --git a/tests/unit/contexts/designate/test_zones.py b/tests/unit/task/contexts/designate/test_zones.py similarity index 95% rename from tests/unit/contexts/designate/test_zones.py rename to tests/unit/task/contexts/designate/test_zones.py index 11d90c81..282df535 100644 --- a/tests/unit/contexts/designate/test_zones.py +++ b/tests/unit/task/contexts/designate/test_zones.py @@ -16,12 +16,12 @@ import copy from unittest import mock -from rally_openstack.contexts.designate import zones -from rally_openstack.scenarios.designate import utils +from rally_openstack.task.contexts.designate import zones +from rally_openstack.task.scenarios.designate import utils from tests.unit import test -CTX = "rally_openstack.contexts" -SCN = "rally_openstack.scenarios" +CTX = "rally_openstack.task.contexts" +SCN = "rally_openstack.task.scenarios" class ZoneGeneratorTestCase(test.ScenarioTestCase): diff --git a/tests/unit/contexts/watcher/__init__.py b/tests/unit/task/contexts/glance/__init__.py similarity index 100% rename from tests/unit/contexts/watcher/__init__.py rename to tests/unit/task/contexts/glance/__init__.py diff --git a/tests/unit/contexts/glance/test_images.py b/tests/unit/task/contexts/glance/test_images.py similarity index 97% rename from tests/unit/contexts/glance/test_images.py rename to tests/unit/task/contexts/glance/test_images.py index 1f6366a7..85b3d81e 100644 --- a/tests/unit/contexts/glance/test_images.py +++ b/tests/unit/task/contexts/glance/test_images.py @@ -18,11 +18,11 @@ from unittest import mock import ddt -from rally_openstack.contexts.glance import images +from rally_openstack.task.contexts.glance import images from tests.unit import test -CTX = "rally_openstack.contexts.glance.images" -SCN = "rally_openstack.scenarios.glance" +CTX = "rally_openstack.task.contexts.glance.images" +SCN = "rally_openstack.task.scenarios.glance" @ddt.ddt @@ -48,7 +48,7 @@ class ImageGeneratorTestCase(test.ScenarioTestCase): "task": {"uuid": "task_id"} }) patch = mock.patch( - "rally_openstack.services.image.image.Image") + "rally_openstack.common.services.image.image.Image") self.addCleanup(patch.stop) self.mock_image = patch.start() @@ -64,7 +64,7 @@ class ImageGeneratorTestCase(test.ScenarioTestCase): {"image_name": "foo"}, {"tenants": 3, "users_per_tenant": 2, "images_per_tenant": 5}) @ddt.unpack - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup(self, mock_clients, container_format="bare", disk_format="qcow2", image_url="http://example.com/fake/url", diff --git a/tests/unit/hook/__init__.py b/tests/unit/task/contexts/heat/__init__.py similarity index 100% rename from tests/unit/hook/__init__.py rename to tests/unit/task/contexts/heat/__init__.py diff --git a/tests/unit/contexts/heat/test_stacks.py b/tests/unit/task/contexts/heat/test_stacks.py similarity index 94% rename from tests/unit/contexts/heat/test_stacks.py rename to tests/unit/task/contexts/heat/test_stacks.py index 27f4c8a0..9e002dc6 100644 --- a/tests/unit/contexts/heat/test_stacks.py +++ b/tests/unit/task/contexts/heat/test_stacks.py @@ -15,13 +15,13 @@ from unittest import mock -from rally_openstack.contexts.heat import stacks -from rally_openstack.scenarios.heat import utils as heat_utils +from rally_openstack.task.contexts.heat import stacks +from rally_openstack.task.scenarios.heat import utils as heat_utils from tests.unit import fakes from tests.unit import test -CTX = "rally_openstack.contexts" -SCN = "rally_openstack.scenarios" +CTX = "rally_openstack.task.contexts" +SCN = "rally_openstack.task.scenarios" class TestStackGenerator(test.ScenarioTestCase): diff --git a/tests/unit/platforms/__init__.py b/tests/unit/task/contexts/keystone/__init__.py similarity index 100% rename from tests/unit/platforms/__init__.py rename to tests/unit/task/contexts/keystone/__init__.py diff --git a/tests/unit/contexts/keystone/test_roles.py b/tests/unit/task/contexts/keystone/test_roles.py similarity index 98% rename from tests/unit/contexts/keystone/test_roles.py rename to tests/unit/task/contexts/keystone/test_roles.py index 0ce1c751..8edce046 100644 --- a/tests/unit/contexts/keystone/test_roles.py +++ b/tests/unit/task/contexts/keystone/test_roles.py @@ -16,11 +16,11 @@ from unittest import mock from rally import exceptions -from rally_openstack.contexts.keystone import roles +from rally_openstack.task.contexts.keystone import roles from tests.unit import fakes from tests.unit import test -CTX = "rally_openstack.contexts.keystone.roles" +CTX = "rally_openstack.task.contexts.keystone.roles" class RoleGeneratorTestCase(test.TestCase): diff --git a/tests/unit/contexts/keystone/test_users.py b/tests/unit/task/contexts/keystone/test_users.py similarity index 99% rename from tests/unit/contexts/keystone/test_users.py rename to tests/unit/task/contexts/keystone/test_users.py index 43762070..a3365bc4 100644 --- a/tests/unit/contexts/keystone/test_users.py +++ b/tests/unit/task/contexts/keystone/test_users.py @@ -17,13 +17,13 @@ from unittest import mock from rally import exceptions -from rally_openstack.contexts.keystone import users -from rally_openstack import credential as oscredential +from rally_openstack.common import credential as oscredential +from rally_openstack.task.contexts.keystone import users from tests.unit import test -from rally_openstack import consts +from rally_openstack.common import consts -CTX = "rally_openstack.contexts.keystone.users" +CTX = "rally_openstack.task.contexts.keystone.users" class UserGeneratorBaseTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/__init__.py b/tests/unit/task/contexts/magnum/__init__.py similarity index 100% rename from tests/unit/scenarios/__init__.py rename to tests/unit/task/contexts/magnum/__init__.py diff --git a/tests/unit/contexts/magnum/test_ca_certs.py b/tests/unit/task/contexts/magnum/test_ca_certs.py similarity index 98% rename from tests/unit/contexts/magnum/test_ca_certs.py rename to tests/unit/task/contexts/magnum/test_ca_certs.py index f228a9ec..ec0fa12d 100644 --- a/tests/unit/contexts/magnum/test_ca_certs.py +++ b/tests/unit/task/contexts/magnum/test_ca_certs.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.contexts.magnum import ca_certs +from rally_openstack.task.contexts.magnum import ca_certs from tests.unit import test -CTX = "rally_openstack.contexts.magnum" -SCN = "rally_openstack.scenarios" +CTX = "rally_openstack.task.contexts.magnum" +SCN = "rally_openstack.task.scenarios" class CaCertsGeneratorTestCase(test.ScenarioTestCase): diff --git a/tests/unit/contexts/magnum/test_cluster_templates.py b/tests/unit/task/contexts/magnum/test_cluster_templates.py similarity index 94% rename from tests/unit/contexts/magnum/test_cluster_templates.py rename to tests/unit/task/contexts/magnum/test_cluster_templates.py index 9cba28d8..c0e9a1b8 100644 --- a/tests/unit/contexts/magnum/test_cluster_templates.py +++ b/tests/unit/task/contexts/magnum/test_cluster_templates.py @@ -12,16 +12,16 @@ from unittest import mock -from rally_openstack.contexts.magnum import cluster_templates -from rally_openstack.scenarios.magnum import utils as magnum_utils +from rally_openstack.task.contexts.magnum import cluster_templates +from rally_openstack.task.scenarios.magnum import utils as magnum_utils from tests.unit import fakes from tests.unit import test BASE_CTX = "rally.task.context" -CTX = "rally_openstack.contexts" +CTX = "rally_openstack.task.contexts" BASE_SCN = "rally.task.scenarios" -SCN = "rally_openstack.scenarios" +SCN = "rally_openstack.task.scenarios" class ClusterTemplatesGeneratorTestCase(test.ScenarioTestCase): diff --git a/tests/unit/contexts/magnum/test_clusters.py b/tests/unit/task/contexts/magnum/test_clusters.py similarity index 96% rename from tests/unit/contexts/magnum/test_clusters.py rename to tests/unit/task/contexts/magnum/test_clusters.py index d30c0e70..1099eb29 100644 --- a/tests/unit/contexts/magnum/test_clusters.py +++ b/tests/unit/task/contexts/magnum/test_clusters.py @@ -15,12 +15,12 @@ import copy from unittest import mock -from rally_openstack.contexts.magnum import clusters -from rally_openstack.scenarios.magnum import utils as magnum_utils +from rally_openstack.task.contexts.magnum import clusters +from rally_openstack.task.scenarios.magnum import utils as magnum_utils from tests.unit import test -CTX = "rally_openstack.contexts.magnum" -SCN = "rally_openstack.scenarios" +CTX = "rally_openstack.task.contexts.magnum" +SCN = "rally_openstack.task.scenarios" class ClustersGeneratorTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/authenticate/__init__.py b/tests/unit/task/contexts/manila/__init__.py similarity index 100% rename from tests/unit/scenarios/authenticate/__init__.py rename to tests/unit/task/contexts/manila/__init__.py diff --git a/tests/unit/contexts/manila/test_manila_security_services.py b/tests/unit/task/contexts/manila/test_manila_security_services.py similarity index 96% rename from tests/unit/contexts/manila/test_manila_security_services.py rename to tests/unit/task/contexts/manila/test_manila_security_services.py index 57664d5f..3ecd880a 100644 --- a/tests/unit/contexts/manila/test_manila_security_services.py +++ b/tests/unit/task/contexts/manila/test_manila_security_services.py @@ -17,9 +17,9 @@ from unittest import mock import ddt -from rally_openstack.contexts.manila import consts -from rally_openstack.contexts.manila import manila_security_services -from rally_openstack.scenarios.manila import utils as manila_utils +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.contexts.manila import manila_security_services +from rally_openstack.task.scenarios.manila import utils as manila_utils from tests.unit import test CONTEXT_NAME = consts.SECURITY_SERVICES_CONTEXT_NAME diff --git a/tests/unit/contexts/manila/test_manila_share_networks.py b/tests/unit/task/contexts/manila/test_manila_share_networks.py similarity index 96% rename from tests/unit/contexts/manila/test_manila_share_networks.py rename to tests/unit/task/contexts/manila/test_manila_share_networks.py index 3687e9e8..f6543b9a 100644 --- a/tests/unit/contexts/manila/test_manila_share_networks.py +++ b/tests/unit/task/contexts/manila/test_manila_share_networks.py @@ -19,12 +19,12 @@ from unittest import mock import ddt from rally import exceptions -from rally_openstack.contexts.manila import consts -from rally_openstack.contexts.manila import manila_share_networks +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.contexts.manila import manila_share_networks from tests.unit import test MANILA_UTILS_PATH = ( - "rally_openstack.scenarios.manila.utils.ManilaScenario.") + "rally_openstack.task.scenarios.manila.utils.ManilaScenario.") MOCK_USER_CREDENTIAL = mock.MagicMock() @@ -166,7 +166,7 @@ class ShareNetworksTestCase(test.TestCase): self.assertEqual(expected_ctxt, inst.context) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(MANILA_UTILS_PATH + "_list_share_networks") def test_setup_use_existing_share_networks( self, mock_manila_scenario__list_share_networks, mock_clients): @@ -214,7 +214,7 @@ class ShareNetworksTestCase(test.TestCase): self.assertRaises(exceptions.ContextSetupFailure, inst.setup) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(MANILA_UTILS_PATH + "_list_share_networks") def test_setup_use_existing_share_networks_sn_not_found( self, mock_manila_scenario__list_share_networks, mock_clients): @@ -236,7 +236,7 @@ class ShareNetworksTestCase(test.TestCase): self.assertRaises(exceptions.ContextSetupFailure, inst.setup) @ddt.data(True, False) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(MANILA_UTILS_PATH + "_create_share_network") @mock.patch(MANILA_UTILS_PATH + "_add_security_service_to_share_network") def test_setup_autocreate_share_networks_with_security_services( @@ -293,7 +293,7 @@ class ShareNetworksTestCase(test.TestCase): for i in range(self.TENANTS_AMOUNT)]) @ddt.data(True, False) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(MANILA_UTILS_PATH + "_create_share_network") @mock.patch(MANILA_UTILS_PATH + "_add_security_service_to_share_network") def test_setup_autocreate_share_networks_wo_security_services( @@ -330,7 +330,7 @@ class ShareNetworksTestCase(test.TestCase): mock_clients.assert_has_calls([mock.call(MOCK_USER_CREDENTIAL) for i in range(self.TENANTS_AMOUNT)]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(MANILA_UTILS_PATH + "_create_share_network") @mock.patch(MANILA_UTILS_PATH + "_add_security_service_to_share_network") def test_setup_autocreate_share_networks_wo_networks( @@ -355,7 +355,7 @@ class ShareNetworksTestCase(test.TestCase): mock_clients.assert_has_calls([mock.call(MOCK_USER_CREDENTIAL) for i in range(self.TENANTS_AMOUNT)]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(MANILA_UTILS_PATH + "_delete_share_network") @mock.patch(MANILA_UTILS_PATH + "_list_share_servers") @mock.patch(MANILA_UTILS_PATH + "_list_share_networks") @@ -379,7 +379,7 @@ class ShareNetworksTestCase(test.TestCase): self.assertIn(mock.call(user["credential"]), mock_clients.mock_calls) - @mock.patch("rally_openstack.contexts.manila.manila_share_networks." + @mock.patch("rally_openstack.task.contexts.manila.manila_share_networks." "resource_manager.cleanup") def test_cleanup_autocreated_share_networks(self, mock_cleanup): task_id = "task" diff --git a/tests/unit/contexts/manila/test_manila_shares.py b/tests/unit/task/contexts/manila/test_manila_shares.py similarity index 96% rename from tests/unit/contexts/manila/test_manila_shares.py rename to tests/unit/task/contexts/manila/test_manila_shares.py index 96f317f3..4442ae40 100644 --- a/tests/unit/contexts/manila/test_manila_shares.py +++ b/tests/unit/task/contexts/manila/test_manila_shares.py @@ -18,14 +18,14 @@ from unittest import mock import ddt -from rally_openstack import consts as rally_consts -from rally_openstack.contexts.manila import consts -from rally_openstack.contexts.manila import manila_shares -from rally_openstack.scenarios.manila import utils as manila_utils +from rally_openstack.common import consts as rally_consts +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.contexts.manila import manila_shares +from rally_openstack.task.scenarios.manila import utils as manila_utils from tests.unit import test MANILA_UTILS_PATH = ( - "rally_openstack.scenarios.manila.utils.ManilaScenario.") + "rally_openstack.task.scenarios.manila.utils.ManilaScenario.") class Fake(object): diff --git a/tests/unit/scenarios/barbican/__init__.py b/tests/unit/task/contexts/monasca/__init__.py similarity index 100% rename from tests/unit/scenarios/barbican/__init__.py rename to tests/unit/task/contexts/monasca/__init__.py diff --git a/tests/unit/contexts/monasca/test_metrics.py b/tests/unit/task/contexts/monasca/test_metrics.py similarity index 95% rename from tests/unit/contexts/monasca/test_metrics.py rename to tests/unit/task/contexts/monasca/test_metrics.py index 2490ec83..46597acc 100644 --- a/tests/unit/contexts/monasca/test_metrics.py +++ b/tests/unit/task/contexts/monasca/test_metrics.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.contexts.monasca import metrics -from rally_openstack.scenarios.monasca import utils as monasca_utils +from rally_openstack.task.contexts.monasca import metrics +from rally_openstack.task.scenarios.monasca import utils as monasca_utils from tests.unit import test -CTX = "rally_openstack.contexts.monasca" +CTX = "rally_openstack.task.contexts.monasca" class MonascaMetricGeneratorTestCase(test.TestCase): diff --git a/tests/unit/scenarios/ceilometer/__init__.py b/tests/unit/task/contexts/murano/__init__.py similarity index 100% rename from tests/unit/scenarios/ceilometer/__init__.py rename to tests/unit/task/contexts/murano/__init__.py diff --git a/tests/unit/contexts/murano/test_murano_environments.py b/tests/unit/task/contexts/murano/test_murano_environments.py similarity index 92% rename from tests/unit/contexts/murano/test_murano_environments.py rename to tests/unit/task/contexts/murano/test_murano_environments.py index 0771ae1a..88d472f9 100644 --- a/tests/unit/contexts/murano/test_murano_environments.py +++ b/tests/unit/task/contexts/murano/test_murano_environments.py @@ -15,12 +15,12 @@ from unittest import mock -from rally_openstack.contexts.murano import murano_environments -from rally_openstack.scenarios.murano import utils as murano_utils +from rally_openstack.task.contexts.murano import murano_environments +from rally_openstack.task.scenarios.murano import utils as murano_utils from tests.unit import test -CTX = "rally_openstack.contexts.murano.murano_environments" -SCN = "rally_openstack.scenarios" +CTX = "rally_openstack.task.contexts.murano.murano_environments" +SCN = "rally_openstack.task.scenarios" class MuranoEnvironmentGeneratorTestCase(test.TestCase): diff --git a/tests/unit/contexts/murano/test_murano_packages.py b/tests/unit/task/contexts/murano/test_murano_packages.py similarity index 97% rename from tests/unit/contexts/murano/test_murano_packages.py rename to tests/unit/task/contexts/murano/test_murano_packages.py index 6beffc0b..b1864877 100644 --- a/tests/unit/contexts/murano/test_murano_packages.py +++ b/tests/unit/task/contexts/murano/test_murano_packages.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.contexts.murano import murano_packages +from rally_openstack.task.contexts.murano import murano_packages from tests.unit import test -CTX = "rally_openstack.contexts.murano.murano_packages" +CTX = "rally_openstack.task.contexts.murano.murano_packages" class MuranoPackageGeneratorTestCase(test.TestCase): diff --git a/tests/unit/scenarios/cinder/__init__.py b/tests/unit/task/contexts/network/__init__.py similarity index 100% rename from tests/unit/scenarios/cinder/__init__.py rename to tests/unit/task/contexts/network/__init__.py diff --git a/tests/unit/contexts/network/test_allow_ssh.py b/tests/unit/task/contexts/network/test_allow_ssh.py similarity index 94% rename from tests/unit/contexts/network/test_allow_ssh.py rename to tests/unit/task/contexts/network/test_allow_ssh.py index 9f306ba8..11edc212 100644 --- a/tests/unit/contexts/network/test_allow_ssh.py +++ b/tests/unit/task/contexts/network/test_allow_ssh.py @@ -15,11 +15,11 @@ from unittest import mock -from rally_openstack.contexts.network import allow_ssh +from rally_openstack.task.contexts.network import allow_ssh from tests.unit import test -CTX = "rally_openstack.contexts.network.allow_ssh" +CTX = "rally_openstack.task.contexts.network.allow_ssh" class AllowSSHContextTestCase(test.TestCase): @@ -63,7 +63,7 @@ class AllowSSHContextTestCase(test.TestCase): @mock.patch("%s.osclients.Clients" % CTX) @mock.patch("%s._prepare_open_secgroup" % CTX) - @mock.patch("rally_openstack.wrappers.network.wrap") + @mock.patch("rally_openstack.common.wrappers.network.wrap") def test_secgroup_setup_cleanup_with_secgroup_supported( self, mock_network_wrap, mock__prepare_open_secgroup, mock_clients): @@ -93,7 +93,7 @@ class AllowSSHContextTestCase(test.TestCase): mock_clients.return_value, secgrp_ctx, config={}) @mock.patch("%s.osclients.Clients" % CTX) - @mock.patch("rally_openstack.wrappers.network.wrap") + @mock.patch("rally_openstack.common.wrappers.network.wrap") def test_secgroup_setup_with_secgroup_unsupported( self, mock_network_wrap, mock_clients): mock_network_wrapper = mock.MagicMock() diff --git a/tests/unit/contexts/network/test_existing_network.py b/tests/unit/task/contexts/network/test_existing_network.py similarity index 91% rename from tests/unit/contexts/network/test_existing_network.py rename to tests/unit/task/contexts/network/test_existing_network.py index 6a1451e9..be2c6b87 100644 --- a/tests/unit/contexts/network/test_existing_network.py +++ b/tests/unit/task/contexts/network/test_existing_network.py @@ -14,10 +14,10 @@ from unittest import mock -from rally_openstack.contexts.network import existing_network +from rally_openstack.task.contexts.network import existing_network from tests.unit import test -CTX = "rally_openstack.contexts.network" +CTX = "rally_openstack.task.contexts.network" class ExistingNetworkTestCase(test.TestCase): @@ -45,8 +45,8 @@ class ExistingNetworkTestCase(test.TestCase): }, }) - @mock.patch("rally_openstack.osclients.Clients") - @mock.patch("rally_openstack.wrappers.network.wrap") + @mock.patch("rally_openstack.common.osclients.Clients") + @mock.patch("rally_openstack.common.wrappers.network.wrap") def test_setup(self, mock_network_wrap, mock_clients): networks = [mock.Mock(), mock.Mock(), mock.Mock()] net_wrappers = { diff --git a/tests/unit/contexts/network/test_network.py b/tests/unit/task/contexts/network/test_network.py similarity index 92% rename from tests/unit/contexts/network/test_network.py rename to tests/unit/task/contexts/network/test_network.py index e877843a..f86ba9e0 100644 --- a/tests/unit/contexts/network/test_network.py +++ b/tests/unit/task/contexts/network/test_network.py @@ -18,10 +18,10 @@ from unittest import mock import ddt import netaddr -from rally_openstack.contexts.network import networks as network_context +from rally_openstack.task.contexts.network import networks as network_context from tests.unit import test -NET = "rally_openstack.wrappers.network." +NET = "rally_openstack.common.wrappers.network." @ddt.ddt @@ -38,7 +38,7 @@ class NetworkTestCase(test.TestCase): def test_START_CIDR_DFLT(self): netaddr.IPNetwork(network_context.Network.DEFAULT_CONFIG["start_cidr"]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap", return_value="foo_service") def test__init__default(self, mock_wrap, mock_clients): context = network_context.Network(self.get_context()) @@ -47,7 +47,7 @@ class NetworkTestCase(test.TestCase): context.config["start_cidr"]) self.assertIsNone(context.config["dns_nameservers"]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap", return_value="foo_service") def test__init__explicit(self, mock_wrap, mock_clients): context = network_context.Network( @@ -66,7 +66,7 @@ class NetworkTestCase(test.TestCase): {"dns_nameservers": ["1.2.3.4", "5.6.7.8"]}) @ddt.unpack @mock.patch(NET + "wrap") - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup(self, mock_clients, mock_wrap, **dns_kwargs): mock_create = mock.Mock(side_effect=lambda t, **kw: t + "-net") mock_wrap.return_value = mock.Mock(create_network=mock_create) @@ -103,7 +103,7 @@ class NetworkTestCase(test.TestCase): self.assertSequenceEqual(sorted(expected_networks), sorted(actual_networks)) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap") def test_cleanup(self, mock_wrap, mock_clients): net_context = network_context.Network(self.get_context()) diff --git a/tests/unit/contexts/network/test_networking_agents.py b/tests/unit/task/contexts/network/test_networking_agents.py similarity index 90% rename from tests/unit/contexts/network/test_networking_agents.py rename to tests/unit/task/contexts/network/test_networking_agents.py index 565a2113..aab872e1 100644 --- a/tests/unit/contexts/network/test_networking_agents.py +++ b/tests/unit/task/contexts/network/test_networking_agents.py @@ -14,10 +14,10 @@ from unittest import mock -from rally_openstack.contexts.network import networking_agents +from rally_openstack.task.contexts.network import networking_agents from tests.unit import test -CTX = "rally_openstack.contexts.network" +CTX = "rally_openstack.task.contexts.network" class NetworkingAgentsTestCase(test.TestCase): @@ -41,7 +41,7 @@ class NetworkingAgentsTestCase(test.TestCase): }, }) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup(self, mock_clients): context = networking_agents.NetworkingAgents(self.context) context.setup() diff --git a/tests/unit/contexts/network/test_routers.py b/tests/unit/task/contexts/network/test_routers.py similarity index 92% rename from tests/unit/contexts/network/test_routers.py rename to tests/unit/task/contexts/network/test_routers.py index 08839697..3af19c6e 100644 --- a/tests/unit/contexts/network/test_routers.py +++ b/tests/unit/task/contexts/network/test_routers.py @@ -16,13 +16,13 @@ import copy from unittest import mock -from rally_openstack.contexts.network import routers as router_context -from rally_openstack.scenarios.neutron import utils as neutron_utils +from rally_openstack.task.contexts.network import routers as router_context +from rally_openstack.task.scenarios.neutron import utils as neutron_utils from tests.unit import test -SCN = "rally_openstack.scenarios" -CTX = "rally_openstack.contexts.network.routers" +SCN = "rally_openstack.task.scenarios" +CTX = "rally_openstack.task.contexts.network.routers" class RouterTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/designate/__init__.py b/tests/unit/task/contexts/neutron/__init__.py similarity index 100% rename from tests/unit/scenarios/designate/__init__.py rename to tests/unit/task/contexts/neutron/__init__.py diff --git a/tests/unit/contexts/neutron/test_lbaas.py b/tests/unit/task/contexts/neutron/test_lbaas.py similarity index 92% rename from tests/unit/contexts/neutron/test_lbaas.py rename to tests/unit/task/contexts/neutron/test_lbaas.py index 8e8d554d..13a12a36 100644 --- a/tests/unit/contexts/neutron/test_lbaas.py +++ b/tests/unit/task/contexts/neutron/test_lbaas.py @@ -12,10 +12,10 @@ from unittest import mock -from rally_openstack.contexts.neutron import lbaas as lbaas_context +from rally_openstack.task.contexts.neutron import lbaas as lbaas_context from tests.unit import test -NET = "rally_openstack.wrappers.network." +NET = "rally_openstack.common.wrappers.network." class LbaasTestCase(test.TestCase): @@ -34,7 +34,7 @@ class LbaasTestCase(test.TestCase): "tenants": {"foo_tenant": foo_tenant, "bar_tenant": bar_tenant}} - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap", return_value="foo_service") def test__init__default(self, mock_wrap, mock_clients): context = lbaas_context.Lbaas(self.get_context()) @@ -48,7 +48,7 @@ class LbaasTestCase(test.TestCase): context.config["lbaas_version"], lbaas_context.Lbaas.DEFAULT_CONFIG["lbaas_version"]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap", return_value="foo_service") def test__init__explicit(self, mock_wrap, mock_clients): context = lbaas_context.Lbaas( @@ -57,7 +57,7 @@ class LbaasTestCase(test.TestCase): "LEAST_CONNECTIONS") @mock.patch(NET + "wrap") - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup_with_lbaas(self, mock_clients, mock_wrap): foo_net = {"id": "foo_net", "tenant_id": "foo_tenant", @@ -98,7 +98,7 @@ class LbaasTestCase(test.TestCase): self.assertEqual(expected_net, actual_net) @mock.patch(NET + "wrap") - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup_with_no_lbaas(self, mock_clients, mock_wrap): mock_create = mock.Mock(side_effect=lambda t, **kw: t + "-net") mock_wrap.return_value = mock.Mock(create_v1_pool=mock_create) @@ -117,7 +117,7 @@ class LbaasTestCase(test.TestCase): assert not net_wrapper.create_v1_pool.called @mock.patch(NET + "wrap") - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup_with_lbaas_version_not_one(self, mock_clients, mock_wrap): mock_create = mock.Mock(side_effect=lambda t, **kw: t + "-net") mock_wrap.return_value = mock.Mock(create_v1_pool=mock_create) @@ -131,7 +131,7 @@ class LbaasTestCase(test.TestCase): net_wrapper.supports_extension.return_value = (True, None) self.assertRaises(NotImplementedError, lb_context.setup) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap") def test_cleanup(self, mock_wrap, mock_clients): net_wrapper = mock_wrap(mock_clients.return_value) @@ -148,7 +148,7 @@ class LbaasTestCase(test.TestCase): net_wrapper.delete_v1_pool.assert_has_calls( [mock.call(pool["pool"]["id"]) for pool in expected_pools]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") @mock.patch(NET + "wrap") def test_cleanup_lbaas_version_not_one(self, mock_wrap, mock_clients): fakeargs = {"lbaas_version": 2} diff --git a/tests/unit/scenarios/glance/__init__.py b/tests/unit/task/contexts/nova/__init__.py similarity index 100% rename from tests/unit/scenarios/glance/__init__.py rename to tests/unit/task/contexts/nova/__init__.py diff --git a/tests/unit/contexts/nova/test_flavors.py b/tests/unit/task/contexts/nova/test_flavors.py similarity index 97% rename from tests/unit/contexts/nova/test_flavors.py rename to tests/unit/task/contexts/nova/test_flavors.py index f8e9a5d4..47ffa6d4 100644 --- a/tests/unit/contexts/nova/test_flavors.py +++ b/tests/unit/task/contexts/nova/test_flavors.py @@ -18,10 +18,10 @@ from unittest import mock from novaclient import exceptions as nova_exceptions -from rally_openstack.contexts.nova import flavors +from rally_openstack.task.contexts.nova import flavors from tests.unit import test -CTX = "rally_openstack.contexts.nova" +CTX = "rally_openstack.task.contexts.nova" class FlavorsGeneratorTestCase(test.TestCase): diff --git a/tests/unit/contexts/nova/test_keypairs.py b/tests/unit/task/contexts/nova/test_keypairs.py similarity index 95% rename from tests/unit/contexts/nova/test_keypairs.py rename to tests/unit/task/contexts/nova/test_keypairs.py index c5303bdd..2aca1463 100644 --- a/tests/unit/contexts/nova/test_keypairs.py +++ b/tests/unit/task/contexts/nova/test_keypairs.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.contexts.nova import keypairs +from rally_openstack.task.contexts.nova import keypairs from tests.unit import test -CTX = "rally_openstack.contexts.nova" +CTX = "rally_openstack.task.contexts.nova" class KeyPairContextTestCase(test.TestCase): @@ -78,7 +78,7 @@ class KeyPairContextTestCase(test.TestCase): superclass=keypairs.Keypair, task_id=self.ctx_with_keys["task"]["uuid"]) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_keypair_generate(self, mock_clients): mock_keypairs = mock_clients.return_value.nova.return_value.keypairs mock_keypair = mock_keypairs.create.return_value diff --git a/tests/unit/contexts/nova/test_servers.py b/tests/unit/task/contexts/nova/test_servers.py similarity index 96% rename from tests/unit/contexts/nova/test_servers.py rename to tests/unit/task/contexts/nova/test_servers.py index 72240813..41903546 100755 --- a/tests/unit/contexts/nova/test_servers.py +++ b/tests/unit/task/contexts/nova/test_servers.py @@ -16,14 +16,14 @@ import copy from unittest import mock -from rally_openstack.contexts.nova import servers -from rally_openstack.scenarios.nova import utils as nova_utils +from rally_openstack.task.contexts.nova import servers +from rally_openstack.task.scenarios.nova import utils as nova_utils from tests.unit import fakes from tests.unit import test -CTX = "rally_openstack.contexts.nova" -SCN = "rally_openstack.scenarios" -TYP = "rally_openstack.types" +CTX = "rally_openstack.task.contexts.nova" +SCN = "rally_openstack.task.scenarios" +TYP = "rally_openstack.task.types" class ServerGeneratorTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/gnocchi/__init__.py b/tests/unit/task/contexts/quotas/__init__.py similarity index 100% rename from tests/unit/scenarios/gnocchi/__init__.py rename to tests/unit/task/contexts/quotas/__init__.py diff --git a/tests/unit/contexts/quotas/test_cinder_quotas.py b/tests/unit/task/contexts/quotas/test_cinder_quotas.py similarity index 97% rename from tests/unit/contexts/quotas/test_cinder_quotas.py rename to tests/unit/task/contexts/quotas/test_cinder_quotas.py index 6e7bdbb1..70d94ed8 100644 --- a/tests/unit/contexts/quotas/test_cinder_quotas.py +++ b/tests/unit/task/contexts/quotas/test_cinder_quotas.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.contexts.quotas import cinder_quotas +from rally_openstack.task.contexts.quotas import cinder_quotas from tests.unit import test diff --git a/tests/unit/contexts/quotas/test_designate_quotas.py b/tests/unit/task/contexts/quotas/test_designate_quotas.py similarity index 96% rename from tests/unit/contexts/quotas/test_designate_quotas.py rename to tests/unit/task/contexts/quotas/test_designate_quotas.py index f471c65f..25bf5572 100644 --- a/tests/unit/contexts/quotas/test_designate_quotas.py +++ b/tests/unit/task/contexts/quotas/test_designate_quotas.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.contexts.quotas import designate_quotas +from rally_openstack.task.contexts.quotas import designate_quotas from tests.unit import test diff --git a/tests/unit/contexts/quotas/test_manila_quotas.py b/tests/unit/task/contexts/quotas/test_manila_quotas.py similarity index 97% rename from tests/unit/contexts/quotas/test_manila_quotas.py rename to tests/unit/task/contexts/quotas/test_manila_quotas.py index 11a24e17..5d1657af 100644 --- a/tests/unit/contexts/quotas/test_manila_quotas.py +++ b/tests/unit/task/contexts/quotas/test_manila_quotas.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.contexts.quotas import manila_quotas +from rally_openstack.task.contexts.quotas import manila_quotas from tests.unit import test diff --git a/tests/unit/contexts/quotas/test_neutron_quotas.py b/tests/unit/task/contexts/quotas/test_neutron_quotas.py similarity index 97% rename from tests/unit/contexts/quotas/test_neutron_quotas.py rename to tests/unit/task/contexts/quotas/test_neutron_quotas.py index d4eafabc..6bcb7b44 100644 --- a/tests/unit/contexts/quotas/test_neutron_quotas.py +++ b/tests/unit/task/contexts/quotas/test_neutron_quotas.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.contexts.quotas import neutron_quotas +from rally_openstack.task.contexts.quotas import neutron_quotas from tests.unit import test diff --git a/tests/unit/contexts/quotas/test_nova_quotas.py b/tests/unit/task/contexts/quotas/test_nova_quotas.py similarity index 97% rename from tests/unit/contexts/quotas/test_nova_quotas.py rename to tests/unit/task/contexts/quotas/test_nova_quotas.py index 31fc51ba..68eeab72 100644 --- a/tests/unit/contexts/quotas/test_nova_quotas.py +++ b/tests/unit/task/contexts/quotas/test_nova_quotas.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.contexts.quotas import nova_quotas +from rally_openstack.task.contexts.quotas import nova_quotas from tests.unit import test diff --git a/tests/unit/contexts/quotas/test_quotas.py b/tests/unit/task/contexts/quotas/test_quotas.py similarity index 97% rename from tests/unit/contexts/quotas/test_quotas.py rename to tests/unit/task/contexts/quotas/test_quotas.py index 8a758b20..1e2d5099 100644 --- a/tests/unit/contexts/quotas/test_quotas.py +++ b/tests/unit/task/contexts/quotas/test_quotas.py @@ -20,10 +20,10 @@ import ddt from rally.common import logging from rally.task import context -from rally_openstack.contexts.quotas import quotas +from rally_openstack.task.contexts.quotas import quotas from tests.unit import test -QUOTAS_PATH = "rally_openstack.contexts.quotas" +QUOTAS_PATH = "rally_openstack.task.contexts.quotas" @ddt.ddt @@ -220,13 +220,13 @@ class QuotasTestCase(test.TestCase): self.assertEqual([mock.call(tenant) for tenant in tenants], neutron_quo.delete.call_args_list) - @mock.patch("rally_openstack.contexts." + @mock.patch("rally_openstack.task.contexts." "quotas.quotas.osclients.Clients") - @mock.patch("rally_openstack.contexts." + @mock.patch("rally_openstack.task.contexts." "quotas.nova_quotas.NovaQuotas") - @mock.patch("rally_openstack.contexts." + @mock.patch("rally_openstack.task.contexts." "quotas.cinder_quotas.CinderQuotas") - @mock.patch("rally_openstack.contexts." + @mock.patch("rally_openstack.task.contexts." "quotas.neutron_quotas.NeutronQuotas") def test_no_quotas(self, mock_neutron_quotas, mock_cinder_quotas, mock_nova_quotas, mock_clients): diff --git a/tests/unit/scenarios/heat/__init__.py b/tests/unit/task/contexts/sahara/__init__.py similarity index 100% rename from tests/unit/scenarios/heat/__init__.py rename to tests/unit/task/contexts/sahara/__init__.py diff --git a/tests/unit/contexts/sahara/test_sahara_cluster.py b/tests/unit/task/contexts/sahara/test_sahara_cluster.py similarity index 96% rename from tests/unit/contexts/sahara/test_sahara_cluster.py rename to tests/unit/task/contexts/sahara/test_sahara_cluster.py index ae802dee..833ce31d 100644 --- a/tests/unit/contexts/sahara/test_sahara_cluster.py +++ b/tests/unit/task/contexts/sahara/test_sahara_cluster.py @@ -16,13 +16,13 @@ from unittest import mock from rally.common import cfg from rally import exceptions -from rally_openstack.contexts.sahara import sahara_cluster -from rally_openstack.scenarios.sahara import utils as sahara_utils +from rally_openstack.task.contexts.sahara import sahara_cluster +from rally_openstack.task.scenarios.sahara import utils as sahara_utils from tests.unit import test CONF = cfg.CONF -CTX = "rally_openstack.contexts.sahara" +CTX = "rally_openstack.task.contexts.sahara" class SaharaClusterTestCase(test.ScenarioTestCase): diff --git a/tests/unit/contexts/sahara/test_sahara_image.py b/tests/unit/task/contexts/sahara/test_sahara_image.py similarity index 96% rename from tests/unit/contexts/sahara/test_sahara_image.py rename to tests/unit/task/contexts/sahara/test_sahara_image.py index 891e9afe..edc76127 100644 --- a/tests/unit/contexts/sahara/test_sahara_image.py +++ b/tests/unit/task/contexts/sahara/test_sahara_image.py @@ -15,13 +15,13 @@ from unittest import mock from rally import exceptions -from rally_openstack.contexts.sahara import sahara_image +from rally_openstack.task.contexts.sahara import sahara_image from tests.unit import fakes from tests.unit import test BASE_CTX = "rally.task.context" -CTX = "rally_openstack.contexts.sahara.sahara_image" +CTX = "rally_openstack.task.contexts.sahara.sahara_image" BASE_SCN = "rally.task.scenarios" @@ -84,10 +84,10 @@ class SaharaImageTestCase(test.ScenarioTestCase): }) return self.context - @mock.patch("rally_openstack.services." + @mock.patch("rally_openstack.common.services." "image.image.Image") @mock.patch("%s.resource_manager.cleanup" % CTX) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup_and_cleanup_url_image(self, mock_clients, mock_cleanup, mock_image): diff --git a/tests/unit/contexts/sahara/test_sahara_input_data_sources.py b/tests/unit/task/contexts/sahara/test_sahara_input_data_sources.py similarity index 97% rename from tests/unit/contexts/sahara/test_sahara_input_data_sources.py rename to tests/unit/task/contexts/sahara/test_sahara_input_data_sources.py index 11d24fa2..bf2fa558 100644 --- a/tests/unit/contexts/sahara/test_sahara_input_data_sources.py +++ b/tests/unit/task/contexts/sahara/test_sahara_input_data_sources.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.contexts.sahara import sahara_input_data_sources -from rally_openstack.scenarios.swift import utils as swift_utils +from rally_openstack.task.contexts.sahara import sahara_input_data_sources +from rally_openstack.task.scenarios.swift import utils as swift_utils from tests.unit import test -CTX = "rally_openstack.contexts.sahara" +CTX = "rally_openstack.task.contexts.sahara" class SaharaInputDataSourcesTestCase(test.ScenarioTestCase): diff --git a/tests/unit/contexts/sahara/test_sahara_job_binaries.py b/tests/unit/task/contexts/sahara/test_sahara_job_binaries.py similarity index 96% rename from tests/unit/contexts/sahara/test_sahara_job_binaries.py rename to tests/unit/task/contexts/sahara/test_sahara_job_binaries.py index fa370d93..d7c739f0 100644 --- a/tests/unit/contexts/sahara/test_sahara_job_binaries.py +++ b/tests/unit/task/contexts/sahara/test_sahara_job_binaries.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.contexts.sahara import sahara_job_binaries -from rally_openstack.scenarios.sahara import utils as sahara_utils +from rally_openstack.task.contexts.sahara import sahara_job_binaries +from rally_openstack.task.scenarios.sahara import utils as sahara_utils from tests.unit import test -CTX = "rally_openstack.contexts.sahara" +CTX = "rally_openstack.task.contexts.sahara" class SaharaJobBinariesTestCase(test.ScenarioTestCase): diff --git a/tests/unit/contexts/sahara/test_sahara_output_data_sources.py b/tests/unit/task/contexts/sahara/test_sahara_output_data_sources.py similarity index 96% rename from tests/unit/contexts/sahara/test_sahara_output_data_sources.py rename to tests/unit/task/contexts/sahara/test_sahara_output_data_sources.py index 544ad3c1..cb47ece1 100644 --- a/tests/unit/contexts/sahara/test_sahara_output_data_sources.py +++ b/tests/unit/task/contexts/sahara/test_sahara_output_data_sources.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.contexts.sahara import sahara_output_data_sources -from rally_openstack import credential as oscredential +from rally_openstack.common import credential as oscredential +from rally_openstack.task.contexts.sahara import sahara_output_data_sources from tests.unit import test -CTX = "rally_openstack.contexts.sahara" +CTX = "rally_openstack.task.contexts.sahara" class SaharaOutputDataSourcesTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/ironic/__init__.py b/tests/unit/task/contexts/senlin/__init__.py similarity index 100% rename from tests/unit/scenarios/ironic/__init__.py rename to tests/unit/task/contexts/senlin/__init__.py diff --git a/tests/unit/contexts/senlin/test_profiles.py b/tests/unit/task/contexts/senlin/test_profiles.py similarity index 96% rename from tests/unit/contexts/senlin/test_profiles.py rename to tests/unit/task/contexts/senlin/test_profiles.py index 5c52b5e7..c362cb4b 100644 --- a/tests/unit/contexts/senlin/test_profiles.py +++ b/tests/unit/task/contexts/senlin/test_profiles.py @@ -12,14 +12,14 @@ from unittest import mock -from rally_openstack.contexts.senlin import profiles +from rally_openstack.task.contexts.senlin import profiles from tests.unit import test BASE_CTX = "rally.task.context" CTX = "rally_openstack.context" BASE_SCN = "rally.task.scenarios" -SCN = "rally_openstack.scenarios" +SCN = "rally_openstack.task.scenarios" class ProfilesGeneratorTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/keystone/__init__.py b/tests/unit/task/contexts/swift/__init__.py similarity index 100% rename from tests/unit/scenarios/keystone/__init__.py rename to tests/unit/task/contexts/swift/__init__.py diff --git a/tests/unit/contexts/swift/test_objects.py b/tests/unit/task/contexts/swift/test_objects.py similarity index 94% rename from tests/unit/contexts/swift/test_objects.py rename to tests/unit/task/contexts/swift/test_objects.py index 8c6b2b77..efaa8900 100644 --- a/tests/unit/contexts/swift/test_objects.py +++ b/tests/unit/task/contexts/swift/test_objects.py @@ -16,13 +16,13 @@ from unittest import mock from rally import exceptions -from rally_openstack.contexts.swift import objects +from rally_openstack.task.contexts.swift import objects from tests.unit import test class SwiftObjectGeneratorTestCase(test.TestCase): - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup(self, mock_clients): containers_per_tenant = 2 objects_per_container = 7 @@ -64,8 +64,8 @@ class SwiftObjectGeneratorTestCase(test.TestCase): self.assertEqual(objects_per_container, len(container["objects"])) - @mock.patch("rally_openstack.osclients.Clients") - @mock.patch("rally_openstack.contexts.swift.utils." + @mock.patch("rally_openstack.common.osclients.Clients") + @mock.patch("rally_openstack.task.contexts.swift.utils." "swift_utils.SwiftScenario") def test_cleanup(self, mock_swift_scenario, mock_clients): context = test.get_test_context() @@ -114,7 +114,7 @@ class SwiftObjectGeneratorTestCase(test.TestCase): self.assertEqual(0, len(context["tenants"][tenant_id]["containers"])) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup_failure_clients_put_container(self, mock_clients): context = test.get_test_context() context.update({ @@ -150,7 +150,7 @@ class SwiftObjectGeneratorTestCase(test.TestCase): "containers, expected 4 but got 1", objects_ctx.setup) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_setup_failure_clients_put_object(self, mock_clients): context = test.get_test_context() context.update({ @@ -178,7 +178,7 @@ class SwiftObjectGeneratorTestCase(test.TestCase): "objects, expected 2 but got 1", objects_ctx.setup) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_cleanup_failure_clients_delete_container(self, mock_clients): context = test.get_test_context() context.update({ @@ -199,7 +199,7 @@ class SwiftObjectGeneratorTestCase(test.TestCase): objects_ctx.cleanup() self.assertEqual(1, len(context["tenants"]["t1"]["containers"])) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test_cleanup_failure_clients_delete_object(self, mock_clients): context = test.get_test_context() context.update({ diff --git a/tests/unit/contexts/swift/test_utils.py b/tests/unit/task/contexts/swift/test_utils.py similarity index 96% rename from tests/unit/contexts/swift/test_utils.py rename to tests/unit/task/contexts/swift/test_utils.py index 5d5a4c5f..113a14c8 100644 --- a/tests/unit/contexts/swift/test_utils.py +++ b/tests/unit/task/contexts/swift/test_utils.py @@ -15,8 +15,8 @@ from unittest import mock -from rally_openstack.contexts.swift import utils from rally_openstack.task import context +from rally_openstack.task.contexts.swift import utils from tests.unit import test @@ -33,7 +33,7 @@ class SwiftContext(utils.SwiftObjectMixin, context.OpenStackContext): class SwiftObjectMixinTestCase(test.TestCase): - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test__create_containers(self, mock_clients): tenants = 2 containers_per_tenant = 2 @@ -67,7 +67,7 @@ class SwiftObjectMixinTestCase(test.TestCase): container["user"]["credential"]) self.assertEqual(0, len(container["objects"])) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test__create_objects(self, mock_clients): tenants = 2 containers_per_tenant = 1 @@ -115,7 +115,7 @@ class SwiftObjectMixinTestCase(test.TestCase): self.assertEqual(objects_per_container, len(container["objects"])) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test__delete_containers(self, mock_clients): context = test.get_test_context() context.update({ @@ -154,7 +154,7 @@ class SwiftObjectMixinTestCase(test.TestCase): self.assertEqual(0, len(context["tenants"][tenant_id]["containers"])) - @mock.patch("rally_openstack.osclients.Clients") + @mock.patch("rally_openstack.common.osclients.Clients") def test__delete_objects(self, mock_clients): context = test.get_test_context() context.update({ diff --git a/tests/unit/contexts/test_api_versions.py b/tests/unit/task/contexts/test_api_versions.py similarity index 97% rename from tests/unit/contexts/test_api_versions.py rename to tests/unit/task/contexts/test_api_versions.py index acff0d28..614f5cc6 100644 --- a/tests/unit/contexts/test_api_versions.py +++ b/tests/unit/task/contexts/test_api_versions.py @@ -18,7 +18,7 @@ from rally.common import utils from rally import exceptions from rally.task import context -from rally_openstack.contexts import api_versions +from rally_openstack.task.contexts import api_versions from tests.unit import test @@ -28,7 +28,7 @@ class OpenStackServicesTestCase(test.TestCase): def setUp(self): super(OpenStackServicesTestCase, self).setUp() self.mock_clients = mock.patch( - "rally_openstack.osclients.Clients").start() + "rally_openstack.common.osclients.Clients").start() osclient_kc = self.mock_clients.return_value.keystone self.mock_kc = osclient_kc.return_value self.service_catalog = osclient_kc.service_catalog diff --git a/tests/unit/scenarios/loadbalancer/__init__.py b/tests/unit/task/contexts/vm/__init__.py similarity index 100% rename from tests/unit/scenarios/loadbalancer/__init__.py rename to tests/unit/task/contexts/vm/__init__.py diff --git a/tests/unit/contexts/vm/test_custom_image.py b/tests/unit/task/contexts/vm/test_custom_image.py similarity index 98% rename from tests/unit/contexts/vm/test_custom_image.py rename to tests/unit/task/contexts/vm/test_custom_image.py index d9bce1ae..0dd41cc7 100644 --- a/tests/unit/contexts/vm/test_custom_image.py +++ b/tests/unit/task/contexts/vm/test_custom_image.py @@ -17,11 +17,11 @@ from unittest import mock from rally.task import context -from rally_openstack.contexts.vm import custom_image +from rally_openstack.task.contexts.vm import custom_image from tests.unit import test -BASE = "rally_openstack.contexts.vm.custom_image" +BASE = "rally_openstack.task.contexts.vm.custom_image" @context.configure(name="test_custom_image", order=500) diff --git a/tests/unit/contexts/vm/test_image_command_customizer.py b/tests/unit/task/contexts/vm/test_image_command_customizer.py similarity index 96% rename from tests/unit/contexts/vm/test_image_command_customizer.py rename to tests/unit/task/contexts/vm/test_image_command_customizer.py index 28848e53..74f5bdef 100644 --- a/tests/unit/contexts/vm/test_image_command_customizer.py +++ b/tests/unit/task/contexts/vm/test_image_command_customizer.py @@ -19,10 +19,10 @@ from unittest import mock from rally import exceptions -from rally_openstack.contexts.vm import image_command_customizer +from rally_openstack.task.contexts.vm import image_command_customizer from tests.unit import test -BASE = "rally_openstack.contexts.vm.image_command_customizer" +BASE = "rally_openstack.task.contexts.vm.image_command_customizer" class ImageCommandCustomizerContextVMTestCase(test.TestCase): diff --git a/tests/unit/scenarios/magnum/__init__.py b/tests/unit/task/contexts/watcher/__init__.py similarity index 100% rename from tests/unit/scenarios/magnum/__init__.py rename to tests/unit/task/contexts/watcher/__init__.py diff --git a/tests/unit/contexts/watcher/test_audit_templates.py b/tests/unit/task/contexts/watcher/test_audit_templates.py similarity index 92% rename from tests/unit/contexts/watcher/test_audit_templates.py rename to tests/unit/task/contexts/watcher/test_audit_templates.py index 10b50167..4e52571c 100644 --- a/tests/unit/contexts/watcher/test_audit_templates.py +++ b/tests/unit/task/contexts/watcher/test_audit_templates.py @@ -14,14 +14,14 @@ from unittest import mock -from rally_openstack.contexts.watcher import audit_templates -from rally_openstack.scenarios.watcher import utils as watcher_utils +from rally_openstack.task.contexts.watcher import audit_templates +from rally_openstack.task.scenarios.watcher import utils as watcher_utils from tests.unit import test -CTX = "rally_openstack.contexts.watcher" -SCN = "rally_openstack.scenarios.watcher" -TYP = "rally_openstack.types" +CTX = "rally_openstack.task.contexts.watcher" +SCN = "rally_openstack.task.scenarios.watcher" +TYP = "rally_openstack.task.types" class AuditTemplateTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/manila/__init__.py b/tests/unit/task/hooks/__init__.py similarity index 100% rename from tests/unit/scenarios/manila/__init__.py rename to tests/unit/task/hooks/__init__.py diff --git a/tests/unit/hook/test_fault_injection.py b/tests/unit/task/hooks/test_fault_injection.py similarity index 98% rename from tests/unit/hook/test_fault_injection.py rename to tests/unit/task/hooks/test_fault_injection.py index 1ebde2ee..b384d552 100644 --- a/tests/unit/hook/test_fault_injection.py +++ b/tests/unit/task/hooks/test_fault_injection.py @@ -22,7 +22,7 @@ from os_faults.api import error from rally import consts from rally.task import hook -from rally_openstack.hook import fault_injection +from rally_openstack.task.hooks import fault_injection from tests.unit import fakes from tests.unit import test diff --git a/tests/unit/scenarios/mistral/__init__.py b/tests/unit/task/scenarios/__init__.py similarity index 100% rename from tests/unit/scenarios/mistral/__init__.py rename to tests/unit/task/scenarios/__init__.py diff --git a/tests/unit/scenarios/monasca/__init__.py b/tests/unit/task/scenarios/authenticate/__init__.py similarity index 100% rename from tests/unit/scenarios/monasca/__init__.py rename to tests/unit/task/scenarios/authenticate/__init__.py diff --git a/tests/unit/scenarios/authenticate/test_authenticate.py b/tests/unit/task/scenarios/authenticate/test_authenticate.py similarity index 98% rename from tests/unit/scenarios/authenticate/test_authenticate.py rename to tests/unit/task/scenarios/authenticate/test_authenticate.py index d7999307..1f6b6e21 100644 --- a/tests/unit/scenarios/authenticate/test_authenticate.py +++ b/tests/unit/task/scenarios/authenticate/test_authenticate.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.authenticate import authenticate +from rally_openstack.task.scenarios.authenticate import authenticate from tests.unit import test diff --git a/tests/unit/scenarios/murano/__init__.py b/tests/unit/task/scenarios/barbican/__init__.py similarity index 100% rename from tests/unit/scenarios/murano/__init__.py rename to tests/unit/task/scenarios/barbican/__init__.py diff --git a/tests/unit/scenarios/barbican/test_containers.py b/tests/unit/task/scenarios/barbican/test_containers.py similarity index 95% rename from tests/unit/scenarios/barbican/test_containers.py rename to tests/unit/task/scenarios/barbican/test_containers.py index 31adab97..ff109b9a 100644 --- a/tests/unit/scenarios/barbican/test_containers.py +++ b/tests/unit/task/scenarios/barbican/test_containers.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.barbican import containers +from rally_openstack.task.scenarios.barbican import containers from tests.unit import test @@ -38,8 +38,8 @@ class BarbicanContainersTestCase(test.ScenarioTestCase): def setUp(self): super(BarbicanContainersTestCase, self).setUp() - patch = mock.patch( - "rally_openstack.services.key_manager.barbican.BarbicanService") + m = "rally_openstack.common.services.key_manager.barbican" + patch = mock.patch("%s.BarbicanService" % m) self.addCleanup(patch.stop) self.mock_secrets = patch.start() diff --git a/tests/unit/scenarios/barbican/test_orders.py b/tests/unit/task/scenarios/barbican/test_orders.py similarity index 94% rename from tests/unit/scenarios/barbican/test_orders.py rename to tests/unit/task/scenarios/barbican/test_orders.py index a8be1a81..78b94909 100644 --- a/tests/unit/scenarios/barbican/test_orders.py +++ b/tests/unit/task/scenarios/barbican/test_orders.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.barbican import orders +from rally_openstack.task.scenarios.barbican import orders from tests.unit import test @@ -38,8 +38,8 @@ class BarbicanOrdersTestCase(test.ScenarioTestCase): def setUp(self): super(BarbicanOrdersTestCase, self).setUp() - patch = mock.patch( - "rally_openstack.services.key_manager.barbican.BarbicanService") + m = "rally_openstack.common.services.key_manager.barbican" + patch = mock.patch("%s.BarbicanService" % m) self.addCleanup(patch.stop) self.mock_secrets = patch.start() diff --git a/tests/unit/scenarios/barbican/test_secrets.py b/tests/unit/task/scenarios/barbican/test_secrets.py similarity index 95% rename from tests/unit/scenarios/barbican/test_secrets.py rename to tests/unit/task/scenarios/barbican/test_secrets.py index ee097057..67be7ceb 100644 --- a/tests/unit/scenarios/barbican/test_secrets.py +++ b/tests/unit/task/scenarios/barbican/test_secrets.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.barbican import secrets +from rally_openstack.task.scenarios.barbican import secrets from tests.unit import fakes from tests.unit import test @@ -39,8 +39,8 @@ class BarbicanSecretsTestCase(test.ScenarioTestCase): def setUp(self): super(BarbicanSecretsTestCase, self).setUp() - patch = mock.patch( - "rally_openstack.services.key_manager.barbican.BarbicanService") + m = "rally_openstack.common.services.key_manager.barbican" + patch = mock.patch("%s.BarbicanService" % m) self.addCleanup(patch.stop) self.mock_secrets = patch.start() diff --git a/tests/unit/scenarios/barbican/test_utils.py b/tests/unit/task/scenarios/barbican/test_utils.py similarity index 89% rename from tests/unit/scenarios/barbican/test_utils.py rename to tests/unit/task/scenarios/barbican/test_utils.py index 92ffbabb..968539b5 100644 --- a/tests/unit/scenarios/barbican/test_utils.py +++ b/tests/unit/task/scenarios/barbican/test_utils.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.barbican import utils +from rally_openstack.task.scenarios.barbican import utils from tests.unit import test @@ -36,8 +36,8 @@ class BarbicanBaseTestCase(test.ScenarioTestCase): "tenant": {"id": "fake_tenant_id", "name": "fake_tenant_name"} }) - patch = mock.patch( - "rally_openstack.services.key_manager.barbican.BarbicanService") + m = "rally_openstack.common.services.key_manager.barbican" + patch = mock.patch("%s.BarbicanService" % m) self.addCleanup(patch.stop) self.mock_service = patch.start() diff --git a/tests/unit/scenarios/neutron/__init__.py b/tests/unit/task/scenarios/ceilometer/__init__.py similarity index 100% rename from tests/unit/scenarios/neutron/__init__.py rename to tests/unit/task/scenarios/ceilometer/__init__.py diff --git a/tests/unit/scenarios/ceilometer/test_alarms.py b/tests/unit/task/scenarios/ceilometer/test_alarms.py similarity index 98% rename from tests/unit/scenarios/ceilometer/test_alarms.py rename to tests/unit/task/scenarios/ceilometer/test_alarms.py index a32f08e5..eb4aee37 100644 --- a/tests/unit/scenarios/ceilometer/test_alarms.py +++ b/tests/unit/task/scenarios/ceilometer/test_alarms.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.ceilometer import alarms +from rally_openstack.task.scenarios.ceilometer import alarms from tests.unit import test diff --git a/tests/unit/scenarios/ceilometer/test_events.py b/tests/unit/task/scenarios/ceilometer/test_events.py similarity index 96% rename from tests/unit/scenarios/ceilometer/test_events.py rename to tests/unit/task/scenarios/ceilometer/test_events.py index bb0f825c..6a14f767 100644 --- a/tests/unit/scenarios/ceilometer/test_events.py +++ b/tests/unit/task/scenarios/ceilometer/test_events.py @@ -15,7 +15,7 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.ceilometer import events +from rally_openstack.task.scenarios.ceilometer import events from tests.unit import test @@ -24,7 +24,7 @@ class CeilometerEventsTestCase(test.ScenarioTestCase): def setUp(self): super(CeilometerEventsTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.identity.identity.Identity") + "rally_openstack.common.services.identity.identity.Identity") self.addCleanup(patch.stop) self.mock_identity = patch.start() diff --git a/tests/unit/scenarios/ceilometer/test_meters.py b/tests/unit/task/scenarios/ceilometer/test_meters.py similarity index 96% rename from tests/unit/scenarios/ceilometer/test_meters.py rename to tests/unit/task/scenarios/ceilometer/test_meters.py index 8a0c5df6..a536daca 100644 --- a/tests/unit/scenarios/ceilometer/test_meters.py +++ b/tests/unit/task/scenarios/ceilometer/test_meters.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.scenarios.ceilometer import meters +from rally_openstack.task.scenarios.ceilometer import meters from tests.unit import test -BASE = "rally_openstack.scenarios.ceilometer" +BASE = "rally_openstack.task.scenarios.ceilometer" class CeilometerMetersTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/ceilometer/test_queries.py b/tests/unit/task/scenarios/ceilometer/test_queries.py similarity index 98% rename from tests/unit/scenarios/ceilometer/test_queries.py rename to tests/unit/task/scenarios/ceilometer/test_queries.py index 7045d03a..65277cb9 100644 --- a/tests/unit/scenarios/ceilometer/test_queries.py +++ b/tests/unit/task/scenarios/ceilometer/test_queries.py @@ -15,7 +15,7 @@ import json from unittest import mock -from rally_openstack.scenarios.ceilometer import queries +from rally_openstack.task.scenarios.ceilometer import queries from tests.unit import test diff --git a/tests/unit/scenarios/ceilometer/test_resources.py b/tests/unit/task/scenarios/ceilometer/test_resources.py similarity index 97% rename from tests/unit/scenarios/ceilometer/test_resources.py rename to tests/unit/task/scenarios/ceilometer/test_resources.py index 39465426..dcbcc7eb 100644 --- a/tests/unit/scenarios/ceilometer/test_resources.py +++ b/tests/unit/task/scenarios/ceilometer/test_resources.py @@ -15,11 +15,11 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.ceilometer import resources +from rally_openstack.task.scenarios.ceilometer import resources from tests.unit import test -BASE = "rally_openstack.scenarios.ceilometer" +BASE = "rally_openstack.task.scenarios.ceilometer" class CeilometerResourcesTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/ceilometer/test_samples.py b/tests/unit/task/scenarios/ceilometer/test_samples.py similarity index 96% rename from tests/unit/scenarios/ceilometer/test_samples.py rename to tests/unit/task/scenarios/ceilometer/test_samples.py index 21ecc3cb..aac586fa 100644 --- a/tests/unit/scenarios/ceilometer/test_samples.py +++ b/tests/unit/task/scenarios/ceilometer/test_samples.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.scenarios.ceilometer import samples +from rally_openstack.task.scenarios.ceilometer import samples from tests.unit import test -BASE = "rally_openstack.scenarios.ceilometer" +BASE = "rally_openstack.task.scenarios.ceilometer" class CeilometerSamplesTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/ceilometer/test_stats.py b/tests/unit/task/scenarios/ceilometer/test_stats.py similarity index 96% rename from tests/unit/scenarios/ceilometer/test_stats.py rename to tests/unit/task/scenarios/ceilometer/test_stats.py index a30ec749..16424da2 100644 --- a/tests/unit/scenarios/ceilometer/test_stats.py +++ b/tests/unit/task/scenarios/ceilometer/test_stats.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.ceilometer import stats +from rally_openstack.task.scenarios.ceilometer import stats from tests.unit import test diff --git a/tests/unit/scenarios/ceilometer/test_traits.py b/tests/unit/task/scenarios/ceilometer/test_traits.py similarity index 94% rename from tests/unit/scenarios/ceilometer/test_traits.py rename to tests/unit/task/scenarios/ceilometer/test_traits.py index 24aca004..d7a10a27 100644 --- a/tests/unit/scenarios/ceilometer/test_traits.py +++ b/tests/unit/task/scenarios/ceilometer/test_traits.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.ceilometer import traits +from rally_openstack.task.scenarios.ceilometer import traits from tests.unit import test @@ -23,7 +23,7 @@ class CeilometerTraitsTestCase(test.ScenarioTestCase): def setUp(self): super(CeilometerTraitsTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.identity.identity.Identity") + "rally_openstack.common.services.identity.identity.Identity") self.addCleanup(patch.stop) self.mock_identity = patch.start() diff --git a/tests/unit/scenarios/ceilometer/test_utils.py b/tests/unit/task/scenarios/ceilometer/test_utils.py similarity index 99% rename from tests/unit/scenarios/ceilometer/test_utils.py rename to tests/unit/task/scenarios/ceilometer/test_utils.py index bcce7ef5..65300845 100644 --- a/tests/unit/scenarios/ceilometer/test_utils.py +++ b/tests/unit/task/scenarios/ceilometer/test_utils.py @@ -19,10 +19,10 @@ from unittest import mock from dateutil import parser from rally import exceptions -from rally_openstack.scenarios.ceilometer import utils +from rally_openstack.task.scenarios.ceilometer import utils from tests.unit import test -CEILOMETER_UTILS = "rally_openstack.scenarios.ceilometer.utils" +CEILOMETER_UTILS = "rally_openstack.task.scenarios.ceilometer.utils" class CeilometerScenarioTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/nova/__init__.py b/tests/unit/task/scenarios/cinder/__init__.py similarity index 100% rename from tests/unit/scenarios/nova/__init__.py rename to tests/unit/task/scenarios/cinder/__init__.py diff --git a/tests/unit/scenarios/cinder/test_qos_specs.py b/tests/unit/task/scenarios/cinder/test_qos_specs.py similarity index 97% rename from tests/unit/scenarios/cinder/test_qos_specs.py rename to tests/unit/task/scenarios/cinder/test_qos_specs.py index 55910e78..5af47447 100644 --- a/tests/unit/scenarios/cinder/test_qos_specs.py +++ b/tests/unit/task/scenarios/cinder/test_qos_specs.py @@ -15,7 +15,7 @@ from unittest import mock from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.cinder import qos_specs +from rally_openstack.task.scenarios.cinder import qos_specs from tests.unit import test @@ -24,7 +24,7 @@ class CinderQosTestCase(test.ScenarioTestCase): def setUp(self): super(CinderQosTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.storage.block.BlockStorage") + "rally_openstack.common.services.storage.block.BlockStorage") self.addCleanup(patch.stop) self.mock_cinder = patch.start() diff --git a/tests/unit/scenarios/cinder/test_utils.py b/tests/unit/task/scenarios/cinder/test_utils.py similarity index 94% rename from tests/unit/scenarios/cinder/test_utils.py rename to tests/unit/task/scenarios/cinder/test_utils.py index 61816c44..d44877f1 100644 --- a/tests/unit/scenarios/cinder/test_utils.py +++ b/tests/unit/task/scenarios/cinder/test_utils.py @@ -15,8 +15,8 @@ from unittest import mock -from rally_openstack import credential -from rally_openstack.scenarios.cinder import utils +from rally_openstack.common import credential +from rally_openstack.task.scenarios.cinder import utils from tests.unit import test diff --git a/tests/unit/scenarios/cinder/test_volume_backups.py b/tests/unit/task/scenarios/cinder/test_volume_backups.py similarity index 93% rename from tests/unit/scenarios/cinder/test_volume_backups.py rename to tests/unit/task/scenarios/cinder/test_volume_backups.py index 65027fdb..da912f4b 100644 --- a/tests/unit/scenarios/cinder/test_volume_backups.py +++ b/tests/unit/task/scenarios/cinder/test_volume_backups.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.cinder import volume_backups +from rally_openstack.task.scenarios.cinder import volume_backups from tests.unit import test @@ -23,7 +23,7 @@ class CinderBackupTestCase(test.ScenarioTestCase): def setUp(self): super(CinderBackupTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.storage.block.BlockStorage") + "rally_openstack.common.services.storage.block.BlockStorage") self.addCleanup(patch.stop) self.mock_cinder = patch.start() diff --git a/tests/unit/scenarios/cinder/test_volume_types.py b/tests/unit/task/scenarios/cinder/test_volume_types.py similarity index 98% rename from tests/unit/scenarios/cinder/test_volume_types.py rename to tests/unit/task/scenarios/cinder/test_volume_types.py index 917a44a2..974ccf97 100644 --- a/tests/unit/scenarios/cinder/test_volume_types.py +++ b/tests/unit/task/scenarios/cinder/test_volume_types.py @@ -15,10 +15,10 @@ from unittest import mock from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.cinder import volume_types +from rally_openstack.task.scenarios.cinder import volume_types from tests.unit import test -CINDER_V2_PATH = ("rally_openstack.services.storage" +CINDER_V2_PATH = ("rally_openstack.common.services.storage" ".cinder_v2.CinderV2Service") @@ -27,7 +27,7 @@ class CinderVolumeTypesTestCase(test.ScenarioTestCase): def setUp(self): super(CinderVolumeTypesTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.storage.block.BlockStorage") + "rally_openstack.common.services.storage.block.BlockStorage") self.addCleanup(patch.stop) self.mock_cinder = patch.start() diff --git a/tests/unit/scenarios/cinder/test_volumes.py b/tests/unit/task/scenarios/cinder/test_volumes.py similarity index 99% rename from tests/unit/scenarios/cinder/test_volumes.py rename to tests/unit/task/scenarios/cinder/test_volumes.py index a6a63ca3..66696e09 100755 --- a/tests/unit/scenarios/cinder/test_volumes.py +++ b/tests/unit/task/scenarios/cinder/test_volumes.py @@ -17,10 +17,10 @@ from unittest import mock import ddt -from rally_openstack.scenarios.cinder import volumes +from rally_openstack.task.scenarios.cinder import volumes from tests.unit import test -CINDER_VOLUMES = ("rally_openstack.scenarios.cinder.volumes") +CINDER_VOLUMES = ("rally_openstack.task.scenarios.cinder.volumes") @ddt.ddt @@ -43,7 +43,7 @@ class CinderServersTestCase(test.ScenarioTestCase): def setUp(self): super(CinderServersTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.storage.block.BlockStorage") + "rally_openstack.common.services.storage.block.BlockStorage") self.addCleanup(patch.stop) self.mock_cinder = patch.start() @@ -237,7 +237,7 @@ class CinderServersTestCase(test.ScenarioTestCase): mock_service.create_volume.return_value) scenario._delete_server.assert_called_once_with(fake_server) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test_create_and_upload_volume_to_image(self, mock_image): mock_volume_service = self.mock_cinder.return_value mock_image_service = mock_image.return_value diff --git a/tests/unit/scenarios/quotas/__init__.py b/tests/unit/task/scenarios/designate/__init__.py similarity index 100% rename from tests/unit/scenarios/quotas/__init__.py rename to tests/unit/task/scenarios/designate/__init__.py diff --git a/tests/unit/scenarios/designate/test_basic.py b/tests/unit/task/scenarios/designate/test_basic.py similarity index 99% rename from tests/unit/scenarios/designate/test_basic.py rename to tests/unit/task/scenarios/designate/test_basic.py index 4302da14..4c6bb13f 100644 --- a/tests/unit/scenarios/designate/test_basic.py +++ b/tests/unit/task/scenarios/designate/test_basic.py @@ -17,10 +17,10 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.designate import basic +from rally_openstack.task.scenarios.designate import basic from tests.unit import test -BASE = "rally_openstack.scenarios.designate.basic" +BASE = "rally_openstack.task.scenarios.designate.basic" class DesignateBasicTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/designate/test_utils.py b/tests/unit/task/scenarios/designate/test_utils.py similarity index 98% rename from tests/unit/scenarios/designate/test_utils.py rename to tests/unit/task/scenarios/designate/test_utils.py index 26f3e344..54d42f6a 100644 --- a/tests/unit/scenarios/designate/test_utils.py +++ b/tests/unit/task/scenarios/designate/test_utils.py @@ -18,10 +18,10 @@ from unittest import mock import ddt -from rally_openstack.scenarios.designate import utils +from rally_openstack.task.scenarios.designate import utils from tests.unit import test -DESIGNATE_UTILS = "rally_openstack.scenarios.designate.utils." +DESIGNATE_UTILS = "rally_openstack.task.scenarios.designate.utils." @ddt.ddt diff --git a/tests/unit/scenarios/sahara/__init__.py b/tests/unit/task/scenarios/glance/__init__.py similarity index 100% rename from tests/unit/scenarios/sahara/__init__.py rename to tests/unit/task/scenarios/glance/__init__.py diff --git a/tests/unit/scenarios/glance/test_images.py b/tests/unit/task/scenarios/glance/test_images.py similarity index 97% rename from tests/unit/scenarios/glance/test_images.py rename to tests/unit/task/scenarios/glance/test_images.py index a6d6ea1b..ae5809d1 100644 --- a/tests/unit/scenarios/glance/test_images.py +++ b/tests/unit/task/scenarios/glance/test_images.py @@ -16,12 +16,12 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.glance import images +from rally_openstack.task.scenarios.glance import images from tests.unit import fakes from tests.unit import test -BASE = "rally_openstack.scenarios.glance.images" -GLANCE_V2_PATH = ("rally_openstack.services.image.glance_v2." +BASE = "rally_openstack.task.scenarios.glance.images" +GLANCE_V2_PATH = ("rally_openstack.common.services.image.glance_v2." "GlanceV2Service") @@ -46,7 +46,7 @@ class GlanceBasicTestCase(test.ScenarioTestCase): def setUp(self): super(GlanceBasicTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.image.image.Image") + "rally_openstack.common.services.image.image.Image") self.addCleanup(patch.stop) self.mock_image = patch.start() diff --git a/tests/unit/scenarios/senlin/__init__.py b/tests/unit/task/scenarios/gnocchi/__init__.py similarity index 100% rename from tests/unit/scenarios/senlin/__init__.py rename to tests/unit/task/scenarios/gnocchi/__init__.py diff --git a/tests/unit/scenarios/gnocchi/test_archive_policy.py b/tests/unit/task/scenarios/gnocchi/test_archive_policy.py similarity index 95% rename from tests/unit/scenarios/gnocchi/test_archive_policy.py rename to tests/unit/task/scenarios/gnocchi/test_archive_policy.py index 920d700a..8dc8d45b 100644 --- a/tests/unit/scenarios/gnocchi/test_archive_policy.py +++ b/tests/unit/task/scenarios/gnocchi/test_archive_policy.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import archive_policy +from rally_openstack.task.scenarios.gnocchi import archive_policy from tests.unit import test @@ -39,7 +39,7 @@ class GnocchiArchivePolicyTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiArchivePolicyTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_archive_policy_rule.py b/tests/unit/task/scenarios/gnocchi/test_archive_policy_rule.py similarity index 94% rename from tests/unit/scenarios/gnocchi/test_archive_policy_rule.py rename to tests/unit/task/scenarios/gnocchi/test_archive_policy_rule.py index 270cd327..d8112c25 100644 --- a/tests/unit/scenarios/gnocchi/test_archive_policy_rule.py +++ b/tests/unit/task/scenarios/gnocchi/test_archive_policy_rule.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import archive_policy_rule +from rally_openstack.task.scenarios.gnocchi import archive_policy_rule from tests.unit import test @@ -39,7 +39,7 @@ class GnocchiArchivePolicyRuleTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiArchivePolicyRuleTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_capabilities.py b/tests/unit/task/scenarios/gnocchi/test_capabilities.py similarity index 91% rename from tests/unit/scenarios/gnocchi/test_capabilities.py rename to tests/unit/task/scenarios/gnocchi/test_capabilities.py index 74d7429d..c4aa7bd4 100644 --- a/tests/unit/scenarios/gnocchi/test_capabilities.py +++ b/tests/unit/task/scenarios/gnocchi/test_capabilities.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import capabilities +from rally_openstack.task.scenarios.gnocchi import capabilities from tests.unit import test @@ -34,7 +34,7 @@ class GnocchiCapabilitiesTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiCapabilitiesTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_metric.py b/tests/unit/task/scenarios/gnocchi/test_metric.py similarity index 94% rename from tests/unit/scenarios/gnocchi/test_metric.py rename to tests/unit/task/scenarios/gnocchi/test_metric.py index 40794547..3d08e432 100644 --- a/tests/unit/scenarios/gnocchi/test_metric.py +++ b/tests/unit/task/scenarios/gnocchi/test_metric.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import metric +from rally_openstack.task.scenarios.gnocchi import metric from tests.unit import test @@ -38,7 +38,7 @@ class GnocchiMetricTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiMetricTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_resource.py b/tests/unit/task/scenarios/gnocchi/test_resource.py similarity index 94% rename from tests/unit/scenarios/gnocchi/test_resource.py rename to tests/unit/task/scenarios/gnocchi/test_resource.py index ef33d7b2..bc0f9482 100644 --- a/tests/unit/scenarios/gnocchi/test_resource.py +++ b/tests/unit/task/scenarios/gnocchi/test_resource.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import resource +from rally_openstack.task.scenarios.gnocchi import resource from tests.unit import test @@ -38,7 +38,7 @@ class GnocchiResourceTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiResourceTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_resource_type.py b/tests/unit/task/scenarios/gnocchi/test_resource_type.py similarity index 94% rename from tests/unit/scenarios/gnocchi/test_resource_type.py rename to tests/unit/task/scenarios/gnocchi/test_resource_type.py index cc3740c4..0879ef2d 100644 --- a/tests/unit/scenarios/gnocchi/test_resource_type.py +++ b/tests/unit/task/scenarios/gnocchi/test_resource_type.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import resource_type +from rally_openstack.task.scenarios.gnocchi import resource_type from tests.unit import test @@ -38,7 +38,7 @@ class GnocchiResourceTypeTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiResourceTypeTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_status.py b/tests/unit/task/scenarios/gnocchi/test_status.py similarity index 91% rename from tests/unit/scenarios/gnocchi/test_status.py rename to tests/unit/task/scenarios/gnocchi/test_status.py index 31157901..e2958dc5 100644 --- a/tests/unit/scenarios/gnocchi/test_status.py +++ b/tests/unit/task/scenarios/gnocchi/test_status.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import status +from rally_openstack.task.scenarios.gnocchi import status from tests.unit import test @@ -33,7 +33,7 @@ class GnocchiStatusTestCase(test.ScenarioTestCase): def setUp(self): super(GnocchiStatusTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_metric = patch.start() diff --git a/tests/unit/scenarios/gnocchi/test_utils.py b/tests/unit/task/scenarios/gnocchi/test_utils.py similarity index 92% rename from tests/unit/scenarios/gnocchi/test_utils.py rename to tests/unit/task/scenarios/gnocchi/test_utils.py index 91fa569b..44bdad05 100644 --- a/tests/unit/scenarios/gnocchi/test_utils.py +++ b/tests/unit/task/scenarios/gnocchi/test_utils.py @@ -14,7 +14,7 @@ from unittest import mock -from rally_openstack.scenarios.gnocchi import utils +from rally_openstack.task.scenarios.gnocchi import utils from tests.unit import test @@ -36,7 +36,7 @@ class GnocchiBaseTestCase(test.ScenarioTestCase): "name": "fake_tenant_name"} }) patch = mock.patch( - "rally_openstack.services.gnocchi.metric.GnocchiService") + "rally_openstack.common.services.gnocchi.metric.GnocchiService") self.addCleanup(patch.stop) self.mock_service = patch.start() diff --git a/tests/unit/scenarios/swift/__init__.py b/tests/unit/task/scenarios/heat/__init__.py similarity index 100% rename from tests/unit/scenarios/swift/__init__.py rename to tests/unit/task/scenarios/heat/__init__.py diff --git a/tests/unit/scenarios/heat/test_stacks.py b/tests/unit/task/scenarios/heat/test_stacks.py similarity index 99% rename from tests/unit/scenarios/heat/test_stacks.py rename to tests/unit/task/scenarios/heat/test_stacks.py index 1d0fa62e..3d5d9d63 100644 --- a/tests/unit/scenarios/heat/test_stacks.py +++ b/tests/unit/task/scenarios/heat/test_stacks.py @@ -17,10 +17,10 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.heat import stacks +from rally_openstack.task.scenarios.heat import stacks from tests.unit import test -BASE = "rally_openstack.scenarios.heat.stacks" +BASE = "rally_openstack.task.scenarios.heat.stacks" class HeatStacksTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/heat/test_utils.py b/tests/unit/task/scenarios/heat/test_utils.py similarity index 99% rename from tests/unit/scenarios/heat/test_utils.py rename to tests/unit/task/scenarios/heat/test_utils.py index 961e3174..df2bb3c7 100644 --- a/tests/unit/scenarios/heat/test_utils.py +++ b/tests/unit/task/scenarios/heat/test_utils.py @@ -17,10 +17,10 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.heat import utils +from rally_openstack.task.scenarios.heat import utils from tests.unit import test -HEAT_UTILS = "rally_openstack.scenarios.heat.utils" +HEAT_UTILS = "rally_openstack.task.scenarios.heat.utils" CONF = utils.CONF diff --git a/tests/unit/scenarios/vm/__init__.py b/tests/unit/task/scenarios/ironic/__init__.py similarity index 100% rename from tests/unit/scenarios/vm/__init__.py rename to tests/unit/task/scenarios/ironic/__init__.py diff --git a/tests/unit/scenarios/ironic/test_nodes.py b/tests/unit/task/scenarios/ironic/test_nodes.py similarity index 98% rename from tests/unit/scenarios/ironic/test_nodes.py rename to tests/unit/task/scenarios/ironic/test_nodes.py index f4949dcf..3eca7c72 100644 --- a/tests/unit/scenarios/ironic/test_nodes.py +++ b/tests/unit/task/scenarios/ironic/test_nodes.py @@ -17,7 +17,7 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.ironic import nodes +from rally_openstack.task.scenarios.ironic import nodes from tests.unit import test diff --git a/tests/unit/scenarios/ironic/test_utils.py b/tests/unit/task/scenarios/ironic/test_utils.py similarity index 96% rename from tests/unit/scenarios/ironic/test_utils.py rename to tests/unit/task/scenarios/ironic/test_utils.py index ad2805fe..96192c64 100644 --- a/tests/unit/scenarios/ironic/test_utils.py +++ b/tests/unit/task/scenarios/ironic/test_utils.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.scenarios.ironic import utils +from rally_openstack.task.scenarios.ironic import utils from tests.unit import test -IRONIC_UTILS = "rally_openstack.scenarios.ironic.utils" +IRONIC_UTILS = "rally_openstack.task.scenarios.ironic.utils" class IronicScenarioTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/watcher/__init__.py b/tests/unit/task/scenarios/keystone/__init__.py similarity index 100% rename from tests/unit/scenarios/watcher/__init__.py rename to tests/unit/task/scenarios/keystone/__init__.py diff --git a/tests/unit/scenarios/keystone/test_basic.py b/tests/unit/task/scenarios/keystone/test_basic.py similarity index 99% rename from tests/unit/scenarios/keystone/test_basic.py rename to tests/unit/task/scenarios/keystone/test_basic.py index 6c57bca9..8e022d5d 100755 --- a/tests/unit/scenarios/keystone/test_basic.py +++ b/tests/unit/task/scenarios/keystone/test_basic.py @@ -18,7 +18,7 @@ from unittest import mock import ddt from rally import exceptions -from rally_openstack.scenarios.keystone import basic +from rally_openstack.task.scenarios.keystone import basic from tests.unit import test @@ -44,7 +44,7 @@ class KeystoneBasicTestCase(test.ScenarioTestCase): def setUp(self): super(KeystoneBasicTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.identity.identity.Identity") + "rally_openstack.common.services.identity.identity.Identity") self.addCleanup(patch.stop) self.mock_identity = patch.start() diff --git a/tests/unit/scenarios/zaqar/__init__.py b/tests/unit/task/scenarios/loadbalancer/__init__.py similarity index 100% rename from tests/unit/scenarios/zaqar/__init__.py rename to tests/unit/task/scenarios/loadbalancer/__init__.py diff --git a/tests/unit/scenarios/loadbalancer/test_loadbalancers.py b/tests/unit/task/scenarios/loadbalancer/test_loadbalancers.py similarity index 97% rename from tests/unit/scenarios/loadbalancer/test_loadbalancers.py rename to tests/unit/task/scenarios/loadbalancer/test_loadbalancers.py index cd7da291..9ec57d16 100644 --- a/tests/unit/scenarios/loadbalancer/test_loadbalancers.py +++ b/tests/unit/task/scenarios/loadbalancer/test_loadbalancers.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.octavia import loadbalancers +from rally_openstack.task.scenarios.octavia import loadbalancers from tests.unit import test @@ -24,7 +24,7 @@ class LoadBalancersTestCase(test.ScenarioTestCase): def setUp(self): super(LoadBalancersTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.loadbalancer.octavia.Octavia") + "rally_openstack.common.services.loadbalancer.octavia.Octavia") self.addCleanup(patch.stop) self.mock_loadbalancers = patch.start() diff --git a/tests/unit/scenarios/loadbalancer/test_pools.py b/tests/unit/task/scenarios/loadbalancer/test_pools.py similarity index 97% rename from tests/unit/scenarios/loadbalancer/test_pools.py rename to tests/unit/task/scenarios/loadbalancer/test_pools.py index 9be5460c..3d2c9901 100644 --- a/tests/unit/scenarios/loadbalancer/test_pools.py +++ b/tests/unit/task/scenarios/loadbalancer/test_pools.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.octavia import pools +from rally_openstack.task.scenarios.octavia import pools from tests.unit import test @@ -24,7 +24,7 @@ class PoolsTestCase(test.ScenarioTestCase): def setUp(self): super(PoolsTestCase, self).setUp() patch = mock.patch( - "rally_openstack.services.loadbalancer.octavia.Octavia") + "rally_openstack.common.services.loadbalancer.octavia.Octavia") self.addCleanup(patch.stop) self.mock_loadbalancers = patch.start() diff --git a/tests/unit/scenarios/loadbalancer/test_utils.py b/tests/unit/task/scenarios/loadbalancer/test_utils.py similarity index 92% rename from tests/unit/scenarios/loadbalancer/test_utils.py rename to tests/unit/task/scenarios/loadbalancer/test_utils.py index f3d0d5cb..4e78ddf9 100644 --- a/tests/unit/scenarios/loadbalancer/test_utils.py +++ b/tests/unit/task/scenarios/loadbalancer/test_utils.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.octavia import utils +from rally_openstack.task.scenarios.octavia import utils from tests.unit import test @@ -37,7 +37,7 @@ class LoadBalancerBaseTestCase(test.ScenarioTestCase): "name": "fake_tenant_name"} }) patch = mock.patch( - "rally_openstack.services.loadbalancer.octavia.Octavia") + "rally_openstack.common.services.loadbalancer.octavia.Octavia") self.addCleanup(patch.stop) self.mock_service = patch.start() diff --git a/tests/unit/services/__init__.py b/tests/unit/task/scenarios/magnum/__init__.py similarity index 100% rename from tests/unit/services/__init__.py rename to tests/unit/task/scenarios/magnum/__init__.py diff --git a/tests/unit/scenarios/magnum/test_cluster_templates.py b/tests/unit/task/scenarios/magnum/test_cluster_templates.py similarity index 94% rename from tests/unit/scenarios/magnum/test_cluster_templates.py rename to tests/unit/task/scenarios/magnum/test_cluster_templates.py index 21ddbf7c..b8bcfbb8 100644 --- a/tests/unit/scenarios/magnum/test_cluster_templates.py +++ b/tests/unit/task/scenarios/magnum/test_cluster_templates.py @@ -16,7 +16,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.magnum import cluster_templates +from rally_openstack.task.scenarios.magnum import cluster_templates from tests.unit import test diff --git a/tests/unit/scenarios/magnum/test_clusters.py b/tests/unit/task/scenarios/magnum/test_clusters.py similarity index 98% rename from tests/unit/scenarios/magnum/test_clusters.py rename to tests/unit/task/scenarios/magnum/test_clusters.py index 0201d860..ff9e3853 100644 --- a/tests/unit/scenarios/magnum/test_clusters.py +++ b/tests/unit/task/scenarios/magnum/test_clusters.py @@ -17,7 +17,7 @@ from unittest import mock import ddt from rally import exceptions -from rally_openstack.scenarios.magnum import clusters +from rally_openstack.task.scenarios.magnum import clusters from tests.unit import test diff --git a/tests/unit/scenarios/magnum/test_k8s_pods.py b/tests/unit/task/scenarios/magnum/test_k8s_pods.py similarity index 90% rename from tests/unit/scenarios/magnum/test_k8s_pods.py rename to tests/unit/task/scenarios/magnum/test_k8s_pods.py index dcc1f43b..fbe4ec08 100644 --- a/tests/unit/scenarios/magnum/test_k8s_pods.py +++ b/tests/unit/task/scenarios/magnum/test_k8s_pods.py @@ -17,7 +17,7 @@ from unittest import mock import ddt from rally import exceptions -from rally_openstack.scenarios.magnum import k8s_pods +from rally_openstack.task.scenarios.magnum import k8s_pods from tests.unit import test @@ -44,7 +44,7 @@ class K8sPodsTestCase(test.ScenarioTestCase): scenario._create_v1pod = mock.MagicMock(return_value=fake_pod) with mock.patch( - "rally_openstack.scenarios.magnum.k8s_pods.open", + "rally_openstack.task.scenarios.magnum.k8s_pods.open", file_mock, create=True) as m: scenario.run(manifests) @@ -58,7 +58,7 @@ class K8sPodsTestCase(test.ScenarioTestCase): scenario._create_v1pod = mock.MagicMock(return_value=None) with mock.patch( - "rally_openstack.scenarios.magnum.k8s_pods.open", + "rally_openstack.task.scenarios.magnum.k8s_pods.open", file_mock, create=True) as m: self.assertRaises( exceptions.RallyAssertionError, @@ -81,7 +81,7 @@ class K8sPodsTestCase(test.ScenarioTestCase): scenario._create_v1rc = mock.MagicMock(return_value=fake_rc) with mock.patch( - "rally_openstack.scenarios.magnum.k8s_pods.open", + "rally_openstack.task.scenarios.magnum.k8s_pods.open", file_mock, create=True) as m: scenario.run(manifests) @@ -94,7 +94,7 @@ class K8sPodsTestCase(test.ScenarioTestCase): scenario._create_v1rc = mock.MagicMock(return_value=None) with mock.patch( - "rally_openstack.scenarios.magnum.k8s_pods.open", + "rally_openstack.task.scenarios.magnum.k8s_pods.open", file_mock, create=True) as m: self.assertRaises( exceptions.RallyAssertionError, diff --git a/tests/unit/scenarios/magnum/test_utils.py b/tests/unit/task/scenarios/magnum/test_utils.py similarity index 99% rename from tests/unit/scenarios/magnum/test_utils.py rename to tests/unit/task/scenarios/magnum/test_utils.py index 17296e4f..ecf6be36 100644 --- a/tests/unit/scenarios/magnum/test_utils.py +++ b/tests/unit/task/scenarios/magnum/test_utils.py @@ -19,10 +19,10 @@ import os from kubernetes import client as kubernetes_client from kubernetes.client.rest import ApiException from rally import exceptions -from rally_openstack.scenarios.magnum import utils +from rally_openstack.task.scenarios.magnum import utils from tests.unit import test -MAGNUM_UTILS = "rally_openstack.scenarios.magnum.utils" +MAGNUM_UTILS = "rally_openstack.task.scenarios.magnum.utils" CONF = utils.CONF diff --git a/tests/unit/services/barbican/__init__.py b/tests/unit/task/scenarios/manila/__init__.py similarity index 100% rename from tests/unit/services/barbican/__init__.py rename to tests/unit/task/scenarios/manila/__init__.py diff --git a/tests/unit/scenarios/manila/test_shares.py b/tests/unit/task/scenarios/manila/test_shares.py similarity index 99% rename from tests/unit/scenarios/manila/test_shares.py rename to tests/unit/task/scenarios/manila/test_shares.py index 6a212a47..9529b150 100644 --- a/tests/unit/scenarios/manila/test_shares.py +++ b/tests/unit/task/scenarios/manila/test_shares.py @@ -17,7 +17,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.manila import shares +from rally_openstack.task.scenarios.manila import shares from tests.unit import test diff --git a/tests/unit/scenarios/manila/test_utils.py b/tests/unit/task/scenarios/manila/test_utils.py similarity index 99% rename from tests/unit/scenarios/manila/test_utils.py rename to tests/unit/task/scenarios/manila/test_utils.py index ddd1148f..4c7fba0c 100644 --- a/tests/unit/scenarios/manila/test_utils.py +++ b/tests/unit/task/scenarios/manila/test_utils.py @@ -18,8 +18,8 @@ from unittest import mock import ddt from rally import exceptions -from rally_openstack.contexts.manila import consts -from rally_openstack.scenarios.manila import utils +from rally_openstack.task.contexts.manila import consts +from rally_openstack.task.scenarios.manila import utils from tests.unit import test BM_UTILS = "rally.task.utils." diff --git a/tests/unit/services/gnocchi/__init__.py b/tests/unit/task/scenarios/mistral/__init__.py similarity index 100% rename from tests/unit/services/gnocchi/__init__.py rename to tests/unit/task/scenarios/mistral/__init__.py diff --git a/tests/unit/scenarios/mistral/test_executions.py b/tests/unit/task/scenarios/mistral/test_executions.py similarity index 97% rename from tests/unit/scenarios/mistral/test_executions.py rename to tests/unit/task/scenarios/mistral/test_executions.py index 24a9a0e0..7cbb5af1 100644 --- a/tests/unit/scenarios/mistral/test_executions.py +++ b/tests/unit/task/scenarios/mistral/test_executions.py @@ -15,11 +15,11 @@ from unittest import mock -from rally_openstack.scenarios.mistral import executions +from rally_openstack.task.scenarios.mistral import executions from tests.unit import test -BASE = "rally_openstack.scenarios.mistral.executions" -MISTRAL_WBS_BASE = "rally_openstack.scenarios.mistral.workbooks" +BASE = "rally_openstack.task.scenarios.mistral.executions" +MISTRAL_WBS_BASE = "rally_openstack.task.scenarios.mistral.workbooks" WB_DEFINITION = """--- diff --git a/tests/unit/scenarios/mistral/test_utils.py b/tests/unit/task/scenarios/mistral/test_utils.py similarity index 98% rename from tests/unit/scenarios/mistral/test_utils.py rename to tests/unit/task/scenarios/mistral/test_utils.py index 8c8b5067..c5ceb4e1 100644 --- a/tests/unit/scenarios/mistral/test_utils.py +++ b/tests/unit/task/scenarios/mistral/test_utils.py @@ -14,11 +14,11 @@ # under the License. -from rally_openstack.scenarios.mistral import utils +from rally_openstack.task.scenarios.mistral import utils from tests.unit import fakes from tests.unit import test -MISTRAL_UTILS = "rally_openstack.scenarios.mistral.utils" +MISTRAL_UTILS = "rally_openstack.task.scenarios.mistral.utils" PARAMS_EXAMPLE = {"env": {"env_param": "param_value"}} INPUT_EXAMPLE = """{"input1": "value1", "some_json_input": {"a": "b"}}""" diff --git a/tests/unit/scenarios/mistral/test_workbooks.py b/tests/unit/task/scenarios/mistral/test_workbooks.py similarity index 94% rename from tests/unit/scenarios/mistral/test_workbooks.py rename to tests/unit/task/scenarios/mistral/test_workbooks.py index 72e529f9..65da30f7 100644 --- a/tests/unit/scenarios/mistral/test_workbooks.py +++ b/tests/unit/task/scenarios/mistral/test_workbooks.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.scenarios.mistral import workbooks +from rally_openstack.task.scenarios.mistral import workbooks from tests.unit import test -BASE = "rally_openstack.scenarios.mistral.workbooks" +BASE = "rally_openstack.task.scenarios.mistral.workbooks" class MistralWorkbooksTestCase(test.ScenarioTestCase): diff --git a/tests/unit/services/heat/__init__.py b/tests/unit/task/scenarios/monasca/__init__.py similarity index 100% rename from tests/unit/services/heat/__init__.py rename to tests/unit/task/scenarios/monasca/__init__.py diff --git a/tests/unit/scenarios/monasca/test_metrics.py b/tests/unit/task/scenarios/monasca/test_metrics.py similarity index 94% rename from tests/unit/scenarios/monasca/test_metrics.py rename to tests/unit/task/scenarios/monasca/test_metrics.py index 435ee733..6d98c6b9 100644 --- a/tests/unit/scenarios/monasca/test_metrics.py +++ b/tests/unit/task/scenarios/monasca/test_metrics.py @@ -16,7 +16,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.monasca import metrics +from rally_openstack.task.scenarios.monasca import metrics from tests.unit import test diff --git a/tests/unit/scenarios/monasca/test_utils.py b/tests/unit/task/scenarios/monasca/test_utils.py similarity index 96% rename from tests/unit/scenarios/monasca/test_utils.py rename to tests/unit/task/scenarios/monasca/test_utils.py index 77c09732..e66601a1 100644 --- a/tests/unit/scenarios/monasca/test_utils.py +++ b/tests/unit/task/scenarios/monasca/test_utils.py @@ -14,7 +14,7 @@ import ddt -from rally_openstack.scenarios.monasca import utils +from rally_openstack.task.scenarios.monasca import utils from tests.unit import test diff --git a/tests/unit/services/identity/__init__.py b/tests/unit/task/scenarios/murano/__init__.py similarity index 100% rename from tests/unit/services/identity/__init__.py rename to tests/unit/task/scenarios/murano/__init__.py diff --git a/tests/unit/scenarios/murano/test_environments.py b/tests/unit/task/scenarios/murano/test_environments.py similarity index 97% rename from tests/unit/scenarios/murano/test_environments.py rename to tests/unit/task/scenarios/murano/test_environments.py index dab13ee2..d61f3747 100644 --- a/tests/unit/scenarios/murano/test_environments.py +++ b/tests/unit/task/scenarios/murano/test_environments.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.scenarios.murano import environments +from rally_openstack.task.scenarios.murano import environments from tests.unit import test -MURANO_SCENARIO = ("rally_openstack.scenarios.murano." +MURANO_SCENARIO = ("rally_openstack.task.scenarios.murano." "environments") diff --git a/tests/unit/scenarios/murano/test_packages.py b/tests/unit/task/scenarios/murano/test_packages.py similarity index 96% rename from tests/unit/scenarios/murano/test_packages.py rename to tests/unit/task/scenarios/murano/test_packages.py index cc0c307e..cccc2ef7 100644 --- a/tests/unit/scenarios/murano/test_packages.py +++ b/tests/unit/task/scenarios/murano/test_packages.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.scenarios.murano import packages +from rally_openstack.task.scenarios.murano import packages from tests.unit import test -MURANO_SCENARIO = ("rally_openstack.scenarios.murano." +MURANO_SCENARIO = ("rally_openstack.task.scenarios.murano." "packages.MuranoPackages") diff --git a/tests/unit/scenarios/murano/test_utils.py b/tests/unit/task/scenarios/murano/test_utils.py similarity index 98% rename from tests/unit/scenarios/murano/test_utils.py rename to tests/unit/task/scenarios/murano/test_utils.py index c3bed550..f1a03cda 100644 --- a/tests/unit/scenarios/murano/test_utils.py +++ b/tests/unit/task/scenarios/murano/test_utils.py @@ -17,10 +17,10 @@ from unittest import mock from rally.common import cfg -from rally_openstack.scenarios.murano import utils +from rally_openstack.task.scenarios.murano import utils from tests.unit import test -MRN_UTILS = "rally_openstack.scenarios.murano.utils" +MRN_UTILS = "rally_openstack.task.scenarios.murano.utils" CONF = cfg.CONF diff --git a/tests/unit/services/image/__init__.py b/tests/unit/task/scenarios/neutron/__init__.py similarity index 100% rename from tests/unit/services/image/__init__.py rename to tests/unit/task/scenarios/neutron/__init__.py diff --git a/tests/unit/scenarios/neutron/test_bgpvpn.py b/tests/unit/task/scenarios/neutron/test_bgpvpn.py similarity index 99% rename from tests/unit/scenarios/neutron/test_bgpvpn.py rename to tests/unit/task/scenarios/neutron/test_bgpvpn.py index 2b07bd2f..c72de780 100644 --- a/tests/unit/scenarios/neutron/test_bgpvpn.py +++ b/tests/unit/task/scenarios/neutron/test_bgpvpn.py @@ -14,7 +14,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.neutron import bgpvpn +from rally_openstack.task.scenarios.neutron import bgpvpn from tests.unit import test diff --git a/tests/unit/scenarios/neutron/test_loadbalancer_v1.py b/tests/unit/task/scenarios/neutron/test_loadbalancer_v1.py similarity index 99% rename from tests/unit/scenarios/neutron/test_loadbalancer_v1.py rename to tests/unit/task/scenarios/neutron/test_loadbalancer_v1.py index fe5a4d7f..26a7ea2a 100644 --- a/tests/unit/scenarios/neutron/test_loadbalancer_v1.py +++ b/tests/unit/task/scenarios/neutron/test_loadbalancer_v1.py @@ -14,7 +14,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.neutron import loadbalancer_v1 +from rally_openstack.task.scenarios.neutron import loadbalancer_v1 from tests.unit import test diff --git a/tests/unit/scenarios/neutron/test_loadbalancer_v2.py b/tests/unit/task/scenarios/neutron/test_loadbalancer_v2.py similarity index 96% rename from tests/unit/scenarios/neutron/test_loadbalancer_v2.py rename to tests/unit/task/scenarios/neutron/test_loadbalancer_v2.py index d7bd09af..15ce843f 100755 --- a/tests/unit/scenarios/neutron/test_loadbalancer_v2.py +++ b/tests/unit/task/scenarios/neutron/test_loadbalancer_v2.py @@ -14,7 +14,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.neutron import loadbalancer_v2 +from rally_openstack.task.scenarios.neutron import loadbalancer_v2 from tests.unit import test diff --git a/tests/unit/scenarios/neutron/test_network.py b/tests/unit/task/scenarios/neutron/test_network.py similarity index 99% rename from tests/unit/scenarios/neutron/test_network.py rename to tests/unit/task/scenarios/neutron/test_network.py index 072878fe..c8a6ab6d 100644 --- a/tests/unit/scenarios/neutron/test_network.py +++ b/tests/unit/task/scenarios/neutron/test_network.py @@ -18,10 +18,10 @@ from unittest import mock import ddt from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.neutron import network +from rally_openstack.task.scenarios.neutron import network from tests.unit import test -BASE = "rally_openstack.scenarios.neutron.network" +BASE = "rally_openstack.task.scenarios.neutron.network" @ddt.ddt diff --git a/tests/unit/scenarios/neutron/test_security_groups.py b/tests/unit/task/scenarios/neutron/test_security_groups.py similarity index 99% rename from tests/unit/scenarios/neutron/test_security_groups.py rename to tests/unit/task/scenarios/neutron/test_security_groups.py index 6d94b955..7a6dcdf6 100644 --- a/tests/unit/scenarios/neutron/test_security_groups.py +++ b/tests/unit/task/scenarios/neutron/test_security_groups.py @@ -16,7 +16,7 @@ import copy import ddt from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.neutron import security_groups +from rally_openstack.task.scenarios.neutron import security_groups from tests.unit import test diff --git a/tests/unit/scenarios/neutron/test_trunk.py b/tests/unit/task/scenarios/neutron/test_trunk.py similarity index 99% rename from tests/unit/scenarios/neutron/test_trunk.py rename to tests/unit/task/scenarios/neutron/test_trunk.py index a99b8a93..1fd35005 100644 --- a/tests/unit/scenarios/neutron/test_trunk.py +++ b/tests/unit/task/scenarios/neutron/test_trunk.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.neutron import trunk +from rally_openstack.task.scenarios.neutron import trunk from tests.unit import test diff --git a/tests/unit/scenarios/neutron/test_utils.py b/tests/unit/task/scenarios/neutron/test_utils.py similarity index 99% rename from tests/unit/scenarios/neutron/test_utils.py rename to tests/unit/task/scenarios/neutron/test_utils.py index d5b4e483..73ac1fc7 100644 --- a/tests/unit/scenarios/neutron/test_utils.py +++ b/tests/unit/task/scenarios/neutron/test_utils.py @@ -19,10 +19,10 @@ import ddt import netaddr from rally import exceptions -from rally_openstack.scenarios.neutron import utils +from rally_openstack.task.scenarios.neutron import utils from tests.unit import test -NEUTRON_UTILS = "rally_openstack.scenarios.neutron.utils" +NEUTRON_UTILS = "rally_openstack.task.scenarios.neutron.utils" @ddt.ddt diff --git a/tests/unit/services/loadbalancer/__init__.py b/tests/unit/task/scenarios/nova/__init__.py similarity index 100% rename from tests/unit/services/loadbalancer/__init__.py rename to tests/unit/task/scenarios/nova/__init__.py diff --git a/tests/unit/scenarios/nova/test_agents.py b/tests/unit/task/scenarios/nova/test_agents.py similarity index 94% rename from tests/unit/scenarios/nova/test_agents.py rename to tests/unit/task/scenarios/nova/test_agents.py index 26697a1c..592cd201 100644 --- a/tests/unit/scenarios/nova/test_agents.py +++ b/tests/unit/task/scenarios/nova/test_agents.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.nova import agents +from rally_openstack.task.scenarios.nova import agents from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_aggregates.py b/tests/unit/task/scenarios/nova/test_aggregates.py similarity index 99% rename from tests/unit/scenarios/nova/test_aggregates.py rename to tests/unit/task/scenarios/nova/test_aggregates.py index 715af0dc..629cd5b5 100644 --- a/tests/unit/scenarios/nova/test_aggregates.py +++ b/tests/unit/task/scenarios/nova/test_aggregates.py @@ -17,7 +17,7 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.nova import aggregates +from rally_openstack.task.scenarios.nova import aggregates from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_availability_zones.py b/tests/unit/task/scenarios/nova/test_availability_zones.py similarity index 93% rename from tests/unit/scenarios/nova/test_availability_zones.py rename to tests/unit/task/scenarios/nova/test_availability_zones.py index b0dc98d7..0629730e 100644 --- a/tests/unit/scenarios/nova/test_availability_zones.py +++ b/tests/unit/task/scenarios/nova/test_availability_zones.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.nova import availability_zones +from rally_openstack.task.scenarios.nova import availability_zones from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_flavors.py b/tests/unit/task/scenarios/nova/test_flavors.py similarity index 99% rename from tests/unit/scenarios/nova/test_flavors.py rename to tests/unit/task/scenarios/nova/test_flavors.py index 3af20189..62ac53d2 100644 --- a/tests/unit/scenarios/nova/test_flavors.py +++ b/tests/unit/task/scenarios/nova/test_flavors.py @@ -18,7 +18,7 @@ from unittest import mock import ddt from rally import exceptions -from rally_openstack.scenarios.nova import flavors +from rally_openstack.task.scenarios.nova import flavors from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_hypervisors.py b/tests/unit/task/scenarios/nova/test_hypervisors.py similarity index 97% rename from tests/unit/scenarios/nova/test_hypervisors.py rename to tests/unit/task/scenarios/nova/test_hypervisors.py index 8e404dc9..37b22555 100644 --- a/tests/unit/scenarios/nova/test_hypervisors.py +++ b/tests/unit/task/scenarios/nova/test_hypervisors.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.nova import hypervisors +from rally_openstack.task.scenarios.nova import hypervisors from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_keypairs.py b/tests/unit/task/scenarios/nova/test_keypairs.py similarity index 98% rename from tests/unit/scenarios/nova/test_keypairs.py rename to tests/unit/task/scenarios/nova/test_keypairs.py index faf770cf..b420ec8e 100644 --- a/tests/unit/scenarios/nova/test_keypairs.py +++ b/tests/unit/task/scenarios/nova/test_keypairs.py @@ -16,7 +16,7 @@ from unittest import mock from rally import exceptions -from rally_openstack.scenarios.nova import keypairs +from rally_openstack.task.scenarios.nova import keypairs from tests.unit import fakes from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_server_groups.py b/tests/unit/task/scenarios/nova/test_server_groups.py similarity index 98% rename from tests/unit/scenarios/nova/test_server_groups.py rename to tests/unit/task/scenarios/nova/test_server_groups.py index 412da029..8fe6e982 100644 --- a/tests/unit/scenarios/nova/test_server_groups.py +++ b/tests/unit/task/scenarios/nova/test_server_groups.py @@ -18,10 +18,10 @@ from unittest import mock import ddt from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.nova import server_groups +from rally_openstack.task.scenarios.nova import server_groups from tests.unit import test -SERVER_GROUPS_MODULE = "rally_openstack.scenarios.nova.server_groups" +SERVER_GROUPS_MODULE = "rally_openstack.task.scenarios.nova.server_groups" NOVA_SERVER_GROUPS = SERVER_GROUPS_MODULE + ".NovaServerGroups" diff --git a/tests/unit/scenarios/nova/test_servers.py b/tests/unit/task/scenarios/nova/test_servers.py similarity index 98% rename from tests/unit/scenarios/nova/test_servers.py rename to tests/unit/task/scenarios/nova/test_servers.py index 08cef214..667e8c2d 100644 --- a/tests/unit/scenarios/nova/test_servers.py +++ b/tests/unit/task/scenarios/nova/test_servers.py @@ -18,12 +18,12 @@ from unittest import mock import ddt from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.nova import servers +from rally_openstack.task.scenarios.nova import servers from tests.unit import fakes from tests.unit import test -NOVA_SERVERS_MODULE = "rally_openstack.scenarios.nova.servers" +NOVA_SERVERS_MODULE = "rally_openstack.task.scenarios.nova.servers" NOVA_SERVERS = NOVA_SERVERS_MODULE + ".NovaServers" @@ -346,7 +346,7 @@ class NovaServersTestCase(test.ScenarioTestCase): scenario.run(True) scenario._list_servers.assert_called_once_with(True) - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_from_volume(self, mock_block_storage): fake_server = object() scenario = servers.BootServerFromVolume( @@ -368,7 +368,7 @@ class NovaServersTestCase(test.ScenarioTestCase): block_device_mapping={"vda": "volume_id:::0"}, fakearg="f") - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_from_volume_and_delete(self, mock_block_storage): fake_server = object() scenario = servers.BootServerFromVolumeAndDelete( @@ -518,7 +518,7 @@ class NovaServersTestCase(test.ScenarioTestCase): @ddt.data({"confirm": True, "do_delete": True}, {"confirm": False, "do_delete": True}) @ddt.unpack - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_attach_created_volume_and_resize( self, mock_block_storage, confirm=False, do_delete=False): fake_volume = mock.MagicMock() @@ -567,7 +567,7 @@ class NovaServersTestCase(test.ScenarioTestCase): scenario._delete_server.assert_called_once_with(fake_server, force=False) - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_list_attachments(self, mock_block_storage): mock_volume_service = mock_block_storage.return_value fake_volume = mock.MagicMock() @@ -609,7 +609,7 @@ class NovaServersTestCase(test.ScenarioTestCase): fake_volume) scenario._list_attachments.assert_called_once_with(fake_server.id) - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_list_attachments_fails(self, mock_block_storage): mock_volume_service = mock_block_storage.return_value fake_volume = mock.MagicMock() @@ -658,7 +658,7 @@ class NovaServersTestCase(test.ScenarioTestCase): @ddt.data({"confirm": True, "do_delete": True}, {"confirm": False, "do_delete": True}) @ddt.unpack - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_from_volume_and_resize( self, mock_block_storage, confirm=False, do_delete=False): fake_server = object() @@ -720,7 +720,7 @@ class NovaServersTestCase(test.ScenarioTestCase): False, False) scenario._delete_server.assert_called_once_with(fake_server) - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_from_volume_and_live_migrate(self, mock_block_storage): fake_server = mock.MagicMock() @@ -756,7 +756,7 @@ class NovaServersTestCase(test.ScenarioTestCase): scenario._delete_server.assert_called_once_with(fake_server, force=False) - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_attach_created_volume_and_live_migrate( self, mock_block_storage): fake_volume = mock.MagicMock() @@ -1003,7 +1003,7 @@ class NovaServersTestCase(test.ScenarioTestCase): scenario._attach_interface.assert_called_once_with( server, net_id=net["network"]["id"]) - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test_boot_server_from_volume_snapshot(self, mock_block_storage): fake_volume = mock.MagicMock(id="volume_id") fake_snapshot = mock.MagicMock(id="snapshot_id") diff --git a/tests/unit/scenarios/nova/test_services.py b/tests/unit/task/scenarios/nova/test_services.py similarity index 94% rename from tests/unit/scenarios/nova/test_services.py rename to tests/unit/task/scenarios/nova/test_services.py index ce7e404f..f6909aa6 100644 --- a/tests/unit/scenarios/nova/test_services.py +++ b/tests/unit/task/scenarios/nova/test_services.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.nova import services +from rally_openstack.task.scenarios.nova import services from tests.unit import test diff --git a/tests/unit/scenarios/nova/test_utils.py b/tests/unit/task/scenarios/nova/test_utils.py similarity index 99% rename from tests/unit/scenarios/nova/test_utils.py rename to tests/unit/task/scenarios/nova/test_utils.py index 4c837a74..0a3385c2 100644 --- a/tests/unit/scenarios/nova/test_utils.py +++ b/tests/unit/task/scenarios/nova/test_utils.py @@ -19,12 +19,12 @@ import ddt from rally.common import cfg from rally import exceptions as rally_exceptions -from rally_openstack.scenarios.nova import utils +from rally_openstack.task.scenarios.nova import utils from tests.unit import fakes from tests.unit import test BM_UTILS = "rally.task.utils" -NOVA_UTILS = "rally_openstack.scenarios.nova.utils" +NOVA_UTILS = "rally_openstack.task.scenarios.nova.utils" CONF = cfg.CONF @@ -247,7 +247,7 @@ class NovaScenarioTestCase(test.ScenarioTestCase): self._test_atomic_action_timer(nova_scenario.atomic_actions(), "nova.unshelve_server") - @mock.patch("rally_openstack.scenarios.nova.utils.image_service") + @mock.patch("rally_openstack.task.scenarios.nova.utils.image_service") def test__create_image(self, mock_image_service): glance = mock_image_service.Image.return_value glance.get_image.return_value = self.image @@ -435,7 +435,7 @@ class NovaScenarioTestCase(test.ScenarioTestCase): def test__force_delete_servers(self): self._test_delete_servers(force=True) - @mock.patch("rally_openstack.scenarios.nova.utils.image_service") + @mock.patch("rally_openstack.task.scenarios.nova.utils.image_service") def test__delete_image(self, mock_image_service): glance = mock_image_service.Image.return_value nova_scenario = utils.NovaScenario(context=self.context, @@ -713,7 +713,7 @@ class NovaScenarioTestCase(test.ScenarioTestCase): self._test_atomic_action_timer(nova_scenario.atomic_actions(), "nova.resize_revert") - @mock.patch("rally_openstack.services.storage.block.BlockStorage") + @mock.patch("rally_openstack.common.services.storage.block.BlockStorage") def test__update_volume_resource(self, mock_block_storage): volume = fakes.FakeVolume(id=1) cinder = mock_block_storage.return_value diff --git a/tests/unit/services/storage/__init__.py b/tests/unit/task/scenarios/quotas/__init__.py similarity index 100% rename from tests/unit/services/storage/__init__.py rename to tests/unit/task/scenarios/quotas/__init__.py diff --git a/tests/unit/scenarios/quotas/test_quotas.py b/tests/unit/task/scenarios/quotas/test_quotas.py similarity index 98% rename from tests/unit/scenarios/quotas/test_quotas.py rename to tests/unit/task/scenarios/quotas/test_quotas.py index b55e45c8..720fb623 100644 --- a/tests/unit/scenarios/quotas/test_quotas.py +++ b/tests/unit/task/scenarios/quotas/test_quotas.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.quotas import quotas +from rally_openstack.task.scenarios.quotas import quotas from tests.unit import test diff --git a/tests/unit/scenarios/quotas/test_utils.py b/tests/unit/task/scenarios/quotas/test_utils.py similarity index 98% rename from tests/unit/scenarios/quotas/test_utils.py rename to tests/unit/task/scenarios/quotas/test_utils.py index c23aefca..d5627173 100644 --- a/tests/unit/scenarios/quotas/test_utils.py +++ b/tests/unit/task/scenarios/quotas/test_utils.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.quotas import utils +from rally_openstack.task.scenarios.quotas import utils from tests.unit import test diff --git a/tests/unit/workload/__init__.py b/tests/unit/task/scenarios/sahara/__init__.py similarity index 100% rename from tests/unit/workload/__init__.py rename to tests/unit/task/scenarios/sahara/__init__.py diff --git a/tests/unit/scenarios/sahara/test_clusters.py b/tests/unit/task/scenarios/sahara/test_clusters.py similarity index 98% rename from tests/unit/scenarios/sahara/test_clusters.py rename to tests/unit/task/scenarios/sahara/test_clusters.py index 9a89d974..655c8998 100644 --- a/tests/unit/scenarios/sahara/test_clusters.py +++ b/tests/unit/task/scenarios/sahara/test_clusters.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.scenarios.sahara import clusters +from rally_openstack.task.scenarios.sahara import clusters from tests.unit import test -BASE = "rally_openstack.scenarios.sahara.clusters" +BASE = "rally_openstack.task.scenarios.sahara.clusters" class SaharaClustersTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/sahara/test_jobs.py b/tests/unit/task/scenarios/sahara/test_jobs.py similarity index 98% rename from tests/unit/scenarios/sahara/test_jobs.py rename to tests/unit/task/scenarios/sahara/test_jobs.py index 450d3d15..868854ac 100644 --- a/tests/unit/scenarios/sahara/test_jobs.py +++ b/tests/unit/task/scenarios/sahara/test_jobs.py @@ -16,12 +16,12 @@ from unittest import mock from rally.common import cfg -from rally_openstack.scenarios.sahara import jobs +from rally_openstack.task.scenarios.sahara import jobs from tests.unit import test CONF = cfg.CONF -BASE = "rally_openstack.scenarios.sahara.jobs" +BASE = "rally_openstack.task.scenarios.sahara.jobs" class SaharaJobTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/sahara/test_node_group_templates.py b/tests/unit/task/scenarios/sahara/test_node_group_templates.py similarity index 95% rename from tests/unit/scenarios/sahara/test_node_group_templates.py rename to tests/unit/task/scenarios/sahara/test_node_group_templates.py index 2b0241dc..7ea11792 100644 --- a/tests/unit/scenarios/sahara/test_node_group_templates.py +++ b/tests/unit/task/scenarios/sahara/test_node_group_templates.py @@ -15,10 +15,10 @@ from unittest import mock -from rally_openstack.scenarios.sahara import node_group_templates as ngts +from rally_openstack.task.scenarios.sahara import node_group_templates as ngts from tests.unit import test -BASE = "rally_openstack.scenarios.sahara.node_group_templates" +BASE = "rally_openstack.task.scenarios.sahara.node_group_templates" class SaharaNodeGroupTemplatesTestCase(test.TestCase): diff --git a/tests/unit/scenarios/sahara/test_utils.py b/tests/unit/task/scenarios/sahara/test_utils.py similarity index 99% rename from tests/unit/scenarios/sahara/test_utils.py rename to tests/unit/task/scenarios/sahara/test_utils.py index b3f52200..4bd1501d 100644 --- a/tests/unit/scenarios/sahara/test_utils.py +++ b/tests/unit/task/scenarios/sahara/test_utils.py @@ -21,14 +21,14 @@ from saharaclient.api import base as sahara_base from rally.common import cfg from rally import exceptions -from rally_openstack import consts -from rally_openstack.scenarios.sahara import utils +from rally_openstack.common import consts +from rally_openstack.task.scenarios.sahara import utils from tests.unit import test CONF = cfg.CONF -SAHARA_UTILS = "rally_openstack.scenarios.sahara.utils" +SAHARA_UTILS = "rally_openstack.task.scenarios.sahara.utils" class SaharaScenarioTestCase(test.ScenarioTestCase): diff --git a/tests/unit/wrappers/__init__.py b/tests/unit/task/scenarios/senlin/__init__.py similarity index 100% rename from tests/unit/wrappers/__init__.py rename to tests/unit/task/scenarios/senlin/__init__.py diff --git a/tests/unit/scenarios/senlin/test_clusters.py b/tests/unit/task/scenarios/senlin/test_clusters.py similarity index 95% rename from tests/unit/scenarios/senlin/test_clusters.py rename to tests/unit/task/scenarios/senlin/test_clusters.py index d29af09d..996254f2 100644 --- a/tests/unit/scenarios/senlin/test_clusters.py +++ b/tests/unit/task/scenarios/senlin/test_clusters.py @@ -12,7 +12,7 @@ from unittest import mock -from rally_openstack.scenarios.senlin import clusters +from rally_openstack.task.scenarios.senlin import clusters from tests.unit import test diff --git a/tests/unit/scenarios/senlin/test_utils.py b/tests/unit/task/scenarios/senlin/test_utils.py similarity index 98% rename from tests/unit/scenarios/senlin/test_utils.py rename to tests/unit/task/scenarios/senlin/test_utils.py index 92b6ee29..e77db130 100644 --- a/tests/unit/scenarios/senlin/test_utils.py +++ b/tests/unit/task/scenarios/senlin/test_utils.py @@ -15,10 +15,10 @@ from unittest import mock from rally.common import cfg from rally import exceptions -from rally_openstack.scenarios.senlin import utils +from rally_openstack.task.scenarios.senlin import utils from tests.unit import test -SENLIN_UTILS = "rally_openstack.scenarios.senlin.utils." +SENLIN_UTILS = "rally_openstack.task.scenarios.senlin.utils." CONF = cfg.CONF diff --git a/tests/unit/task/scenarios/swift/__init__.py b/tests/unit/task/scenarios/swift/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/scenarios/swift/test_objects.py b/tests/unit/task/scenarios/swift/test_objects.py similarity index 99% rename from tests/unit/scenarios/swift/test_objects.py rename to tests/unit/task/scenarios/swift/test_objects.py index 8bc4fd3a..8cefc1c1 100644 --- a/tests/unit/scenarios/swift/test_objects.py +++ b/tests/unit/task/scenarios/swift/test_objects.py @@ -17,7 +17,7 @@ from unittest import mock import ddt -from rally_openstack.scenarios.swift import objects +from rally_openstack.task.scenarios.swift import objects from tests.unit import test diff --git a/tests/unit/scenarios/swift/test_utils.py b/tests/unit/task/scenarios/swift/test_utils.py similarity index 98% rename from tests/unit/scenarios/swift/test_utils.py rename to tests/unit/task/scenarios/swift/test_utils.py index a674693f..b3d4b43e 100644 --- a/tests/unit/scenarios/swift/test_utils.py +++ b/tests/unit/task/scenarios/swift/test_utils.py @@ -17,10 +17,10 @@ from unittest import mock import ddt -from rally_openstack.scenarios.swift import utils +from rally_openstack.task.scenarios.swift import utils from tests.unit import test -SWIFT_UTILS = "rally_openstack.scenarios.swift.utils" +SWIFT_UTILS = "rally_openstack.task.scenarios.swift.utils" @ddt.ddt diff --git a/tests/unit/task/scenarios/vm/__init__.py b/tests/unit/task/scenarios/vm/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/scenarios/vm/test_utils.py b/tests/unit/task/scenarios/vm/test_utils.py similarity index 99% rename from tests/unit/scenarios/vm/test_utils.py rename to tests/unit/task/scenarios/vm/test_utils.py index 653822cb..1eda763b 100644 --- a/tests/unit/scenarios/vm/test_utils.py +++ b/tests/unit/task/scenarios/vm/test_utils.py @@ -19,10 +19,10 @@ from unittest import mock import netaddr from rally.common import cfg -from rally_openstack.scenarios.vm import utils +from rally_openstack.task.scenarios.vm import utils from tests.unit import test -VMTASKS_UTILS = "rally_openstack.scenarios.vm.utils" +VMTASKS_UTILS = "rally_openstack.task.scenarios.vm.utils" CONF = cfg.CONF diff --git a/tests/unit/scenarios/vm/test_vmtasks.py b/tests/unit/task/scenarios/vm/test_vmtasks.py similarity index 99% rename from tests/unit/scenarios/vm/test_vmtasks.py rename to tests/unit/task/scenarios/vm/test_vmtasks.py index 7141a580..a4e95098 100644 --- a/tests/unit/scenarios/vm/test_vmtasks.py +++ b/tests/unit/task/scenarios/vm/test_vmtasks.py @@ -21,11 +21,11 @@ import ddt from rally.common import validation from rally import exceptions -from rally_openstack.scenarios.vm import vmtasks +from rally_openstack.task.scenarios.vm import vmtasks from tests.unit import test -BASE = "rally_openstack.scenarios.vm.vmtasks" +BASE = "rally_openstack.task.scenarios.vm.vmtasks" @ddt.ddt @@ -37,7 +37,7 @@ class VMTasksTestCase(test.ScenarioTestCase): "credential": mock.MagicMock()}}) cinder_patcher = mock.patch( - "rally_openstack.services.storage.block.BlockStorage") + "rally_openstack.common.services.storage.block.BlockStorage") self.cinder = cinder_patcher.start().return_value self.cinder.create_volume.return_value = mock.Mock(id="foo_volume") self.addCleanup(cinder_patcher.stop) diff --git a/tests/unit/task/scenarios/vm/workloads/__init__.py b/tests/unit/task/scenarios/vm/workloads/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/workload/test_siege.py b/tests/unit/task/scenarios/vm/workloads/test_siege.py similarity index 87% rename from tests/unit/workload/test_siege.py rename to tests/unit/task/scenarios/vm/workloads/test_siege.py index 42fb9ec8..6b83b0a0 100644 --- a/tests/unit/workload/test_siege.py +++ b/tests/unit/task/scenarios/vm/workloads/test_siege.py @@ -18,10 +18,12 @@ import sys from unittest import mock -from rally_openstack.workload import siege +from rally_openstack.task.scenarios.vm.workloads import siege from tests.unit import test +PATH = "rally_openstack.task.scenarios.vm.workloads.siege" + SIEGE_OUTPUT = """ Transactions: 522 hits Availability: 100.00 % @@ -51,15 +53,15 @@ OUTPUT = [ class SiegeTestCase(test.TestCase): - @mock.patch("rally_openstack.workload.siege.json.load") + @mock.patch("%s.json.load" % PATH) def test_get_instances(self, mock_load): mock_load.return_value = OUTPUT instances = list(siege.get_instances()) self.assertEqual(["10.0.0.4", "10.0.0.5"], instances) - @mock.patch("rally_openstack.workload.siege.get_instances") - @mock.patch("rally_openstack.workload.siege.generate_urls_list") - @mock.patch("rally_openstack.workload.siege.subprocess.check_output") + @mock.patch("%s.get_instances" % PATH) + @mock.patch("%s.generate_urls_list" % PATH) + @mock.patch("%s.subprocess.check_output" % PATH) def test_run(self, mock_check_output, mock_generate_urls_list, mock_get_instances): mock_get_instances.return_value = [1, 2] @@ -75,7 +77,7 @@ class SiegeTestCase(test.TestCase): sys.stdout = real_stdout self.assertEqual(expected, mock_write.mock_calls) - @mock.patch("rally_openstack.workload.siege.tempfile.NamedTemporaryFile") + @mock.patch("%s.tempfile.NamedTemporaryFile" % PATH) def test_generate_urls_list(self, mock_named_temporary_file): mock_urls = mock.MagicMock() mock_named_temporary_file.return_value = mock_urls diff --git a/tests/unit/task/scenarios/watcher/__init__.py b/tests/unit/task/scenarios/watcher/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/scenarios/watcher/test_basic.py b/tests/unit/task/scenarios/watcher/test_basic.py similarity index 97% rename from tests/unit/scenarios/watcher/test_basic.py rename to tests/unit/task/scenarios/watcher/test_basic.py index eee34f5c..6bee5595 100644 --- a/tests/unit/scenarios/watcher/test_basic.py +++ b/tests/unit/task/scenarios/watcher/test_basic.py @@ -15,7 +15,7 @@ from unittest import mock -from rally_openstack.scenarios.watcher import basic +from rally_openstack.task.scenarios.watcher import basic from tests.unit import test diff --git a/tests/unit/scenarios/watcher/test_utils.py b/tests/unit/task/scenarios/watcher/test_utils.py similarity index 98% rename from tests/unit/scenarios/watcher/test_utils.py rename to tests/unit/task/scenarios/watcher/test_utils.py index 07372439..a9a79ec2 100644 --- a/tests/unit/scenarios/watcher/test_utils.py +++ b/tests/unit/task/scenarios/watcher/test_utils.py @@ -16,7 +16,7 @@ from unittest import mock from rally.common import cfg -from rally_openstack.scenarios.watcher import utils +from rally_openstack.task.scenarios.watcher import utils from tests.unit import test CONF = cfg.CONF diff --git a/tests/unit/task/scenarios/zaqar/__init__.py b/tests/unit/task/scenarios/zaqar/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/scenarios/zaqar/test_basic.py b/tests/unit/task/scenarios/zaqar/test_basic.py similarity index 94% rename from tests/unit/scenarios/zaqar/test_basic.py rename to tests/unit/task/scenarios/zaqar/test_basic.py index c7fa1ce0..9c7ad0bc 100644 --- a/tests/unit/scenarios/zaqar/test_basic.py +++ b/tests/unit/task/scenarios/zaqar/test_basic.py @@ -14,10 +14,10 @@ from unittest import mock -from rally_openstack.scenarios.zaqar import basic +from rally_openstack.task.scenarios.zaqar import basic from tests.unit import test -BASE = "rally_openstack.scenarios.zaqar.basic" +BASE = "rally_openstack.task.scenarios.zaqar.basic" class ZaqarBasicTestCase(test.ScenarioTestCase): diff --git a/tests/unit/scenarios/zaqar/test_utils.py b/tests/unit/task/scenarios/zaqar/test_utils.py similarity index 96% rename from tests/unit/scenarios/zaqar/test_utils.py rename to tests/unit/task/scenarios/zaqar/test_utils.py index 3bac9214..43c54cea 100644 --- a/tests/unit/scenarios/zaqar/test_utils.py +++ b/tests/unit/task/scenarios/zaqar/test_utils.py @@ -14,11 +14,11 @@ from unittest import mock -from rally_openstack.scenarios.zaqar import utils +from rally_openstack.task.scenarios.zaqar import utils from tests.unit import fakes from tests.unit import test -UTILS = "rally_openstack.scenarios.zaqar.utils." +UTILS = "rally_openstack.task.scenarios.zaqar.utils." class ZaqarScenarioTestCase(test.ScenarioTestCase): diff --git a/tests/unit/test_scenario.py b/tests/unit/task/test_scenario.py similarity index 97% rename from tests/unit/test_scenario.py rename to tests/unit/task/test_scenario.py index bb853023..076e55fc 100644 --- a/tests/unit/test_scenario.py +++ b/tests/unit/task/test_scenario.py @@ -17,8 +17,8 @@ from unittest import mock import ddt import fixtures -from rally_openstack.credential import OpenStackCredential -from rally_openstack import scenario as base_scenario +from rally_openstack.common.credential import OpenStackCredential +from rally_openstack.task import scenario as base_scenario from tests.unit import test @@ -39,7 +39,7 @@ class OpenStackScenarioTestCase(test.TestCase): def setUp(self): super(OpenStackScenarioTestCase, self).setUp() self.osclients = fixtures.MockPatch( - "rally_openstack.osclients.Clients") + "rally_openstack.common.osclients.Clients") self.useFixture(self.osclients) self.context = test.get_test_context() self.context.update({"foo": "bar"}) diff --git a/tests/unit/test_types.py b/tests/unit/task/test_types.py similarity index 99% rename from tests/unit/test_types.py rename to tests/unit/task/test_types.py index 5b4bf9d9..b2486680 100644 --- a/tests/unit/test_types.py +++ b/tests/unit/task/test_types.py @@ -17,7 +17,7 @@ from unittest import mock from rally import exceptions -from rally_openstack import types +from rally_openstack.task import types from tests.unit import fakes from tests.unit import test @@ -342,7 +342,7 @@ class VolumeTypeTestCase(test.TestCase): def setUp(self): super(VolumeTypeTestCase, self).setUp() - cinder = mock.patch("rally_openstack.types.block.BlockStorage") + cinder = mock.patch("rally_openstack.task.types.block.BlockStorage") self.service = cinder.start().return_value self.addCleanup(cinder.stop) diff --git a/tests/unit/task/ui/__init__.py b/tests/unit/task/ui/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/embedcharts/test_osprofilerchart.py b/tests/unit/task/ui/charts/test_osprofilerchart.py similarity index 98% rename from tests/unit/embedcharts/test_osprofilerchart.py rename to tests/unit/task/ui/charts/test_osprofilerchart.py index 8e5f8cea..aebf5654 100644 --- a/tests/unit/embedcharts/test_osprofilerchart.py +++ b/tests/unit/task/ui/charts/test_osprofilerchart.py @@ -17,11 +17,11 @@ import datetime as dt import os from unittest import mock -from rally_openstack.embedcharts import osprofilerchart as osp_chart +from rally_openstack.task.ui.charts import osprofilerchart as osp_chart from tests.unit import test -PATH = "rally_openstack.embedcharts.osprofilerchart" +PATH = "rally_openstack.task.ui.charts.osprofilerchart" CHART_PATH = "%s.OSProfilerChart" % PATH diff --git a/tests/unit/test.py b/tests/unit/test.py index 19f27934..b47cca2b 100644 --- a/tests/unit/test.py +++ b/tests/unit/test.py @@ -213,7 +213,7 @@ class ContextTestCase(ScenarioTestCase): def get_client_mocks(self): return [ mock.patch( - "rally_openstack.osclients.Clients", + "rally_openstack.common.osclients.Clients", mock.Mock(side_effect=self.context_client)) ] diff --git a/tests/unit/verification/tempest/test_config.py b/tests/unit/verification/tempest/test_config.py index 0f759b19..c7759020 100644 --- a/tests/unit/verification/tempest/test_config.py +++ b/tests/unit/verification/tempest/test_config.py @@ -18,7 +18,7 @@ from unittest import mock import ddt from rally.common import cfg -from rally_openstack import osclients +from rally_openstack.common import osclients from rally_openstack.verification.tempest import config from tests.unit import fakes from tests.unit import test diff --git a/tests/unit/verification/tempest/test_context.py b/tests/unit/verification/tempest/test_context.py index 4bb00c09..c477bc58 100644 --- a/tests/unit/verification/tempest/test_context.py +++ b/tests/unit/verification/tempest/test_context.py @@ -116,7 +116,7 @@ class TempestContextTestCase(test.TestCase): self.context._download_image_from_source, os.path.join(self.context.data_dir, "foo")) - @mock.patch("rally_openstack.wrappers." + @mock.patch("rally_openstack.common.wrappers." "network.NeutronWrapper.create_network") @mock.patch("%s.open" % PATH, side_effect=mock.mock_open()) def test_options_configured_manually( @@ -159,7 +159,7 @@ class TempestContextTestCase(test.TestCase): self.assertIn(role3, created_roles) self.assertIn(role4, created_roles) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__discover_image(self, mock_image): client = mock_image.return_value client.list_images.return_value = [fakes.FakeImage(name="Foo"), @@ -169,7 +169,7 @@ class TempestContextTestCase(test.TestCase): self.assertEqual("CirrOS", image.name) @mock.patch("%s.open" % PATH, side_effect=mock.mock_open(), create=True) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") @mock.patch("os.path.isfile", return_value=False) def test__download_image(self, mock_isfile, mock_image, mock_open): img_1 = mock.MagicMock() @@ -206,7 +206,7 @@ class TempestContextTestCase(test.TestCase): result = self.context.conf.get("compute", "flavor_ref") self.assertEqual("id1", result) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__discover_or_create_image_when_image_exists(self, mock_image): client = mock_image.return_value client.list_images.return_value = [fakes.FakeImage(name="CirrOS")] @@ -216,7 +216,7 @@ class TempestContextTestCase(test.TestCase): self.assertEqual(0, client.create_image.call_count) self.assertEqual(0, len(self.context._created_images)) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__discover_or_create_image(self, mock_image): client = mock_image.return_value @@ -269,7 +269,7 @@ class TempestContextTestCase(test.TestCase): self.assertEqual("subid1", self.context._created_networks[0]["subnets"][0]) - @mock.patch("rally_openstack.wrappers.network.NeutronWrapper.ext_gw_mode_enabled", # noqa E501 + @mock.patch("rally_openstack.common.wrappers.network.NeutronWrapper.ext_gw_mode_enabled", # noqa E501 new_callable=mock.PropertyMock, return_value=True) def test__create_network_resources_public_network_override(self, mock_ext_gw_mode_enabled): # noqa E501 client = self.context.clients.neutron() @@ -302,7 +302,7 @@ class TempestContextTestCase(test.TestCase): client = self.context.clients.keystone() self.assertEqual(2, client.roles.delete.call_count) - @mock.patch("rally_openstack.services.image.image.Image") + @mock.patch("rally_openstack.common.services.image.image.Image") def test__cleanup_images(self, mock_image): self.context._created_images = [fakes.FakeImage(id="id1"), fakes.FakeImage(id="id2")] @@ -343,7 +343,7 @@ class TempestContextTestCase(test.TestCase): self.assertEqual("", self.context.conf.get("orchestration", "instance_type")) - @mock.patch("rally_openstack.wrappers." + @mock.patch("rally_openstack.common.wrappers." "network.NeutronWrapper.delete_network") def test__cleanup_network_resources( self, mock_neutron_wrapper_delete_network):