Replace deprecated LOG.warn with LOG.warning

LOG.warn is deprecated. It is still used in few modules.
Replaced with non-deprecated LOG.warning.

Change-Id: I20ae299b9b1cb07ba8ab74eb2c36a4884dc771e1
Closes-Bug: #1508442
This commit is contained in:
yatin karel 2016-07-16 17:19:01 +05:30 committed by yatin
parent 218fb2de54
commit d24b02d4b5
2 changed files with 4 additions and 4 deletions

View File

@ -136,7 +136,7 @@ class OpenStack_Driver(abstract_vim_driver.VimAbstractDriver):
try:
regions_list = self._find_regions(ks_client)
except exceptions.Unauthorized as e:
LOG.warn(_("Authorization failed for user"))
LOG.warning(_("Authorization failed for user"))
raise nfvo.VimUnauthorizedException(message=e.message)
vim_obj['placement_attr'] = {'regions': regions_list}
return vim_obj
@ -173,7 +173,7 @@ class OpenStack_Driver(abstract_vim_driver.VimAbstractDriver):
os.remove(key_file)
LOG.debug(_('VIM key deleted successfully for vim %s'), vim_id)
except OSError:
LOG.warn(_('VIM key deletion unsuccessful for vim %s'), vim_id)
LOG.warning(_('VIM key deletion unsuccessful for vim %s'), vim_id)
@log.log
def encode_vim_auth(self, vim_id, auth):

View File

@ -93,7 +93,7 @@ class VimClient(object):
vim_key = self._find_vim_key(vim_id)
f = Fernet(vim_key)
if not f:
LOG.warn(_('Unable to decode VIM auth'))
LOG.warning(_('Unable to decode VIM auth'))
raise nfvo.VimNotFoundException('Unable to decode VIM auth key')
return f.decrypt(cred)
@ -103,4 +103,4 @@ class VimClient(object):
LOG.debug(_('Attempting to open key file for vim id %s'), vim_id)
with open(key_file, 'r') as f:
return f.read()
LOG.warn(_('VIM id invalid or key not found for %s'), vim_id)
LOG.warning(_('VIM id invalid or key not found for %s'), vim_id)