)]}'
{"ceilometer/compute/pollsters.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"def get_hypervisor_inspector():"},{"line_number":51,"context_line":"    try:"},{"line_number":52,"context_line":"        namespace \u003d \u0027ceilometer.compute.virt\u0027"},{"line_number":53,"context_line":"        return importutils.import_object_ns(namespace,"},{"line_number":54,"context_line":"                                            CONF.hypervisor_inspector)"},{"line_number":55,"context_line":"    except ImportError as e:"},{"line_number":56,"context_line":"        LOG.error(\"Unable to load the hypervisor inspector: %s\" % (e))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BIo%3D","line":53,"updated":"2012-12-04 14:40:17.000000000","message":"Using import_object_ns was OK before because there were no entry points set up for the classes in nova. At the Grizzly summit, though, the Oslo team decided to stop using and supporting new uses of importutils in favor of entry points for new work -- in part based on our experiences using entry points elsewhere in ceilometer. So, this should be converted to use stevedore.driver.DriverManager. See http://stevedore.readthedocs.org/en/latest/managers.html#drivermanager and get_engine() in ceilometer/storage/__init__.py for an example.","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            r_requests \u003d 0"},{"line_number":116,"context_line":"            w_bytes \u003d 0"},{"line_number":117,"context_line":"            w_requests \u003d 0"},{"line_number":118,"context_line":"            for disk, info in HypervisorPollster.inspector.inspect_disks("},{"line_number":119,"context_line":"                                                               instance_name):"},{"line_number":120,"context_line":"                self.LOG.info(self.DISKIO_USAGE_MESSAGE,"},{"line_number":121,"context_line":"                              instance, disk, info[\u0027read_requests\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BIc%3D","line":118,"updated":"2012-12-04 14:40:17.000000000","message":"Why not self.inspector?","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        instance_name \u003d _instance_name(instance)"},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            cpu_info \u003d HypervisorPollster.inspector.inspect_cpus("},{"line_number":183,"context_line":"                                                                instance_name)"},{"line_number":184,"context_line":"            self.LOG.info(\"CPUTIME USAGE: %s %d\","},{"line_number":185,"context_line":"                          instance.__dict__, cpu_info[\u0027cpu_time\u0027])"},{"line_number":186,"context_line":"            cpu_util \u003d self.get_cpu_util(instance, cpu_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BIU%3D","line":183,"updated":"2012-12-04 14:40:17.000000000","message":"This indentation looks a little odd. If you move line 183 left, does pep8 complain?","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"40e6b9bcdc7c8bbdc06ca200ce1e19900e28954f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                   CONF.hypervisor_inspector,"},{"line_number":57,"context_line":"                                   invoke_on_load\u003dTrue)"},{"line_number":58,"context_line":"        return mgr.driver"},{"line_number":59,"context_line":"    except ImportError as e:"},{"line_number":60,"context_line":"        LOG.error(\"Unable to load the hypervisor inspector: %s\" % (e))"},{"line_number":61,"context_line":"        return virt_inspector.Inspector()"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAMX%2F%2F7gQ%3D","line":59,"updated":"2012-12-06 15:24:05.000000000","message":"This could probably be \"except Exception as e\" since invoke_on_load might trigger other exceptions besides ImportError. I\u0027m not sure it\u0027s worth holding up merging this to make the change, though.","commit_id":"40a3874c3845ccb2756f92f48be6baae820ee90d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"40e6b9bcdc7c8bbdc06ca200ce1e19900e28954f","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    inspector \u003d None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def __init__(self):"},{"line_number":82,"context_line":"        if not HypervisorPollster.inspector:"},{"line_number":83,"context_line":"            HypervisorPollster.inspector \u003d get_hypervisor_inspector()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAMX%2F%2F7gE%3D","line":82,"updated":"2012-12-06 15:24:05.000000000","message":"We discussed this via IRC, but for the record: I think it would be better to have the manager for the hypervisor-related pollsters pass the inspector to get_counters() as an argument, instead of setting it up here in the base class. That will make testing a little easier, and will also put the responsibility for managing that inspector instance in the right place logically. We agreed that sort of change could come as another patch, instead of holding this up further.","commit_id":"40a3874c3845ccb2756f92f48be6baae820ee90d"}],"ceilometer/compute/virt/inspector.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Inspector(object):"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    \"\"\""},{"line_number":24,"context_line":"    List the instances on the current host."},{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":"    def inspect_instances(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BIM%3D","line":23,"updated":"2012-12-04 14:40:17.000000000","message":"Your docstrings are outside of the functions. Is that on purpose?","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    Inspect the CPU statistics for an instance."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    :param instance_name: the name of the target instance"},{"line_number":33,"context_line":"    :return: the number of CPUs and cumulative CPU time"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    def inspect_cpus(self, instance_name):"},{"line_number":36,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BIQ%3D","line":33,"updated":"2012-12-04 14:40:17.000000000","message":"Is the return type a tuple of those values?","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    Inspect the vNIC statistics for an instance."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    :param instance_name: the name of the target instance"},{"line_number":42,"context_line":"    :return: for each vNIC, the number of bytes \u0026 packets"},{"line_number":43,"context_line":"             received and transmitted"},{"line_number":44,"context_line":"    \"\"\""},{"line_number":45,"context_line":"    def inspect_vnics(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BIE%3D","line":42,"updated":"2012-12-04 14:40:17.000000000","message":"How are vnic\u0027s identified in the return list?","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    Inspect the disk statistics for an instance."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    :param instance_name: the name of the target instance"},{"line_number":52,"context_line":"    :return: for each disk, the number of bytes \u0026 operations"},{"line_number":53,"context_line":"             read and written, and the error count"},{"line_number":54,"context_line":"    \"\"\""},{"line_number":55,"context_line":"    def inspect_disks(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BH8%3D","line":52,"updated":"2012-12-04 14:40:17.000000000","message":"How are disks identified in the return value?","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7df499d62655489bd1282f99a3c50a90d64cb4ef","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                    \u0027errors\u0027])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class Inspector(object):"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def inspect_instances(self):"},{"line_number":85,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8tg%3D","line":82,"updated":"2012-12-05 14:59:59.000000000","message":"Would it make sense to use abc here instead of NotImplementedError to make it clear this is defining an API?","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4bc8bc3ebe35fa7965e8673ab2027de764fcaaf8","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                    \u0027errors\u0027])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class Inspector(object):"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def inspect_instances(self):"},{"line_number":85,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8GI%3D","line":82,"in_reply_to":"AAAAMX%2F%2F8jM%3D","updated":"2012-12-05 23:09:40.000000000","message":"Ah, OK.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"906cae09f3dc82c6119c67cce6de5cf2264161fd","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                    \u0027errors\u0027])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class Inspector(object):"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def inspect_instances(self):"},{"line_number":85,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8jM%3D","line":82,"in_reply_to":"AAAAMX%2F%2F8tg%3D","updated":"2012-12-05 18:12:44.000000000","message":"Yeah, I considered that, but I also wanted to instantiate this class as a fallback when the configure inspector type can\u0027t be loaded for any reason.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"}],"ceilometer/compute/virt/libvirt/inspector.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# under the License."},{"line_number":18,"context_line":"\"\"\"Implementation of Inspector abstraction for libvirt\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from lxml import etree"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from ceilometer.compute.virt import inspector as virt_inspector"},{"line_number":23,"context_line":"from ceilometer.openstack.common import cfg"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BH4%3D","line":20,"updated":"2012-12-04 14:40:17.000000000","message":"I don\u0027t think we already have a direct dependency on lxml. We\u0027re probably bringing it in through something else we depend on, but we should have it in our pip-requires file to be safe.","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"13caa820a1227ff463efb4cf7c47f83e07ba8de1","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def inspect_cpus(self, instance_name):"},{"line_number":109,"context_line":"        virt_dom \u003d self._lookup_by_name(instance_name)"},{"line_number":110,"context_line":"        (_, _, _, num_cpu, cpu_time) \u003d virt_dom.info()"},{"line_number":111,"context_line":"        return {\u0027num_cpu\u0027: num_cpu,"},{"line_number":112,"context_line":"                \u0027cpu_time\u0027: cpu_time}"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def inspect_vnics(self, instance_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAMX%2F%2F%2BHw%3D","line":111,"updated":"2012-12-04 14:40:17.000000000","message":"I would prefer for these API methods to return instances of a class, instead of a dictionary. Even if it\u0027s just a namedtuple, it gives us a place to point to in documentation for authors of new inspectors to say \"return one of these\" and avoids the issue of attributes/keys with the wrong case, - instead of _, etc. That has been a problem for us in the storage API already, so I want to change it there, but let\u0027s not introduce a new case of the same problem.","commit_id":"12dcaca568f9c3a91417d4a312eadd356040cb31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7df499d62655489bd1282f99a3c50a90d64cb4ef","unresolved":false,"context_lines":[{"line_number":45,"context_line":"class LibvirtInspector(virt_inspector.Inspector):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __init__(self):"},{"line_number":48,"context_line":"        global libvirt"},{"line_number":49,"context_line":"        if libvirt is None:"},{"line_number":50,"context_line":"            libvirt \u003d __import__(\u0027libvirt\u0027)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8tY%3D","line":48,"updated":"2012-12-05 14:59:59.000000000","message":"What is this section doing? Is it just delaying the import of libvirt until it\u0027s being used, or is there an issue importing libvirt at the module level?","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"906cae09f3dc82c6119c67cce6de5cf2264161fd","unresolved":false,"context_lines":[{"line_number":45,"context_line":"class LibvirtInspector(virt_inspector.Inspector):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __init__(self):"},{"line_number":48,"context_line":"        global libvirt"},{"line_number":49,"context_line":"        if libvirt is None:"},{"line_number":50,"context_line":"            libvirt \u003d __import__(\u0027libvirt\u0027)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8lQ%3D","line":48,"in_reply_to":"AAAAMX%2F%2F8tY%3D","updated":"2012-12-05 18:12:44.000000000","message":"Yeah, it just follows the nova example on late loading the library, but there wouldn\u0027t be a problem with normal module-level loading if the libvirt python binding is installed.\n\nSince we will only load the libvirt inspector if configured to do so, then we can probably assume that libvirt is present when the deployed inspector code is run.\n\nHowever, this reminds me that I should have allowed the unit test to tolerate the absence of libivrt (addressed in the latest patch set by moving the lazy import to the code that connects to libvirt, which is not executed in the unit test case).","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7df499d62655489bd1282f99a3c50a90d64cb4ef","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.connection \u003d None"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _get_uri(self):"},{"line_number":56,"context_line":"        if CONF.libvirt_type \u003d\u003d \u0027uml\u0027:"},{"line_number":57,"context_line":"            uri \u003d CONF.libvirt_uri or \u0027uml:///system\u0027"},{"line_number":58,"context_line":"        elif CONF.libvirt_type \u003d\u003d \u0027xen\u0027:"},{"line_number":59,"context_line":"            uri \u003d CONF.libvirt_uri or \u0027xen:///\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8tU%3D","line":56,"updated":"2012-12-05 14:59:59.000000000","message":"This if/else chain could be a simple dict lookup.\n\nuri \u003d CONF.libvirt_uri or {populated-dictionary}.get(CONF.libvirt_type)","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"906cae09f3dc82c6119c67cce6de5cf2264161fd","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.connection \u003d None"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _get_uri(self):"},{"line_number":56,"context_line":"        if CONF.libvirt_type \u003d\u003d \u0027uml\u0027:"},{"line_number":57,"context_line":"            uri \u003d CONF.libvirt_uri or \u0027uml:///system\u0027"},{"line_number":58,"context_line":"        elif CONF.libvirt_type \u003d\u003d \u0027xen\u0027:"},{"line_number":59,"context_line":"            uri \u003d CONF.libvirt_uri or \u0027xen:///\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8lI%3D","line":56,"in_reply_to":"AAAAMX%2F%2F8tU%3D","updated":"2012-12-05 18:12:44.000000000","message":"Nice!\n\nI\u0027ll change over to that.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7df499d62655489bd1282f99a3c50a90d64cb4ef","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return uri"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_connection(self):"},{"line_number":67,"context_line":"        if not self.connection or not self._test_connection():"},{"line_number":68,"context_line":"            LOG.debug(\u0027Connecting to libvirt: %s\u0027, self.uri)"},{"line_number":69,"context_line":"            self.connection \u003d libvirt.openReadOnly(self.uri)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8tE%3D","line":67,"updated":"2012-12-05 14:59:59.000000000","message":"Is that logic right? If we don\u0027t have a connection or we can\u0027t make one, try to create a connection?","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4bc8bc3ebe35fa7965e8673ab2027de764fcaaf8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return uri"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_connection(self):"},{"line_number":67,"context_line":"        if not self.connection or not self._test_connection():"},{"line_number":68,"context_line":"            LOG.debug(\u0027Connecting to libvirt: %s\u0027, self.uri)"},{"line_number":69,"context_line":"            self.connection \u003d libvirt.openReadOnly(self.uri)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8GA%3D","line":67,"in_reply_to":"AAAAMX%2F%2F8lA%3D","updated":"2012-12-05 23:09:40.000000000","message":"Ah, I missed that _test_connection() used the existing one.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"906cae09f3dc82c6119c67cce6de5cf2264161fd","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return uri"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _get_connection(self):"},{"line_number":67,"context_line":"        if not self.connection or not self._test_connection():"},{"line_number":68,"context_line":"            LOG.debug(\u0027Connecting to libvirt: %s\u0027, self.uri)"},{"line_number":69,"context_line":"            self.connection \u003d libvirt.openReadOnly(self.uri)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8lA%3D","line":67,"in_reply_to":"AAAAMX%2F%2F8tE%3D","updated":"2012-12-05 18:12:44.000000000","message":"It\u0027s more like ... try to create a connection if we don\u0027t already have a connection, or the existing connection is no longer usable.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7df499d62655489bd1282f99a3c50a90d64cb4ef","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":90,"context_line":"            msg \u003d (\"Error from libvirt while looking up %(instance_name)s: \""},{"line_number":91,"context_line":"                   \"[Error Code %(error_code)s] %(ex)s\" % locals())"},{"line_number":92,"context_line":"            raise Exception(msg)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def inspect_instances(self):"},{"line_number":95,"context_line":"        if self._get_connection().numOfDomains() \u003e 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8s0%3D","line":92,"updated":"2012-12-05 14:59:59.000000000","message":"Should this have a more specific exception type? I don\u0027t know if anything needs to try to catch it. Probably not. Still, for testing?","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"906cae09f3dc82c6119c67cce6de5cf2264161fd","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            error_code \u003d ex.get_error_code()"},{"line_number":90,"context_line":"            msg \u003d (\"Error from libvirt while looking up %(instance_name)s: \""},{"line_number":91,"context_line":"                   \"[Error Code %(error_code)s] %(ex)s\" % locals())"},{"line_number":92,"context_line":"            raise Exception(msg)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def inspect_instances(self):"},{"line_number":95,"context_line":"        if self._get_connection().numOfDomains() \u003e 0:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8k4%3D","line":92,"in_reply_to":"AAAAMX%2F%2F8s0%3D","updated":"2012-12-05 18:12:44.000000000","message":"Fair point, I\u0027ll change that.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7df499d62655489bd1282f99a3c50a90d64cb4ef","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            raise Exception(msg)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def inspect_instances(self):"},{"line_number":95,"context_line":"        if self._get_connection().numOfDomains() \u003e 0:"},{"line_number":96,"context_line":"            for domain_id in self._get_connection().listDomainsID():"},{"line_number":97,"context_line":"                try:"},{"line_number":98,"context_line":"                    # We skip domains with ID 0 (hypervisors)."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8so%3D","line":95,"updated":"2012-12-05 14:59:59.000000000","message":"Is this test redundant with getting the list of domain ids? Is it more efficient to ask for the number first? I\u0027m not that familiar with libvirt.","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4bc8bc3ebe35fa7965e8673ab2027de764fcaaf8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            raise Exception(msg)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def inspect_instances(self):"},{"line_number":95,"context_line":"        if self._get_connection().numOfDomains() \u003e 0:"},{"line_number":96,"context_line":"            for domain_id in self._get_connection().listDomainsID():"},{"line_number":97,"context_line":"                try:"},{"line_number":98,"context_line":"                    # We skip domains with ID 0 (hypervisors)."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8F4%3D","line":95,"in_reply_to":"AAAAMX%2F%2F8jg%3D","updated":"2012-12-05 23:09:40.000000000","message":"Could you add a comment? Otherwise, I\u0027m likely to forget in a few weeks and take it out when I go on a cleaning binge. ;-)","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"906cae09f3dc82c6119c67cce6de5cf2264161fd","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            raise Exception(msg)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def inspect_instances(self):"},{"line_number":95,"context_line":"        if self._get_connection().numOfDomains() \u003e 0:"},{"line_number":96,"context_line":"            for domain_id in self._get_connection().listDomainsID():"},{"line_number":97,"context_line":"                try:"},{"line_number":98,"context_line":"                    # We skip domains with ID 0 (hypervisors)."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMX%2F%2F8jg%3D","line":95,"in_reply_to":"AAAAMX%2F%2F8so%3D","updated":"2012-12-05 18:12:44.000000000","message":"This idiom is just a work-around for an obscure OpenVZ bug (maybe not even relevant for practical deployments of ceilometer):\n\n https://bugzilla.redhat.com/836647","commit_id":"86324901dad23fe7d7ab052ec63ef9b31a0771a7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"91c834ca02a23ca77c0c6cc5bcad30548fe0229d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        self.connection \u003d None"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _get_uri(self):"},{"line_number":52,"context_line":"        per_type_uris \u003d dict(uml\u003d\u0027uml:///system\u0027,"},{"line_number":53,"context_line":"                             xen\u003d\u0027xen:///\u0027,"},{"line_number":54,"context_line":"                             lxc\u003d\u0027lxc:///\u0027)"},{"line_number":55,"context_line":"        return CONF.libvirt_uri or per_type_uris.get(CONF.libvirt_type,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMX%2F%2F8GE%3D","line":52,"updated":"2012-12-05 23:08:59.000000000","message":"If this doesn\u0027t change, it can be a class attribute.","commit_id":"0aa3f2bbb55cf95b1397dc1a263f218a0bfa09d5"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"479fdd2c8daae5db1ab9e13e34ec8226625741a2","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            doc \u003d etree.fromstring(xml)"},{"line_number":132,"context_line":"        except Exception:"},{"line_number":133,"context_line":"            yield"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        for device in filter(bool,"},{"line_number":136,"context_line":"                      [target.get(\"dev\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAMX%2F%2F7vs%3D","line":133,"updated":"2012-12-06 09:57:34.000000000","message":"I might be wrong, but this is not what you want right?\nBecause if something raises doc is going to be undefined and you\u0027re going to access it just after unless you return.","commit_id":"8a02e2c0341e2449112c054997229603c44cb1a0"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c1500f0e685ae923371f01957e4b7be025a1c167","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            doc \u003d etree.fromstring(xml)"},{"line_number":132,"context_line":"        except Exception:"},{"line_number":133,"context_line":"            yield"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        for device in filter(bool,"},{"line_number":136,"context_line":"                      [target.get(\"dev\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAMX%2F%2F7oQ%3D","line":133,"in_reply_to":"AAAAMX%2F%2F7vs%3D","updated":"2012-12-06 12:38:48.000000000","message":"Yeah, it doesn\u0027t look right ... a bare yield will still cause the calling code to iterate once on None as opposed to not iterating at all. And since the calling loop will attempt to unpack the disk and stats, this will fail.\n\nSo in the latest patch set I\u0027ve switched to just bubbling up any XML parsing exceptions, as is done for the other inspect_* methods.","commit_id":"8a02e2c0341e2449112c054997229603c44cb1a0"}],"tests/compute/virt/libvirt/test_inspector.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3e2930f92aa5c79fffdb93d0ba0b477c9cf70d6e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\"Tests for libvirt inspector."},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import mock"},{"line_number":23,"context_line":"import time"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from ceilometer.compute.virt.libvirt import inspector as libvirt_inspector"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMX%2F%2F8Cg%3D","line":22,"updated":"2012-12-06 00:03:18.000000000","message":"unused import...","commit_id":"0aa3f2bbb55cf95b1397dc1a263f218a0bfa09d5"}]}
