)]}'
{"ceilometer/compute/virt/libvirt/inspector.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6b51a41b64e6fe91fc5e2bbd8168f1b0feb94bc7","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def inspect_cpus(self, instance_name):"},{"line_number":111,"context_line":"        domain \u003d self._lookup_by_name(instance_name)"},{"line_number":112,"context_line":"        (__, __, __, num_cpu, cpu_time) \u003d domain.info()"},{"line_number":113,"context_line":"        return virt_inspector.CPUStats(number\u003dnum_cpu, time\u003dcpu_time)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def inspect_vnics(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BkKI%3D","line":112,"updated":"2014-01-24 10:51:22.000000000","message":"Can you explain why you substituted a double-underscore here for the tuple elements that we\u0027re not interested in?","commit_id":"13a61b366edb4f39ac7353c05d542c6734af0ece"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"77cdf4ce6a046740afdf32e4b796924fa611015e","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def inspect_cpus(self, instance_name):"},{"line_number":111,"context_line":"        domain \u003d self._lookup_by_name(instance_name)"},{"line_number":112,"context_line":"        (__, __, __, num_cpu, cpu_time) \u003d domain.info()"},{"line_number":113,"context_line":"        return virt_inspector.CPUStats(number\u003dnum_cpu, time\u003dcpu_time)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def inspect_vnics(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BdGI%3D","line":112,"in_reply_to":"AAAAUH%2F%2BkKI%3D","updated":"2014-01-26 02:47:01.000000000","message":"Eoghan Glynn,thanks for your reviewing, here,if we use single-underscore,the imported method _()  will raise error which used in LOG.warn()","commit_id":"13a61b366edb4f39ac7353c05d542c6734af0ece"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"7337d46df50e56ae07d9c61e38e0dfdc6d869b6b","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    per_type_uris \u003d dict(uml\u003d\u0027uml:///system\u0027, xen\u003d\u0027xen:///\u0027, lxc\u003d\u0027lxc:///\u0027)"},{"line_number":49,"context_line":"    domain_states \u003d [\u0027none\u0027, \u0027run\u0027, \u0027block\u0027, \u0027pause\u0027,"},{"line_number":50,"context_line":"                     \u0027halting\u0027, \u0027off\u0027, \u0027crash\u0027]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def __init__(self):"},{"line_number":53,"context_line":"        self.uri \u003d self._get_uri()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2BKHA%3D","line":50,"updated":"2014-01-29 16:05:55.000000000","message":"i don\u0027t really like the idea of defining our own set of values to libvirt domain_state numbers but i assume it\u0027s not defined anywhere else?\n\nis domain_state \u003d 7 not something that ever happens?\nhttp://libvirt.org/html/libvirt-libvirt.html#virDomainState","commit_id":"711efc87e3679940b2db54982747ce35af551c7a"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"8667d959a8a7f9bbaddec0ca7a96f5d2f47404b3","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def inspect_vnics(self, instance_name):"},{"line_number":114,"context_line":"        domain \u003d self._lookup_by_name(instance_name)"},{"line_number":115,"context_line":"        (state, __, __, __, __) \u003d domain.info()"},{"line_number":116,"context_line":"        #The domain states defined in libvirt-python:"},{"line_number":117,"context_line":"        #   VIR_DOMAIN_NOSTATE \u003d 0"},{"line_number":118,"context_line":"        #   VIR_DOMAIN_RUNNING \u003d 1"},{"line_number":119,"context_line":"        #   VIR_DOMAIN_BLOCKED \u003d 2"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F9Wxg%3D","line":116,"updated":"2014-02-07 14:11:05.000000000","message":"thanks for the change. since you need another patch, i\u0027ll add that i\u0027m not sure we even need these comments. VIR_DOMAIN_SHUTOFF seems like a descriptive enough const name and we only use the one const. if other devs want to use other consts they can look it up.","commit_id":"1c2d9bedb3e564a8101bc28d2b6b430ad3d4e710"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"5ebf956611dcdea98b8d7556dac117fbc27c6301","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        #   VIR_DOMAIN_CRASHED \u003d 6"},{"line_number":124,"context_line":"        #   VIR_DOMAIN_LAST \u003d 7"},{"line_number":125,"context_line":"        if state \u003d\u003d libvirt.VIR_DOMAIN_SHUTOFF:"},{"line_number":126,"context_line":"            LOG.warn(_(\u0027Fail to inspect vnics of %(instance_name)s, \u0027"},{"line_number":127,"context_line":"                       \u0027domain is in state of SHUTOFF\u0027),"},{"line_number":128,"context_line":"                     {\u0027instance_name\u0027: instance_name})"},{"line_number":129,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2Frdg%3D","line":126,"updated":"2014-02-11 15:12:19.000000000","message":"s/Fail/Failed/","commit_id":"d3fb9d90ae4739e7347bc6e90a59f4da87f1a433"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"5ebf956611dcdea98b8d7556dac117fbc27c6301","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        (state, __, __, __, __) \u003d domain.info()"},{"line_number":161,"context_line":"        #The domain states defined in libvirt-python are noted above"},{"line_number":162,"context_line":"        if state \u003d\u003d libvirt.VIR_DOMAIN_SHUTOFF:"},{"line_number":163,"context_line":"            LOG.warn(_(\u0027Fail to inspect disks of %(instance_name)s, \u0027"},{"line_number":164,"context_line":"                       \u0027domain is in state of SHUTOFF\u0027),"},{"line_number":165,"context_line":"                     {\u0027instance_name\u0027: instance_name})"},{"line_number":166,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2FrdU%3D","line":163,"updated":"2014-02-11 15:12:19.000000000","message":"s/Fail/Failed/","commit_id":"d3fb9d90ae4739e7347bc6e90a59f4da87f1a433"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a69e40788c7eede2efe776d1a77a70e5030a5d9c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        #   VIR_DOMAIN_SHUTDOWN \u003d 4"},{"line_number":122,"context_line":"        #   VIR_DOMAIN_SHUTOFF \u003d 5"},{"line_number":123,"context_line":"        #   VIR_DOMAIN_CRASHED \u003d 6"},{"line_number":124,"context_line":"        #   VIR_DOMAIN_LAST \u003d 7"},{"line_number":125,"context_line":"        if state \u003d\u003d libvirt.VIR_DOMAIN_SHUTOFF:"},{"line_number":126,"context_line":"            LOG.warn(_(\u0027Failed to inspect vnics of %(instance_name)s, \u0027"},{"line_number":127,"context_line":"                       \u0027domain is in state of SHUTOFF\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUX%2F%2FO%2Bg%3D","line":124,"updated":"2014-02-14 16:55:51.000000000","message":"If VIR_DOMAIN_SHUTOFF is the only state referred to directly in the code, do we really need all the states and their numeric values listed in a comment?\n\nAlso do we need to explicitly take account of states such as VIR_DOMAIN_CRASHED, VIR_DOMAIN_NOSTATE?","commit_id":"8ba16a6d42aededb673c403fd333b7d998436014"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e9992946c94c42b69b810ac71aaf5a361bde7588","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        #   VIR_DOMAIN_SHUTDOWN \u003d 4"},{"line_number":122,"context_line":"        #   VIR_DOMAIN_SHUTOFF \u003d 5"},{"line_number":123,"context_line":"        #   VIR_DOMAIN_CRASHED \u003d 6"},{"line_number":124,"context_line":"        #   VIR_DOMAIN_LAST \u003d 7"},{"line_number":125,"context_line":"        if state \u003d\u003d libvirt.VIR_DOMAIN_SHUTOFF:"},{"line_number":126,"context_line":"            LOG.warn(_(\u0027Failed to inspect vnics of %(instance_name)s, \u0027"},{"line_number":127,"context_line":"                       \u0027domain is in state of SHUTOFF\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUX%2F%2FNOM%3D","line":124,"in_reply_to":"AAAAUX%2F%2FO%2Bg%3D","updated":"2014-02-14 21:22:07.000000000","message":"+1 on removing the comment","commit_id":"8ba16a6d42aededb673c403fd333b7d998436014"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"455badf7bfbdfaa51d75a8d2cb80b91764450ee9","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        #   VIR_DOMAIN_SHUTDOWN \u003d 4"},{"line_number":122,"context_line":"        #   VIR_DOMAIN_SHUTOFF \u003d 5"},{"line_number":123,"context_line":"        #   VIR_DOMAIN_CRASHED \u003d 6"},{"line_number":124,"context_line":"        #   VIR_DOMAIN_LAST \u003d 7"},{"line_number":125,"context_line":"        if state \u003d\u003d libvirt.VIR_DOMAIN_SHUTOFF:"},{"line_number":126,"context_line":"            LOG.warn(_(\u0027Failed to inspect vnics of %(instance_name)s, \u0027"},{"line_number":127,"context_line":"                       \u0027domain is in state of SHUTOFF\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUX%2F%2B854%3D","line":124,"in_reply_to":"AAAAUX%2F%2FO%2Bg%3D","updated":"2014-02-18 01:45:19.000000000","message":"thanks, I will remove the comments.\nthe other states such as VIR_DOMAIN_CRASHED, VIR_DOMAIN_NOSTATE,I haven\u0027t fond these states occured by nova API.\nSo I think here we only  take account of  VIR_DOMAIN_SHUTOFF.","commit_id":"8ba16a6d42aededb673c403fd333b7d998436014"}],"ceilometer/tests/compute/virt/libvirt/test_inspector.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"5ebf956611dcdea98b8d7556dac117fbc27c6301","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                               mock.patch.object(self.domain,"},{"line_number":148,"context_line":"                                                 \u0027interfaceStats\u0027,"},{"line_number":149,"context_line":"                                                 side_effect\u003dinterfaceStats),"},{"line_number":150,"context_line":"                               mock.patch.object(self.domain, \u0027info\u0027,"},{"line_number":151,"context_line":"                                                 return_value\u003d(0L, 0L, 0L,"},{"line_number":152,"context_line":"                                                 2L, 999999L))):"},{"line_number":153,"context_line":"            interfaces \u003d list(self.inspector.inspect_vnics(self.instance_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2Frak%3D","line":150,"updated":"2014-02-11 15:12:19.000000000","message":"could we add a test to test state \u003d\u003d libvirt.VIR_DOMAIN_SHUTOFF? maybe ensure nothing gets returned.","commit_id":"d3fb9d90ae4739e7347bc6e90a59f4da87f1a433"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"0f548fe3a3923133ad5da71531914ffd7862e250","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def _dummy_get_connection(*args, **kwargs):"},{"line_number":248,"context_line":"        raise Exception(\u0027dummy\u0027)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def test_inspect_unknown_error(self):"},{"line_number":251,"context_line":"        self.assertRaises(virt_inspector.InspectorException,"},{"line_number":252,"context_line":"                          self.inspector.inspect_cpus, \u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2FvjY%3D","line":250,"updated":"2014-02-11 04:13:17.000000000","message":"Here, there is also a problem, this UT aim to test the unkown libvirt exception, but in metod  _lookup_by_name() called by inspect_cpus() in ceilometer.compute.virt.libvirt.inspector.LibvirtInspector will except Exception and  raise virt_inspector.InspectorException.\nBut the reason is \"libvirt\" with NoneType (It wasn\u0027t imported)  not the unknown libvirt exception.\nI am not sure this should be commit in another patch.","commit_id":"d3fb9d90ae4739e7347bc6e90a59f4da87f1a433"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"5ebf956611dcdea98b8d7556dac117fbc27c6301","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def _dummy_get_connection(*args, **kwargs):"},{"line_number":248,"context_line":"        raise Exception(\u0027dummy\u0027)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def test_inspect_unknown_error(self):"},{"line_number":251,"context_line":"        self.assertRaises(virt_inspector.InspectorException,"},{"line_number":252,"context_line":"                          self.inspector.inspect_cpus, \u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2FrbE%3D","line":250,"in_reply_to":"AAAAUX%2F%2FvjY%3D","updated":"2014-02-11 15:12:19.000000000","message":"we can expand this test in another patch i think.","commit_id":"d3fb9d90ae4739e7347bc6e90a59f4da87f1a433"}]}
