)]}'
{"marconi/common/transport/utils.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"8c493fb1e093b11bdbe704c1fdcbba3e6145c9ac","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.exception(ex)"},{"line_number":40,"context_line":"        raise wsgi_errors.HTTPBadRequestBody("},{"line_number":41,"context_line":"            \u0027JSON could not be parsed.\u0027"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# TODO(cpp-cabrera): generalize this"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2BKw%3D","line":42,"updated":"2013-10-23 14:01:50.000000000","message":"Moved here to allow reuse between transport implementations.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.exception(ex)"},{"line_number":40,"context_line":"        raise wsgi_errors.HTTPBadRequestBody("},{"line_number":41,"context_line":"            \u0027JSON could not be parsed.\u0027"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# TODO(cpp-cabrera): generalize this"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9S4%3D","line":42,"in_reply_to":"AAAATX%2F%2F%2BKw%3D","updated":"2013-10-23 17:21:48.000000000","message":"Thing is, it is specific to the HTTP (WSGI) transport. Shouldn\u0027t it go under transport.wsgi, instead?","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"f0c7924ef023b2994089387a68701bf1bd660f28","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.exception(ex)"},{"line_number":40,"context_line":"        raise wsgi_errors.HTTPBadRequestBody("},{"line_number":41,"context_line":"            \u0027JSON could not be parsed.\u0027"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# TODO(cpp-cabrera): generalize this"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8rk%3D","line":42,"in_reply_to":"AAAATX%2F%2F9G0%3D","updated":"2013-10-23 19:57:28.000000000","message":"Done","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.exception(ex)"},{"line_number":40,"context_line":"        raise wsgi_errors.HTTPBadRequestBody("},{"line_number":41,"context_line":"            \u0027JSON could not be parsed.\u0027"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# TODO(cpp-cabrera): generalize this"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9G0%3D","line":42,"in_reply_to":"AAAATX%2F%2F9S4%3D","updated":"2013-10-23 18:11:39.000000000","message":"Good point. I\u0027ll move this to common/transport/wsgi/utils.","commit_id":"349b557a925ee097184b8f07a142308013edc311"}],"marconi/common/transport/wsgi/utils.py":[{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"2860b4b3de68e966fed766379560f4e241fd1a5d","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    except (json_utils.MalformedJSON, json_utils.OverflowedJSONInteger) as ex:"},{"line_number":39,"context_line":"        LOG.exception(ex)"},{"line_number":40,"context_line":"        raise wsgi_errors.HTTPBadRequestBody("},{"line_number":41,"context_line":"            \u0027JSON could not be parsed.\u0027"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATX%2F%2F8nQ%3D","line":41,"updated":"2013-10-23 20:05:11.000000000","message":"Those exceptions have predefined messages.","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"}],"marconi/proxy/transport/wsgi/partitions.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"e9633a5f734fc00de13eca42c9e410ad26b5e2d1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"import falcon"},{"line_number":32,"context_line":"import jsonschema"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"from marconi.common.transport import utils as utils"},{"line_number":35,"context_line":"from marconi.openstack.common import log"},{"line_number":36,"context_line":"from marconi.proxy.storage import exceptions"},{"line_number":37,"context_line":"from marconi.proxy.transport import schema"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fv7w%3D","line":34,"updated":"2013-10-10 11:35:19.000000000","message":"Hmm... this is redundant. I\u0027ll fix this up.","commit_id":"98b85db9972349f21cc49c50580044f9461b398b"}],"marconi/queues/storage/exceptions.py":[{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"2860b4b3de68e966fed766379560f4e241fd1a5d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"class ShardDoesNotExist(DoesNotExist):"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def __init__(self, shard):"},{"line_number":114,"context_line":"        msg \u003d u\u0027Shard {0} does not exists\u0027.format(shard)"},{"line_number":115,"context_line":"        super(ShardDoesNotExist, self).__init__(msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATX%2F%2F8mw%3D","line":114,"updated":"2013-10-23 20:05:11.000000000","message":"I guess Flavio is going to cry: \"use `%(var)`\"!  I like the new format of course :)","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2608b23a8f895a1c9c68ec00b1517baea6450ff7","unresolved":false,"context_lines":[{"line_number":111,"context_line":"class ShardDoesNotExist(DoesNotExist):"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def __init__(self, shard):"},{"line_number":114,"context_line":"        msg \u003d u\u0027Shard {0} does not exists\u0027.format(shard)"},{"line_number":115,"context_line":"        super(ShardDoesNotExist, self).__init__(msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2F95o%3D","line":114,"in_reply_to":"AAAATX%2F%2F8mw%3D","updated":"2013-10-24 14:34:28.000000000","message":"LOL, I\u0027m +1 for the new format, in this case I think {0} is fine because there\u0027s just 1 argument. In other cases we could use {var}...","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"}],"marconi/queues/transport/wsgi/shards.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"e9633a5f734fc00de13eca42c9e410ad26b5e2d1","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"},{"line_number":175,"context_line":"            self._ctrl.update(shard, **fields)"},{"line_number":176,"context_line":"        except exceptions.ShardDoesNotExist as ex:"},{"line_number":177,"context_line":"            LOG.exception(ex)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fv7U%3D","line":174,"updated":"2013-10-10 11:35:19.000000000","message":"In an upcoming patch, I\u0027ll replace this comprehension with a generalization I wrote in a child patch.","commit_id":"98b85db9972349f21cc49c50580044f9461b398b"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"ca56aaa27c9eac476d671cc28ce10051ae37222e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    :param partitions_controller: means to interact with storage"},{"line_number":54,"context_line":"    \"\"\""},{"line_number":55,"context_line":"    def __init__(self, partitions_controller):"},{"line_number":56,"context_line":"        self._ctrl \u003d partitions_controller"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def on_get(self, request, response):"},{"line_number":59,"context_line":"        \"\"\"Returns a partition listing as a JSON object:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2Fvr8%3D","line":56,"updated":"2013-10-10 12:17:40.000000000","message":"Cruft alert: partitions -\u003e shards. I\u0027m fixing this in a child patch coming soon.","commit_id":"82d4964393144c2d1f67d4edf362ac2afa3cde61"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":22,"context_line":"{"},{"line_number":23,"context_line":"    \"name\": string,"},{"line_number":24,"context_line":"    \"weight\": integer,"},{"line_number":25,"context_line":"    \"location\": string::uri"},{"line_number":26,"context_line":"}"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Furthermore, depending on the underlying storage type of shard being"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9gU%3D","line":25,"updated":"2013-10-23 17:21:48.000000000","message":"Rename field to \"uri\".","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":22,"context_line":"{"},{"line_number":23,"context_line":"    \"name\": string,"},{"line_number":24,"context_line":"    \"weight\": integer,"},{"line_number":25,"context_line":"    \"location\": string::uri"},{"line_number":26,"context_line":"}"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Furthermore, depending on the underlying storage type of shard being"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9Go%3D","line":25,"in_reply_to":"AAAATX%2F%2F9gU%3D","updated":"2013-10-23 18:11:39.000000000","message":"Done in the final patch.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"8c493fb1e093b11bdbe704c1fdcbba3e6145c9ac","unresolved":false,"context_lines":[{"line_number":38,"context_line":"import falcon"},{"line_number":39,"context_line":"import jsonschema"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"from marconi.common.schemas import shards as schema"},{"line_number":42,"context_line":"from marconi.common.transport import utils"},{"line_number":43,"context_line":"from marconi.openstack.common import log"},{"line_number":44,"context_line":"from marconi.proxy.storage import exceptions"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2BKo%3D","line":41,"updated":"2013-10-23 14:01:50.000000000","message":"Fun with jsonschema above.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":47,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class Listing(object):"},{"line_number":51,"context_line":"    \"\"\"A resource to list registered partition"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    :param partitions_controller: means to interact with storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9f0%3D","line":50,"updated":"2013-10-23 17:21:48.000000000","message":"How about renaming to CollectionResource?","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"7c132684f5c6da50c64f4bdd12fb3ea5069e51df","unresolved":false,"context_lines":[{"line_number":47,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class Listing(object):"},{"line_number":51,"context_line":"    \"\"\"A resource to list registered partition"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    :param partitions_controller: means to interact with storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8vM%3D","line":50,"in_reply_to":"AAAATX%2F%2F8wE%3D","updated":"2013-10-23 19:40:06.000000000","message":"Sounds good to me. Thanks for the suggestions!","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8626798d15f456f974f10e8e61c4d9b0c387bdb6","unresolved":false,"context_lines":[{"line_number":47,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class Listing(object):"},{"line_number":51,"context_line":"    \"\"\"A resource to list registered partition"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    :param partitions_controller: means to interact with storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8wE%3D","line":50,"in_reply_to":"AAAATX%2F%2F9GY%3D","updated":"2013-10-23 19:35:23.000000000","message":"See my reply to the bug. We can fix this up in a later patch.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":47,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class Listing(object):"},{"line_number":51,"context_line":"    \"\"\"A resource to list registered partition"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    :param partitions_controller: means to interact with storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9GY%3D","line":50,"in_reply_to":"AAAATX%2F%2F9f0%3D","updated":"2013-10-23 18:11:39.000000000","message":"It gets redundant. If I import shards, I want to be able to do \u0027shards.Listing\u0027 and \u0027shards.Resource\u0027.\n\nI\u0027ve filed a bug in the past about the current naming scheme: https://bugs.launchpad.net/marconi/+bug/1237747","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def on_get(self, request, response):"},{"line_number":59,"context_line":"        \"\"\"Returns a partition listing as a JSON object:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        ["},{"line_number":62,"context_line":"            {\"name\": \"\", \"weight\": 100, \"location\": \"\"},"},{"line_number":63,"context_line":"            ..."},{"line_number":64,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9fA%3D","line":61,"updated":"2013-10-23 17:21:48.000000000","message":"Pls. return the array encapsulated in an object (e.g., {}). This will allow for extensions and adding fields that won\u0027t break backwards-compatibility.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"7c132684f5c6da50c64f4bdd12fb3ea5069e51df","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def on_get(self, request, response):"},{"line_number":59,"context_line":"        \"\"\"Returns a partition listing as a JSON object:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        ["},{"line_number":62,"context_line":"            {\"name\": \"\", \"weight\": 100, \"location\": \"\"},"},{"line_number":63,"context_line":"            ..."},{"line_number":64,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8uk%3D","line":61,"in_reply_to":"AAAATX%2F%2F8v0%3D","updated":"2013-10-23 19:40:06.000000000","message":"Bug filed: https://bugs.launchpad.net/marconi/+bug/1243898\n\nThanks!","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8626798d15f456f974f10e8e61c4d9b0c387bdb6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def on_get(self, request, response):"},{"line_number":59,"context_line":"        \"\"\"Returns a partition listing as a JSON object:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        ["},{"line_number":62,"context_line":"            {\"name\": \"\", \"weight\": 100, \"location\": \"\"},"},{"line_number":63,"context_line":"            ..."},{"line_number":64,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8v0%3D","line":61,"in_reply_to":"AAAATX%2F%2F9GU%3D","updated":"2013-10-23 19:35:23.000000000","message":"Sure.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def on_get(self, request, response):"},{"line_number":59,"context_line":"        \"\"\"Returns a partition listing as a JSON object:"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        ["},{"line_number":62,"context_line":"            {\"name\": \"\", \"weight\": 100, \"location\": \"\"},"},{"line_number":63,"context_line":"            ..."},{"line_number":64,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9GU%3D","line":61,"in_reply_to":"AAAATX%2F%2F9fA%3D","updated":"2013-10-23 18:11:39.000000000","message":"Do you mind if I update this functionality in another patch?","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        response.body \u003d json.dumps(resp, ensure_ascii\u003dFalse)"},{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9fU%3D","line":75,"updated":"2013-10-23 17:21:48.000000000","message":"How about using transport.utils.to_json here?","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"f0c7924ef023b2994089387a68701bf1bd660f28","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        response.body \u003d json.dumps(resp, ensure_ascii\u003dFalse)"},{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8o4%3D","line":75,"in_reply_to":"AAAATX%2F%2F9GI%3D","updated":"2013-10-23 19:57:28.000000000","message":"Done","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        response.body \u003d json.dumps(resp, ensure_ascii\u003dFalse)"},{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9GI%3D","line":75,"in_reply_to":"AAAATX%2F%2F9fU%3D","updated":"2013-10-23 18:11:39.000000000","message":"Good point. I\u0027ll update this in this patch.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        response.body \u003d json.dumps(resp, ensure_ascii\u003dFalse)"},{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class Resource(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9c0%3D","line":76,"updated":"2013-10-23 17:21:48.000000000","message":"How about setting \"response.content_location \u003d request.path\" for consistency with the non-admin api endpoints?\n\nTBH, it may not be necessary to do this in any endpoints, but for now it would be good to keep things consistent.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        response.body \u003d json.dumps(resp, ensure_ascii\u003dFalse)"},{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class Resource(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9GE%3D","line":76,"in_reply_to":"AAAATX%2F%2F9c0%3D","updated":"2013-10-23 18:11:39.000000000","message":"I\u0027ve already done this in the final patch in this series. It occurred to me a bit late. :)","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class Resource(object):"},{"line_number":80,"context_line":"    \"\"\"A handler for individual partitions"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    :param partitions_controller: means to interact with storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9fw%3D","line":79,"updated":"2013-10-23 17:21:48.000000000","message":"How about renaming to ItemResource?","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"class Resource(object):"},{"line_number":80,"context_line":"    \"\"\"A handler for individual partitions"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    :param partitions_controller: means to interact with storage"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9GA%3D","line":79,"in_reply_to":"AAAATX%2F%2F9fw%3D","updated":"2013-10-23 18:11:39.000000000","message":"As above.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"8c493fb1e093b11bdbe704c1fdcbba3e6145c9ac","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            \u0027location\u0027: validator_type(schema.patch_location),"},{"line_number":90,"context_line":"            \u0027options\u0027: validator_type(schema.patch_options),"},{"line_number":91,"context_line":"            \u0027create\u0027: validator_type(schema.create)"},{"line_number":92,"context_line":"        }"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def on_get(self, request, response, shard):"},{"line_number":95,"context_line":"        \"\"\"Returns a JSON object for a single shard entry:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2BKU%3D","line":92,"updated":"2013-10-23 14:01:50.000000000","message":"Initialize the jsonschema validators ahead of time for performance reasons - init is expensice. Cache them for reuse. An alternative solution here is to replace lookup keys with enums.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # remove the name entry - it isn\u0027t needed on GET"},{"line_number":110,"context_line":"        del data[\u0027name\u0027]"},{"line_number":111,"context_line":"        response.body \u003d json.dumps(data, ensure_ascii\u003dFalse)"},{"line_number":112,"context_line":"        response.content_location \u003d request.path"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def on_put(self, request, response, shard):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9cs%3D","line":111,"updated":"2013-10-23 17:21:48.000000000","message":"utils.to_json","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"f0c7924ef023b2994089387a68701bf1bd660f28","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # remove the name entry - it isn\u0027t needed on GET"},{"line_number":110,"context_line":"        del data[\u0027name\u0027]"},{"line_number":111,"context_line":"        response.body \u003d json.dumps(data, ensure_ascii\u003dFalse)"},{"line_number":112,"context_line":"        response.content_location \u003d request.path"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def on_put(self, request, response, shard):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8o8%3D","line":111,"in_reply_to":"AAAATX%2F%2F9F8%3D","updated":"2013-10-23 19:57:28.000000000","message":"Done","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # remove the name entry - it isn\u0027t needed on GET"},{"line_number":110,"context_line":"        del data[\u0027name\u0027]"},{"line_number":111,"context_line":"        response.body \u003d json.dumps(data, ensure_ascii\u003dFalse)"},{"line_number":112,"context_line":"        response.content_location \u003d request.path"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def on_put(self, request, response, shard):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9F8%3D","line":111,"in_reply_to":"AAAATX%2F%2F9cs%3D","updated":"2013-10-23 18:11:39.000000000","message":"Will do.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        LOG.debug(\u0027PUT shard - name: {0}\u0027.format(shard))"},{"line_number":124,"context_line":"        if self._ctrl.exists(shard):"},{"line_number":125,"context_line":"            LOG.debug(\u0027Shard {0} already exists\u0027.format(shard))"},{"line_number":126,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        data \u003d utils.load(request)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9bU%3D","line":126,"updated":"2013-10-23 17:21:48.000000000","message":"Seems like you should set response.location here as well...\n\nAlso, how about overwriting weight, location (AKA uri) and options with what is passed? Semantically, PUT is expected to do that iirc.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"7c132684f5c6da50c64f4bdd12fb3ea5069e51df","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        LOG.debug(\u0027PUT shard - name: {0}\u0027.format(shard))"},{"line_number":124,"context_line":"        if self._ctrl.exists(shard):"},{"line_number":125,"context_line":"            LOG.debug(\u0027Shard {0} already exists\u0027.format(shard))"},{"line_number":126,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        data \u003d utils.load(request)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8uM%3D","line":126,"in_reply_to":"AAAATX%2F%2F8wk%3D","updated":"2013-10-23 19:40:06.000000000","message":"Bug filed: https://bugs.launchpad.net/marconi/+bug/1243899","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8626798d15f456f974f10e8e61c4d9b0c387bdb6","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        LOG.debug(\u0027PUT shard - name: {0}\u0027.format(shard))"},{"line_number":124,"context_line":"        if self._ctrl.exists(shard):"},{"line_number":125,"context_line":"            LOG.debug(\u0027Shard {0} already exists\u0027.format(shard))"},{"line_number":126,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        data \u003d utils.load(request)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8wk%3D","line":126,"in_reply_to":"AAAATX%2F%2F9FU%3D","updated":"2013-10-23 19:35:23.000000000","message":"Sure, later patch is OK.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        LOG.debug(\u0027PUT shard - name: {0}\u0027.format(shard))"},{"line_number":124,"context_line":"        if self._ctrl.exists(shard):"},{"line_number":125,"context_line":"            LOG.debug(\u0027Shard {0} already exists\u0027.format(shard))"},{"line_number":126,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        data \u003d utils.load(request)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9FU%3D","line":126,"in_reply_to":"AAAATX%2F%2F9bU%3D","updated":"2013-10-23 18:11:39.000000000","message":"response.location is set in the final patch in this line.\n\nI agree about the PUT, but I\u0027d like to file a bug on it. Can I fix this after in a later patch?","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"8c493fb1e093b11bdbe704c1fdcbba3e6145c9ac","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        data \u003d utils.load(request)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        EXPECT \u003d (\u0027weight\u0027, \u0027location\u0027, \u0027options\u0027)"},{"line_number":162,"context_line":"        if not any([(field in data) for field in EXPECT]):"},{"line_number":163,"context_line":"            LOG.debug(\u0027PATCH shard, bad params\u0027)"},{"line_number":164,"context_line":"            raise wsgi_errors.HTTPBadRequestBody("},{"line_number":165,"context_line":"                \u0027One of `location`, `weight`, or `options` needs \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2BKI%3D","line":162,"updated":"2013-10-23 14:01:50.000000000","message":"Check that the patch request contains *at least one* of the EXPECTed fields.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                \u0027to be specified\u0027"},{"line_number":167,"context_line":"            )"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        utils.validate(self._validators[\u0027weight\u0027], data)"},{"line_number":170,"context_line":"        utils.validate(self._validators[\u0027location\u0027], data)"},{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9UY%3D","line":169,"updated":"2013-10-23 17:21:48.000000000","message":"DRY - you could loop through EXPECT rather than duplicating these lines three times.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"f0c7924ef023b2994089387a68701bf1bd660f28","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                \u0027to be specified\u0027"},{"line_number":167,"context_line":"            )"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        utils.validate(self._validators[\u0027weight\u0027], data)"},{"line_number":170,"context_line":"        utils.validate(self._validators[\u0027location\u0027], data)"},{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8pA%3D","line":169,"in_reply_to":"AAAATX%2F%2F9FI%3D","updated":"2013-10-23 19:57:28.000000000","message":"Done","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                \u0027to be specified\u0027"},{"line_number":167,"context_line":"            )"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        utils.validate(self._validators[\u0027weight\u0027], data)"},{"line_number":170,"context_line":"        utils.validate(self._validators[\u0027location\u0027], data)"},{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9FI%3D","line":169,"in_reply_to":"AAAATX%2F%2F9UY%3D","updated":"2013-10-23 18:11:39.000000000","message":"+1 - I\u0027ll fix that soon.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"8c493fb1e093b11bdbe704c1fdcbba3e6145c9ac","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        utils.validate(self._validators[\u0027weight\u0027], data)"},{"line_number":170,"context_line":"        utils.validate(self._validators[\u0027location\u0027], data)"},{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2BJ8%3D","line":171,"updated":"2013-10-23 14:01:50.000000000","message":"I haven\u0027t figured out a cleaner way to express \"must contain at least one of\" using jsonschema. If you can figure this out, let me know. I\u0027d gladly address this in a later patch. :)","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        utils.validate(self._validators[\u0027location\u0027], data)"},{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"},{"line_number":175,"context_line":"            self._ctrl.update(shard, **fields)"},{"line_number":176,"context_line":"        except exceptions.ShardDoesNotExist as ex:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9T8%3D","line":173,"updated":"2013-10-23 17:21:48.000000000","message":"FWIW, using list comprehension is slightly faster (this API doesn\u0027t need to be super optimized, so it doesn\u0027t really matter here).","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        utils.validate(self._validators[\u0027location\u0027], data)"},{"line_number":171,"context_line":"        utils.validate(self._validators[\u0027options\u0027], data)"},{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"},{"line_number":175,"context_line":"            self._ctrl.update(shard, **fields)"},{"line_number":176,"context_line":"        except exceptions.ShardDoesNotExist as ex:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9FA%3D","line":173,"in_reply_to":"AAAATX%2F%2F9T8%3D","updated":"2013-10-23 18:11:39.000000000","message":"I end up not using a listcomp here, but instead resort to marconi.common.utils:fields in the last patch.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"553b6a13635e974c58298326571e07e1ba496973","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"},{"line_number":175,"context_line":"            self._ctrl.update(shard, **fields)"},{"line_number":176,"context_line":"        except exceptions.ShardDoesNotExist as ex:"},{"line_number":177,"context_line":"            LOG.exception(ex)"},{"line_number":178,"context_line":"            raise falcon.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9Tw%3D","line":175,"updated":"2013-10-23 17:21:48.000000000","message":"A blank line just above L175 would make it more visually distrinct from the generator expression above it.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"f0c7924ef023b2994089387a68701bf1bd660f28","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"},{"line_number":175,"context_line":"            self._ctrl.update(shard, **fields)"},{"line_number":176,"context_line":"        except exceptions.ShardDoesNotExist as ex:"},{"line_number":177,"context_line":"            LOG.exception(ex)"},{"line_number":178,"context_line":"            raise falcon.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F8pI%3D","line":175,"in_reply_to":"AAAATX%2F%2F9Tw%3D","updated":"2013-10-23 19:57:28.000000000","message":"Done","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"66b6802510e60f9184f97ff16102efaf863922f1","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in data.items()"},{"line_number":174,"context_line":"                          if k in EXPECT and v is not None)"},{"line_number":175,"context_line":"            self._ctrl.update(shard, **fields)"},{"line_number":176,"context_line":"        except exceptions.ShardDoesNotExist as ex:"},{"line_number":177,"context_line":"            LOG.exception(ex)"},{"line_number":178,"context_line":"            raise falcon.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F9E4%3D","line":175,"in_reply_to":"AAAATX%2F%2F9Tw%3D","updated":"2013-10-23 18:11:39.000000000","message":"I\u0027ll fix this up.","commit_id":"349b557a925ee097184b8f07a142308013edc311"},{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"2860b4b3de68e966fed766379560f4e241fd1a5d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            return"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        response.body \u003d transport_utils.to_json(resp)"},{"line_number":75,"context_line":"        response.status \u003d falcon.HTTP_200"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class Resource(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATX%2F%2F8mg%3D","line":75,"updated":"2013-10-23 20:05:11.000000000","message":"It\u0027s OK to add, but not physically needed; response code defaults to 200.","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2608b23a8f895a1c9c68ec00b1517baea6450ff7","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        {\"weight\": 100, \"location\": \"\", options: {...}}"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        :returns: HTTP | [200, 404]"},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        LOG.debug(\u0027GET shard - name: {0}\u0027.format(shard))"},{"line_number":101,"context_line":"        data \u003d None"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2F90o%3D","line":98,"updated":"2013-10-24 14:34:28.000000000","message":"Don\u0027t want to be too nitpicky here but, I\u0027m not sure we should be using `returns` here since we\u0027re actually not returning anything here! What about defining our own standard? \n\n    :http_status: 200 | 400 ?","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43278763109cf7503faad14c9c6285d0fcdb94fb","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        {\"weight\": 100, \"location\": \"\", options: {...}}"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        :returns: HTTP | [200, 404]"},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        LOG.debug(\u0027GET shard - name: {0}\u0027.format(shard))"},{"line_number":101,"context_line":"        data \u003d None"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2F9o4%3D","line":98,"in_reply_to":"AAAATn%2F%2F90o%3D","updated":"2013-10-24 15:02:48.000000000","message":"Thanks for nitpicking here, because as a result, I discovered this: http://pythonhosted.org/sphinxcontrib-httpdomain/\n\nThat\u0027s the way of the future for our transport docs. :)","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2608b23a8f895a1c9c68ec00b1517baea6450ff7","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        data \u003d utils.load(request)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        EXPECT \u003d (\u0027weight\u0027, \u0027location\u0027, \u0027options\u0027)"},{"line_number":161,"context_line":"        if not any([(field in data) for field in EXPECT]):"},{"line_number":162,"context_line":"            LOG.debug(\u0027PATCH shard, bad params\u0027)"},{"line_number":163,"context_line":"            raise wsgi_errors.HTTPBadRequestBody("},{"line_number":164,"context_line":"                \u0027One of `location`, `weight`, or `options` needs \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2F90M%3D","line":161,"updated":"2013-10-24 14:34:28.000000000","message":"IIRC, there are 2 more views with code similar to this, aren\u0027t there? It would be cool to move this out into some helper function. Were those part of the proxy code?","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43278763109cf7503faad14c9c6285d0fcdb94fb","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        data \u003d utils.load(request)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        EXPECT \u003d (\u0027weight\u0027, \u0027location\u0027, \u0027options\u0027)"},{"line_number":161,"context_line":"        if not any([(field in data) for field in EXPECT]):"},{"line_number":162,"context_line":"            LOG.debug(\u0027PATCH shard, bad params\u0027)"},{"line_number":163,"context_line":"            raise wsgi_errors.HTTPBadRequestBody("},{"line_number":164,"context_line":"                \u0027One of `location`, `weight`, or `options` needs \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATn%2F%2F9os%3D","line":161,"in_reply_to":"AAAATn%2F%2F90M%3D","updated":"2013-10-24 15:02:48.000000000","message":"I believe I unify this in the final patch. I may also have an instance in the proxy, but we\u0027re aiming to remove the proxy soon.","commit_id":"52b5dad078884f33b3ed23e271ca7de5839ee895"}],"tests/unit/queues/transport/wsgi/test_shards.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"e9633a5f734fc00de13eca42c9e410ad26b5e2d1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        super(ShardsBaseTest, self).setUp()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def tearDown(self):"},{"line_number":29,"context_line":"        super(ShardsBaseTest, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fv7E%3D","line":29,"updated":"2013-10-10 11:35:19.000000000","message":"This test will get filled in once the integration between the storage layer and the transport layer happens.","commit_id":"98b85db9972349f21cc49c50580044f9461b398b"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"8c493fb1e093b11bdbe704c1fdcbba3e6145c9ac","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        super(ShardsBaseTest, self).setUp()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def tearDown(self):"},{"line_number":29,"context_line":"        super(ShardsBaseTest, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATX%2F%2F%2BJ4%3D","line":29,"updated":"2013-10-23 14:01:50.000000000","message":"Just a stub. It\u0027s filled in when the storage layer is implemented, unit tested, and finally integrated with this resource.","commit_id":"349b557a925ee097184b8f07a142308013edc311"}]}
