)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"31e6de8c9cc49be5f23c790e05ec4ecc4e68f2a3","unresolved":false,"context_lines":[{"line_number":11,"context_line":"in square brackets if it is IPv6."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ifc44e5aa3c5b814b6ceba04461bb68fe1d75c22b"},{"line_number":14,"context_line":"Fixes-Bug: #1650533"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba5201f7_55388fa0","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":5},"updated":"2017-01-04 11:41:03.000000000","message":"Closes-Bug\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references","commit_id":"6ccd5af96c18ac59b431347c150d20400c216a67"}],"ironic_python_agent/agent.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"31e6de8c9cc49be5f23c790e05ec4ecc4e68f2a3","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        try:"},{"line_number":213,"context_line":"            return out.strip().split(\u0027\\n\u0027)[0].split(\u0027src\u0027)[1].strip()\\"},{"line_number":214,"context_line":"                .split()[0]"},{"line_number":215,"context_line":"        except IndexError:"},{"line_number":216,"context_line":"            LOG.warning(\u0027No route to host %(dest)s, route record: %(rec)s\u0027,"},{"line_number":217,"context_line":"                        {\u0027dest\u0027: dest, \u0027rec\u0027: out})"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_d042cd3d","line":215,"range":{"start_line":213,"start_character":0,"end_line":215,"end_character":26},"updated":"2017-01-04 11:41:03.000000000","message":"Don\u0027t need to do it as part of this review but... I wonder if it would be better to use the socket module to do this, this bunch of split/strip() looks pretty messy and hard to read.\n\nExample:\n\nfamily \u003d socket.AF_INET\nif netutils.is_valid_ipv6(dest):\n   family \u003d socket.AF_INET6\n\ntry:\n    s \u003d socket.socket(family, socket.SOCK_DGRAM)\n    s.connect((dest, 0))\n    src \u003d s.getsockname()[0]\nexcept socket.error:\n    LOG.warning(\u0027No route ...\u0027)\nfinally:\n    s.close()\n\nreturn src","commit_id":"6ccd5af96c18ac59b431347c150d20400c216a67"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"decd39cdf1721c517eff8e3a275cb1bb7eac1e82","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        try:"},{"line_number":213,"context_line":"            return out.strip().split(\u0027\\n\u0027)[0].split(\u0027src\u0027)[1].strip()\\"},{"line_number":214,"context_line":"                .split()[0]"},{"line_number":215,"context_line":"        except IndexError:"},{"line_number":216,"context_line":"            LOG.warning(\u0027No route to host %(dest)s, route record: %(rec)s\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_bbc9f75c","line":213,"updated":"2017-01-10 00:06:32.000000000","message":"This is getting kind of hard to understand.\n\nnit: ending strip() probably not needed with the split() call after.\n\nMaybe some variables + comments would be helpful.\n\n ip_line \u003d out.strip().splitline()[0]\n return ip_line.split(\u0027src\u0027)[1].split()[0]","commit_id":"afab2ce2aed82193845d427d591a2e2f9083f69f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7a7e5b2c25bbe38ef6cc3017e7544236c14088ad","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            return"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        try:"},{"line_number":213,"context_line":"            return out.strip().split(\u0027\\n\u0027)[0].split(\u0027src\u0027)[1].strip()\\"},{"line_number":214,"context_line":"                .split()[0]"},{"line_number":215,"context_line":"        except IndexError:"},{"line_number":216,"context_line":"            LOG.warning(\u0027No route to host %(dest)s, route record: %(rec)s\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_a520d1f8","line":213,"in_reply_to":"ba5201f7_bbc9f75c","updated":"2017-01-10 16:00:34.000000000","message":"-1\n\nI don\u0027t think that more variables is a solution, I think the right way to do this is to use the libraries to get the route instead of running a command and do a lot of string manipulation, for example:\n\nfamily \u003d socket.AF_INET\nif netutils.is_valid_ipv6(dest):\n   family \u003d socket.AF_INET6\n\ntry:\n    s \u003d socket.socket(family, socket.SOCK_DGRAM)\n    s.connect((dest, 0))\n    src \u003d s.getsockname()[0]\nexcept socket.error:\n    LOG.warning(\u0027No route ...\u0027)\nfinally:\n    s.close()\n\nreturn src\n\nThat said, this refactor should probably come later in another patch because it\u0027s not really related to the change here.","commit_id":"afab2ce2aed82193845d427d591a2e2f9083f69f"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"decd39cdf1721c517eff8e3a275cb1bb7eac1e82","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        try:"},{"line_number":213,"context_line":"            return out.strip().split(\u0027\\n\u0027)[0].split(\u0027src\u0027)[1].strip()\\"},{"line_number":214,"context_line":"                .split()[0]"},{"line_number":215,"context_line":"        except IndexError:"},{"line_number":216,"context_line":"            LOG.warning(\u0027No route to host %(dest)s, route record: %(rec)s\u0027,"},{"line_number":217,"context_line":"                        {\u0027dest\u0027: dest, \u0027rec\u0027: out})"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_5b080b92","line":215,"updated":"2017-01-10 00:06:32.000000000","message":"Please add a unit test which calls _get_route_source() directly to test this change.","commit_id":"afab2ce2aed82193845d427d591a2e2f9083f69f"}],"ironic_python_agent/ironic_api_client.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"decd39cdf1721c517eff8e3a275cb1bb7eac1e82","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        # Got valid content"},{"line_number":142,"context_line":"        raise loopingcall.LoopingCallDone(retvalue\u003dcontent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _get_agent_url(self, advertise_address):"},{"line_number":145,"context_line":"        return \u0027http://{}:{}\u0027.format(netutils.wrap_ipv6(advertise_address[0]),"},{"line_number":146,"context_line":"                                     advertise_address[1])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_9bd513bb","line":144,"updated":"2017-01-10 00:06:32.000000000","message":"Please add a unit test which calls _get_agent_url() directly to test this change.","commit_id":"afab2ce2aed82193845d427d591a2e2f9083f69f"}],"ironic_python_agent/netutils.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"decd39cdf1721c517eff8e3a275cb1bb7eac1e82","unresolved":false,"context_lines":[{"line_number":219,"context_line":"def wrap_ipv6(ip):"},{"line_number":220,"context_line":"    if netutils.is_valid_ipv6(ip):"},{"line_number":221,"context_line":"        return \"[%s]\" % ip"},{"line_number":222,"context_line":"    return ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_9b9d135c","line":222,"updated":"2017-01-10 00:06:32.000000000","message":"Add unit tests please","commit_id":"afab2ce2aed82193845d427d591a2e2f9083f69f"}],"ironic_python_agent/tests/unit/test_agent.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        self.assertRaises(errors.UnknownNodeError,"},{"line_number":468,"context_line":"                          self.agent.get_node_uuid)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":471,"context_line":"    def test_get_route_source(self, mock_execute):"},{"line_number":472,"context_line":"        mock_execute.return_value \u003d (\u0027XXX src 1.2.3.4 XXX\u0027, None)"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_f56d15cd","line":470,"updated":"2017-01-10 22:21:09.000000000","message":"Please add: autospec\u003dTrue","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":471,"context_line":"    def test_get_route_source(self, mock_execute):"},{"line_number":472,"context_line":"        mock_execute.return_value \u003d (\u0027XXX src 1.2.3.4 XXX\u0027, None)"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        source \u003d self.agent._get_route_source(\u0027XXX\u0027)"},{"line_number":475,"context_line":"        self.assertEqual(\u00271.2.3.4\u0027, source)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_f7435d6a","line":472,"updated":"2017-01-10 22:21:09.000000000","message":"Seems like this should be a multi-line value as that is what the command will return. Like on line 620.","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":474,"context_line":"        source \u003d self.agent._get_route_source(\u0027XXX\u0027)"},{"line_number":475,"context_line":"        self.assertEqual(\u00271.2.3.4\u0027, source)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    @mock.patch.object(log.KeywordArgumentAdapter, \u0027warning\u0027)"},{"line_number":478,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":479,"context_line":"    def test_get_route_source_indexerror(self, mock_execute, mock_warning):"},{"line_number":480,"context_line":"        mock_execute.return_value \u003d (\u0027XXX src \u0027, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_95184977","line":477,"updated":"2017-01-10 22:21:09.000000000","message":"@mock.patch.object(agent, \u0027LOG\u0027, autospec\u003dTrue)","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        self.assertEqual(\u00271.2.3.4\u0027, source)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    @mock.patch.object(log.KeywordArgumentAdapter, \u0027warning\u0027)"},{"line_number":478,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":479,"context_line":"    def test_get_route_source_indexerror(self, mock_execute, mock_warning):"},{"line_number":480,"context_line":"        mock_execute.return_value \u003d (\u0027XXX src \u0027, None)"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_35687dba","line":478,"updated":"2017-01-10 22:21:09.000000000","message":"Please add autospec\u003dTrue","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    @mock.patch.object(log.KeywordArgumentAdapter, \u0027warning\u0027)"},{"line_number":478,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":479,"context_line":"    def test_get_route_source_indexerror(self, mock_execute, mock_warning):"},{"line_number":480,"context_line":"        mock_execute.return_value \u003d (\u0027XXX src \u0027, None)"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"        source \u003d self.agent._get_route_source(\u0027XXX\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_d54f3168","line":479,"range":{"start_line":479,"start_character":61,"end_line":479,"end_character":73},"updated":"2017-01-10 22:21:09.000000000","message":"s/mock_warning/mock_log/","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":477,"context_line":"    @mock.patch.object(log.KeywordArgumentAdapter, \u0027warning\u0027)"},{"line_number":478,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":479,"context_line":"    def test_get_route_source_indexerror(self, mock_execute, mock_warning):"},{"line_number":480,"context_line":"        mock_execute.return_value \u003d (\u0027XXX src \u0027, None)"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":"        source \u003d self.agent._get_route_source(\u0027XXX\u0027)"},{"line_number":483,"context_line":"        self.assertIsNone(source)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_17154148","line":480,"updated":"2017-01-10 22:21:09.000000000","message":"Seems like this should be a multi-line value as that is what the command will return. Like on line 620.","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"57236c4a8b3e4397117b3db0989965c74bd31f2d","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"        source \u003d self.agent._get_route_source(\u0027XXX\u0027)"},{"line_number":483,"context_line":"        self.assertIsNone(source)"},{"line_number":484,"context_line":"        mock_warning.assert_called_once()"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"@mock.patch.object(hardware.GenericHardwareManager, \u0027_wait_for_disks\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_952f6987","line":484,"updated":"2017-01-10 22:21:09.000000000","message":"mock_log.warning.assert_called_once()","commit_id":"ac52176b6260fe338831721d0ec0c64a1ab0e8b8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d34ca4bae35ca315b6f4bae35245d8af09b8b977","unresolved":false,"context_lines":[{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        source \u003d self.agent._get_route_source(\u0027XXX\u0027)"},{"line_number":474,"context_line":"        self.assertEqual(\u00271.2.3.4\u0027, source)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"    @mock.patch.object(agent, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":477,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":478,"context_line":"    def test_get_route_source_indexerror(self, mock_execute, mock_log):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_794486b6","line":475,"updated":"2017-01-11 21:58:21.000000000","message":"Can a follow up patch be done which also tests an IPv6 address, like this test. Calling _get_route_source() directly","commit_id":"9f5f6640804e255b05adfa34de9dd4d900fcdcbf"}],"releasenotes/notes/ip6-addresses-1c2b9bcd9a124de7.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f84ec1d163ed01186732039a96339133fe939975","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Ironic Python Agent now correctly detects its IPv6 address"},{"line_number":4,"context_line":"    if comunicating with ironic over IPv6. This address is also"},{"line_number":5,"context_line":"    wrapped in square brackets if the address being advertised"},{"line_number":6,"context_line":"    id IPv6."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"ba5201f7_700afa22","line":4,"updated":"2017-01-04 14:16:32.000000000","message":"typo: communicating","commit_id":"a52850284b38910d668fc64b6e3c7e7688d1ca0f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f84ec1d163ed01186732039a96339133fe939975","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Ironic Python Agent now correctly detects its IPv6 address"},{"line_number":4,"context_line":"    if comunicating with ironic over IPv6. This address is also"},{"line_number":5,"context_line":"    wrapped in square brackets if the address being advertised"},{"line_number":6,"context_line":"    id IPv6."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"ba5201f7_900d9e39","line":6,"updated":"2017-01-04 14:16:32.000000000","message":"s/id/is/","commit_id":"a52850284b38910d668fc64b6e3c7e7688d1ca0f"}]}
