Code review comment for lp://staging/~rackspace-titan/nova/osapi-servers-cleanup-p1

Revision history for this message
Brian Lamar (blamar) wrote :

request.context > request.environ["nova.context"] everywhere because hard-coded strings are bad. I'd rather write the hard-coded string in one place rather than in 1000 places.

request.reservation_id is the same things, even if it's only used in a small number of places, hard-coding a string like that is just something I try to stay away from. What happens when we need to validate it? Do we put validation code everywhere it's used?

I made reservation_id in the Request object to pave the way for putting 'limit', 'offset', and 'marker' in the Request object as well. It allows for centralization of validation logic for request parameters.

> Also, you changed single quotes to double quotes.

I don't care one way or the other. If I ruled the world I would make everything double quotes, but I don't want to hold up code for quotation marks so I'll just change them all back.

« Back to merge proposal