From 599990844c2388cb808de81e80d0c447a5a62c1b Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Mon, 17 Apr 2017 16:51:02 +0800 Subject: [PATCH] Remove usage of parameter enforce_type Oslo.config deprecated parameter enforce_type and change its default value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0. Nova peridic py35 job failure due to the DeprecationWarning: "Using the 'enforce_type' argument is deprecated in version '4.0' and will be removed in version '5.0': The argument enforce_type has changed its default value to True and then will be removed completely."[1] So need clean up usage of enforce_type. Note this patch also change enforce_type from False to default value True in test__get_node_console_with_reset_wait_timeout. We should test as runtime, we can use float type to test when config option serial_console_state_timeout is float. [1] http://logs.openstack.org/periodic/periodic-nova-py35-with-oslo-master/6eeea0f/testr_results.html.gz Related--Bug: #1517839 Change-Id: I94915a5c6abbbb739c597025272dc0e25d3ba2ec --- nova/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/test.py b/nova/test.py index 7e27ec212..ab027fb51 100644 --- a/nova/test.py +++ b/nova/test.py @@ -348,7 +348,7 @@ class TestCase(testtools.TestCase): """Override flag variables for a test.""" group = kw.pop('group', None) for k, v in kw.items(): - CONF.set_override(k, v, group, enforce_type=True) + CONF.set_override(k, v, group) def start_service(self, name, host=None, **kwargs): if name == 'compute' and self.USES_DB: