Convert scenario tests to use global CONF object
This commit takes all the uses of config in the scenario tests and
converts them to use the global CONF object.
Partially implements bp config-cleanup
Change-Id: I1bac686587f1705901b653b07300077623ba9f21
diff --git a/tempest/scenario/test_snapshot_pattern.py b/tempest/scenario/test_snapshot_pattern.py
index 5ff8642..2bb3d84 100644
--- a/tempest/scenario/test_snapshot_pattern.py
+++ b/tempest/scenario/test_snapshot_pattern.py
@@ -13,10 +13,12 @@
# License for the specific language governing permissions and limitations
# under the License.
+from tempest import config
from tempest.openstack.common import log
from tempest.scenario import manager
from tempest.test import services
+CONF = config.CONF
LOG = log.getLogger(__name__)
@@ -74,8 +76,8 @@
self._create_loginable_secgroup_rule_nova()
# boot a instance and create a timestamp file in it
- server = self._boot_image(self.config.compute.image_ref)
- if self.config.compute.use_floatingip_for_ssh:
+ server = self._boot_image(CONF.compute.image_ref)
+ if CONF.compute.use_floatingip_for_ssh:
fip_for_server = self._create_floating_ip()
self._set_floating_ip_to_server(server, fip_for_server)
self._write_timestamp(fip_for_server.ip)
@@ -89,7 +91,7 @@
server_from_snapshot = self._boot_image(snapshot_image.id)
# check the existence of the timestamp file in the second instance
- if self.config.compute.use_floatingip_for_ssh:
+ if CONF.compute.use_floatingip_for_ssh:
fip_for_snapshot = self._create_floating_ip()
self._set_floating_ip_to_server(server_from_snapshot,
fip_for_snapshot)