glance/glance/api/v2
Dinesh Bhor 2562da28c6 Fix 500 if user passes name with more than 80 characters
Following apis are returning 500 error if user passes name with more
than 80 characters:
* md-tag-create
* md-tag-update
* md-object-create
* md-object-update
* md-property-create
* md-property-update

This happens because there is a discrepancy in db column length and
glance-api length check in schema validation. In database the 'name'
field for these API's is defined as of maximum 80 characters and in
schema it is defined as of maximum 255 characters. So if user passes
name with more than 80 characters and less than 255 characters
database fails to store that value and shouts with following error
which leads to 500 error to API user:

(pymysql.err.DataError) (1406, u"Data too long for column 'name' at
row 1")

Fixed this issue by changing the maximum allowed length for 'name'
from 255 to 80 in schema validation.

APIImpact
DocImpact
Closes-Bug: #1719252
Change-Id: I4ae67457c3e4f5a6bfc3c1db2d305a9b7587395f
2017-10-05 10:24:22 +05:30
..
model Merge "Add operators to provide multivalue support" 2015-03-11 06:57:54 +00:00
__init__.py Empty files shouldn't contain copyright nor license 2013-12-24 22:39:05 -06:00
discovery.py Return 404 for import-info call 2017-08-18 01:17:32 -04:00
image_actions.py Extracted HTTP response codes to constants 2016-10-06 15:15:20 +00:00
image_data.py Fix 500 error from image-stage call 2017-08-15 19:17:09 -04:00
image_members.py do not declare code blocks as json when they do not parse 2017-06-21 14:15:58 -04:00
image_tags.py Extracted HTTP response codes to constants 2016-10-06 15:15:20 +00:00
images.py Fix api_image_import tasks stuck in 'pending' 2017-08-23 14:12:43 -04:00
metadef_namespaces.py Fix 500 if user passes name with more than 80 characters 2017-10-05 10:24:22 +05:30
metadef_objects.py Fix 500 if user passes name with more than 80 characters 2017-10-05 10:24:22 +05:30
metadef_properties.py Extracted HTTP response codes to constants 2016-10-06 15:15:20 +00:00
metadef_resource_types.py Extracted HTTP response codes to constants 2016-10-06 15:15:20 +00:00
metadef_tags.py Fix 500 if user passes name with more than 80 characters 2017-10-05 10:24:22 +05:30
router.py Fix typo in discovery API router 2017-07-26 13:02:37 +01:00
schemas.py Don't use slashes for long lines - use parentheses instead 2015-08-16 07:21:13 +00:00
tasks.py Add 'tasks_api_access' policy 2017-08-18 00:46:34 -04:00