)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef1097e79d7888d454339bd152a99eb32be71691","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add strict option to discover_hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds a --strict option that can be passed in when calling the"},{"line_number":10,"context_line":"nova-manage cell_v2 discover_hosts command. When this optio is used,"},{"line_number":11,"context_line":"the command will only return success if a new host has been found."},{"line_number":12,"context_line":"In any other case it is considered a failure."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_a8a195fa","line":10,"range":{"start_line":10,"start_character":54,"end_line":10,"end_character":59},"updated":"2017-05-23 16:04:41.000000000","message":"option","commit_id":"072ccc1ace9f6bdd64ac8a10ac82a4550fdac4a2"},{"author":{"_account_id":16710,"name":"Eric Berglund","email":"esberglu@us.ibm.com","username":"esberglu"},"change_message_id":"fa7bd5ce0a211b117d4a5840664e88711dac54dc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add strict option to discover_hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds a --strict option that can be passed in when calling the"},{"line_number":10,"context_line":"nova-manage cell_v2 discover_hosts command. When this optio is used,"},{"line_number":11,"context_line":"the command will only return success if a new host has been found."},{"line_number":12,"context_line":"In any other case it is considered a failure."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ff0f0b1f_03c74266","line":10,"range":{"start_line":10,"start_character":54,"end_line":10,"end_character":59},"in_reply_to":"ff0f0b1f_a8a195fa","updated":"2017-05-23 16:32:47.000000000","message":"Done","commit_id":"072ccc1ace9f6bdd64ac8a10ac82a4550fdac4a2"}],"doc/source/man/nova-manage.rst":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"55741e981e52e20c17af8a3b880cc028ddf7546e","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    nothing will be done. You need to re-run this command each time you add"},{"line_number":152,"context_line":"    more compute hosts to a cell (otherwise the scheduler will never place"},{"line_number":153,"context_line":"    instances there and the API will not list the new hosts). If the strict"},{"line_number":154,"context_line":"    option is provided success (0) will only be returned if a new host is"},{"line_number":155,"context_line":"    found. Any other result will return failure (1)."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"``nova-manage cell_v2 list_cells [--verbose]``"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff0f0b1f_17b427d0","line":155,"range":{"start_line":154,"start_character":48,"end_line":155,"end_character":39},"updated":"2017-05-23 13:54:19.000000000","message":"nit: \u0027exit code\u0027 is more appropriate than \u0027return\u0027 for a command.","commit_id":"ed35107c9c32b9aab922ba55e26e9cc7de8ea516"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"dad759e68046ca76f5035972dbc2cff7ccd04967","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    any hosts which are not currently mapped. If a host is already mapped"},{"line_number":151,"context_line":"    nothing will be done. You need to re-run this command each time you add"},{"line_number":152,"context_line":"    more compute hosts to a cell (otherwise the scheduler will never place"},{"line_number":153,"context_line":"    instances there and the API will not list the new hosts). If the strict"},{"line_number":154,"context_line":"    option is provided the command will only be considered successful if an"},{"line_number":155,"context_line":"    unmapped host is discovered (exit code 0). Any other case is considered a"},{"line_number":156,"context_line":"    failure (exit code 1)."}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff0f0b1f_d4eb1810","line":153,"range":{"start_line":153,"start_character":69,"end_line":153,"end_character":75},"updated":"2017-05-24 20:08:26.000000000","message":"This should probably be \"--strict\" but I think people will understand.","commit_id":"aaae213bf32096c56cb1bfcb4d0ac3cafd1c13fb"}],"nova/cmd/manage.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"55741e981e52e20c17af8a3b880cc028ddf7546e","unresolved":false,"context_lines":[{"line_number":1449,"context_line":"    @args(\u0027--verbose\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":1450,"context_line":"          help\u003d_(\u0027Provide detailed output when discovering hosts.\u0027))"},{"line_number":1451,"context_line":"    @args(\u0027--strict\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":1452,"context_line":"          help\u003d_(\u0027Return success (0) only if a host is discovered. Any other \u0027"},{"line_number":1453,"context_line":"                 \u0027result will return failure (1).\u0027))"},{"line_number":1454,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone, verbose\u003dFalse, strict\u003dFalse):"},{"line_number":1455,"context_line":"        \"\"\"Searches cells, or a single cell, and maps found hosts."},{"line_number":1456,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_1737874f","line":1453,"range":{"start_line":1452,"start_character":18,"end_line":1453,"end_character":36},"updated":"2017-05-23 13:54:19.000000000","message":"Ditto.","commit_id":"ed35107c9c32b9aab922ba55e26e9cc7de8ea516"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"15dced4c5fb3db39a30bd59cf40ff542f230b766","unresolved":false,"context_lines":[{"line_number":1468,"context_line":"        hosts \u003d host_mapping_obj.discover_hosts(ctxt, cell_uuid, status_fn)"},{"line_number":1469,"context_line":"        # discover_hosts will return an empty list if no hosts are discovered"},{"line_number":1470,"context_line":"        if strict:"},{"line_number":1471,"context_line":"            if not hosts:"},{"line_number":1472,"context_line":"                return 1"},{"line_number":1473,"context_line":"            else:"},{"line_number":1474,"context_line":"                return 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_515ce1eb","line":1471,"updated":"2017-05-23 18:55:39.000000000","message":"You could do this as:\n\n return int(not hosts)\n\nand be a little more compact.","commit_id":"6c28f7f20339db905d038c5e5ff23a60ae470c30"}],"nova/tests/unit/test_nova_manage.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"15dced4c5fb3db39a30bd59cf40ff542f230b766","unresolved":false,"context_lines":[{"line_number":1391,"context_line":"        mock_discover_hosts.return_value \u003d [\u0027fake\u0027]"},{"line_number":1392,"context_line":"        self.assertEqual(self.commands.discover_hosts(strict\u003dTrue), 0)"},{"line_number":1393,"context_line":"        mock_discover_hosts.return_value \u003d []"},{"line_number":1394,"context_line":"        self.assertEqual(self.commands.discover_hosts(strict\u003dTrue), 1)"},{"line_number":1395,"context_line":""},{"line_number":1396,"context_line":"    def test_validate_transport_url_in_conf(self):"},{"line_number":1397,"context_line":"        from_conf \u003d \u0027fake://user:pass@host:port/\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_512aa12b","line":1394,"updated":"2017-05-23 18:55:39.000000000","message":"Can you assert that if strict is not provided that we still get None as the result? I could be missing it, but I don\u0027t think that is validated anywhere in the existing tests.","commit_id":"6c28f7f20339db905d038c5e5ff23a60ae470c30"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"0708ec519c008db7efee243ee06bd691edb1eed9","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"        self.assertEqual(self.commands.discover_hosts(strict\u003dTrue), 1)"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"        # Check the return when strict\u003dFalse"},{"line_number":1400,"context_line":"        self.assertEqual(self.commands.discover_hosts(), None)"},{"line_number":1401,"context_line":""},{"line_number":1402,"context_line":"    def test_validate_transport_url_in_conf(self):"},{"line_number":1403,"context_line":"        from_conf \u003d \u0027fake://user:pass@host:port/\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff0f0b1f_2f31f65a","line":1400,"range":{"start_line":1400,"start_character":8,"end_line":1400,"end_character":62},"updated":"2017-05-24 07:03:36.000000000","message":"Should use asserIsNone","commit_id":"063dba919c226c43a26a8f0990b76aac40448584"},{"author":{"_account_id":16710,"name":"Eric Berglund","email":"esberglu@us.ibm.com","username":"esberglu"},"change_message_id":"f275916ecef6770cc54978ee4870521d945c4f85","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"        self.assertEqual(self.commands.discover_hosts(strict\u003dTrue), 1)"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"        # Check the return when strict\u003dFalse"},{"line_number":1400,"context_line":"        self.assertEqual(self.commands.discover_hosts(), None)"},{"line_number":1401,"context_line":""},{"line_number":1402,"context_line":"    def test_validate_transport_url_in_conf(self):"},{"line_number":1403,"context_line":"        from_conf \u003d \u0027fake://user:pass@host:port/\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff0f0b1f_fabe13d3","line":1400,"range":{"start_line":1400,"start_character":8,"end_line":1400,"end_character":62},"in_reply_to":"ff0f0b1f_2f31f65a","updated":"2017-05-24 13:44:07.000000000","message":"Done","commit_id":"063dba919c226c43a26a8f0990b76aac40448584"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"dad759e68046ca76f5035972dbc2cff7ccd04967","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"    def test_discover_hosts_strict(self, mock_discover_hosts):"},{"line_number":1395,"context_line":"        # Check for exit code 0 if unmapped hosts found"},{"line_number":1396,"context_line":"        mock_discover_hosts.return_value \u003d [\u0027fake\u0027]"},{"line_number":1397,"context_line":"        self.assertEqual(self.commands.discover_hosts(strict\u003dTrue), 0)"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"        # Check for exit code 1 if no unmapped hosts are found"},{"line_number":1400,"context_line":"        mock_discover_hosts.return_value \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_3448142b","line":1397,"updated":"2017-05-24 20:08:26.000000000","message":"These should be \"assertEqual(expected, actual)\" for the failed assertion message to be correct.","commit_id":"aaae213bf32096c56cb1bfcb4d0ac3cafd1c13fb"}]}
