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