)]}'
{"designate/dnsutils.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"23bd4f83c1b528b91cdd2cbb9b0ccbdde2868aaa","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    yield response.get_wire()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"                else:"},{"line_number":146,"context_line":"                    LOG.error(_LI(\"Unexpected response %(resp)s\") %"},{"line_number":147,"context_line":"                              repr(response))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_b5b9f9cd","line":146,"range":{"start_line":146,"start_character":31,"end_line":146,"end_character":33},"updated":"2016-03-02 14:36:34.000000000","message":"Should be using _LE","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"850913f26f4fe0f63624bc2151443d86173bbaf0","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    yield response.get_wire()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"                else:"},{"line_number":146,"context_line":"                    LOG.error(_LI(\"Unexpected response %(resp)s\") %"},{"line_number":147,"context_line":"                              repr(response))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_2f974d49","line":146,"range":{"start_line":146,"start_character":31,"end_line":146,"end_character":33},"in_reply_to":"7af24918_b5b9f9cd","updated":"2016-03-02 16:07:21.000000000","message":"Done","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"}],"designate/mdns/handler.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"23bd4f83c1b528b91cdd2cbb9b0ccbdde2868aaa","unresolved":false,"context_lines":[{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _handle_record_query(self, request):"},{"line_number":343,"context_line":"        \"\"\"Handle a DNS QUERY request for a record\"\"\""},{"line_number":344,"context_line":"        #TODO(Federico): this method always yields one item, no benefit in using a generator here"},{"line_number":345,"context_line":"        context \u003d request.environ[\u0027context\u0027]"},{"line_number":346,"context_line":"        response \u003d dns.message.make_response(request)"},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_55b1958e","line":344,"range":{"start_line":344,"start_character":8,"end_line":344,"end_character":97},"updated":"2016-03-02 14:36:34.000000000","message":"The caller has no idea if 1 of 10 will be returned, so all internal methods regardless of if they can return more than 1  are setup as generators.","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"0f16a35a7bf6fd555fd5a9e8fd27f7140e7736e3","unresolved":false,"context_lines":[{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _handle_record_query(self, request):"},{"line_number":343,"context_line":"        \"\"\"Handle a DNS QUERY request for a record\"\"\""},{"line_number":344,"context_line":"        #TODO(Federico): this method always yields one item, no benefit in using a generator here"},{"line_number":345,"context_line":"        context \u003d request.environ[\u0027context\u0027]"},{"line_number":346,"context_line":"        response \u003d dns.message.make_response(request)"},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_1ad3b905","line":344,"range":{"start_line":344,"start_character":8,"end_line":344,"end_character":97},"in_reply_to":"7af24918_55b1958e","updated":"2016-03-02 16:03:36.000000000","message":"The only call I see to this method is:\nfor response in self._handle_record_query(request):\n   yield response\n\nThe \"for\" could be replaced with just a \"yield self._handle_record_query(request)\"","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"c051eb5be6de1a0d6fe42ecc4f765a8b7c86407a","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            #"},{"line_number":373,"context_line":"            # To simply things currently this returns a REFUSED in all cases."},{"line_number":374,"context_line":"            # If zone transfers needs different errors, we could revisit this."},{"line_number":375,"context_line":"            LOG.debug(\"NotFound, refusing\")"},{"line_number":376,"context_line":"            yield self._handle_query_error(request, dns.rcode.REFUSED)"},{"line_number":377,"context_line":"            raise StopIteration"},{"line_number":378,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_c02517c3","line":375,"updated":"2016-03-07 20:11:50.000000000","message":"This should log the zone that was being looked up.\n\nIt should also be at INFO imho - but I am open to that being debated","commit_id":"ab6b39af90072569b73b5955bf5ab8514ecddef6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"c051eb5be6de1a0d6fe42ecc4f765a8b7c86407a","unresolved":false,"context_lines":[{"line_number":377,"context_line":"            raise StopIteration"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        except exceptions.Forbidden:"},{"line_number":380,"context_line":"            LOG.debug(\"Forbidden, refusing\")"},{"line_number":381,"context_line":"            yield self._handle_query_error(request, dns.rcode.REFUSED)"},{"line_number":382,"context_line":"            raise StopIteration"},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_a0228bb7","line":380,"updated":"2016-03-07 20:11:50.000000000","message":"Same as ^","commit_id":"ab6b39af90072569b73b5955bf5ab8514ecddef6"}],"designate/tests/test_mdns/test_service.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"23bd4f83c1b528b91cdd2cbb9b0ccbdde2868aaa","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        req \u003d dns.message.make_query(qname, rdtype, rdclass\u003drdclass)"},{"line_number":81,"context_line":"        return self._send_request_to_mdns(req)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_query(self):"},{"line_number":84,"context_line":"        zone \u003d self.create_zone()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Reply query for NS"},{"line_number":87,"context_line":"        response \u003d self._query_mdns(zone.name, dns.rdatatype.NS)"},{"line_number":88,"context_line":"        self.assertEqual(dns.rcode.NOERROR, response.rcode())"},{"line_number":89,"context_line":"        self.assertEqual(1, len(response.answer))"},{"line_number":90,"context_line":"        ans \u003d response.answer[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_90c5eb3d","line":87,"range":{"start_line":83,"start_character":4,"end_line":87,"end_character":37},"updated":"2016-03-02 14:36:34.000000000","message":"I think these tests are in the wrong place, we\u0027re only interested here in knowing that the code in mdns/service.py (and it\u0027s base) are doing the right thing.. e.g. checking that mDNS came up, that data received on the TCP/UDP port was passed to the handler, and that it\u0027s response was \"sent\" over the wire. Checking the various things the handler does happens in test_mdns/test_handler.py.\n\nAlso, We specifically avoid writing tests that rely on dnspython for inspecting the output - as serialization bugs will like deserialize just fine with the same code ;)","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"0f16a35a7bf6fd555fd5a9e8fd27f7140e7736e3","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        req \u003d dns.message.make_query(qname, rdtype, rdclass\u003drdclass)"},{"line_number":81,"context_line":"        return self._send_request_to_mdns(req)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_query(self):"},{"line_number":84,"context_line":"        zone \u003d self.create_zone()"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # Reply query for NS"},{"line_number":87,"context_line":"        response \u003d self._query_mdns(zone.name, dns.rdatatype.NS)"},{"line_number":88,"context_line":"        self.assertEqual(dns.rcode.NOERROR, response.rcode())"},{"line_number":89,"context_line":"        self.assertEqual(1, len(response.answer))"},{"line_number":90,"context_line":"        ans \u003d response.answer[0]"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_14cee859","line":87,"range":{"start_line":83,"start_character":4,"end_line":87,"end_character":37},"in_reply_to":"7af24918_90c5eb3d","updated":"2016-03-02 16:03:36.000000000","message":"These tests are meant to test the interaction between all the components involved in mDNS receiving a query and replying to it.\nFor example, the fixed bug was triggered only when the output _convert_to_rrset was used in dnspython\u0027s to_wire() method.\n\nSo far we have not been covering this parts of the codebase at all so having some basic functional tests is a starting point. Ideally we should also tests mDNS in isolation as part of the unit test suite but that could be done in future.\n\ntest_service is the only place where we are actually running mDNS","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"}],"designate/tests/unit/test_mdns/test_handler.py":[{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"c051eb5be6de1a0d6fe42ecc4f765a8b7c86407a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        assert list(self.handler(request)) \u003d\u003d [\u0027Notify\u0027]"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test__convert_to_rrset_no_records(self):"},{"line_number":115,"context_line":"        zone \u003d RoObject(ttl\u003d1234)"},{"line_number":116,"context_line":"        recordset \u003d objects.RecordSet("},{"line_number":117,"context_line":"            name\u003d\u0027www.example.org.\u0027,"},{"line_number":118,"context_line":"            type\u003d\u0027A\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_803b0feb","line":115,"updated":"2016-03-07 20:11:50.000000000","message":"Use Zone","commit_id":"ab6b39af90072569b73b5955bf5ab8514ecddef6"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"c051eb5be6de1a0d6fe42ecc4f765a8b7c86407a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.assertEqual(None, r_rrset)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test__convert_to_rrset(self):"},{"line_number":127,"context_line":"        zone \u003d RoObject(ttl\u003d1234)"},{"line_number":128,"context_line":"        recordset \u003d objects.RecordSet("},{"line_number":129,"context_line":"            name\u003d\u0027www.example.org.\u0027,"},{"line_number":130,"context_line":"            type\u003d\u0027A\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_60408357","line":127,"updated":"2016-03-07 20:11:50.000000000","message":"We should just use a zone. use of RoObject causes a lot of issues.","commit_id":"ab6b39af90072569b73b5955bf5ab8514ecddef6"}],"designate/utils.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"23bd4f83c1b528b91cdd2cbb9b0ccbdde2868aaa","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    sock_tcp.setblocking(True)"},{"line_number":477,"context_line":"    sock_tcp.bind((host, port))"},{"line_number":478,"context_line":"    if port \u003d\u003d 0:"},{"line_number":479,"context_line":"        newport \u003d sock_tcp.getsockname()[1]"},{"line_number":480,"context_line":"        LOG.info(_LI(\u0027Listening on TCP port %(port)d\u0027), {\u0027port\u0027: newport})"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_70f81f4a","line":478,"range":{"start_line":478,"start_character":12,"end_line":478,"end_character":14},"updated":"2016-03-02 14:36:34.000000000","message":"It\u0027s better IMO to either always  or never log the port we bound to, rather than only logging when one is randomly selected.","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"0f16a35a7bf6fd555fd5a9e8fd27f7140e7736e3","unresolved":false,"context_lines":[{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    sock_tcp.setblocking(True)"},{"line_number":477,"context_line":"    sock_tcp.bind((host, port))"},{"line_number":478,"context_line":"    if port \u003d\u003d 0:"},{"line_number":479,"context_line":"        newport \u003d sock_tcp.getsockname()[1]"},{"line_number":480,"context_line":"        LOG.info(_LI(\u0027Listening on TCP port %(port)d\u0027), {\u0027port\u0027: newport})"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_1a56195c","line":478,"range":{"start_line":478,"start_character":12,"end_line":478,"end_character":14},"in_reply_to":"7af24918_70f81f4a","updated":"2016-03-02 16:03:36.000000000","message":"As discussed, we log the requested port earlier on","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"23bd4f83c1b528b91cdd2cbb9b0ccbdde2868aaa","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    sock_udp.setblocking(True)"},{"line_number":501,"context_line":"    sock_udp.bind((host, port))"},{"line_number":502,"context_line":"    if port \u003d\u003d 0:"},{"line_number":503,"context_line":"        newport \u003d sock_udp.getsockname()[1]"},{"line_number":504,"context_line":"        LOG.info(_LI(\u0027Listening on UDP port %(port)d\u0027), {\u0027port\u0027: newport})"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_d095b3e4","line":502,"range":{"start_line":502,"start_character":11,"end_line":502,"end_character":12},"updated":"2016-03-02 14:36:34.000000000","message":"Same as above","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"0f16a35a7bf6fd555fd5a9e8fd27f7140e7736e3","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    sock_udp.setblocking(True)"},{"line_number":501,"context_line":"    sock_udp.bind((host, port))"},{"line_number":502,"context_line":"    if port \u003d\u003d 0:"},{"line_number":503,"context_line":"        newport \u003d sock_udp.getsockname()[1]"},{"line_number":504,"context_line":"        LOG.info(_LI(\u0027Listening on UDP port %(port)d\u0027), {\u0027port\u0027: newport})"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_ba39e543","line":502,"range":{"start_line":502,"start_character":11,"end_line":502,"end_character":12},"in_reply_to":"7af24918_d095b3e4","updated":"2016-03-02 16:03:36.000000000","message":"Done","commit_id":"dba0b006c70b07fb4fa756bbae368a7fc312fbd0"}]}
