yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60362
[Bug 1520159] Re: HTTP response codes should be extracted to constants
Reviewed: https://review.openstack.org/416542
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=4f4c42bd8d5e4dcfb2172f1b2d7bf2c78c606f45
Submitter: Jenkins
Branch: master
commit 4f4c42bd8d5e4dcfb2172f1b2d7bf2c78c606f45
Author: Dinesh Bhor <dinesh.bhor@xxxxxxxxxxx>
Date: Tue Jan 3 15:17:25 2017 +0530
Extracted HTTP response codes to constants
There are several places in the source code where HTTP response
codes are used as numeric values.
All of the used status codes are replaced with symbolic constants
from six.moves.http_client to improve code readibility.
Closes-Bug: #1520159
Change-Id: Ic5e439fb1f33962979536fe1ac5e5320e2c50c40
** Changed in: masakari
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1520159
Title:
HTTP response codes should be extracted to constants
Status in Cinder:
In Progress
Status in Glance:
Fix Released
Status in masakari:
Fix Released
Bug description:
There are several places in the source code where HTTP response codes
are used as numeric values. These values should be extracted to a
common file and the numeric values should be replaced by constants.
For example:
common/auth.py:186
elif resp.status == 404: --> elif resp.status == HTTP_NOT_FOUND;
api/middleware/cache.py:261
if method == 'GET' and status_code == 204: --> if method == 'GET' and status_code == HTTP_NO_CONTENT:
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1520159/+subscriptions
References