diff --git a/etc/rally/rally.conf.sample b/etc/rally/rally.conf.sample index be8cff47..66a7526c 100644 --- a/etc/rally/rally.conf.sample +++ b/etc/rally/rally.conf.sample @@ -9,12 +9,6 @@ # Note: This option can be changed without restarting. #debug = false -# DEPRECATED: If set to false, the logging level will be set to -# WARNING instead of the default INFO level. (boolean value) -# This option is deprecated for removal. -# Its value may be silently ignored in the future. -#verbose = true - # The name of a logging configuration file. This file is appended to # any existing logging configuration files. For details about logging # configuration files, see the Python logging module documentation. @@ -60,7 +54,7 @@ # Log output to standard error. This option is ignored if # log_config_append is set. (boolean value) -#use_stderr = true +#use_stderr = false # Format string to use for log messages with context. (string value) #logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s @@ -96,6 +90,19 @@ # (string value) #instance_uuid_format = "[instance: %(uuid)s] " +# Interval, number of seconds, of log rate limiting. (integer value) +#rate_limit_interval = 0 + +# Maximum number of logged messages per rate_limit_interval. (integer +# value) +#rate_limit_burst = 0 + +# Log level name used by rate limiting: CRITICAL, ERROR, INFO, +# WARNING, DEBUG or empty string. Logs with level greater or equal to +# rate_limit_except_level are not filtered. An empty string means that +# all levels are filtered. (string value) +#rate_limit_except_level = CRITICAL + # Enables or disables fatal status of deprecations. (boolean value) #fatal_deprecations = false @@ -158,17 +165,6 @@ # Server boot poll interval (floating point value) #ec2_server_boot_poll_interval = 1.0 -# Time to sleep after creating a resource before polling for it status -# (floating point value) -#glance_image_create_prepoll_delay = 2.0 - -# Time to wait for glance image to be created. (floating point value) -#glance_image_create_timeout = 120.0 - -# Interval between checks when waiting for image creation. (floating -# point value) -#glance_image_create_poll_interval = 1.0 - # Time(in sec) to sleep after creating a resource before polling for # it status. (floating point value) #heat_stack_create_prepoll_delay = 2.0 @@ -250,6 +246,15 @@ # (floating point value) #ironic_node_create_poll_interval = 1.0 +# Ironic node create timeout (floating point value) +#ironic_node_create_timeout = 300 + +# Ironic node poll interval (floating point value) +#ironic_node_poll_interval = 1.0 + +# Ironic node create timeout (floating point value) +#ironic_node_delete_timeout = 300 + # Time(in sec) to sleep after creating a resource before polling for # the status. (floating point value) #magnum_cluster_create_prepoll_delay = 5.0 @@ -323,7 +328,7 @@ #nova_server_boot_timeout = 300.0 # Server boot poll interval (floating point value) -#nova_server_boot_poll_interval = 1.0 +#nova_server_boot_poll_interval = 2.0 # Time to sleep after delete before polling for status (floating point # value) @@ -541,12 +546,40 @@ # Time to wait for a VM to become pingable (floating point value) #vm_ping_timeout = 120.0 +# Time to wait for glance image to be deleted. (floating point value) +#glance_image_delete_timeout = 120.0 + +# Interval between checks when waiting for image deletion. (floating +# point value) +#glance_image_delete_poll_interval = 1.0 + +# Time to sleep after creating a resource before polling for it status +# (floating point value) +#glance_image_create_prepoll_delay = 2.0 + +# Time to wait for glance image to be created. (floating point value) +#glance_image_create_timeout = 120.0 + +# Interval between checks when waiting for image creation. (floating +# point value) +#glance_image_create_poll_interval = 1.0 + # Watcher audit launch interval (floating point value) #watcher_audit_launch_poll_interval = 2.0 # Watcher audit launch timeout (integer value) #watcher_audit_launch_timeout = 300 +# Time in seconds to wait for senlin action to finish. (floating point +# value) +#senlin_action_timeout = 3600 + +# Neutron create loadbalancer timeout (floating point value) +#neutron_create_loadbalancer_timeout = 500.0 + +# Neutron create loadbalancer poll interval (floating point value) +#neutron_create_loadbalancer_poll_interval = 2.0 + [cleanup] @@ -567,16 +600,7 @@ # From oslo.db # -# DEPRECATED: The file name to use with SQLite. (string value) -# Deprecated group/name - [DEFAULT]/sqlite_db -# This option is deprecated for removal. -# Its value may be silently ignored in the future. -# Reason: Should use config option connection or slave_connection to -# connect the database. -#sqlite_db = oslo.sqlite - # If True, SQLite uses synchronous mode. (boolean value) -# Deprecated group/name - [DEFAULT]/sqlite_synchronous #sqlite_synchronous = true # The back end to use for the database. (string value) @@ -740,8 +764,8 @@ # From rally # -# How many concurrent threads use for serving users context (integer -# value) +# The number of concurrent threads to use for serving users context. +# (integer value) #resource_management_workers = 20 # ID of domain in which projects will be created. (string value) @@ -750,5 +774,6 @@ # ID of domain in which users will be created. (string value) #user_domain = default -# The default role name of the keystone. (string value) +# The default role name of the keystone to assign to users. (string +# value) #keystone_default_role = member diff --git a/rally/plugins/openstack/cfg/__init__.py b/rally/plugins/openstack/cfg/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rally/plugins/openstack/cfg/cinder.py b/rally/plugins/openstack/cfg/cinder.py new file mode 100644 index 00000000..6eae57f7 --- /dev/null +++ b/rally/plugins/openstack/cfg/cinder.py @@ -0,0 +1,44 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("cinder_volume_create_prepoll_delay", + default=2.0, + help="Time to sleep after creating a resource before" + " polling for it status"), + cfg.FloatOpt("cinder_volume_create_timeout", + default=600.0, + help="Time to wait for cinder volume to be created."), + cfg.FloatOpt("cinder_volume_create_poll_interval", + default=2.0, + help="Interval between checks when waiting for volume" + " creation."), + cfg.FloatOpt("cinder_volume_delete_timeout", + default=600.0, + help="Time to wait for cinder volume to be deleted."), + cfg.FloatOpt("cinder_volume_delete_poll_interval", + default=2.0, + help="Interval between checks when waiting for volume" + " deletion."), + cfg.FloatOpt("cinder_backup_restore_timeout", + default=600.0, + help="Time to wait for cinder backup to be restored."), + cfg.FloatOpt("cinder_backup_restore_poll_interval", + default=2.0, + help="Interval between checks when waiting for backup" + " restoring."), +]} diff --git a/rally/plugins/openstack/cfg/cleanup.py b/rally/plugins/openstack/cfg/cleanup.py new file mode 100644 index 00000000..05ef75c5 --- /dev/null +++ b/rally/plugins/openstack/cfg/cleanup.py @@ -0,0 +1,23 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"cleanup": [ + cfg.IntOpt("resource_deletion_timeout", default=600, + help="A timeout in seconds for deleting resources"), + cfg.IntOpt("cleanup_threads", default=20, + help="Number of cleanup threads to run") +]} diff --git a/rally/plugins/openstack/cfg/ec2.py b/rally/plugins/openstack/cfg/ec2.py new file mode 100644 index 00000000..f6b585fe --- /dev/null +++ b/rally/plugins/openstack/cfg/ec2.py @@ -0,0 +1,34 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt( + "ec2_server_boot_prepoll_delay", + default=1.0, + help="Time to sleep after boot before polling for status" + ), + cfg.FloatOpt( + "ec2_server_boot_timeout", + default=300.0, + help="Server boot timeout" + ), + cfg.FloatOpt( + "ec2_server_boot_poll_interval", + default=1.0, + help="Server boot poll interval" + ) +]} diff --git a/rally/plugins/openstack/cfg/glance.py b/rally/plugins/openstack/cfg/glance.py new file mode 100644 index 00000000..b9fa0410 --- /dev/null +++ b/rally/plugins/openstack/cfg/glance.py @@ -0,0 +1,45 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("glance_image_delete_timeout", + default=120.0, + help="Time to wait for glance image to be deleted."), + cfg.FloatOpt("glance_image_delete_poll_interval", + default=1.0, + help="Interval between checks when waiting for image " + "deletion."), + cfg.FloatOpt("glance_image_create_prepoll_delay", + default=2.0, + help="Time to sleep after creating a resource before " + "polling for it status"), + cfg.FloatOpt("glance_image_create_timeout", + default=120.0, + help="Time to wait for glance image to be created."), + cfg.FloatOpt("glance_image_create_poll_interval", + default=1.0, + help="Interval between checks when waiting for image " + "creation."), + cfg.FloatOpt("glance_image_create_prepoll_delay", + default=2.0, + help="Time to sleep after creating a resource before " + "polling for it status"), + cfg.FloatOpt("glance_image_create_poll_interval", + default=1.0, + help="Interval between checks when waiting for image " + "creation.") +]} diff --git a/rally/plugins/openstack/cfg/heat.py b/rally/plugins/openstack/cfg/heat.py new file mode 100644 index 00000000..c53dd16d --- /dev/null +++ b/rally/plugins/openstack/cfg/heat.py @@ -0,0 +1,92 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("heat_stack_create_prepoll_delay", + default=2.0, + help="Time(in sec) to sleep after creating a resource before " + "polling for it status."), + cfg.FloatOpt("heat_stack_create_timeout", + default=3600.0, + help="Time(in sec) to wait for heat stack to be created."), + cfg.FloatOpt("heat_stack_create_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack creation."), + cfg.FloatOpt("heat_stack_delete_timeout", + default=3600.0, + help="Time(in sec) to wait for heat stack to be deleted."), + cfg.FloatOpt("heat_stack_delete_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack deletion."), + cfg.FloatOpt("heat_stack_check_timeout", + default=3600.0, + help="Time(in sec) to wait for stack to be checked."), + cfg.FloatOpt("heat_stack_check_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack checking."), + cfg.FloatOpt("heat_stack_update_prepoll_delay", + default=2.0, + help="Time(in sec) to sleep after updating a resource before " + "polling for it status."), + cfg.FloatOpt("heat_stack_update_timeout", + default=3600.0, + help="Time(in sec) to wait for stack to be updated."), + cfg.FloatOpt("heat_stack_update_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack update."), + cfg.FloatOpt("heat_stack_suspend_timeout", + default=3600.0, + help="Time(in sec) to wait for stack to be suspended."), + cfg.FloatOpt("heat_stack_suspend_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack suspend."), + cfg.FloatOpt("heat_stack_resume_timeout", + default=3600.0, + help="Time(in sec) to wait for stack to be resumed."), + cfg.FloatOpt("heat_stack_resume_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack resume."), + cfg.FloatOpt("heat_stack_snapshot_timeout", + default=3600.0, + help="Time(in sec) to wait for stack snapshot to " + "be created."), + cfg.FloatOpt("heat_stack_snapshot_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack snapshot to be created."), + cfg.FloatOpt("heat_stack_restore_timeout", + default=3600.0, + help="Time(in sec) to wait for stack to be restored from " + "snapshot."), + cfg.FloatOpt("heat_stack_restore_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "stack to be restored."), + cfg.FloatOpt("heat_stack_scale_timeout", + default=3600.0, + help="Time (in sec) to wait for stack to scale up or down."), + cfg.FloatOpt("heat_stack_scale_poll_interval", + default=1.0, + help="Time interval (in sec) between checks when waiting for " + "a stack to scale up or down.") +]} diff --git a/rally/plugins/openstack/cfg/ironic.py b/rally/plugins/openstack/cfg/ironic.py new file mode 100644 index 00000000..9ee598d2 --- /dev/null +++ b/rally/plugins/openstack/cfg/ironic.py @@ -0,0 +1,32 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("ironic_node_create_poll_interval", + default=1.0, + help="Interval(in sec) between checks when waiting for node " + "creation."), + cfg.FloatOpt("ironic_node_create_timeout", + default=300, + help="Ironic node create timeout"), + cfg.FloatOpt("ironic_node_poll_interval", + default=1.0, + help="Ironic node poll interval"), + cfg.FloatOpt("ironic_node_delete_timeout", + default=300, + help="Ironic node create timeout") +]} diff --git a/rally/plugins/openstack/cfg/keystone_roles.py b/rally/plugins/openstack/cfg/keystone_roles.py new file mode 100644 index 00000000..857b4ff3 --- /dev/null +++ b/rally/plugins/openstack/cfg/keystone_roles.py @@ -0,0 +1,23 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"roles_context": [ + cfg.IntOpt("resource_management_workers", + default=30, + help="How many concurrent threads to use for serving roles " + "context"), +]} diff --git a/rally/plugins/openstack/cfg/keystone_users.py b/rally/plugins/openstack/cfg/keystone_users.py new file mode 100644 index 00000000..d69eed35 --- /dev/null +++ b/rally/plugins/openstack/cfg/keystone_users.py @@ -0,0 +1,37 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +RESOURCE_MANAGEMENT_WORKERS_DESCR = ("The number of concurrent threads to use " + "for serving users context.") +PROJECT_DOMAIN_DESCR = "ID of domain in which projects will be created." +USER_DOMAIN_DESCR = "ID of domain in which users will be created." + +OPTS = {"users_context": [ + cfg.IntOpt("resource_management_workers", + default=20, + help=RESOURCE_MANAGEMENT_WORKERS_DESCR), + cfg.StrOpt("project_domain", + default="default", + help=PROJECT_DOMAIN_DESCR), + cfg.StrOpt("user_domain", + default="default", + help=USER_DOMAIN_DESCR), + cfg.StrOpt("keystone_default_role", + default="member", + help="The default role name of the keystone to assign to " + "users."), +]} diff --git a/rally/plugins/openstack/cfg/magnum.py b/rally/plugins/openstack/cfg/magnum.py new file mode 100644 index 00000000..6a4b1cf4 --- /dev/null +++ b/rally/plugins/openstack/cfg/magnum.py @@ -0,0 +1,31 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("magnum_cluster_create_prepoll_delay", + default=5.0, + help="Time(in sec) to sleep after creating a resource before " + "polling for the status."), + cfg.FloatOpt("magnum_cluster_create_timeout", + default=1200.0, + help="Time(in sec) to wait for magnum cluster to be " + "created."), + cfg.FloatOpt("magnum_cluster_create_poll_interval", + default=1.0, + help="Time interval(in sec) between checks when waiting for " + "cluster creation."), +]} diff --git a/rally/plugins/openstack/cfg/manila.py b/rally/plugins/openstack/cfg/manila.py new file mode 100644 index 00000000..4786601e --- /dev/null +++ b/rally/plugins/openstack/cfg/manila.py @@ -0,0 +1,42 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt( + "manila_share_create_prepoll_delay", + default=2.0, + help="Delay between creating Manila share and polling for its " + "status."), + cfg.FloatOpt( + "manila_share_create_timeout", + default=300.0, + help="Timeout for Manila share creation."), + cfg.FloatOpt( + "manila_share_create_poll_interval", + default=3.0, + help="Interval between checks when waiting for Manila share " + "creation."), + cfg.FloatOpt( + "manila_share_delete_timeout", + default=180.0, + help="Timeout for Manila share deletion."), + cfg.FloatOpt( + "manila_share_delete_poll_interval", + default=2.0, + help="Interval between checks when waiting for Manila share " + "deletion.") +]} diff --git a/rally/plugins/openstack/cfg/mistral.py b/rally/plugins/openstack/cfg/mistral.py new file mode 100644 index 00000000..344537ad --- /dev/null +++ b/rally/plugins/openstack/cfg/mistral.py @@ -0,0 +1,9 @@ + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.IntOpt( + "mistral_execution_timeout", + default=200, + help="mistral execution timeout") +]} diff --git a/rally/plugins/openstack/cfg/monasca.py b/rally/plugins/openstack/cfg/monasca.py new file mode 100644 index 00000000..c289ac44 --- /dev/null +++ b/rally/plugins/openstack/cfg/monasca.py @@ -0,0 +1,10 @@ + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt( + "monasca_metric_create_prepoll_delay", + default=15.0, + help="Delay between creating Monasca metrics and polling for " + "its elements.") +]} diff --git a/rally/plugins/openstack/cfg/murano.py b/rally/plugins/openstack/cfg/murano.py new file mode 100644 index 00000000..e77182f1 --- /dev/null +++ b/rally/plugins/openstack/cfg/murano.py @@ -0,0 +1,25 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.IntOpt("murano_deploy_environment_timeout", default=1200, + deprecated_name="deploy_environment_timeout", + help="A timeout in seconds for an environment deploy"), + cfg.IntOpt("murano_deploy_environment_check_interval", default=5, + deprecated_name="deploy_environment_check_interval", + help="Deploy environment check interval in seconds"), +]} diff --git a/rally/plugins/openstack/cfg/neutron.py b/rally/plugins/openstack/cfg/neutron.py new file mode 100644 index 00000000..ff20fc7a --- /dev/null +++ b/rally/plugins/openstack/cfg/neutron.py @@ -0,0 +1,25 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("neutron_create_loadbalancer_timeout", + default=float(500), + help="Neutron create loadbalancer timeout"), + cfg.FloatOpt("neutron_create_loadbalancer_poll_interval", + default=float(2), + help="Neutron create loadbalancer poll interval") +]} diff --git a/rally/plugins/openstack/cfg/nova.py b/rally/plugins/openstack/cfg/nova.py new file mode 100644 index 00000000..904c9357 --- /dev/null +++ b/rally/plugins/openstack/cfg/nova.py @@ -0,0 +1,258 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + # prepoll delay, timeout, poll interval + # "start": (0, 300, 1) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "start", + default=float(0), + help="Time to sleep after %s before polling" + " for status" % "start"), + cfg.FloatOpt("nova_server_%s_timeout" % "start", + default=float(300), + help="Server %s timeout" % "start"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "start", + default=float(1), + help="Server %s poll interval" % "start"), + # "stop": (0, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "stop", + default=float(0), + help="Time to sleep after %s before polling" + " for status" % "stop"), + cfg.FloatOpt("nova_server_%s_timeout" % "stop", + default=float(300), + help="Server %s timeout" % "stop"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "stop", + default=float(2), + help="Server %s poll interval" % "stop"), + # "boot": (1, 300, 1) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "boot", + default=float(1), + help="Time to sleep after %s before polling" + " for status" % "boot"), + cfg.FloatOpt("nova_server_%s_timeout" % "boot", + default=float(300), + help="Server %s timeout" % "boot"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "boot", + default=float(2), + help="Server %s poll interval" % "boot"), + # "delete": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "delete", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "delete"), + cfg.FloatOpt("nova_server_%s_timeout" % "delete", + default=float(300), + help="Server %s timeout" % "delete"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "delete", + default=float(2), + help="Server %s poll interval" % "delete"), + # "reboot": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "reboot", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "reboot"), + cfg.FloatOpt("nova_server_%s_timeout" % "reboot", + default=float(300), + help="Server %s timeout" % "reboot"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "reboot", + default=float(2), + help="Server %s poll interval" % "reboot"), + # "rebuild": (1, 300, 1) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "rebuild", + default=float(1), + help="Time to sleep after %s before polling" + " for status" % "rebuild"), + cfg.FloatOpt("nova_server_%s_timeout" % "rebuild", + default=float(300), + help="Server %s timeout" % "rebuild"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "rebuild", + default=float(1), + help="Server %s poll interval" % "rebuild"), + # "rescue": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "rescue", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "rescue"), + cfg.FloatOpt("nova_server_%s_timeout" % "rescue", + default=float(300), + help="Server %s timeout" % "rescue"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "rescue", + default=float(2), + help="Server %s poll interval" % "rescue"), + # "unrescue": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "unrescue", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "unrescue"), + cfg.FloatOpt("nova_server_%s_timeout" % "unrescue", + default=float(300), + help="Server %s timeout" % "unrescue"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "unrescue", + default=float(2), + help="Server %s poll interval" % "unrescue"), + # "suspend": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "suspend", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "suspend"), + cfg.FloatOpt("nova_server_%s_timeout" % "suspend", + default=float(300), + help="Server %s timeout" % "suspend"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "suspend", + default=float(2), + help="Server %s poll interval" % "suspend"), + # "resume": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "resume", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "resume"), + cfg.FloatOpt("nova_server_%s_timeout" % "resume", + default=float(300), + help="Server %s timeout" % "resume"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "resume", + default=float(2), + help="Server %s poll interval" % "resume"), + # "pause": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "pause", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "pause"), + cfg.FloatOpt("nova_server_%s_timeout" % "pause", + default=float(300), + help="Server %s timeout" % "pause"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "pause", + default=float(2), + help="Server %s poll interval" % "pause"), + # "unpause": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "unpause", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "unpause"), + cfg.FloatOpt("nova_server_%s_timeout" % "unpause", + default=float(300), + help="Server %s timeout" % "unpause"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "unpause", + default=float(2), + help="Server %s poll interval" % "unpause"), + # "shelve": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "shelve", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "shelve"), + cfg.FloatOpt("nova_server_%s_timeout" % "shelve", + default=float(300), + help="Server %s timeout" % "shelve"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "shelve", + default=float(2), + help="Server %s poll interval" % "shelve"), + # "unshelve": (2, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "unshelve", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "unshelve"), + cfg.FloatOpt("nova_server_%s_timeout" % "unshelve", + default=float(300), + help="Server %s timeout" % "unshelve"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "unshelve", + default=float(2), + help="Server %s poll interval" % "unshelve"), + # "image_create": (0, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "image_create", + default=float(0), + help="Time to sleep after %s before polling" + " for status" % "image_create"), + cfg.FloatOpt("nova_server_%s_timeout" % "image_create", + default=float(300), + help="Server %s timeout" % "image_create"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "image_create", + default=float(2), + help="Server %s poll interval" % "image_create"), + # "image_delete": (0, 300, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "image_delete", + default=float(0), + help="Time to sleep after %s before polling" + " for status" % "image_delete"), + cfg.FloatOpt("nova_server_%s_timeout" % "image_delete", + default=float(300), + help="Server %s timeout" % "image_delete"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "image_delete", + default=float(2), + help="Server %s poll interval" % "image_delete"), + # "resize": (2, 400, 5) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "resize", + default=float(2), + help="Time to sleep after %s before polling" + " for status" % "resize"), + cfg.FloatOpt("nova_server_%s_timeout" % "resize", + default=float(400), + help="Server %s timeout" % "resize"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "resize", + default=float(5), + help="Server %s poll interval" % "resize"), + # "resize_confirm": (0, 200, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "resize_confirm", + default=float(0), + help="Time to sleep after %s before polling" + " for status" % "resize_confirm"), + cfg.FloatOpt("nova_server_%s_timeout" % "resize_confirm", + default=float(200), + help="Server %s timeout" % "resize_confirm"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "resize_confirm", + default=float(2), + help="Server %s poll interval" % "resize_confirm"), + # "resize_revert": (0, 200, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "resize_revert", + default=float(0), + help="Time to sleep after %s before polling" + " for status" % "resize_revert"), + cfg.FloatOpt("nova_server_%s_timeout" % "resize_revert", + default=float(200), + help="Server %s timeout" % "resize_revert"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "resize_revert", + default=float(2), + help="Server %s poll interval" % "resize_revert"), + # "live_migrate": (1, 400, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "live_migrate", + default=float(1), + help="Time to sleep after %s before polling" + " for status" % "live_migrate"), + cfg.FloatOpt("nova_server_%s_timeout" % "live_migrate", + default=float(400), + help="Server %s timeout" % "live_migrate"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "live_migrate", + default=float(2), + help="Server %s poll interval" % "live_migrate"), + # "migrate": (1, 400, 2) + cfg.FloatOpt("nova_server_%s_prepoll_delay" % "migrate", + default=float(1), + help="Time to sleep after %s before polling" + " for status" % "migrate"), + cfg.FloatOpt("nova_server_%s_timeout" % "migrate", + default=float(400), + help="Server %s timeout" % "migrate"), + cfg.FloatOpt("nova_server_%s_poll_interval" % "migrate", + default=float(2), + help="Server %s poll interval" % "migrate"), + # "detach": + cfg.FloatOpt("nova_detach_volume_timeout", + default=float(200), + help="Nova volume detach timeout"), + cfg.FloatOpt("nova_detach_volume_poll_interval", + default=float(2), + help="Nova volume detach poll interval") +]} diff --git a/rally/plugins/openstack/cfg/opts.py b/rally/plugins/openstack/cfg/opts.py new file mode 100644 index 00000000..416cccee --- /dev/null +++ b/rally/plugins/openstack/cfg/opts.py @@ -0,0 +1,52 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from rally.plugins.openstack.cfg import cinder +from rally.plugins.openstack.cfg import ec2 +from rally.plugins.openstack.cfg import glance +from rally.plugins.openstack.cfg import heat +from rally.plugins.openstack.cfg import ironic +from rally.plugins.openstack.cfg import magnum +from rally.plugins.openstack.cfg import manila +from rally.plugins.openstack.cfg import mistral +from rally.plugins.openstack.cfg import monasca +from rally.plugins.openstack.cfg import murano +from rally.plugins.openstack.cfg import neutron +from rally.plugins.openstack.cfg import nova +from rally.plugins.openstack.cfg import sahara +from rally.plugins.openstack.cfg import senlin +from rally.plugins.openstack.cfg import vm +from rally.plugins.openstack.cfg import watcher + +from rally.plugins.openstack.cfg import tempest + +from rally.plugins.openstack.cfg import keystone_roles +from rally.plugins.openstack.cfg import keystone_users + +from rally.plugins.openstack.cfg import cleanup + + +def list_opts(): + + opts = {} + for l_opts in (cinder.OPTS, ec2.OPTS, heat.OPTS, ironic.OPTS, magnum.OPTS, + manila.OPTS, mistral.OPTS, monasca.OPTS, murano.OPTS, + nova.OPTS, sahara.OPTS, vm.OPTS, glance.OPTS, watcher.OPTS, + tempest.OPTS, keystone_roles.OPTS, keystone_users.OPTS, + cleanup.OPTS, senlin.OPTS, neutron.OPTS): + for category, opt in l_opts.items(): + opts.setdefault(category, []) + opts[category].extend(opt) + return opts diff --git a/rally/plugins/openstack/cfg/sahara.py b/rally/plugins/openstack/cfg/sahara.py new file mode 100644 index 00000000..d301d983 --- /dev/null +++ b/rally/plugins/openstack/cfg/sahara.py @@ -0,0 +1,36 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.IntOpt("sahara_cluster_create_timeout", default=1800, + deprecated_name="cluster_create_timeout", + help="A timeout in seconds for a cluster create operation"), + cfg.IntOpt("sahara_cluster_delete_timeout", default=900, + deprecated_name="cluster_delete_timeout", + help="A timeout in seconds for a cluster delete operation"), + cfg.IntOpt("sahara_cluster_check_interval", default=5, + deprecated_name="cluster_check_interval", + help="Cluster status polling interval in seconds"), + cfg.IntOpt("sahara_job_execution_timeout", default=600, + deprecated_name="job_execution_timeout", + help="A timeout in seconds for a Job Execution to complete"), + cfg.IntOpt("sahara_job_check_interval", default=5, + deprecated_name="job_check_interval", + help="Job Execution status polling interval in seconds"), + cfg.IntOpt("sahara_workers_per_proxy", default=20, + help="Amount of workers one proxy should serve to.") +]} diff --git a/rally/plugins/openstack/cfg/senlin.py b/rally/plugins/openstack/cfg/senlin.py new file mode 100644 index 00000000..fd88808b --- /dev/null +++ b/rally/plugins/openstack/cfg/senlin.py @@ -0,0 +1,22 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("senlin_action_timeout", + default=3600, + help="Time in seconds to wait for senlin action to finish.") +]} diff --git a/rally/plugins/openstack/cfg/tempest.py b/rally/plugins/openstack/cfg/tempest.py new file mode 100644 index 00000000..d97e611b --- /dev/null +++ b/rally/plugins/openstack/cfg/tempest.py @@ -0,0 +1,63 @@ +# Copyright 2013: Mirantis Inc. +# 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. + +from oslo_config import cfg + +OPTS = {"tempest": [ + cfg.StrOpt("img_url", + default="http://download.cirros-cloud.net/" + "0.3.5/cirros-0.3.5-x86_64-disk.img", + help="image URL"), + cfg.StrOpt("img_disk_format", + default="qcow2", + help="Image disk format to use when creating the image"), + cfg.StrOpt("img_container_format", + default="bare", + help="Image container format to use when creating the image"), + cfg.StrOpt("img_name_regex", + default="^.*(cirros|testvm).*$", + help="Regular expression for name of a public image to " + "discover it in the cloud and use it for the tests. " + "Note that when Rally is searching for the image, case " + "insensitive matching is performed. Specify nothing " + "('img_name_regex =') if you want to disable discovering. " + "In this case Rally will create needed resources by " + "itself if the values for the corresponding config " + "options are not specified in the Tempest config file"), + cfg.StrOpt("swift_operator_role", + default="Member", + help="Role required for users " + "to be able to create Swift containers"), + cfg.StrOpt("swift_reseller_admin_role", + default="ResellerAdmin", + help="User role that has reseller admin"), + cfg.StrOpt("heat_stack_owner_role", + default="heat_stack_owner", + help="Role required for users " + "to be able to manage Heat stacks"), + cfg.StrOpt("heat_stack_user_role", + default="heat_stack_user", + help="Role for Heat template-defined users"), + cfg.IntOpt("flavor_ref_ram", + default="64", + help="Primary flavor RAM size used by most of the test cases"), + cfg.IntOpt("flavor_ref_alt_ram", + default="128", + help="Alternate reference flavor RAM size used by test that" + "need two flavors, like those that resize an instance"), + cfg.IntOpt("heat_instance_type_ram", + default="64", + help="RAM size flavor used for orchestration test cases") +]} diff --git a/rally/plugins/openstack/cfg/vm.py b/rally/plugins/openstack/cfg/vm.py new file mode 100644 index 00000000..f5e6b434 --- /dev/null +++ b/rally/plugins/openstack/cfg/vm.py @@ -0,0 +1,10 @@ + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("vm_ping_poll_interval", default=1.0, + help="Interval between checks when waiting for a VM to " + "become pingable"), + cfg.FloatOpt("vm_ping_timeout", default=120.0, + help="Time to wait for a VM to become pingable") +]} diff --git a/rally/plugins/openstack/cfg/watcher.py b/rally/plugins/openstack/cfg/watcher.py new file mode 100644 index 00000000..90807b27 --- /dev/null +++ b/rally/plugins/openstack/cfg/watcher.py @@ -0,0 +1,9 @@ + +from oslo_config import cfg + +OPTS = {"benchmark": [ + cfg.FloatOpt("watcher_audit_launch_poll_interval", default=2.0, + help="Watcher audit launch interval"), + cfg.IntOpt("watcher_audit_launch_timeout", default=300, + help="Watcher audit launch timeout") +]} diff --git a/rally/plugins/openstack/cleanup/base.py b/rally/plugins/openstack/cleanup/base.py index 883e4a14..5b198c00 100644 --- a/rally/plugins/openstack/cleanup/base.py +++ b/rally/plugins/openstack/cleanup/base.py @@ -19,17 +19,12 @@ from oslo_config import cfg from rally.task import utils +from rally.common import opts +opts.register() + CONF = cfg.CONF -CLEANUP_OPTS = [ - cfg.IntOpt("resource_deletion_timeout", default=600, - help="A timeout in seconds for deleting resources"), - cfg.IntOpt("cleanup_threads", default=20, - help="Number of cleanup threads to run") -] cleanup_group = cfg.OptGroup(name="cleanup", title="Cleanup Options") -CONF.register_group(cleanup_group) -CONF.register_opts(CLEANUP_OPTS, cleanup_group) # NOTE(andreykurilin): There are cases when there is no way to use any kind diff --git a/rally/plugins/openstack/context/keystone/roles.py b/rally/plugins/openstack/context/keystone/roles.py index 776a96aa..bc5903ad 100644 --- a/rally/plugins/openstack/context/keystone/roles.py +++ b/rally/plugins/openstack/context/keystone/roles.py @@ -24,20 +24,10 @@ from rally import osclients from rally.plugins.openstack.services.identity import identity from rally.task import context + LOG = logging.getLogger(__name__) - -ROLES_CONTEXT_OPTS = [ - cfg.IntOpt("resource_management_workers", - default=30, - help="How many concurrent threads to use for serving roles " - "context"), -] - CONF = cfg.CONF -CONF.register_opts(ROLES_CONTEXT_OPTS, - group=cfg.OptGroup(name="roles_context", - title="benchmark context options")) @context.configure(name="roles", order=330) diff --git a/rally/plugins/openstack/context/keystone/users.py b/rally/plugins/openstack/context/keystone/users.py index eb392626..317217ef 100644 --- a/rally/plugins/openstack/context/keystone/users.py +++ b/rally/plugins/openstack/context/keystone/users.py @@ -31,34 +31,19 @@ from rally.plugins.openstack.wrappers import network from rally.task import context from rally.task import utils +from rally.common import opts +opts.register() + + LOG = logging.getLogger(__name__) +CONF = cfg.CONF + RESOURCE_MANAGEMENT_WORKERS_DESCR = ("The number of concurrent threads to use " "for serving users context.") PROJECT_DOMAIN_DESCR = "ID of domain in which projects will be created." USER_DOMAIN_DESCR = "ID of domain in which users will be created." -USER_CONTEXT_OPTS = [ - cfg.IntOpt("resource_management_workers", - default=20, - help=RESOURCE_MANAGEMENT_WORKERS_DESCR), - cfg.StrOpt("project_domain", - default="default", - help=PROJECT_DOMAIN_DESCR), - cfg.StrOpt("user_domain", - default="default", - help=USER_DOMAIN_DESCR), - cfg.StrOpt("keystone_default_role", - default="member", - help="The default role name of the keystone to assign to " - "users."), -] - -CONF = cfg.CONF -CONF.register_opts(USER_CONTEXT_OPTS, - group=cfg.OptGroup(name="users_context", - title="benchmark context options")) - @context.configure(name="users", namespace="openstack", order=100) class UserGenerator(context.Context): diff --git a/rally/plugins/openstack/scenarios/cinder/utils.py b/rally/plugins/openstack/scenarios/cinder/utils.py index 27b68bd3..34be8cc1 100644 --- a/rally/plugins/openstack/scenarios/cinder/utils.py +++ b/rally/plugins/openstack/scenarios/cinder/utils.py @@ -25,37 +25,7 @@ from rally.plugins.openstack.wrappers import glance as glance_wrapper from rally.task import atomic from rally.task import utils as bench_utils -CINDER_BENCHMARK_OPTS = [ - cfg.FloatOpt("cinder_volume_create_prepoll_delay", - default=2.0, - help="Time to sleep after creating a resource before" - " polling for it status"), - cfg.FloatOpt("cinder_volume_create_timeout", - default=600.0, - help="Time to wait for cinder volume to be created."), - cfg.FloatOpt("cinder_volume_create_poll_interval", - default=2.0, - help="Interval between checks when waiting for volume" - " creation."), - cfg.FloatOpt("cinder_volume_delete_timeout", - default=600.0, - help="Time to wait for cinder volume to be deleted."), - cfg.FloatOpt("cinder_volume_delete_poll_interval", - default=2.0, - help="Interval between checks when waiting for volume" - " deletion."), - cfg.FloatOpt("cinder_backup_restore_timeout", - default=600.0, - help="Time to wait for cinder backup to be restored."), - cfg.FloatOpt("cinder_backup_restore_poll_interval", - default=2.0, - help="Interval between checks when waiting for backup" - " restoring."), -] - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(CINDER_BENCHMARK_OPTS, group=benchmark_group) class CinderBasic(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/ec2/utils.py b/rally/plugins/openstack/scenarios/ec2/utils.py index dfb556e0..1c7d3d75 100644 --- a/rally/plugins/openstack/scenarios/ec2/utils.py +++ b/rally/plugins/openstack/scenarios/ec2/utils.py @@ -20,28 +20,7 @@ from rally.task import atomic from rally.task import utils -EC2_BENCHMARK_OPTS = [ - cfg.FloatOpt( - "ec2_server_boot_prepoll_delay", - default=1.0, - help="Time to sleep after boot before polling for status" - ), - cfg.FloatOpt( - "ec2_server_boot_timeout", - default=300.0, - help="Server boot timeout" - ), - cfg.FloatOpt( - "ec2_server_boot_poll_interval", - default=1.0, - help="Server boot poll interval" - ) -] - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", - title="benchmark options") -CONF.register_opts(EC2_BENCHMARK_OPTS, group=benchmark_group) class EC2Scenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/glance/utils.py b/rally/plugins/openstack/scenarios/glance/utils.py index 79018670..6be988e8 100644 --- a/rally/plugins/openstack/scenarios/glance/utils.py +++ b/rally/plugins/openstack/scenarios/glance/utils.py @@ -22,19 +22,8 @@ from rally.plugins.openstack.wrappers import glance as glance_wrapper from rally.task import atomic from rally.task import utils -GLANCE_BENCHMARK_OPTS = [ - cfg.FloatOpt("glance_image_delete_timeout", - default=120.0, - help="Time to wait for glance image to be deleted."), - cfg.FloatOpt("glance_image_delete_poll_interval", - default=1.0, - help="Interval between checks when waiting for image " - "deletion.") -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(GLANCE_BENCHMARK_OPTS, group=benchmark_group) LOG = logging.getLogger(__name__) diff --git a/rally/plugins/openstack/scenarios/heat/utils.py b/rally/plugins/openstack/scenarios/heat/utils.py index e161f129..d23258d2 100644 --- a/rally/plugins/openstack/scenarios/heat/utils.py +++ b/rally/plugins/openstack/scenarios/heat/utils.py @@ -23,87 +23,11 @@ from rally.plugins.openstack import scenario from rally.task import atomic from rally.task import utils + LOG = logging.getLogger(__name__) -HEAT_BENCHMARK_OPTS = [ - cfg.FloatOpt("heat_stack_create_prepoll_delay", - default=2.0, - help="Time(in sec) to sleep after creating a resource before " - "polling for it status."), - cfg.FloatOpt("heat_stack_create_timeout", - default=3600.0, - help="Time(in sec) to wait for heat stack to be created."), - cfg.FloatOpt("heat_stack_create_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack creation."), - cfg.FloatOpt("heat_stack_delete_timeout", - default=3600.0, - help="Time(in sec) to wait for heat stack to be deleted."), - cfg.FloatOpt("heat_stack_delete_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack deletion."), - cfg.FloatOpt("heat_stack_check_timeout", - default=3600.0, - help="Time(in sec) to wait for stack to be checked."), - cfg.FloatOpt("heat_stack_check_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack checking."), - cfg.FloatOpt("heat_stack_update_prepoll_delay", - default=2.0, - help="Time(in sec) to sleep after updating a resource before " - "polling for it status."), - cfg.FloatOpt("heat_stack_update_timeout", - default=3600.0, - help="Time(in sec) to wait for stack to be updated."), - cfg.FloatOpt("heat_stack_update_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack update."), - cfg.FloatOpt("heat_stack_suspend_timeout", - default=3600.0, - help="Time(in sec) to wait for stack to be suspended."), - cfg.FloatOpt("heat_stack_suspend_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack suspend."), - cfg.FloatOpt("heat_stack_resume_timeout", - default=3600.0, - help="Time(in sec) to wait for stack to be resumed."), - cfg.FloatOpt("heat_stack_resume_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack resume."), - cfg.FloatOpt("heat_stack_snapshot_timeout", - default=3600.0, - help="Time(in sec) to wait for stack snapshot to " - "be created."), - cfg.FloatOpt("heat_stack_snapshot_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack snapshot to be created."), - cfg.FloatOpt("heat_stack_restore_timeout", - default=3600.0, - help="Time(in sec) to wait for stack to be restored from " - "snapshot."), - cfg.FloatOpt("heat_stack_restore_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "stack to be restored."), - cfg.FloatOpt("heat_stack_scale_timeout", - default=3600.0, - help="Time (in sec) to wait for stack to scale up or down."), - cfg.FloatOpt("heat_stack_scale_poll_interval", - default=1.0, - help="Time interval (in sec) between checks when waiting for " - "a stack to scale up or down."), -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(HEAT_BENCHMARK_OPTS, group=benchmark_group) class HeatScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/ironic/utils.py b/rally/plugins/openstack/scenarios/ironic/utils.py index 4dded38d..0a834256 100644 --- a/rally/plugins/openstack/scenarios/ironic/utils.py +++ b/rally/plugins/openstack/scenarios/ironic/utils.py @@ -22,25 +22,7 @@ from rally.task import atomic from rally.task import utils -IRONIC_BENCHMARK_OPTS = [ - cfg.FloatOpt("ironic_node_create_poll_interval", - default=1.0, - help="Interval(in sec) between checks when waiting for node " - "creation."), - cfg.FloatOpt("ironic_node_create_timeout", - default=300, - help="Ironic node create timeout"), - cfg.FloatOpt("ironic_node_poll_interval", - default=1.0, - help="Ironic node poll interval"), - cfg.FloatOpt("ironic_node_delete_timeout", - default=300, - help="Ironic node create timeout") -] - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(IRONIC_BENCHMARK_OPTS, group=benchmark_group) class IronicScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/magnum/utils.py b/rally/plugins/openstack/scenarios/magnum/utils.py index 44fc4f2e..39497dee 100644 --- a/rally/plugins/openstack/scenarios/magnum/utils.py +++ b/rally/plugins/openstack/scenarios/magnum/utils.py @@ -19,24 +19,8 @@ from rally.plugins.openstack import scenario from rally.task import atomic from rally.task import utils -MAGNUM_BENCHMARK_OPTS = [ - cfg.FloatOpt("magnum_cluster_create_prepoll_delay", - default=5.0, - help="Time(in sec) to sleep after creating a resource before " - "polling for the status."), - cfg.FloatOpt("magnum_cluster_create_timeout", - default=1200.0, - help="Time(in sec) to wait for magnum cluster to be " - "created."), - cfg.FloatOpt("magnum_cluster_create_poll_interval", - default=1.0, - help="Time interval(in sec) between checks when waiting for " - "cluster creation."), -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(MAGNUM_BENCHMARK_OPTS, group=benchmark_group) class MagnumScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/manila/utils.py b/rally/plugins/openstack/scenarios/manila/utils.py index 4f34af23..211114b0 100644 --- a/rally/plugins/openstack/scenarios/manila/utils.py +++ b/rally/plugins/openstack/scenarios/manila/utils.py @@ -24,35 +24,7 @@ from rally.task import atomic from rally.task import utils -MANILA_BENCHMARK_OPTS = [ - cfg.FloatOpt( - "manila_share_create_prepoll_delay", - default=2.0, - help="Delay between creating Manila share and polling for its " - "status."), - cfg.FloatOpt( - "manila_share_create_timeout", - default=300.0, - help="Timeout for Manila share creation."), - cfg.FloatOpt( - "manila_share_create_poll_interval", - default=3.0, - help="Interval between checks when waiting for Manila share " - "creation."), - cfg.FloatOpt( - "manila_share_delete_timeout", - default=180.0, - help="Timeout for Manila share deletion."), - cfg.FloatOpt( - "manila_share_delete_poll_interval", - default=2.0, - help="Interval between checks when waiting for Manila share " - "deletion."), -] - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(MANILA_BENCHMARK_OPTS, group=benchmark_group) class ManilaScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/mistral/utils.py b/rally/plugins/openstack/scenarios/mistral/utils.py index 9ee2ec4c..a192fcdb 100644 --- a/rally/plugins/openstack/scenarios/mistral/utils.py +++ b/rally/plugins/openstack/scenarios/mistral/utils.py @@ -21,16 +21,8 @@ from rally.plugins.openstack import scenario from rally.task import atomic from rally.task import utils -MISTRAL_BENCHMARK_OPTS = [ - cfg.IntOpt( - "mistral_execution_timeout", - default=200, - help="mistral execution timeout") -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(MISTRAL_BENCHMARK_OPTS, group=benchmark_group) class MistralScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/monasca/utils.py b/rally/plugins/openstack/scenarios/monasca/utils.py index 6d787c8b..6d5e1930 100644 --- a/rally/plugins/openstack/scenarios/monasca/utils.py +++ b/rally/plugins/openstack/scenarios/monasca/utils.py @@ -22,17 +22,7 @@ from rally.plugins.openstack import scenario from rally.task import atomic -MONASCA_BENCHMARK_OPTS = [ - cfg.FloatOpt( - "monasca_metric_create_prepoll_delay", - default=15.0, - help="Delay between creating Monasca metrics and polling for " - "its elements.") -] - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(MONASCA_BENCHMARK_OPTS, group=benchmark_group) class MonascaScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/murano/utils.py b/rally/plugins/openstack/scenarios/murano/utils.py index d662ca8f..814c8378 100644 --- a/rally/plugins/openstack/scenarios/murano/utils.py +++ b/rally/plugins/openstack/scenarios/murano/utils.py @@ -28,20 +28,9 @@ from rally.plugins.openstack import scenario from rally.task import atomic from rally.task import utils + CONF = cfg.CONF -MURANO_BENCHMARK_OPTS = [ - cfg.IntOpt("murano_deploy_environment_timeout", default=1200, - deprecated_name="deploy_environment_timeout", - help="A timeout in seconds for an environment deploy"), - cfg.IntOpt("murano_deploy_environment_check_interval", default=5, - deprecated_name="deploy_environment_check_interval", - help="Deploy environment check interval in seconds"), -] - -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(MURANO_BENCHMARK_OPTS, group=benchmark_group) - class MuranoScenario(scenario.OpenStackScenario): """Base class for Murano scenarios with basic atomic actions.""" diff --git a/rally/plugins/openstack/scenarios/neutron/utils.py b/rally/plugins/openstack/scenarios/neutron/utils.py index c3f1d8df..dbd57401 100755 --- a/rally/plugins/openstack/scenarios/neutron/utils.py +++ b/rally/plugins/openstack/scenarios/neutron/utils.py @@ -25,22 +25,9 @@ from rally.plugins.openstack.wrappers import network as network_wrapper from rally.task import atomic from rally.task import utils -NEUTRON_BENCHMARK_OPTS = [ - cfg.FloatOpt( - "neutron_create_loadbalancer_timeout", - default=float(500), - help="Neutron create loadbalancer timeout"), - cfg.FloatOpt( - "neutron_create_loadbalancer_poll_interval", - default=float(2), - help="Neutron create loadbalancer poll interval") -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", - title="benchmark options") -CONF.register_group(benchmark_group) -CONF.register_opts(NEUTRON_BENCHMARK_OPTS, group=benchmark_group) + LOG = logging.getLogger(__name__) diff --git a/rally/plugins/openstack/scenarios/nova/utils.py b/rally/plugins/openstack/scenarios/nova/utils.py index 9bf58752..d51ce442 100644 --- a/rally/plugins/openstack/scenarios/nova/utils.py +++ b/rally/plugins/openstack/scenarios/nova/utils.py @@ -25,67 +25,7 @@ from rally.plugins.openstack.wrappers import network as network_wrapper from rally.task import atomic from rally.task import utils -NOVA_BENCHMARK_OPTS = [] -option_names_and_defaults = [ - # action, prepoll delay, timeout, poll interval - ("start", 0, 300, 1), - ("stop", 0, 300, 2), - ("boot", 1, 300, 1), - ("delete", 2, 300, 2), - ("reboot", 2, 300, 2), - ("rebuild", 1, 300, 1), - ("rescue", 2, 300, 2), - ("unrescue", 2, 300, 2), - ("suspend", 2, 300, 2), - ("resume", 2, 300, 2), - ("pause", 2, 300, 2), - ("unpause", 2, 300, 2), - ("shelve", 2, 300, 2), - ("unshelve", 2, 300, 2), - ("image_create", 0, 300, 2), - ("image_delete", 0, 300, 2), - ("resize", 2, 400, 5), - ("resize_confirm", 0, 200, 2), - ("resize_revert", 0, 200, 2), - ("live_migrate", 1, 400, 2), - ("migrate", 1, 400, 2), -] - -for action, prepoll, timeout, poll in option_names_and_defaults: - NOVA_BENCHMARK_OPTS.extend([ - cfg.FloatOpt( - "nova_server_%s_prepoll_delay" % action, - default=float(prepoll), - help="Time to sleep after %s before polling for status" % action - ), - cfg.FloatOpt( - "nova_server_%s_timeout" % action, - default=float(timeout), - help="Server %s timeout" % action - ), - cfg.FloatOpt( - "nova_server_%s_poll_interval" % action, - default=float(poll), - help="Server %s poll interval" % action - ) - ]) - -NOVA_BENCHMARK_OPTS.extend([ - cfg.FloatOpt( - "nova_detach_volume_timeout", - default=float(200), - help="Nova volume detach timeout"), - cfg.FloatOpt( - "nova_detach_volume_poll_interval", - default=float(2), - help="Nova volume detach poll interval") -]) - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", - title="benchmark options") -CONF.register_group(benchmark_group) -CONF.register_opts(NOVA_BENCHMARK_OPTS, group=benchmark_group) class NovaScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/sahara/utils.py b/rally/plugins/openstack/scenarios/sahara/utils.py index 2e86a920..8957bac2 100644 --- a/rally/plugins/openstack/scenarios/sahara/utils.py +++ b/rally/plugins/openstack/scenarios/sahara/utils.py @@ -29,32 +29,10 @@ from rally.plugins.openstack.scenarios.sahara import consts as sahara_consts from rally.task import atomic from rally.task import utils + LOG = logging.getLogger(__name__) CONF = cfg.CONF -SAHARA_BENCHMARK_OPTS = [ - cfg.IntOpt("sahara_cluster_create_timeout", default=1800, - deprecated_name="cluster_create_timeout", - help="A timeout in seconds for a cluster create operation"), - cfg.IntOpt("sahara_cluster_delete_timeout", default=900, - deprecated_name="cluster_delete_timeout", - help="A timeout in seconds for a cluster delete operation"), - cfg.IntOpt("sahara_cluster_check_interval", default=5, - deprecated_name="cluster_check_interval", - help="Cluster status polling interval in seconds"), - cfg.IntOpt("sahara_job_execution_timeout", default=600, - deprecated_name="job_execution_timeout", - help="A timeout in seconds for a Job Execution to complete"), - cfg.IntOpt("sahara_job_check_interval", default=5, - deprecated_name="job_check_interval", - help="Job Execution status polling interval in seconds"), - cfg.IntOpt("sahara_workers_per_proxy", default=20, - help="Amount of workers one proxy should serve to.") -] - -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(SAHARA_BENCHMARK_OPTS, group=benchmark_group) - class SaharaScenario(scenario.OpenStackScenario): """Base class for Sahara scenarios with basic atomic actions.""" diff --git a/rally/plugins/openstack/scenarios/senlin/utils.py b/rally/plugins/openstack/scenarios/senlin/utils.py index 0bcbca61..b1c2a039 100644 --- a/rally/plugins/openstack/scenarios/senlin/utils.py +++ b/rally/plugins/openstack/scenarios/senlin/utils.py @@ -17,15 +17,8 @@ from rally.plugins.openstack import scenario from rally.task import atomic from rally.task import utils -SENLIN_BENCHMARK_OPTS = [ - cfg.FloatOpt("senlin_action_timeout", - default=3600, - help="Time in seconds to wait for senlin action to finish."), -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(SENLIN_BENCHMARK_OPTS, group=benchmark_group) class SenlinScenario(scenario.OpenStackScenario): diff --git a/rally/plugins/openstack/scenarios/vm/utils.py b/rally/plugins/openstack/scenarios/vm/utils.py index e9362972..135ef0c1 100644 --- a/rally/plugins/openstack/scenarios/vm/utils.py +++ b/rally/plugins/openstack/scenarios/vm/utils.py @@ -32,16 +32,8 @@ from rally.task import utils LOG = logging.getLogger(__name__) -VM_BENCHMARK_OPTS = [ - cfg.FloatOpt("vm_ping_poll_interval", default=1.0, - help="Interval between checks when waiting for a VM to " - "become pingable"), - cfg.FloatOpt("vm_ping_timeout", default=120.0, - help="Time to wait for a VM to become pingable")] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(VM_BENCHMARK_OPTS, group=benchmark_group) class Host(object): diff --git a/rally/plugins/openstack/scenarios/watcher/utils.py b/rally/plugins/openstack/scenarios/watcher/utils.py index a36c0320..d8e3fe6c 100644 --- a/rally/plugins/openstack/scenarios/watcher/utils.py +++ b/rally/plugins/openstack/scenarios/watcher/utils.py @@ -16,20 +16,10 @@ from rally.plugins.openstack import scenario from rally.task import atomic from rally.task import utils + CONF = cfg.CONF -WATCHER_BENCHMARK_OPTS = [ - cfg.FloatOpt("watcher_audit_launch_poll_interval", default=2.0, - help="Watcher audit launch interval"), - cfg.IntOpt("watcher_audit_launch_timeout", default=300, - help="Watcher audit launch timeout") -] - -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(WATCHER_BENCHMARK_OPTS, group=benchmark_group) - - class WatcherScenario(scenario.OpenStackScenario): """Base class for Watcher scenarios with basic atomic actions.""" diff --git a/rally/plugins/openstack/services/image/image.py b/rally/plugins/openstack/services/image/image.py index b958cbd2..002cea67 100644 --- a/rally/plugins/openstack/services/image/image.py +++ b/rally/plugins/openstack/services/image/image.py @@ -17,20 +17,7 @@ from rally.plugins.openstack import service from oslo_config import cfg -GLANCE_BENCHMARK_OPTS = [ - cfg.FloatOpt("glance_image_create_prepoll_delay", - default=2.0, - help="Time to sleep after creating a resource before " - "polling for it status"), - cfg.FloatOpt("glance_image_create_poll_interval", - default=1.0, - help="Interval between checks when waiting for image " - "creation.") -] - CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(GLANCE_BENCHMARK_OPTS, group=benchmark_group) UnifiedImage = collections.namedtuple("Image", ["id", "name", "visibility", "status"]) diff --git a/rally/plugins/openstack/services/storage/block.py b/rally/plugins/openstack/services/storage/block.py index c421b5ee..04503d0f 100644 --- a/rally/plugins/openstack/services/storage/block.py +++ b/rally/plugins/openstack/services/storage/block.py @@ -18,30 +18,9 @@ from oslo_config import cfg from rally.plugins.openstack import service -CINDER_BENCHMARK_OPTS = [ - cfg.FloatOpt("cinder_volume_create_prepoll_delay", - default=2.0, - help="Time to sleep after creating a resource before" - " polling for it status"), - cfg.FloatOpt("cinder_volume_create_timeout", - default=600.0, - help="Time to wait for cinder volume to be created."), - cfg.FloatOpt("cinder_volume_create_poll_interval", - default=2.0, - help="Interval between checks when waiting for volume" - " creation."), - cfg.FloatOpt("cinder_volume_delete_timeout", - default=600.0, - help="Time to wait for cinder volume to be deleted."), - cfg.FloatOpt("cinder_volume_delete_poll_interval", - default=2.0, - help="Interval between checks when waiting for volume" - " deletion.") -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(CINDER_BENCHMARK_OPTS, group=benchmark_group) + Volume = collections.namedtuple("Volume", ["id", "name", "size", "status"]) VolumeSnapshot = collections.namedtuple("VolumeSnapshot", ["id", "name", diff --git a/rally/plugins/openstack/verification/tempest/config.py b/rally/plugins/openstack/verification/tempest/config.py index 24f15ccd..f4521491 100644 --- a/rally/plugins/openstack/verification/tempest/config.py +++ b/rally/plugins/openstack/verification/tempest/config.py @@ -24,61 +24,7 @@ from six.moves.urllib import parse from rally.verification import utils -TEMPEST_OPTS = [ - cfg.StrOpt("img_url", - default="http://download.cirros-cloud.net/" - "0.3.5/cirros-0.3.5-x86_64-disk.img", - help="image URL"), - cfg.StrOpt("img_disk_format", - default="qcow2", - help="Image disk format to use when creating the image"), - cfg.StrOpt("img_container_format", - default="bare", - help="Image container format to use when creating the image"), - cfg.StrOpt("img_name_regex", - default="^.*(cirros|testvm).*$", - help="Regular expression for name of a public image to " - "discover it in the cloud and use it for the tests. " - "Note that when Rally is searching for the image, case " - "insensitive matching is performed. Specify nothing " - "('img_name_regex =') if you want to disable discovering. " - "In this case Rally will create needed resources by " - "itself if the values for the corresponding config " - "options are not specified in the Tempest config file"), - cfg.StrOpt("swift_operator_role", - default="Member", - help="Role required for users " - "to be able to create Swift containers"), - cfg.StrOpt("swift_reseller_admin_role", - default="ResellerAdmin", - help="User role that has reseller admin"), - cfg.StrOpt("heat_stack_owner_role", - default="heat_stack_owner", - help="Role required for users " - "to be able to manage Heat stacks"), - cfg.StrOpt("heat_stack_user_role", - default="heat_stack_user", - help="Role for Heat template-defined users"), - cfg.IntOpt("flavor_ref_ram", - default="64", - help="Primary flavor RAM size used by most of the test cases"), - cfg.IntOpt("flavor_ref_alt_ram", - default="128", - help="Alternate reference flavor RAM size used by test that" - "need two flavors, like those that resize an instance"), - cfg.IntOpt("heat_instance_type_ram", - default="64", - help="RAM size flavor used for orchestration test cases") -] - CONF = cfg.CONF -CONF.register_opts(TEMPEST_OPTS, "tempest") -CONF.import_opt("glance_image_delete_timeout", - "rally.plugins.openstack.scenarios.glance.utils", - "benchmark") -CONF.import_opt("glance_image_delete_poll_interval", - "rally.plugins.openstack.scenarios.glance.utils", - "benchmark") class TempestConfigfileManager(object): diff --git a/rally/plugins/openstack/wrappers/glance.py b/rally/plugins/openstack/wrappers/glance.py index 86726877..aac7a776 100644 --- a/rally/plugins/openstack/wrappers/glance.py +++ b/rally/plugins/openstack/wrappers/glance.py @@ -29,23 +29,8 @@ import six LOG = logging.getLogger(__name__) -GLANCE_BENCHMARK_OPTS = [ - cfg.FloatOpt("glance_image_create_prepoll_delay", - default=2.0, - help="Time to sleep after creating a resource before " - "polling for it status"), - cfg.FloatOpt("glance_image_create_timeout", - default=120.0, - help="Time to wait for glance image to be created."), - cfg.FloatOpt("glance_image_create_poll_interval", - default=1.0, - help="Interval between checks when waiting for image " - "creation.") -] CONF = cfg.CONF -benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options") -CONF.register_opts(GLANCE_BENCHMARK_OPTS, group=benchmark_group) @six.add_metaclass(abc.ABCMeta) diff --git a/tests/hacking/README.rst b/tests/hacking/README.rst index a5cf1ecc..0b2ed91f 100644 --- a/tests/hacking/README.rst +++ b/tests/hacking/README.rst @@ -25,6 +25,7 @@ Rally Specific Commandments * [N325] - Ensure that ``assertNotEqual(A, None)`` and ``assertNotEqual(None, A)`` are not used * [N340] - Ensure that we are importing always ``from rally import objects`` * [N341] - Ensure that we are importing oslo_xyz packages instead of deprecated oslo.xyz ones +* [N342] - Ensure that we load opts from correct paths only * [N350] - Ensure that single quotes are not used * [N351] - Ensure that data structs (i.e Lists and Dicts) are declared literally rather than using constructors * [N352] - Ensure that string formatting only uses a mapping if multiple mapping keys are used. diff --git a/tests/hacking/checks.py b/tests/hacking/checks.py index e454768d..0db7bdf2 100644 --- a/tests/hacking/checks.py +++ b/tests/hacking/checks.py @@ -562,6 +562,25 @@ def check_log_warn(logical_line, physical_line, filename): yield(0, "N313 LOG.warn is deprecated, please use LOG.warning") +@skip_ignored_lines +def check_opts_import_path(logical_line, physical_line, filename): + """Ensure that we load opts from correct paths only + + N342 + """ + excluded_files = ["./rally/osclients.py", + "./rally/task/engine.py", + "./rally/common/opts.py"] + forbidden_methods = [".register_opts("] + + if filename not in excluded_files: + for forbidden_method in forbidden_methods: + if logical_line.find(forbidden_method) != -1: + yield (0, "N342 All options should be loaded from correct " + "paths only. For 'openstack' " + "its './rally/plugin/openstack/cfg'") + + def factory(register): register(check_assert_methods_from_mock) register(check_import_of_logging) @@ -585,3 +604,4 @@ def factory(register): register(check_old_type_class) register(check_no_six_iteritems) register(check_log_warn) + register(check_opts_import_path)