Merge "Improve context manager setup()/cleanup() logging"
This commit is contained in:
commit
bed0fda0f9
@ -120,7 +120,6 @@ class CeilometerSampleGenerator(context.Context):
|
||||
|
||||
return samples
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Ceilometer`"))
|
||||
def setup(self):
|
||||
new_sample = {
|
||||
"counter_name": self.config["counter_name"],
|
||||
@ -175,7 +174,6 @@ class CeilometerSampleGenerator(context.Context):
|
||||
ctx_name=self.get_name(),
|
||||
msg="Ceilometer Resource %s is not found" % resource_id)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Ceilometer`"))
|
||||
def cleanup(self):
|
||||
# We don't have API for removal of samples and resources
|
||||
pass
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
@ -37,7 +36,6 @@ class VolumeTypeGenerator(context.Context):
|
||||
"items": {"type": "string"}
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `volume_types`"))
|
||||
def setup(self):
|
||||
admin_clients = osclients.Clients(
|
||||
self.context.get("admin", {}).get("credential"),
|
||||
@ -51,7 +49,6 @@ class VolumeTypeGenerator(context.Context):
|
||||
self.context["volume_types"].append({"id": vtype.id,
|
||||
"name": vtype_name})
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `volume_types`"))
|
||||
def cleanup(self):
|
||||
mather = utils.make_name_matcher(*self.config)
|
||||
resource_manager.cleanup(
|
||||
|
@ -12,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally import consts
|
||||
from rally import osclients
|
||||
@ -22,9 +20,6 @@ from rally.plugins.openstack.services.storage import block
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@context.configure(name="volumes", platform="openstack", order=420)
|
||||
class VolumeGenerator(context.Context):
|
||||
"""Creates volumes for each tenant."""
|
||||
@ -58,7 +53,6 @@ class VolumeGenerator(context.Context):
|
||||
"volumes_per_tenant": 1
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Volumes`"))
|
||||
def setup(self):
|
||||
size = self.config["size"]
|
||||
volume_type = self.config.get("type", None)
|
||||
@ -78,7 +72,6 @@ class VolumeGenerator(context.Context):
|
||||
self.context["tenants"][tenant_id]["volumes"].append(
|
||||
vol._as_dict())
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Volumes`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["cinder.volumes"],
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
import sys
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import validation
|
||||
from rally.plugins.openstack.cleanup import manager
|
||||
from rally.plugins.openstack.context.cleanup import base
|
||||
@ -24,9 +22,6 @@ from rally.plugins.openstack import scenario
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add(name="check_cleanup_resources", admin_required=True)
|
||||
# NOTE(amaretskiy): Set order to run this just before UserCleanup
|
||||
@context.configure(name="admin_cleanup", platform="openstack",
|
||||
@ -34,7 +29,6 @@ LOG = logging.getLogger(__name__)
|
||||
class AdminCleanup(base.CleanupMixin, context.Context):
|
||||
"""Context class for admin resources cleanup."""
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("admin resources cleanup"))
|
||||
def cleanup(self):
|
||||
manager.cleanup(
|
||||
names=self.config,
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
import sys
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import validation
|
||||
from rally.plugins.openstack.cleanup import manager
|
||||
from rally.plugins.openstack.context.cleanup import base
|
||||
@ -24,9 +22,6 @@ from rally.plugins.openstack import scenario
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add(name="check_cleanup_resources", admin_required=False)
|
||||
# NOTE(amaretskiy): Set maximum order to run this last
|
||||
@context.configure(name="cleanup", platform="openstack", order=sys.maxsize,
|
||||
@ -34,7 +29,6 @@ LOG = logging.getLogger(__name__)
|
||||
class UserCleanup(base.CleanupMixin, context.Context):
|
||||
"""Context class for user resources cleanup."""
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("user resources cleanup"))
|
||||
def cleanup(self):
|
||||
manager.cleanup(
|
||||
names=self.config,
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
import pkgutil
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -26,8 +24,6 @@ from rally.plugins.openstack.cleanup import manager as resource_manager
|
||||
from rally.plugins.openstack.scenarios.heat import utils as heat_utils
|
||||
from rally.task import context
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_data(filename_or_resource):
|
||||
if isinstance(filename_or_resource, list):
|
||||
@ -113,7 +109,6 @@ class HeatDataplane(context.Context):
|
||||
networks = nc.list_networks(**{"router:external": True})["networks"]
|
||||
return networks[0]["id"]
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `HeatDataplane`"))
|
||||
def setup(self):
|
||||
template = get_data(self.config["template"])
|
||||
files = {}
|
||||
@ -146,7 +141,6 @@ class HeatDataplane(context.Context):
|
||||
tenant_data["stack_dataplane"].append([stack.id, template,
|
||||
files, parameters])
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `HeatDataplane`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["heat.stacks"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -12,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -22,9 +20,6 @@ from rally.plugins.openstack.scenarios.designate import utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="zones", platform="openstack", order=600)
|
||||
class ZoneGenerator(context.Context):
|
||||
@ -46,7 +41,6 @@ class ZoneGenerator(context.Context):
|
||||
"zones_per_tenant": 1
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Zones`"))
|
||||
def setup(self):
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
@ -59,7 +53,6 @@ class ZoneGenerator(context.Context):
|
||||
zone = designate_util._create_zone()
|
||||
self.context["tenants"][tenant_id]["zones"].append(zone)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Zones`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["designate.zones"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally import consts
|
||||
@ -59,7 +58,6 @@ class EC2ServerGenerator(context.Context):
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `EC2 Servers`"))
|
||||
def setup(self):
|
||||
image = self.config["image"]
|
||||
flavor = self.config["flavor"]
|
||||
@ -91,7 +89,6 @@ class EC2ServerGenerator(context.Context):
|
||||
|
||||
self.context["tenants"][tenant_id]["ec2_servers"] = current_servers
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `EC2 Servers`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["ec2.servers"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -121,7 +121,6 @@ class ImageGenerator(context.Context):
|
||||
|
||||
DEFAULT_CONFIG = {"images_per_tenant": 1}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Images`"))
|
||||
def setup(self):
|
||||
image_url = self.config.get("image_url")
|
||||
disk_format = self.config.get("disk_format")
|
||||
@ -190,7 +189,6 @@ class ImageGenerator(context.Context):
|
||||
|
||||
self.context["tenants"][tenant_id]["images"] = current_images
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Images`"))
|
||||
def cleanup(self):
|
||||
if self.context.get("admin", {}):
|
||||
# NOTE(andreykurilin): Glance does not require the admin for
|
||||
|
@ -13,8 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -22,8 +20,6 @@ from rally.plugins.openstack.cleanup import manager as resource_manager
|
||||
from rally.plugins.openstack.scenarios.heat import utils as heat_utils
|
||||
from rally.task import context
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="stacks", platform="openstack", order=435)
|
||||
@ -72,7 +68,6 @@ class StackGenerator(context.Context):
|
||||
template["resources"]["TestResource%d" % i] = rand_string
|
||||
return template
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Stacks`"))
|
||||
def setup(self):
|
||||
template = self._prepare_stack_template(
|
||||
self.config["resources_per_stack"])
|
||||
@ -86,7 +81,6 @@ class StackGenerator(context.Context):
|
||||
stack = heat_scenario._create_stack(template)
|
||||
self.context["tenants"][tenant_id]["stacks"].append(stack.id)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Stacks`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["heat.stacks"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -75,7 +75,6 @@ class RoleGenerator(context.Context):
|
||||
project_id=project_id)
|
||||
return consume
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `roles`"))
|
||||
def setup(self):
|
||||
"""Add all roles to users."""
|
||||
threads = self.workers
|
||||
@ -97,7 +96,6 @@ class RoleGenerator(context.Context):
|
||||
broker.run(publish, self._get_consumer("add_role"), threads)
|
||||
self.context["roles"] = roles_dict
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `roles`"))
|
||||
def cleanup(self):
|
||||
"""Remove all roles from users."""
|
||||
threads = self.workers
|
||||
|
@ -304,7 +304,6 @@ class UserGenerator(context.Context):
|
||||
"tenant_id": tenant_id
|
||||
})
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `users`"))
|
||||
def setup(self):
|
||||
self.context["users"] = []
|
||||
self.context["tenants"] = {}
|
||||
@ -315,7 +314,6 @@ class UserGenerator(context.Context):
|
||||
else:
|
||||
self.create_users()
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `users`"))
|
||||
def cleanup(self):
|
||||
"""Delete tenants and users, using the broker pattern."""
|
||||
if self.existing_users:
|
||||
|
@ -21,8 +21,6 @@ from cryptography.hazmat.primitives import serialization
|
||||
from cryptography import x509
|
||||
from cryptography.x509 import oid
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -30,9 +28,6 @@ from rally.plugins.openstack.scenarios.magnum import utils as magnum_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="ca_certs", platform="openstack", order=490)
|
||||
class CaCertGenerator(context.Context):
|
||||
@ -70,7 +65,6 @@ class CaCertGenerator(context.Context):
|
||||
|
||||
return result
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Ca Cert`"))
|
||||
def setup(self):
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
@ -110,7 +104,6 @@ class CaCertGenerator(context.Context):
|
||||
with open(fname, "w") as cert_file:
|
||||
cert_file.write(cert.pem)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Ca Cert`"))
|
||||
def cleanup(self):
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
|
@ -12,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -22,9 +20,6 @@ from rally.plugins.openstack.scenarios.magnum import utils as magnum_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="cluster_templates", platform="openstack", order=470)
|
||||
class ClusterTemplateGenerator(context.Context):
|
||||
@ -102,7 +97,6 @@ class ClusterTemplateGenerator(context.Context):
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `ClusterTemplate`"))
|
||||
def setup(self):
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
@ -121,7 +115,6 @@ class ClusterTemplateGenerator(context.Context):
|
||||
ct_uuid = cluster_template.uuid
|
||||
self.context["tenants"][tenant_id]["cluster_template"] = ct_uuid
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `ClusterTemplate`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["magnum.cluster_templates"],
|
||||
|
@ -12,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -23,9 +21,6 @@ from rally.plugins.openstack.scenarios.nova import utils as nova_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="clusters", platform="openstack", order=480)
|
||||
class ClusterGenerator(context.Context):
|
||||
@ -48,7 +43,6 @@ class ClusterGenerator(context.Context):
|
||||
|
||||
DEFAULT_CONFIG = {"node_count": 1}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Cluster`"))
|
||||
def setup(self):
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
@ -79,7 +73,6 @@ class ClusterGenerator(context.Context):
|
||||
node_count=self.config.get("node_count"), keypair=keypair)
|
||||
self.context["tenants"][tenant_id]["cluster"] = cluster.uuid
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Cluster`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["magnum.clusters", "nova.keypairs"],
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
from rally import consts as rally_consts
|
||||
@ -26,8 +24,6 @@ from rally.plugins.openstack.scenarios.manila import utils as manila_utils
|
||||
from rally.task import context
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONTEXT_NAME = consts.SECURITY_SERVICES_CONTEXT_NAME
|
||||
|
||||
|
||||
@ -67,8 +63,6 @@ class SecurityServices(context.Context):
|
||||
"security_services": [],
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(
|
||||
LOG.info, _("Enter context: `%s`") % CONTEXT_NAME)
|
||||
def setup(self):
|
||||
for user, tenant_id in (utils.iterate_per_tenants(
|
||||
self.context.get("users", []))):
|
||||
@ -90,7 +84,6 @@ class SecurityServices(context.Context):
|
||||
self.context["tenants"][tenant_id][CONTEXT_NAME][
|
||||
"security_services"].append(inst)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `%s`") % CONTEXT_NAME)
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["manila.security_services"],
|
||||
|
@ -185,8 +185,6 @@ class ShareNetworks(context.Context):
|
||||
else:
|
||||
_setup_share_network(tenant_id, data)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `%s`")
|
||||
% CONTEXT_NAME)
|
||||
def setup(self):
|
||||
self.context[CONTEXT_NAME] = {}
|
||||
if not self.config["use_share_networks"]:
|
||||
@ -196,7 +194,6 @@ class ShareNetworks(context.Context):
|
||||
else:
|
||||
self._setup_for_autocreated_users()
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `%s`") % CONTEXT_NAME)
|
||||
def cleanup(self):
|
||||
if (not self.context["config"].get("existing_users") or
|
||||
self.config["use_share_networks"]):
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
from rally import consts as rally_consts
|
||||
@ -26,8 +24,6 @@ from rally.plugins.openstack.scenarios.manila import utils as manila_utils
|
||||
from rally.task import context
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONTEXT_NAME = consts.SHARES_CONTEXT_NAME
|
||||
|
||||
|
||||
@ -81,8 +77,6 @@ class Shares(context.Context):
|
||||
share = manila_scenario._create_share(**kwargs)
|
||||
tenant_ctxt["shares"].append(share.to_dict())
|
||||
|
||||
@logging.log_task_wrapper(
|
||||
LOG.info, _("Enter context: `%s`") % CONTEXT_NAME)
|
||||
def setup(self):
|
||||
for user, tenant_id in (
|
||||
utils.iterate_per_tenants(self.context.get("users", []))):
|
||||
@ -102,7 +96,6 @@ class Shares(context.Context):
|
||||
self.config["share_type"],
|
||||
)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `%s`") % CONTEXT_NAME)
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["manila.shares"],
|
||||
|
@ -14,8 +14,6 @@
|
||||
|
||||
from six import moves
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -23,9 +21,6 @@ from rally.plugins.openstack.scenarios.monasca import utils as monasca_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="monasca_metrics", platform="openstack", order=510)
|
||||
class MonascaMetricGenerator(context.Context):
|
||||
@ -81,7 +76,6 @@ class MonascaMetricGenerator(context.Context):
|
||||
"metrics_per_tenant": 2
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Monasca`"))
|
||||
def setup(self):
|
||||
new_metric = {}
|
||||
|
||||
@ -102,7 +96,6 @@ class MonascaMetricGenerator(context.Context):
|
||||
monasca_utils.CONF.benchmark.monasca_metric_create_prepoll_delay,
|
||||
atomic_delay=1)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Monasca`"))
|
||||
def cleanup(self):
|
||||
# We don't have API for removal of metrics
|
||||
pass
|
||||
|
@ -13,8 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -23,9 +21,6 @@ from rally.plugins.openstack.scenarios.murano import utils as murano_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="murano_environments", platform="openstack", order=402)
|
||||
class EnvironmentGenerator(context.Context):
|
||||
@ -44,8 +39,6 @@ class EnvironmentGenerator(context.Context):
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Enter context: `Murano environments`"))
|
||||
def setup(self):
|
||||
for user, tenant_id in utils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
@ -59,8 +52,6 @@ class EnvironmentGenerator(context.Context):
|
||||
env = murano_util._create_environment()
|
||||
self.context["tenants"][tenant_id]["environments"].append(env)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Exit context: `Murano environments`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["murano.environments"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -17,9 +17,6 @@ import os
|
||||
import zipfile
|
||||
|
||||
from rally.common import fileutils
|
||||
from rally.common.i18n import _
|
||||
from rally.common.i18n import _LE
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -29,9 +26,6 @@ from rally.plugins.openstack.cleanup import manager as resource_manager
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="murano_packages", platform="openstack", order=401)
|
||||
class PackageGenerator(context.Context):
|
||||
@ -49,7 +43,6 @@ class PackageGenerator(context.Context):
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Murano packages`"))
|
||||
def setup(self):
|
||||
is_config_app_dir = False
|
||||
pckg_path = os.path.expanduser(self.config["app_package"])
|
||||
@ -59,9 +52,8 @@ class PackageGenerator(context.Context):
|
||||
is_config_app_dir = True
|
||||
zip_name = fileutils.pack_dir(pckg_path)
|
||||
else:
|
||||
msg = (_LE("There is no zip archive or directory by this path:"
|
||||
" %s") % pckg_path)
|
||||
raise exceptions.ContextSetupFailure(msg=msg,
|
||||
msg = "There is no zip archive or directory by this path: %s"
|
||||
raise exceptions.ContextSetupFailure(msg=msg % pckg_path,
|
||||
ctx_name=self.get_name())
|
||||
|
||||
for user, tenant_id in utils.iterate_per_tenants(
|
||||
@ -77,7 +69,6 @@ class PackageGenerator(context.Context):
|
||||
|
||||
self.context["tenants"][tenant_id]["packages"].append(package)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Murano packages`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["murano.packages"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -88,7 +88,6 @@ def _prepare_open_secgroup(credential, secgroup_name):
|
||||
class AllowSSH(context.Context):
|
||||
"""Sets up security groups for all users to access VM via SSH."""
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `allow_ssh`"))
|
||||
def setup(self):
|
||||
admin_or_user = (self.context.get("admin") or
|
||||
self.context.get("users")[0])
|
||||
@ -106,7 +105,6 @@ class AllowSSH(context.Context):
|
||||
user["secgroup"] = _prepare_open_secgroup(user["credential"],
|
||||
secgroup_name)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `allow_ssh`"))
|
||||
def cleanup(self):
|
||||
for user, tenant_id in utils.iterate_per_tenants(
|
||||
self.context["users"]):
|
||||
|
@ -12,9 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -23,9 +20,6 @@ from rally.plugins.openstack.wrappers import network as network_wrapper
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="existing_network", platform="openstack", order=349)
|
||||
class ExistingNetwork(context.Context):
|
||||
@ -40,7 +34,6 @@ class ExistingNetwork(context.Context):
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `existing_network`"))
|
||||
def setup(self):
|
||||
for user, tenant_id in utils.iterate_per_tenants(
|
||||
self.context.get("users", [])):
|
||||
@ -50,6 +43,5 @@ class ExistingNetwork(context.Context):
|
||||
self.context["tenants"][tenant_id]["networks"] = (
|
||||
net_wrapper.list_networks())
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `existing_network`"))
|
||||
def cleanup(self):
|
||||
"""Networks were not created by Rally, so nothing to do."""
|
||||
|
@ -73,7 +73,6 @@ class Network(context.Context):
|
||||
"dns_nameservers": None
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `network`"))
|
||||
def setup(self):
|
||||
# NOTE(rkiran): Some clients are not thread-safe. Thus during
|
||||
# multithreading/multiprocessing, it is likely the
|
||||
@ -100,7 +99,6 @@ class Network(context.Context):
|
||||
**kwargs)
|
||||
self.context["tenants"][tenant_id]["networks"].append(network)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `network`"))
|
||||
def cleanup(self):
|
||||
net_wrapper = network_wrapper.wrap(
|
||||
osclients.Clients(self.context["admin"]["credential"]),
|
||||
|
@ -13,8 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -23,9 +21,6 @@ from rally.plugins.openstack.scenarios.neutron import utils as neutron_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", admin=True,
|
||||
users=True)
|
||||
@context.configure(name="router", platform="openstack", order=351)
|
||||
@ -90,7 +85,6 @@ class Router(context.Context):
|
||||
"routers_per_tenant": 1,
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `router`"))
|
||||
def setup(self):
|
||||
kwargs = {}
|
||||
parameters = ("admin_state_up", "external_gateway_info", "network_id",
|
||||
@ -110,7 +104,6 @@ class Router(context.Context):
|
||||
router = scenario._create_router(kwargs)
|
||||
self.context["tenants"][tenant_id]["routers"].append(router)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `router`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["neutron.router"],
|
||||
|
@ -51,7 +51,6 @@ class Lbaas(context.Context):
|
||||
"lbaas_version": 1
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `lbaas`"))
|
||||
def setup(self):
|
||||
net_wrapper = network_wrapper.wrap(
|
||||
osclients.Clients(self.context["admin"]["credential"]),
|
||||
@ -78,7 +77,6 @@ class Lbaas(context.Context):
|
||||
"Context for LBaaS version %s not implemented."
|
||||
% self.config["lbaas_version"])
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `lbaas`"))
|
||||
def cleanup(self):
|
||||
net_wrapper = network_wrapper.wrap(
|
||||
osclients.Clients(self.context["admin"]["credential"]),
|
||||
|
@ -13,9 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from novaclient import exceptions as nova_exceptions
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
@ -73,9 +70,10 @@ class FlavorsGenerator(context.Context):
|
||||
}
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `flavors`"))
|
||||
def setup(self):
|
||||
"""Create list of flavors."""
|
||||
from novaclient import exceptions as nova_exceptions
|
||||
|
||||
self.context["flavors"] = {}
|
||||
|
||||
clients = osclients.Clients(self.context["admin"]["credential"])
|
||||
@ -99,7 +97,6 @@ class FlavorsGenerator(context.Context):
|
||||
self.context["flavors"][flavor_config["name"]] = flavor.to_dict()
|
||||
LOG.debug("Created flavor with id '%s'", flavor.id)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `flavors`"))
|
||||
def cleanup(self):
|
||||
"""Delete created flavors."""
|
||||
mather = rutils.make_name_matcher(*[f["name"] for f in self.config])
|
||||
|
@ -13,17 +13,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import validation
|
||||
from rally import osclients
|
||||
from rally.plugins.openstack.cleanup import manager as resource_manager
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="keypair", platform="openstack", order=310)
|
||||
class Keypair(context.Context):
|
||||
@ -52,12 +47,10 @@ class Keypair(context.Context):
|
||||
"name": keypair_name,
|
||||
"id": keypair.id}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `keypair`"))
|
||||
def setup(self):
|
||||
for user in self.context["users"]:
|
||||
user["keypair"] = self._generate_keypair(user["credential"])
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `keypair`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["nova.keypairs"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
@ -78,7 +77,6 @@ class ServerGenerator(context.Context):
|
||||
"auto_assign_nic": False
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Servers`"))
|
||||
def setup(self):
|
||||
image = self.config["image"]
|
||||
flavor = self.config["flavor"]
|
||||
@ -130,7 +128,6 @@ class ServerGenerator(context.Context):
|
||||
self.context["tenants"][tenant_id][
|
||||
"servers"] = current_servers
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Servers`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["nova.servers"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -13,7 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -65,7 +64,6 @@ class Quotas(context.Context):
|
||||
def _service_has_quotas(self, service):
|
||||
return len(self.config.get(service, {})) > 0
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `quotas`"))
|
||||
def setup(self):
|
||||
for tenant_id in self.context["tenants"]:
|
||||
for service in self.manager:
|
||||
@ -103,7 +101,6 @@ class Quotas(context.Context):
|
||||
% {"tenant_id": tenant_id,
|
||||
"service": service, "exc": e})
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `quotas`"))
|
||||
def cleanup(self):
|
||||
if self.original_quotas:
|
||||
# existing users
|
||||
|
@ -16,7 +16,6 @@
|
||||
from oslo_config import cfg
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -28,7 +27,6 @@ from rally.task import utils as bench_utils
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@ -100,7 +98,6 @@ class SaharaCluster(context.Context):
|
||||
"master_flavor_id", "worker_flavor_id"]
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Sahara Cluster`"))
|
||||
def setup(self):
|
||||
utils.init_sahara_context(self)
|
||||
self.context["sahara"]["clusters"] = {}
|
||||
@ -181,7 +178,6 @@ class SaharaCluster(context.Context):
|
||||
return False
|
||||
return True
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Sahara Cluster`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["sahara.clusters"],
|
||||
users=self.context.get("users", []),
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -25,9 +24,6 @@ from rally.plugins.openstack.services.image import image as image_services
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="sahara_image", platform="openstack", order=440)
|
||||
class SaharaImage(context.Context):
|
||||
@ -79,7 +75,6 @@ class SaharaImage(context.Context):
|
||||
image_id=image.id, new_tags=[plugin_name, hadoop_version])
|
||||
return image.id
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Sahara Image`"))
|
||||
def setup(self):
|
||||
utils.init_sahara_context(self)
|
||||
self.context["sahara"]["images"] = {}
|
||||
@ -129,7 +124,6 @@ class SaharaImage(context.Context):
|
||||
self.context["tenants"][tenant_id]["sahara"]["image"] = (
|
||||
image_id)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Sahara Image`"))
|
||||
def cleanup(self):
|
||||
if self.context["sahara"]["need_image_cleanup"]:
|
||||
resource_manager.cleanup(names=["glance.images"],
|
||||
|
@ -16,8 +16,6 @@
|
||||
import requests
|
||||
from six.moves.urllib import parse
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -28,9 +26,6 @@ from rally.plugins.openstack.scenarios.swift import utils as swift_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="sahara_input_data_sources", platform="openstack",
|
||||
order=443)
|
||||
@ -68,8 +63,6 @@ class SaharaInputDataSources(context.Context):
|
||||
"required": ["input_type", "input_url"]
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Enter context: `Sahara Input Data Sources`"))
|
||||
def setup(self):
|
||||
utils.init_sahara_context(self)
|
||||
self.context["sahara"]["swift_objects"] = []
|
||||
@ -121,8 +114,6 @@ class SaharaInputDataSources(context.Context):
|
||||
self.context["tenants"][tenant_id]["sahara"]["input"] = (
|
||||
input_ds_swift.id)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Sahara Input Data"
|
||||
"Sources`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["swift.object", "swift.container"],
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
import requests
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -27,9 +25,6 @@ from rally.plugins.openstack.scenarios.sahara import utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="sahara_job_binaries", platform="openstack", order=442)
|
||||
class SaharaJobBinaries(context.Context):
|
||||
@ -79,8 +74,6 @@ class SaharaJobBinaries(context.Context):
|
||||
# downloads for each tenant
|
||||
lib_cache = {}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Enter context: `Sahara Job Binaries`"))
|
||||
def setup(self):
|
||||
utils.init_sahara_context(self)
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
@ -142,8 +135,6 @@ class SaharaJobBinaries(context.Context):
|
||||
self.context["tenants"][tenant_id]["sahara"][lib_type].append(
|
||||
job_binary.id)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Exit context: `Sahara Job Binaries`"))
|
||||
def cleanup(self):
|
||||
resources = ["job_binary_internals", "job_binaries"]
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
@ -25,9 +23,6 @@ from rally.plugins.openstack.scenarios.swift import utils as swift_utils
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="sahara_output_data_sources", platform="openstack",
|
||||
order=444)
|
||||
@ -49,8 +44,6 @@ class SaharaOutputDataSources(context.Context):
|
||||
"required": ["output_type", "output_url_prefix"]
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Enter context: `Sahara Output Data Sources`"))
|
||||
def setup(self):
|
||||
utils.init_sahara_context(self)
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
@ -99,8 +92,6 @@ class SaharaOutputDataSources(context.Context):
|
||||
output_ds_swift.id
|
||||
)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info,
|
||||
_("Exit context: `Sahara Output Data Sources`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(
|
||||
names=["swift.object", "swift.container"],
|
||||
|
@ -10,16 +10,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import utils as rutils
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
from rally.plugins.openstack.scenarios.senlin import utils as senlin_utils
|
||||
from rally.task import context
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", users=True)
|
||||
@context.configure(name="profiles", platform="openstack", order=190)
|
||||
@ -44,7 +40,6 @@ class ProfilesGenerator(context.Context):
|
||||
"required": ["type", "version", "properties"]
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Senlin profiles`"))
|
||||
def setup(self):
|
||||
"""Create test profiles."""
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
@ -61,7 +56,6 @@ class ProfilesGenerator(context.Context):
|
||||
|
||||
self.context["tenants"][tenant_id]["profile"] = profile.id
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Senlin profiles`"))
|
||||
def cleanup(self):
|
||||
"""Delete created test profiles."""
|
||||
for user, tenant_id in rutils.iterate_per_tenants(
|
||||
|
@ -59,7 +59,6 @@ class SwiftObjectGenerator(swift_utils.SwiftObjectMixin, context.Context):
|
||||
"resource_management_workers": 30
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `swift_objects`"))
|
||||
def setup(self):
|
||||
"""Create containers and objects, using the broker pattern."""
|
||||
threads = self.config["resource_management_workers"]
|
||||
@ -93,7 +92,6 @@ class SwiftObjectGenerator(swift_utils.SwiftObjectMixin, context.Context):
|
||||
"expected %(expected)s but got %(actual)s.")
|
||||
% {"expected": objects_num, "actual": objects_count})
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `swift_objects`"))
|
||||
def cleanup(self):
|
||||
"""Delete containers and objects, using the broker pattern."""
|
||||
threads = self.config["resource_management_workers"]
|
||||
|
@ -101,7 +101,6 @@ class BaseCustomImageGenerator(context.Context):
|
||||
"workers": 1
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `custom_image`"))
|
||||
def setup(self):
|
||||
"""Creates custom image(s) with preinstalled applications.
|
||||
|
||||
@ -178,7 +177,6 @@ class BaseCustomImageGenerator(context.Context):
|
||||
|
||||
return custom_image
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `custom_image`"))
|
||||
def cleanup(self):
|
||||
"""Delete created custom image(s)."""
|
||||
|
||||
|
@ -16,8 +16,6 @@ import random
|
||||
|
||||
import six
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common import logging
|
||||
from rally.common import validation
|
||||
from rally import consts
|
||||
from rally import osclients
|
||||
@ -27,9 +25,6 @@ from rally.plugins.openstack import types
|
||||
from rally.task import context
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@validation.add("required_platform", platform="openstack", admin=True)
|
||||
@context.configure(name="audit_templates", platform="openstack", order=550)
|
||||
class AuditTemplateGenerator(context.Context):
|
||||
@ -77,7 +72,6 @@ class AuditTemplateGenerator(context.Context):
|
||||
"fill_strategy": "round_robin"
|
||||
}
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Enter context: `Audit Templates`"))
|
||||
def setup(self):
|
||||
watcher_scenario = watcher_utils.WatcherScenario(
|
||||
{"admin": self.context["admin"], "task": self.context["task"],
|
||||
@ -108,7 +102,6 @@ class AuditTemplateGenerator(context.Context):
|
||||
goal_id, strategy_id)
|
||||
self.context["audit_templates"].append(audit_template.uuid)
|
||||
|
||||
@logging.log_task_wrapper(LOG.info, _("Exit context: `Audit Templates`"))
|
||||
def cleanup(self):
|
||||
resource_manager.cleanup(names=["watcher.action_plan",
|
||||
"watcher.audit_template"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user