Modified message of exception and log
Metadata tag names are case insensitive, that confuses the user. So we added additional information about metadata tag duplication to clarify the point. Change-Id: Ib58a9d0b9cc95a831981de0cc19456f0c6713dbb Closes-Bug: #1535231
This commit is contained in:
parent
c4918f5636
commit
385ffab06f
|
@ -397,7 +397,9 @@ class MetadefDuplicateResourceTypeAssociation(Duplicate):
|
|||
|
||||
class MetadefDuplicateTag(Duplicate):
|
||||
message = _("A metadata tag with name=%(name)s"
|
||||
" already exists in namespace=%(namespace_name)s.")
|
||||
" already exists in namespace=%(namespace_name)s."
|
||||
" (Please note that metadata tag names are"
|
||||
" case insensitive).")
|
||||
|
||||
|
||||
class MetadefForbidden(Forbidden):
|
||||
|
|
|
@ -100,7 +100,9 @@ def create(context, namespace_name, values, session):
|
|||
metadef_tag.save(session=session)
|
||||
except db_exc.DBDuplicateEntry:
|
||||
LOG.debug("A metadata tag name=%(name)s"
|
||||
" in namespace=%(namespace_name)s already exists.",
|
||||
" already exists in namespace=%(namespace_name)s."
|
||||
" (Please note that metadata tag names are"
|
||||
" case insensitive).",
|
||||
{'name': metadef_tag.name,
|
||||
'namespace_name': namespace_name})
|
||||
raise exc.MetadefDuplicateTag(
|
||||
|
|
Loading…
Reference in New Issue