Add in missing log hints
Add in missing log hints for warnings TrivialFix Change-Id: I70888f9e59744acace08d4ec7afd3eb297d27b95
This commit is contained in:
parent
8932a71651
commit
b54d3d17ef
|
@ -21,7 +21,7 @@ import webob.exc
|
|||
from glance.api import policy
|
||||
from glance.common import wsgi
|
||||
import glance.context
|
||||
from glance.i18n import _
|
||||
from glance.i18n import _, _LW
|
||||
|
||||
|
||||
context_opts = [
|
||||
|
@ -52,7 +52,7 @@ class BaseContextMiddleware(wsgi.Middleware):
|
|||
try:
|
||||
request_id = resp.request.context.request_id
|
||||
except AttributeError:
|
||||
LOG.warn(_('Unable to retrieve request id from context'))
|
||||
LOG.warn(_LW('Unable to retrieve request id from context'))
|
||||
else:
|
||||
# For python 3 compatibility need to use bytes type
|
||||
prefix = b'req-' if isinstance(request_id, bytes) else 'req-'
|
||||
|
|
|
@ -243,11 +243,11 @@ class OVAImageExtractor(object):
|
|||
self.interested_properties = properties.get(
|
||||
'cim_pasd', [])
|
||||
if not self.interested_properties:
|
||||
LOG.warn(_('OVF metadata of interest was not specified '
|
||||
'in ovf-metadata.json config file. Please set '
|
||||
'"cim_pasd" to a list of interested '
|
||||
'CIM_ProcessorAllocationSettingData '
|
||||
'properties.'))
|
||||
LOG.warn(_LW('OVF metadata of interest was not specified '
|
||||
'in ovf-metadata.json config file. Please '
|
||||
'set "cim_pasd" to a list of interested '
|
||||
'CIM_ProcessorAllocationSettingData '
|
||||
'properties.'))
|
||||
else:
|
||||
LOG.warn(_('OVF properties config file "ovf-metadata.json" was '
|
||||
'not found.'))
|
||||
|
|
|
@ -21,7 +21,7 @@ from six.moves import configparser
|
|||
|
||||
import glance.api.policy
|
||||
from glance.common import exception
|
||||
from glance.i18n import _, _LE
|
||||
from glance.i18n import _, _LE, _LW
|
||||
|
||||
CONFIG = configparser.SafeConfigParser()
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -125,9 +125,9 @@ class PropertyRules(object):
|
|||
else:
|
||||
property_dict[operation] = []
|
||||
LOG.warn(
|
||||
_('Property protection on operation %(operation)s'
|
||||
' for rule %(rule)s is not found. No role will be'
|
||||
' allowed to perform this operation.') %
|
||||
_LW('Property protection on operation %(operation)s'
|
||||
' for rule %(rule)s is not found. No role will be'
|
||||
' allowed to perform this operation.') %
|
||||
{'operation': operation,
|
||||
'rule': property_exp})
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import six
|
|||
from webob import exc
|
||||
|
||||
from glance.common import exception
|
||||
from glance.i18n import _, _LE
|
||||
from glance.i18n import _, _LE, _LW
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -421,13 +421,14 @@ def validate_key_cert(key_file, cert_file):
|
|||
data = encodeutils.to_utf8(data)
|
||||
digest = CONF.digest_algorithm
|
||||
if digest == 'sha1':
|
||||
LOG.warn('The FIPS (FEDERAL INFORMATION PROCESSING STANDARDS)'
|
||||
' state that the SHA-1 is not suitable for'
|
||||
' general-purpose digital signature applications (as'
|
||||
' specified in FIPS 186-3) that require 112 bits of'
|
||||
' security. The default value is sha1 in Kilo for a'
|
||||
' smooth upgrade process, and it will be updated'
|
||||
' with sha256 in next release(L).')
|
||||
LOG.warn(
|
||||
_LW('The FIPS (FEDERAL INFORMATION PROCESSING STANDARDS)'
|
||||
' state that the SHA-1 is not suitable for'
|
||||
' general-purpose digital signature applications (as'
|
||||
' specified in FIPS 186-3) that require 112 bits of'
|
||||
' security. The default value is sha1 in Kilo for a'
|
||||
' smooth upgrade process, and it will be updated'
|
||||
' with sha256 in next release(L).'))
|
||||
out = crypto.sign(key, data, digest)
|
||||
crypto.verify(cert, out, data, digest)
|
||||
except crypto.Error as ce:
|
||||
|
|
|
@ -22,7 +22,7 @@ from oslo_utils import encodeutils
|
|||
from glance.common.glare import definitions
|
||||
from glance.common import utils
|
||||
from glance.glare.domain import proxy
|
||||
from glance.i18n import _, _LE, _LW
|
||||
from glance.i18n import _LE, _LW
|
||||
|
||||
CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -156,8 +156,8 @@ class ArtifactBlobProxy(proxy.ArtifactBlob):
|
|||
context=self.context)
|
||||
return data
|
||||
except Exception as e:
|
||||
LOG.warn(_('Get blob %(name)s data failed: '
|
||||
'%(err)s.')
|
||||
LOG.warn(_LW('Get blob %(name)s data failed: '
|
||||
'%(err)s.')
|
||||
% {'name': self.blob.item_key,
|
||||
'err': encodeutils.exception_to_unicode(e)})
|
||||
err = e
|
||||
|
|
|
@ -27,7 +27,7 @@ from glance.common import exception
|
|||
from glance.common import signature_utils
|
||||
from glance.common import utils
|
||||
import glance.domain.proxy
|
||||
from glance.i18n import _, _LE, _LI
|
||||
from glance.i18n import _, _LE, _LI, _LW
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
@ -462,8 +462,8 @@ class ImageProxy(glance.domain.proxy.Image):
|
|||
|
||||
return data
|
||||
except Exception as e:
|
||||
LOG.warn(_('Get image %(id)s data failed: '
|
||||
'%(err)s.')
|
||||
LOG.warn(_LW('Get image %(id)s data failed: '
|
||||
'%(err)s.')
|
||||
% {'id': self.image.image_id,
|
||||
'err': encodeutils.exception_to_unicode(e)})
|
||||
err = e
|
||||
|
|
Loading…
Reference in New Issue