)]}'
{"tests/unit/queues/storage/test_pool_catalog.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"75c2f7a6eb3ec380607ed90e46dce28643922b20","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.catalog.register(\u0027not_yet\u0027, \u0027mapped\u0027)"},{"line_number":78,"context_line":"        storage \u003d self.catalog.lookup(\u0027not_yet\u0027, \u0027mapped\u0027)"},{"line_number":79,"context_line":"        self.assertIsInstance(storage, sqlalchemy.DataDriver)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_register_with_flavor(self):"},{"line_number":82,"context_line":"        queue \u003d \u0027test\u0027"},{"line_number":83,"context_line":"        self.catalog.register(queue, project\u003dself.project,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_4e00ccb1","line":80,"updated":"2014-08-05 14:58:12.000000000","message":"Q. Are there tests somewhere for attempting to create a flavor for a pool that does not exist?","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9ed0db231593648b70380d4ac75adbbb0b16c6fb","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.catalog.register(\u0027not_yet\u0027, \u0027mapped\u0027)"},{"line_number":78,"context_line":"        storage \u003d self.catalog.lookup(\u0027not_yet\u0027, \u0027mapped\u0027)"},{"line_number":79,"context_line":"        self.assertIsInstance(storage, sqlalchemy.DataDriver)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def test_register_with_flavor(self):"},{"line_number":82,"context_line":"        queue \u003d \u0027test\u0027"},{"line_number":83,"context_line":"        self.catalog.register(queue, project\u003dself.project,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_e5a4f4ba","line":80,"in_reply_to":"baada198_4e00ccb1","updated":"2014-08-27 12:46:44.000000000","message":"Not yet, because of this: https://github.com/openstack/zaqar/blob/master/zaqar/queues/transport/wsgi/v1_1/flavors.py#L126 :D","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"}],"zaqar/queues/storage/pooling.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"75c2f7a6eb3ec380607ed90e46dce28643922b20","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            return {}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def create(self, name, metadata\u003dNone, project\u003dNone):"},{"line_number":174,"context_line":"        flavor \u003d metadata and metadata.get(\u0027flavor\u0027, None)"},{"line_number":175,"context_line":"        self._pool_catalog.register(name, project\u003dproject, flavor\u003dflavor)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        # NOTE(cpp-cabrera): This should always succeed since we just"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_73601735","line":174,"updated":"2014-08-05 14:58:12.000000000","message":"DSQ: Would it make sense to have a naming convention for \"official\" metadata field names? And/or we could create a single envelope at the top level for all those, e.g.:\n\n    {\n        \"options\": {\n            \"flavor\": \"xyz\",\n            \"signing\": {\n                ...\n            }\n        }\n    }","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9ed0db231593648b70380d4ac75adbbb0b16c6fb","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            return {}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def create(self, name, metadata\u003dNone, project\u003dNone):"},{"line_number":174,"context_line":"        flavor \u003d metadata and metadata.get(\u0027flavor\u0027, None)"},{"line_number":175,"context_line":"        self._pool_catalog.register(name, project\u003dproject, flavor\u003dflavor)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        # NOTE(cpp-cabrera): This should always succeed since we just"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_659e2456","line":174,"in_reply_to":"baada198_73601735","updated":"2014-08-27 12:46:44.000000000","message":"Mmmh, I\u0027m not sure about this, TBH. I mean, I considered everything in the queue metadata dict to be just that, metadata. Whether this change the way the queue works or not, I think they are still optional data that can be passed.\n\nThoughts?","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"75c2f7a6eb3ec380607ed90e46dce28643922b20","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"            if flavor is not None:"},{"line_number":424,"context_line":"                flavor \u003d self._flavor_ctrl.get(flavor, project\u003dproject)"},{"line_number":425,"context_line":"                pool \u003d flavor.get(\u0027pool\u0027)"},{"line_number":426,"context_line":"            else:"},{"line_number":427,"context_line":"                # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"},{"line_number":428,"context_line":"                # all pools"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1318bb75","line":425,"updated":"2014-08-05 14:58:12.000000000","message":"Q. Any particular reason to use flavor.get(\u0027pool\u0027) instead of flavor[\u0027pool\u0027] ?","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9ed0db231593648b70380d4ac75adbbb0b16c6fb","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"            if flavor is not None:"},{"line_number":424,"context_line":"                flavor \u003d self._flavor_ctrl.get(flavor, project\u003dproject)"},{"line_number":425,"context_line":"                pool \u003d flavor.get(\u0027pool\u0027)"},{"line_number":426,"context_line":"            else:"},{"line_number":427,"context_line":"                # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"},{"line_number":428,"context_line":"                # all pools"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_85c42041","line":425,"in_reply_to":"baada198_1318bb75","updated":"2014-08-27 12:46:44.000000000","message":"nope, I\u0027ll change it.","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"75c2f7a6eb3ec380607ed90e46dce28643922b20","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                pool \u003d select.weighted(self._pools_ctrl.list(limit\u003d0))"},{"line_number":430,"context_line":"                pool \u003d pool and pool[\u0027name\u0027]"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"            if not pool:"},{"line_number":433,"context_line":"                raise errors.NoPoolFound()"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"            self._catalogue_ctrl.insert(project, queue, pool)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_cea93ce0","line":432,"updated":"2014-08-05 14:58:12.000000000","message":"DSQ: It seems like this is not possible when a flavor is specified since we just get the name and assume the pool exists. Do we need to verify the pool actually exists before inserting the mapping into the catalog? If so, we will need a corresponding test.","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9ed0db231593648b70380d4ac75adbbb0b16c6fb","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                pool \u003d select.weighted(self._pools_ctrl.list(limit\u003d0))"},{"line_number":430,"context_line":"                pool \u003d pool and pool[\u0027name\u0027]"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"            if not pool:"},{"line_number":433,"context_line":"                raise errors.NoPoolFound()"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"            self._catalogue_ctrl.insert(project, queue, pool)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_453f6825","line":432,"in_reply_to":"baada198_cea93ce0","updated":"2014-08-27 12:46:44.000000000","message":"Yeah, there\u0027s a TODO for that in the flavor\u0027s wsgi implementation. I\u0027ll work on it in the next patch.","commit_id":"d31c563438cc042be8e1e78e33989adea34a9098"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"33d3189d060f998c29d1d52de3114415eb3ea621","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        :param queue: Name of the new queue to assign to a pool"},{"line_number":426,"context_line":"        :type queue: six.text_type"},{"line_number":427,"context_line":"        :param project: Project to which the queue belongs, or"},{"line_number":428,"context_line":"            None for the \"global\" or \"generic\" project."},{"line_number":429,"context_line":"        :type project: six.text_type"},{"line_number":430,"context_line":"        :raises: NoPoolFound"},{"line_number":431,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_a86b1f1e","line":428,"updated":"2014-08-25 06:05:10.000000000","message":"Would you mind updating the docstring?","commit_id":"62a8ec728464e0da1257def74df0f097a46a625e"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8d9b12aef1a3efbb706074a75dd8fc0192b07507","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        :param queue: Name of the new queue to assign to a pool"},{"line_number":426,"context_line":"        :type queue: six.text_type"},{"line_number":427,"context_line":"        :param project: Project to which the queue belongs, or"},{"line_number":428,"context_line":"            None for the \"global\" or \"generic\" project."},{"line_number":429,"context_line":"        :type project: six.text_type"},{"line_number":430,"context_line":"        :raises: NoPoolFound"},{"line_number":431,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_6521c4fb","line":428,"in_reply_to":"1abeadc6_a86b1f1e","updated":"2014-08-27 12:51:05.000000000","message":"Done","commit_id":"62a8ec728464e0da1257def74df0f097a46a625e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"33d3189d060f998c29d1d52de3114415eb3ea621","unresolved":false,"context_lines":[{"line_number":441,"context_line":"                # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"},{"line_number":442,"context_line":"                # all pools"},{"line_number":443,"context_line":"                pool \u003d select.weighted(self._pools_ctrl.list(limit\u003d0))"},{"line_number":444,"context_line":"                pool \u003d pool and pool[\u0027name\u0027]"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"            if not pool:"},{"line_number":447,"context_line":"                raise errors.NoPoolFound()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_88eca391","line":444,"updated":"2014-08-25 06:05:10.000000000","message":"Q: So it\u0027s changed as a bool value, right? Am I missing anything?","commit_id":"62a8ec728464e0da1257def74df0f097a46a625e"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8d9b12aef1a3efbb706074a75dd8fc0192b07507","unresolved":false,"context_lines":[{"line_number":441,"context_line":"                # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"},{"line_number":442,"context_line":"                # all pools"},{"line_number":443,"context_line":"                pool \u003d select.weighted(self._pools_ctrl.list(limit\u003d0))"},{"line_number":444,"context_line":"                pool \u003d pool and pool[\u0027name\u0027]"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"            if not pool:"},{"line_number":447,"context_line":"                raise errors.NoPoolFound()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_25ba6c6e","line":444,"in_reply_to":"1abeadc6_88eca391","updated":"2014-08-27 12:51:05.000000000","message":"Nope, it just gets the name from `pool` if pool is not empty nor it is None. Otherwise, it\u0027ll be None.","commit_id":"62a8ec728464e0da1257def74df0f097a46a625e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"cc779b3f03bea6f5b15e43ccebe69aedc68a008f","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            return {}"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def create(self, name, metadata\u003dNone, project\u003dNone):"},{"line_number":188,"context_line":"        flavor \u003d metadata and metadata.get(\u0027flavor\u0027, None)"},{"line_number":189,"context_line":"        self._pool_catalog.register(name, project\u003dproject, flavor\u003dflavor)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        # NOTE(cpp-cabrera): This should always succeed since we just"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_6c143fe9","line":188,"updated":"2014-08-27 19:23:08.000000000","message":"I guess the only reason for having a naming convention (for example, starting the name with an underscore) would be to make it a little easier to pick out \"official\" fields when visually inspecting a document. If we don\u0027t expect users to put much in the metadata, then this is less of a concern. Also, I would think that SDKs would abstract this away for the most part anyway.","commit_id":"abd29eee2565395b0a365aff21954de0e7419676"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"26c34f2d4e62628919a32701ed7bd952b8ad0ee5","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            return {}"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def create(self, name, metadata\u003dNone, project\u003dNone):"},{"line_number":188,"context_line":"        flavor \u003d metadata and metadata.get(\u0027flavor\u0027, None)"},{"line_number":189,"context_line":"        self._pool_catalog.register(name, project\u003dproject, flavor\u003dflavor)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        # NOTE(cpp-cabrera): This should always succeed since we just"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_83db0f7b","line":188,"in_reply_to":"1abeadc6_6c143fe9","updated":"2014-08-28 11:52:02.000000000","message":"TBH, I\u0027m not sure how much this metadata thing will be used by the users themselves. However, I think it\u0027ll be more used by other services relying on Zaqar. I remember us discussing a bit about this in the past, I guess we could use `_`","commit_id":"abd29eee2565395b0a365aff21954de0e7419676"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"cc779b3f03bea6f5b15e43ccebe69aedc68a008f","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        if not self._catalogue_ctrl.exists(project, queue):"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"            if flavor is not None:"},{"line_number":442,"context_line":"                flavor \u003d self._flavor_ctrl.get(flavor, project\u003dproject)"},{"line_number":443,"context_line":"                pool \u003d flavor[\u0027pool\u0027]"},{"line_number":444,"context_line":"            else:"},{"line_number":445,"context_line":"                # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_8c2d1b49","line":442,"updated":"2014-08-27 19:23:08.000000000","message":"If the flavor does not exist, this will raise errors.FlavorDoesNotExist. Currently, this will result in the WSGI transport returning HTTP 503. Can you make a note to catch this specific exception and return 400 instead?","commit_id":"abd29eee2565395b0a365aff21954de0e7419676"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"26c34f2d4e62628919a32701ed7bd952b8ad0ee5","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        if not self._catalogue_ctrl.exists(project, queue):"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"            if flavor is not None:"},{"line_number":442,"context_line":"                flavor \u003d self._flavor_ctrl.get(flavor, project\u003dproject)"},{"line_number":443,"context_line":"                pool \u003d flavor[\u0027pool\u0027]"},{"line_number":444,"context_line":"            else:"},{"line_number":445,"context_line":"                # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_e832e00e","line":442,"in_reply_to":"1abeadc6_8c2d1b49","updated":"2014-08-28 11:52:02.000000000","message":"Very good point!","commit_id":"abd29eee2565395b0a365aff21954de0e7419676"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"cc779b3f03bea6f5b15e43ccebe69aedc68a008f","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                pool \u003d pool and pool[\u0027name\u0027] or None"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"            if not pool:"},{"line_number":451,"context_line":"                raise errors.NoPoolFound()"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            self._catalogue_ctrl.insert(project, queue, pool)"},{"line_number":454,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_cc239356","line":451,"updated":"2014-08-27 19:23:08.000000000","message":"Same comment as above, except in this case it isn\u0027t the user\u0027s fault, but rather the operator\u0027s, since the flavor\u0027s pool should always exist, right? So I guess this should result in an HTTP 500 once it bubbles up to the transport layer?","commit_id":"abd29eee2565395b0a365aff21954de0e7419676"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"26c34f2d4e62628919a32701ed7bd952b8ad0ee5","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                pool \u003d pool and pool[\u0027name\u0027] or None"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"            if not pool:"},{"line_number":451,"context_line":"                raise errors.NoPoolFound()"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            self._catalogue_ctrl.insert(project, queue, pool)"},{"line_number":454,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_c800c404","line":451,"in_reply_to":"1abeadc6_cc239356","updated":"2014-08-28 11:52:02.000000000","message":"In this case it depends on whether the pool is being registered through the pools endpoint or by creating a queue with a flavor.\n\nI\u0027ll add a note and start working on the follow-up patches.","commit_id":"abd29eee2565395b0a365aff21954de0e7419676"}]}
