[Openstack] HTTP status value naming normalization

Victor Rodionov vito.ordaz at gmail.com
Fri Apr 20 19:14:36 UTC 2012


There are many place in Swift code where used hard coded values, such
as response statuses (200, 201, 404, ...) which can replaced with
constants HTTP_OK, HTTP_CREATED, HTTP_NOT_FOUND. Also there is widlly
used idiom 200 <= status < 300, that can be replaced as well with
something like this is_success(status). I want add modules for
defining all required constants (Swift, HTTP).

So I think this changes will improve Swift code readability.

PS: this is an initial changes in github
https://github.com/vitoordaz/swift/commit/7163d5df13ceaf8fc7b53ba812fe16bd7dd31131




More information about the Openstack mailing list