Browse Source

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
tags/0.5.0
yuyafei 3 years ago
parent
commit
4afec3a1e3
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      rally/plugins/openstack/scenarios/nova/flavors.py

+ 3
- 2
rally/plugins/openstack/scenarios/nova/flavors.py View File

@@ -13,6 +13,7 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
+from rally.common.i18n import _LW
16 17
 from rally.common import logging
17 18
 from rally import consts
18 19
 from rally.plugins.openstack import scenario
@@ -54,8 +55,8 @@ class NovaFlavors(utils.NovaScenario):
54 55
         # NOTE(pirsriva): access rules can be listed
55 56
         # only for non-public flavors
56 57
         if kwargs.get("is_public", False):
57
-            LOG.warn("is_public cannot be set to True for listing flavor "
58
-                     "access rules. Setting is_public to False")
58
+            LOG.warning(_LW("is_public cannot be set to True for listing "
59
+                            "flavor access rules. Setting is_public to False"))
59 60
         kwargs["is_public"] = False
60 61
         flavor = self._create_flavor(ram, vcpus, disk, **kwargs)
61 62
         self._list_flavor_access(flavor.id)

Loading…
Cancel
Save