Return HTTP 400 on list for invalid status

Raised 400 HTTPBadRequest if user passes invalid status to list
server API. Increased API microversion to v2.38 to maintain
backward compatibility.

Implements: blueprint response-for-invalid-status

Co-Authored-By: Ed Leafe <ed@leafe.com>

Change-Id: I25608280c2f30e70802e173c183de4e8da9a983b
This commit is contained in:
dineshbhor
2016-05-06 10:00:34 +00:00
committed by EdLeafe
parent 6a5e36f52c
commit 984d00919f
7 changed files with 45 additions and 3 deletions
+3 -1
View File
@@ -93,6 +93,8 @@ REST_API_VERSION_HISTORY = """REST API Version History:
* 2.37 - Adds support for auto-allocating networking, otherwise known as
"Get me a Network". Also enforces server.networks.uuid to be in
UUID format.
* 2.38 - Add a condition to return HTTPBadRequest if invalid status is
provided for listing servers.
"""
# The minimum and maximum versions of the API supported
@@ -101,7 +103,7 @@ REST_API_VERSION_HISTORY = """REST API Version History:
# Note(cyeoh): This only applies for the v2.1 API once microversions
# support is fully merged. It does not affect the V2 API.
_MIN_API_VERSION = "2.1"
_MAX_API_VERSION = "2.37"
_MAX_API_VERSION = "2.38"
DEFAULT_API_VERSION = _MIN_API_VERSION
# All the proxy APIs which related network, images and baremetal