From 4afec3a1e362c07e92889e6974a558af49a733f3 Mon Sep 17 00:00:00 2001 From: yuyafei Date: Thu, 14 Jul 2016 15:19:18 +0800 Subject: [PATCH] Replace deprecated LOG.warn with warning LOG.warn is deprecated. It still used in a few places. This updates those one to use the non-deprecated LOG.warning instead. Change-Id: Idb0f7ac1f8788ed0a119fb34b56f8ead32e2b85f Partial-Bug:#1508442 --- rally/plugins/openstack/scenarios/nova/flavors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rally/plugins/openstack/scenarios/nova/flavors.py b/rally/plugins/openstack/scenarios/nova/flavors.py index 13d29ed5a2..83f36eb2a6 100644 --- a/rally/plugins/openstack/scenarios/nova/flavors.py +++ b/rally/plugins/openstack/scenarios/nova/flavors.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +from rally.common.i18n import _LW from rally.common import logging from rally import consts from rally.plugins.openstack import scenario @@ -54,8 +55,8 @@ class NovaFlavors(utils.NovaScenario): # NOTE(pirsriva): access rules can be listed # only for non-public flavors if kwargs.get("is_public", False): - LOG.warn("is_public cannot be set to True for listing flavor " - "access rules. Setting is_public to False") + LOG.warning(_LW("is_public cannot be set to True for listing " + "flavor access rules. Setting is_public to False")) kwargs["is_public"] = False flavor = self._create_flavor(ram, vcpus, disk, **kwargs) self._list_flavor_access(flavor.id)