Return 400 Bad Request for extra capability keys longer than 64 chars
Length of extra capability keys is limited to 64 characters in the DB
schema. However, the host create API can create a host based on a
request that has a longer extra capability key, only to return a 500
Internal Server Error.
With this patch, the API checks the key length before creating a host
and returns a 400 Bad Request status code if it is too long.
Reviewed: https:/ /review. openstack. org/575699 /git.openstack. org/cgit/ openstack/ blazar/ commit/ ?id=580d4ae4705 20e6c72f34b1194 3dec475d0af8e9
Committed: https:/
Submitter: Zuul
Branch: master
commit 580d4ae470520e6 c72f34b11943dec 475d0af8e9
Author: Masahito Muroi <email address hidden>
Date: Fri Jun 15 18:12:21 2018 +0900
Return 400 Bad Request for extra capability keys longer than 64 chars
Length of extra capability keys is limited to 64 characters in the DB
schema. However, the host create API can create a host based on a
request that has a longer extra capability key, only to return a 500
Internal Server Error.
With this patch, the API checks the key length before creating a host
and returns a 400 Bad Request status code if it is too long.
Change-Id: I2cf4ede787e0f6 5385376832ce410 d694df094ff
Closes-Bug: #1709639