From a9c38d2b8a3e5b3ceb96f2bab2049a0871fb24bd Mon Sep 17 00:00:00 2001 From: "Swapnil Kulkarni (coolsvap)" Date: Fri, 11 Mar 2016 12:51:04 +0530 Subject: [PATCH] Replace deprecated LOG.warn with LOG.warning LOG.warn is deprecated. It still used in a few places. Updated to non-deprecated LOG.warning. Change-Id: I151710c566cac93c502cedf61988613110a70e32 Closes-Bug:#1508442 --- aodh/evaluator/threshold.py | 4 ++-- aodh/keystone_client.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aodh/evaluator/threshold.py b/aodh/evaluator/threshold.py index 6e058ff26..885e23692 100644 --- a/aodh/evaluator/threshold.py +++ b/aodh/evaluator/threshold.py @@ -191,8 +191,8 @@ class ThresholdEvaluator(evaluator.Evaluator): return if state == evaluator.UNKNOWN and not unknown: - LOG.warn(_LW('Expecting %(expected)d datapoints but only get ' - '%(actual)d') % { + LOG.warning(_LW('Expecting %(expected)d datapoints but only get ' + '%(actual)d') % { 'expected': alarm.rule['evaluation_periods'], 'actual': len(statistics)}) # Reason is not same as log message because we want to keep diff --git a/aodh/keystone_client.py b/aodh/keystone_client.py index 2c36e415f..0d90684ad 100644 --- a/aodh/keystone_client.py +++ b/aodh/keystone_client.py @@ -115,10 +115,10 @@ def register_keystoneauth_opts(conf): def setup_keystoneauth(conf): if conf[CFG_GROUP].auth_type == "password-aodh-legacy": - LOG.warn("Value 'password-aodh-legacy' for '[%s]/auth_type' " - "is deprecated. And will be removed in Aodh 3.0. " - "Use 'password' instead.", - CFG_GROUP) + LOG.warning("Value 'password-aodh-legacy' for '[%s]/auth_type' " + "is deprecated. And will be removed in Aodh 3.0. " + "Use 'password' instead.", + CFG_GROUP) ka_loading.load_auth_from_conf_options(conf, CFG_GROUP)