)]}'
{"designate/exceptions.py":[{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"1992bee5721f287dd062b042117e76482c3eacb0","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class MarkerNotFound(BadRequest):"},{"line_number":91,"context_line":"    error_type \u003d \u0027marker_not_found\u0027"},{"line_number":92,"context_line":"    error_code \u003d 400"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"class InvalidOperation(BadRequest):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FP0M%3D","line":92,"updated":"2014-02-14 16:11:02.000000000","message":"If we return a MarkerNotFound error - should it inherit from NotFound and return a 404?\nAlternatively if the exception inherits from BadRequest - should it be called BadMarker?\n\nIn Nova from what I can tell, i find that it inherits from NotFound and returns a 404 - https://github.com/openstack/nova/blob/master/nova/exception.py#L1201","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"dfffeabd00b9373a01e58708747308b4b0e411c3","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class MarkerNotFound(BadRequest):"},{"line_number":91,"context_line":"    error_type \u003d \u0027marker_not_found\u0027"},{"line_number":92,"context_line":"    error_code \u003d 400"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"class InvalidOperation(BadRequest):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPL8%3D","line":92,"in_reply_to":"AAAAUX%2F%2FP0M%3D","updated":"2014-02-14 16:35:06.000000000","message":"Indeed, but Kiall meant it should be a 400 and MarkerNotFound.","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"9b54445398ce7e3e39334e770636e3e2322e0049","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class MarkerNotFound(BadRequest):"},{"line_number":91,"context_line":"    error_type \u003d \u0027marker_not_found\u0027"},{"line_number":92,"context_line":"    error_code \u003d 400"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"class InvalidOperation(BadRequest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FCP4%3D","line":92,"updated":"2014-02-17 14:50:03.000000000","message":"There\u0027s no need to include the error_code here, as it gets inherited from the BadRequest.\n\nIf another revision is necessary, lets remove it... otherwise no harm. Ignore :)","commit_id":"a6d1624a267110a752861498d8f225312471044b"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"557c594be963191e262d1b5da359b4e8124e3156","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"class MarkerNotFound(BadRequest):"},{"line_number":91,"context_line":"    error_type \u003d \u0027marker_not_found\u0027"},{"line_number":92,"context_line":"    error_code \u003d 400"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"class InvalidOperation(BadRequest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FBh4%3D","line":92,"in_reply_to":"AAAAUX%2F%2FCP4%3D","updated":"2014-02-17 19:56:48.000000000","message":"Done","commit_id":"a6d1624a267110a752861498d8f225312471044b"}],"designate/storage/api.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"9b54445398ce7e3e39334e770636e3e2322e0049","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        return self.storage.find_servers("},{"line_number":155,"context_line":"            context, criterion, marker\u003dmarker, limit\u003dlimit, sort_key\u003dsort_key,"},{"line_number":156,"context_line":"            sort_dir\u003dsort_dir)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def find_server(self, context, criterion):"},{"line_number":159,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FCNs%3D","line":156,"updated":"2014-02-17 14:50:03.000000000","message":"As a general style thing, just because the arguments are optional doesn\u0027t mean we need to pass them as kwargs.. \n\ne.g. this would have worked just fine, and been less painful on the eyes: \n\n    self.storage.find_servers(context, criterion, marker, limit, sort_key, sort_dir)","commit_id":"a6d1624a267110a752861498d8f225312471044b"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"557c594be963191e262d1b5da359b4e8124e3156","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        return self.storage.find_servers("},{"line_number":155,"context_line":"            context, criterion, marker\u003dmarker, limit\u003dlimit, sort_key\u003dsort_key,"},{"line_number":156,"context_line":"            sort_dir\u003dsort_dir)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def find_server(self, context, criterion):"},{"line_number":159,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2B%2Fhc%3D","line":156,"in_reply_to":"AAAAUX%2F%2FCNs%3D","updated":"2014-02-17 19:56:48.000000000","message":"Done","commit_id":"a6d1624a267110a752861498d8f225312471044b"}],"designate/storage/base.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"9b54445398ce7e3e39334e770636e3e2322e0049","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        :param context: RPC Context."},{"line_number":52,"context_line":"        :param criterion: Criteria to filter by."},{"line_number":53,"context_line":"        :param marker: Object from which after the requested page will start"},{"line_number":54,"context_line":"                       after"},{"line_number":55,"context_line":"        :param limit: Integer limit of objects of the page size after the"},{"line_number":56,"context_line":"                      marker"},{"line_number":57,"context_line":"        :param sort_key: Key from which to sort after."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FCMI%3D","line":54,"updated":"2014-02-17 14:50:03.000000000","message":"Is this really an \"Object\", isn\u0027t it really a \"Resource ID\"?\n\nMaybe this, robbed from the paginate_query docblock?\n\n\t    :param marker: Resource ID of the last item of the previous page; we return the next results after this value.\n\nSame applies to all the other marker doc blocks","commit_id":"a6d1624a267110a752861498d8f225312471044b"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"557c594be963191e262d1b5da359b4e8124e3156","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        :param context: RPC Context."},{"line_number":52,"context_line":"        :param criterion: Criteria to filter by."},{"line_number":53,"context_line":"        :param marker: Object from which after the requested page will start"},{"line_number":54,"context_line":"                       after"},{"line_number":55,"context_line":"        :param limit: Integer limit of objects of the page size after the"},{"line_number":56,"context_line":"                      marker"},{"line_number":57,"context_line":"        :param sort_key: Key from which to sort after."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2B%2Ffw%3D","line":54,"in_reply_to":"AAAAUX%2F%2FCMI%3D","updated":"2014-02-17 19:56:48.000000000","message":"Done","commit_id":"a6d1624a267110a752861498d8f225312471044b"}],"designate/storage/impl_sqlalchemy/__init__.py":[{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"1992bee5721f287dd062b042117e76482c3eacb0","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return query"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _find(self, model, context, criterion, one\u003dFalse,"},{"line_number":98,"context_line":"              marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027desc\u0027):"},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        Base \"finder\" method"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPfg%3D","line":98,"updated":"2014-02-14 16:11:02.000000000","message":"paginate_query itself has the default sort_dir as \u0027asc\u0027.  But we have the default as \u0027desc\u0027.  Do you know what the other projects set the default to?  Is there a reason for the different defaults?","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"dfffeabd00b9373a01e58708747308b4b0e411c3","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return query"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _find(self, model, context, criterion, one\u003dFalse,"},{"line_number":98,"context_line":"              marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027desc\u0027):"},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        Base \"finder\" method"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPLg%3D","line":98,"in_reply_to":"AAAAUX%2F%2FPfg%3D","updated":"2014-02-14 16:35:06.000000000","message":"Cinder does \u0027desc\u0027 as the default and I find it more convenient to always return the newest ontop.","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"1992bee5721f287dd062b042117e76482c3eacb0","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            query \u003d paginate_query("},{"line_number":128,"context_line":"                query, model, limit,"},{"line_number":129,"context_line":"                [sort_key, \u0027id\u0027, \u0027created_at\u0027], marker\u003dmarker,"},{"line_number":130,"context_line":"                sort_dir\u003dsort_dir)"},{"line_number":131,"context_line":"            # Othwewise, return all matching records"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            return query.all()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPaQ%3D","line":130,"updated":"2014-02-14 16:11:02.000000000","message":"(1) I assume id is added to make the key unique.  But why is created_at added?\n(2) Hmm.  So it looks like if we do not specify marker and limit, the results are sorted.  So now we can sort the results without specifying marker and limit - correct?\n(3) So do we want to later allow specifying multiple sort_keys (and sort_orders)?\n(4) What is the behavior if we specify limit without specifying marker?  Glancing at paginate_query it appears that the results are limited to the value specified as limit.  Is this the desired behavior?  If so we need to document it.","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"dfffeabd00b9373a01e58708747308b4b0e411c3","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            query \u003d paginate_query("},{"line_number":128,"context_line":"                query, model, limit,"},{"line_number":129,"context_line":"                [sort_key, \u0027id\u0027, \u0027created_at\u0027], marker\u003dmarker,"},{"line_number":130,"context_line":"                sort_dir\u003dsort_dir)"},{"line_number":131,"context_line":"            # Othwewise, return all matching records"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            return query.all()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPKU%3D","line":130,"in_reply_to":"AAAAUX%2F%2FPaQ%3D","updated":"2014-02-14 16:35:06.000000000","message":"So:\nlimit and no marker: It will return n items as within limit from the beginning matching the sort key / dir.\nlimit and marker same as above but starting at the item after the marker object / row\n\n1) Basically just copying what other OS projects does.\n2) Correct (I think certainly)\n3) Might be, though others only allow 1 in the API by the looks.\n4. See above :)","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"1992bee5721f287dd062b042117e76482c3eacb0","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def find_quotas(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":173,"context_line":"                    sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027desc\u0027):"},{"line_number":174,"context_line":"        quotas \u003d self._find_quotas(context, criterion, limit\u003dlimit,"},{"line_number":175,"context_line":"                                   sort_key\u003dsort_key, sort_dir\u003dsort_dir)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        return [dict(q) for q in quotas]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPoU%3D","line":174,"updated":"2014-02-14 16:11:02.000000000","message":"So would find_quotas have a limit without a marker specified? Is this intentional?","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"dfffeabd00b9373a01e58708747308b4b0e411c3","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def find_quotas(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":173,"context_line":"                    sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027desc\u0027):"},{"line_number":174,"context_line":"        quotas \u003d self._find_quotas(context, criterion, limit\u003dlimit,"},{"line_number":175,"context_line":"                                   sort_key\u003dsort_key, sort_dir\u003dsort_dir)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        return [dict(q) for q in quotas]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPKI%3D","line":174,"in_reply_to":"AAAAUX%2F%2FPoU%3D","updated":"2014-02-14 16:35:06.000000000","message":"Forgot to pass it ;)","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"9b54445398ce7e3e39334e770636e3e2322e0049","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                raise exceptions.NotFound()"},{"line_number":117,"context_line":"        else:"},{"line_number":118,"context_line":"            # If marker is not none and basestring we query it."},{"line_number":119,"context_line":"            if marker is not None and isinstance(marker, basestring):"},{"line_number":120,"context_line":"                try:"},{"line_number":121,"context_line":"                    marker \u003d self._find(model, context, {\u0027id\u0027: marker},"},{"line_number":122,"context_line":"                                        one\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FCFI%3D","line":119,"updated":"2014-02-17 14:50:03.000000000","message":"Why do we do the isinstance(marker, basestring) check here? Doesn\u0027t this result in silently ignoring the marker if, for example, and integer is passed in?","commit_id":"a6d1624a267110a752861498d8f225312471044b"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"557c594be963191e262d1b5da359b4e8124e3156","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                raise exceptions.NotFound()"},{"line_number":117,"context_line":"        else:"},{"line_number":118,"context_line":"            # If marker is not none and basestring we query it."},{"line_number":119,"context_line":"            if marker is not None and isinstance(marker, basestring):"},{"line_number":120,"context_line":"                try:"},{"line_number":121,"context_line":"                    marker \u003d self._find(model, context, {\u0027id\u0027: marker},"},{"line_number":122,"context_line":"                                        one\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2B%2FX4%3D","line":119,"in_reply_to":"AAAAUX%2F%2FCFI%3D","updated":"2014-02-17 19:56:48.000000000","message":"Done","commit_id":"a6d1624a267110a752861498d8f225312471044b"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"9b54445398ce7e3e39334e770636e3e2322e0049","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                query, model, limit,"},{"line_number":131,"context_line":"                [sort_key, \u0027id\u0027, \u0027created_at\u0027], marker\u003dmarker,"},{"line_number":132,"context_line":"                sort_dir\u003dsort_dir)"},{"line_number":133,"context_line":"            # Othwewise, return all matching records"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"            return query.all()"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2FCEw%3D","line":133,"updated":"2014-02-17 14:50:03.000000000","message":"This comment should be moved up + merged with \"# If marker is not None\"..","commit_id":"a6d1624a267110a752861498d8f225312471044b"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"557c594be963191e262d1b5da359b4e8124e3156","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                query, model, limit,"},{"line_number":131,"context_line":"                [sort_key, \u0027id\u0027, \u0027created_at\u0027], marker\u003dmarker,"},{"line_number":132,"context_line":"                sort_dir\u003dsort_dir)"},{"line_number":133,"context_line":"            # Othwewise, return all matching records"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"            return query.all()"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2B%2FRA%3D","line":133,"in_reply_to":"AAAAUX%2F%2FCEw%3D","updated":"2014-02-17 19:56:48.000000000","message":"Done","commit_id":"a6d1624a267110a752861498d8f225312471044b"}],"designate/tests/test_central/test_service.py":[{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"1992bee5721f287dd062b042117e76482c3eacb0","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        servers \u003d self.central_service.find_servers(self.admin_context)"},{"line_number":182,"context_line":"        self.assertEqual(len(servers), 2)"},{"line_number":183,"context_line":"        self.assertEqual(servers[1][\u0027name\u0027], \u0027ns1.example.org.\u0027)"},{"line_number":184,"context_line":"        self.assertEqual(servers[0][\u0027name\u0027], \u0027ns2.example.org.\u0027)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_get_server(self):"},{"line_number":187,"context_line":"        # Create a server"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPXI%3D","line":184,"updated":"2014-02-14 16:11:02.000000000","message":"Did the values change because of sorting?  I think it is better to specify the sort key and order explicitly in the tests, rather than having them take the default values.","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"dfffeabd00b9373a01e58708747308b4b0e411c3","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        servers \u003d self.central_service.find_servers(self.admin_context)"},{"line_number":182,"context_line":"        self.assertEqual(len(servers), 2)"},{"line_number":183,"context_line":"        self.assertEqual(servers[1][\u0027name\u0027], \u0027ns1.example.org.\u0027)"},{"line_number":184,"context_line":"        self.assertEqual(servers[0][\u0027name\u0027], \u0027ns2.example.org.\u0027)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_get_server(self):"},{"line_number":187,"context_line":"        # Create a server"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FPJc%3D","line":184,"in_reply_to":"AAAAUX%2F%2FPXI%3D","updated":"2014-02-14 16:35:06.000000000","message":"Well, ok","commit_id":"69ac55f1e20886948897d4ab449c88255cec0e83"}]}
