)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"2d57e25174dc2c49d0e827808c5c2adb84e5c32b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"List the metrics names stored in DB for compute node \u003chost\u003e or"},{"line_number":13,"context_line":"for all compute nodes if host parameter is not provided."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- nova-manage host_metric --host\u003d\u003chost\u003e show"},{"line_number":16,"context_line":"Show all the metrics stored in DB for the compute node \u003chost\u003e."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also restore the print_list function from cliutils module which was"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_0a0ccfea","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":44},"updated":"2016-04-27 04:07:44.000000000","message":"hi lianhao , I wonder why noting using nova-manage show \u003chost\u003e","commit_id":"2dc80c27117307cbd3038cd14b81930f127c1025"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0222e00651467843f6fb861845aa673cf1477e48","unresolved":false,"context_lines":[{"line_number":12,"context_line":"List the metrics names stored in DB for compute node \u003chost\u003e or"},{"line_number":13,"context_line":"for all compute nodes if host parameter is not provided."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- nova-manage host_metric --host\u003d\u003chost\u003e show"},{"line_number":16,"context_line":"Show all the metrics stored in DB for the compute node \u003chost\u003e."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also restore the print_list function from cliutils module which was"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_8df90783","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":44},"in_reply_to":"1a122d0e_0a0ccfea","updated":"2016-04-27 16:44:21.000000000","message":"do you mean \u0027nova-manage host list\u0027? That command is used to list all the physical node running nova internal services, totally different story.","commit_id":"2dc80c27117307cbd3038cd14b81930f127c1025"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e49839fd180fc8bc419ac7063e6f0d39ca8d2be0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"List the metrics names stored in DB for compute node \u003chost\u003e or"},{"line_number":13,"context_line":"for all compute nodes if host parameter is not provided."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- nova-manage host_metric --host\u003d\u003chost\u003e show"},{"line_number":16,"context_line":"Show all the metrics stored in DB for the compute node \u003chost\u003e."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also restore the print_list function from cliutils module which was"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a122d0e_67691fbe","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":44},"in_reply_to":"1a122d0e_8df90783","updated":"2016-04-28 01:31:59.000000000","message":"Sorry for the typo, I meant\n\nnova-manage host_metric show \u003chost\u003e\n\nPer my understanding --host\u003d\u003chost\u003e is used to filter something, but the show\u0027s mean  you want to show some specific host, it has same meaning with nova show \u003chost\u003e.","commit_id":"2dc80c27117307cbd3038cd14b81930f127c1025"}],"nova/cmd/manage.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"13b61d64c14c394e8f97e3ae1e90ed156d22cb2d","unresolved":false,"context_lines":[{"line_number":1333,"context_line":""},{"line_number":1334,"context_line":"    @args(\u0027--host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027, help\u003d\u0027Host\u0027, required\u003dTrue)"},{"line_number":1335,"context_line":"    def show(self, host\u003dNone):"},{"line_number":1336,"context_line":"        compute_node \u003d self._get_compute_nodes(host)[0]"},{"line_number":1337,"context_line":"        metrics \u003d objects.MonitorMetricList.from_json(compute_node.metrics)"},{"line_number":1338,"context_line":"        cliutils.print_list(metrics,"},{"line_number":1339,"context_line":"                            [\u0027name\u0027, \u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_6ad717c0","line":1336,"updated":"2016-01-26 06:58:13.000000000","message":"Won\u0027t getting index 0 from list throw an IndexError if the list (returned by self._get_compute_nodes()) is empty?","commit_id":"3d5253300f91ec006a4a90778ed05336bdc2a53a"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5835f04ab65facb172a6db83bdff3a449a0c45f3","unresolved":false,"context_lines":[{"line_number":1333,"context_line":""},{"line_number":1334,"context_line":"    @args(\u0027--host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027, help\u003d\u0027Host\u0027, required\u003dTrue)"},{"line_number":1335,"context_line":"    def show(self, host\u003dNone):"},{"line_number":1336,"context_line":"        compute_node \u003d self._get_compute_nodes(host)[0]"},{"line_number":1337,"context_line":"        metrics \u003d objects.MonitorMetricList.from_json(compute_node.metrics)"},{"line_number":1338,"context_line":"        cliutils.print_list(metrics,"},{"line_number":1339,"context_line":"                            [\u0027name\u0027, \u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_4dbb4a0f","line":1336,"in_reply_to":"9a68dd71_6ad717c0","updated":"2016-01-27 12:20:11.000000000","message":"Done","commit_id":"3d5253300f91ec006a4a90778ed05336bdc2a53a"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"3c73df7153481eb6c8e1aa974a5d642c61ed2494","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"    def _get_compute_nodes(self, host):"},{"line_number":1316,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":1317,"context_line":"        if host:"},{"line_number":1318,"context_line":"            compute_nodes \u003d objects.ComputeNodeList.get_all_by_host(ctxt,"},{"line_number":1319,"context_line":"                                                                    host)"},{"line_number":1320,"context_line":"        else:"},{"line_number":1321,"context_line":"            compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_c42213a3","line":1318,"updated":"2016-01-30 11:18:39.000000000","message":"Sorry for not noticing this earlier: method get_all_by_host() will throw a ComputeHostNotFound exception from nova/db/sqlalchemy/api.py \u0027s function compute_get_all_by_host() if I\u0027m not wrong. We need to handle that exception too here, and I\u0027d prefer if you write a unit test for the same too.","commit_id":"b877f66748d782481612ea03ec1b07e175a1aed9"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"8d9811095cf1f37faa1b6af8b16d145f03b6e275","unresolved":false,"context_lines":[{"line_number":1315,"context_line":"    def _get_compute_nodes(self, host):"},{"line_number":1316,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":1317,"context_line":"        if host:"},{"line_number":1318,"context_line":"            compute_nodes \u003d objects.ComputeNodeList.get_all_by_host(ctxt,"},{"line_number":1319,"context_line":"                                                                    host)"},{"line_number":1320,"context_line":"        else:"},{"line_number":1321,"context_line":"            compute_nodes \u003d objects.ComputeNodeList.get_all(ctxt)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_7a33ad62","line":1318,"in_reply_to":"7a5de9d1_c42213a3","updated":"2016-04-14 06:33:55.000000000","message":"I think the ComputeHostNotFound exception will be catch by https://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L1573, so there is no need to handle this kind of exception explicitly.\n\n\nIf the user input a non existing host, the nova-manage would return\nerror: Compute host XXX could not be found.","commit_id":"b877f66748d782481612ea03ec1b07e175a1aed9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3391fa0d64cc6d49857c45c9f097bbd74483c25","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"    @args(\u0027--host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027, help\u003d\u0027Host\u0027)"},{"line_number":1351,"context_line":"    def show(self, host):"},{"line_number":1352,"context_line":"        compute_nodes \u003d self._get_compute_nodes(host)"},{"line_number":1353,"context_line":"        if compute_nodes:"},{"line_number":1354,"context_line":"            node \u003d compute_nodes[0]"},{"line_number":1355,"context_line":"            metrics \u003d objects.MonitorMetricList.from_json(node.metrics)"},{"line_number":1356,"context_line":"            utils.print_list(metrics,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_3335faf6","line":1353,"updated":"2016-07-05 19:01:16.000000000","message":"You won\u0027t get an empty list, the DB API will raise a 404 if a compute node isn\u0027t found by the given host.","commit_id":"e09806bae93beef79dc093bcc4b5ba11399ce51b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1b06283956472f38c259b8022cede61a031d1e22","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"    @args(\u0027--host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027, help\u003d\u0027Host\u0027)"},{"line_number":1351,"context_line":"    def show(self, host):"},{"line_number":1352,"context_line":"        compute_nodes \u003d self._get_compute_nodes(host)"},{"line_number":1353,"context_line":"        if compute_nodes:"},{"line_number":1354,"context_line":"            node \u003d compute_nodes[0]"},{"line_number":1355,"context_line":"            metrics \u003d objects.MonitorMetricList.from_json(node.metrics)"},{"line_number":1356,"context_line":"            utils.print_list(metrics,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_420344b8","line":1353,"in_reply_to":"1aa78d24_3335faf6","updated":"2016-07-07 01:06:52.000000000","message":"Thanks for pointing out. Will modify accordingly.","commit_id":"e09806bae93beef79dc093bcc4b5ba11399ce51b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3391fa0d64cc6d49857c45c9f097bbd74483c25","unresolved":false,"context_lines":[{"line_number":1354,"context_line":"            node \u003d compute_nodes[0]"},{"line_number":1355,"context_line":"            metrics \u003d objects.MonitorMetricList.from_json(node.metrics)"},{"line_number":1356,"context_line":"            utils.print_list(metrics,"},{"line_number":1357,"context_line":"                                [\u0027name\u0027, \u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"CATEGORIES \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_aed7c1bd","line":1357,"range":{"start_line":1357,"start_character":64,"end_line":1357,"end_character":70},"updated":"2016-07-05 19:01:16.000000000","message":"Is this useful? I think it\u0027s the stevedore extension class name that was loaded to get the metric, which unless multiple sources can provide the same metric name, seems not very useful.","commit_id":"e09806bae93beef79dc093bcc4b5ba11399ce51b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1b06283956472f38c259b8022cede61a031d1e22","unresolved":false,"context_lines":[{"line_number":1354,"context_line":"            node \u003d compute_nodes[0]"},{"line_number":1355,"context_line":"            metrics \u003d objects.MonitorMetricList.from_json(node.metrics)"},{"line_number":1356,"context_line":"            utils.print_list(metrics,"},{"line_number":1357,"context_line":"                                [\u0027name\u0027, \u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"},{"line_number":1358,"context_line":""},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"CATEGORIES \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_e2ccf08a","line":1357,"range":{"start_line":1357,"start_character":64,"end_line":1357,"end_character":70},"in_reply_to":"1aa78d24_aed7c1bd","updated":"2016-07-07 01:06:52.000000000","message":"It\u0027s not. A single stevedore extension monitor plugin may report multiple metrics which get populated into the database, so we don\u0027t know what metric names will be in the DB unless we read the plugin code. That\u0027s the reason we propose this patch to display those names to ease the life of the admin","commit_id":"e09806bae93beef79dc093bcc4b5ba11399ce51b"}],"nova/tests/unit/test_nova_manage.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"13b61d64c14c394e8f97e3ae1e90ed156d22cb2d","unresolved":false,"context_lines":[{"line_number":682,"context_line":"    }"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"class HostMetricCommandsTestCase(test.TestCase):"},{"line_number":686,"context_line":"    def setUp(self):"},{"line_number":687,"context_line":"        super(HostMetricCommandsTestCase, self).setUp()"},{"line_number":688,"context_line":"        self.commands \u003d manage.HostMetricCommands()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_0aa9bb24","line":685,"updated":"2016-01-26 06:58:13.000000000","message":"Maybe also write a test when there are no objects returned from db? I\u0027m not sure if this will happen ever in a nova deployment, but just to be sure..","commit_id":"3d5253300f91ec006a4a90778ed05336bdc2a53a"}]}
