Browse Source

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
tags/0.4.0
yatin karel 3 years ago
parent
commit
d24b02d4b5
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      tacker/nfvo/drivers/vim/openstack_driver.py
  2. 2
    2
      tacker/vm/vim_client.py

+ 2
- 2
tacker/nfvo/drivers/vim/openstack_driver.py View File

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

+ 2
- 2
tacker/vm/vim_client.py View File

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

Loading…
Cancel
Save