From 9f1725b2df4c2b5c3dd0ca765fdc3180db0c6ce6 Mon Sep 17 00:00:00 2001 From: Arata Notsu Date: Tue, 10 May 2016 01:27:27 +0900 Subject: [PATCH] Add import_opt for CONF.benchmark.glance_image_delete_* As of I83b46e223e85306b0e54f1d19cbbc7f21489e759, glance_image_delete_timeout and glance_image_delete_poll_interval have been moved from rally.plugins.openstack.wrappers.glance to rally.plugins.openstack.scenarios.glance.utils. So, if a module using the options doesn't import the glance.utils module, we should add import_opt for the options. Otherwise NoSuchOptError might be raised when the options are being used. Closes-Bug: 1579855 Change-Id: Ia05be0997680e2c91dc5d19bc6e36d70c6b07690 --- rally/plugins/openstack/cleanup/resources.py | 6 ++++++ rally/plugins/openstack/context/glance/images.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/rally/plugins/openstack/cleanup/resources.py b/rally/plugins/openstack/cleanup/resources.py index e02a3cd8..c17553ca 100644 --- a/rally/plugins/openstack/cleanup/resources.py +++ b/rally/plugins/openstack/cleanup/resources.py @@ -30,6 +30,12 @@ from rally.plugins.openstack.wrappers import keystone as keystone_wrapper from rally.task import utils as task_utils CONF = cfg.CONF +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") LOG = logging.getLogger(__name__) diff --git a/rally/plugins/openstack/context/glance/images.py b/rally/plugins/openstack/context/glance/images.py index 7731c79a..e4eb25b1 100644 --- a/rally/plugins/openstack/context/glance/images.py +++ b/rally/plugins/openstack/context/glance/images.py @@ -24,6 +24,12 @@ from rally.task import context from rally.task import utils CONF = cfg.CONF +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") LOG = logging.getLogger(__name__)