Merge "Reduce logging level of API validation messages."

This commit is contained in:
Jenkins 2016-07-12 06:04:06 +00:00 committed by Gerrit Code Review
commit 751af8c86c

View File

@ -169,17 +169,17 @@ def check_metadata_properties(metadata=None):
for k, v in metadata.items():
if len(k) == 0:
msg = _("Metadata property key blank.")
LOG.warning(msg)
LOG.debug(msg)
raise exception.InvalidVolumeMetadata(reason=msg)
if len(k) > 255:
msg = _("Metadata property key %s greater than 255 "
"characters.") % k
LOG.warning(msg)
LOG.debug(msg)
raise exception.InvalidVolumeMetadataSize(reason=msg)
if len(v) > 255:
msg = _("Metadata property key %s value greater than "
"255 characters.") % k
LOG.warning(msg)
LOG.debug(msg)
raise exception.InvalidVolumeMetadataSize(reason=msg)