)]}'
{"nova/virt/xenapi/client/session.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"c6922546d67c41f3784c6a4ac260961c3e23c900","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def _get_software_version(self):"},{"line_number":149,"context_line":"        host \u003d self.host_ref"},{"line_number":150,"context_line":"        return self.call_xenapi(\u0027host.get_software_version\u0027, host)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def get_session_id(self):"},{"line_number":153,"context_line":"        \"\"\"Return a string session_id.  Used for vnc consoles.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BN%2Fk%3D","line":150,"updated":"2013-11-28 20:10:30.000000000","message":"Why not just inline that - ...,\u0027 self.host_ref)\n?","commit_id":"3702441ee45fd90601cba2e02dfb386caf066ef2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"cf5dfd42793321888538d480b3de4a0ddd7e9b51","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def _get_software_version(self):"},{"line_number":149,"context_line":"        host \u003d self.host_ref"},{"line_number":150,"context_line":"        return self.call_xenapi(\u0027host.get_software_version\u0027, host)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def get_session_id(self):"},{"line_number":153,"context_line":"        \"\"\"Return a string session_id.  Used for vnc consoles.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BN5c%3D","line":150,"in_reply_to":"AAAATn%2F%2BN%2Fk%3D","updated":"2013-11-28 22:28:57.000000000","message":"Done","commit_id":"3702441ee45fd90601cba2e02dfb386caf066ef2"}],"nova/virt/xenapi/pool.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1832077e5fa7187c4fe6b244ca5b80b3eb3ddb62","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    def __init__(self, session, virtapi):"},{"line_number":54,"context_line":"        host_ref \u003d session.host_ref"},{"line_number":55,"context_line":"        host_rec \u003d session.call_xenapi(\u0027host.get_record\u0027, host_ref)"},{"line_number":56,"context_line":"        self._host_name \u003d host_rec[\u0027hostname\u0027]"},{"line_number":57,"context_line":"        self._host_addr \u003d host_rec[\u0027address\u0027]"},{"line_number":58,"context_line":"        self._host_uuid \u003d host_rec[\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BNNk%3D","line":55,"updated":"2013-11-29 06:26:06.000000000","message":"why not pass session.host_ref here.","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6993efcb8baea0dd7994b99d9a9043accf7f134d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    def __init__(self, session, virtapi):"},{"line_number":54,"context_line":"        host_ref \u003d session.host_ref"},{"line_number":55,"context_line":"        host_rec \u003d session.call_xenapi(\u0027host.get_record\u0027, host_ref)"},{"line_number":56,"context_line":"        self._host_name \u003d host_rec[\u0027hostname\u0027]"},{"line_number":57,"context_line":"        self._host_addr \u003d host_rec[\u0027address\u0027]"},{"line_number":58,"context_line":"        self._host_uuid \u003d host_rec[\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BMu4%3D","line":55,"in_reply_to":"AAAATn%2F%2BNNk%3D","updated":"2013-11-29 09:49:44.000000000","message":"Done","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1832077e5fa7187c4fe6b244ca5b80b3eb3ddb62","unresolved":false,"context_lines":[{"line_number":380,"context_line":"    instance_type \u003d flavors.extract_flavor(instance)"},{"line_number":381,"context_line":"    mem \u003d long(instance_type[\u0027memory_mb\u0027]) * unit.Mi"},{"line_number":382,"context_line":"    host \u003d session.host_ref"},{"line_number":383,"context_line":"    host_free_mem \u003d long(session.call_xenapi(\"host.compute_free_memory\","},{"line_number":384,"context_line":"                                             host))"},{"line_number":385,"context_line":"    return host_free_mem \u003e\u003d mem"},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BNNg%3D","line":383,"updated":"2013-11-29 06:26:06.000000000","message":"ditto","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6993efcb8baea0dd7994b99d9a9043accf7f134d","unresolved":false,"context_lines":[{"line_number":380,"context_line":"    instance_type \u003d flavors.extract_flavor(instance)"},{"line_number":381,"context_line":"    mem \u003d long(instance_type[\u0027memory_mb\u0027]) * unit.Mi"},{"line_number":382,"context_line":"    host \u003d session.host_ref"},{"line_number":383,"context_line":"    host_free_mem \u003d long(session.call_xenapi(\"host.compute_free_memory\","},{"line_number":384,"context_line":"                                             host))"},{"line_number":385,"context_line":"    return host_free_mem \u003e\u003d mem"},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BMtM%3D","line":383,"in_reply_to":"AAAATn%2F%2BNNg%3D","updated":"2013-11-29 09:49:44.000000000","message":"Done","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1832077e5fa7187c4fe6b244ca5b80b3eb3ddb62","unresolved":false,"context_lines":[{"line_number":801,"context_line":"    \"\"\""},{"line_number":802,"context_line":"    if sr_ref is None:"},{"line_number":803,"context_line":"        sr_ref \u003d safe_find_sr(session)"},{"line_number":804,"context_line":"    host_ref \u003d session.host_ref"},{"line_number":805,"context_line":"    pbd_rec \u003d session.call_xenapi(\"PBD.get_all_records_where\","},{"line_number":806,"context_line":"                                  \u0027field \"host\"\u003d\"%s\" and \u0027"},{"line_number":807,"context_line":"                                  \u0027field \"SR\"\u003d\"%s\"\u0027 % (host_ref, sr_ref))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BNNY%3D","line":804,"updated":"2013-11-29 06:26:06.000000000","message":"ditto","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6993efcb8baea0dd7994b99d9a9043accf7f134d","unresolved":false,"context_lines":[{"line_number":801,"context_line":"    \"\"\""},{"line_number":802,"context_line":"    if sr_ref is None:"},{"line_number":803,"context_line":"        sr_ref \u003d safe_find_sr(session)"},{"line_number":804,"context_line":"    host_ref \u003d session.host_ref"},{"line_number":805,"context_line":"    pbd_rec \u003d session.call_xenapi(\"PBD.get_all_records_where\","},{"line_number":806,"context_line":"                                  \u0027field \"host\"\u003d\"%s\" and \u0027"},{"line_number":807,"context_line":"                                  \u0027field \"SR\"\u003d\"%s\"\u0027 % (host_ref, sr_ref))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BMtI%3D","line":804,"in_reply_to":"AAAATn%2F%2BNNY%3D","updated":"2013-11-29 09:49:44.000000000","message":"Done","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1832077e5fa7187c4fe6b244ca5b80b3eb3ddb62","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"                    sr_rec[\u0027other_config\u0027][key] \u003d\u003d value):"},{"line_number":1816,"context_line":"                continue"},{"line_number":1817,"context_line":"            for pbd_ref in sr_rec[\u0027PBDs\u0027]:"},{"line_number":1818,"context_line":"                pbd_rec \u003d session.get_rec(\u0027PBD\u0027, pbd_ref)"},{"line_number":1819,"context_line":"                if pbd_rec and pbd_rec[\u0027host\u0027] \u003d\u003d host:"},{"line_number":1820,"context_line":"                    return sr_ref"},{"line_number":1821,"context_line":"    elif filter_criteria \u003d\u003d \u0027default-sr\u0027 and filter_pattern \u003d\u003d \u0027true\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BNM4%3D","line":1818,"updated":"2013-11-29 06:26:06.000000000","message":"ditto","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6993efcb8baea0dd7994b99d9a9043accf7f134d","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"                    sr_rec[\u0027other_config\u0027][key] \u003d\u003d value):"},{"line_number":1816,"context_line":"                continue"},{"line_number":1817,"context_line":"            for pbd_ref in sr_rec[\u0027PBDs\u0027]:"},{"line_number":1818,"context_line":"                pbd_rec \u003d session.get_rec(\u0027PBD\u0027, pbd_ref)"},{"line_number":1819,"context_line":"                if pbd_rec and pbd_rec[\u0027host\u0027] \u003d\u003d host:"},{"line_number":1820,"context_line":"                    return sr_ref"},{"line_number":1821,"context_line":"    elif filter_criteria \u003d\u003d \u0027default-sr\u0027 and filter_pattern \u003d\u003d \u0027true\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BMuI%3D","line":1818,"in_reply_to":"AAAATn%2F%2BNM4%3D","updated":"2013-11-29 09:49:44.000000000","message":"I\u0027d rather leave this one as-is.\nThe code here isn\u0027t as simple as I\u0027d like - so I think that keeping the concept of which host we\u0027re looking at with the local variable is useful.","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6993efcb8baea0dd7994b99d9a9043accf7f134d","unresolved":false,"context_lines":[{"line_number":2126,"context_line":"def get_this_vm_uuid(session):"},{"line_number":2127,"context_line":"    if session and session.is_local_connection:"},{"line_number":2128,"context_line":"        # UUID is the control domain running on this host"},{"line_number":2129,"context_line":"        host_ref \u003d session.host_ref"},{"line_number":2130,"context_line":"        vms \u003d session.call_xenapi(\"VM.get_all_records_where\","},{"line_number":2131,"context_line":"                                  \u0027field \"is_control_domain\"\u003d\"true\" and \u0027"},{"line_number":2132,"context_line":"                                  \u0027field \"resident_on\"\u003d\"%s\"\u0027 % host_ref)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BMt8%3D","line":2129,"updated":"2013-11-29 09:49:44.000000000","message":"Changed this one too","commit_id":"cf4e4128d4de43a457cb118eee7de9680bd20cdb"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"39116cb6d82f73b4566cd9cdfdc24955c4c0179c","unresolved":false,"context_lines":[{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"def _find_iso_sr(session):"},{"line_number":1844,"context_line":"    \"\"\"Return the storage repository to hold ISO images.\"\"\""},{"line_number":1845,"context_line":"    host \u003d session.host_ref"},{"line_number":1846,"context_line":"    for sr_ref, sr_rec in session.get_all_refs_and_recs(\u0027SR\u0027):"},{"line_number":1847,"context_line":"        LOG.debug(_(\"ISO: looking at SR %s\"), sr_rec)"},{"line_number":1848,"context_line":"        if not sr_rec[\u0027content_type\u0027] \u003d\u003d \u0027iso\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BLd8%3D","line":1845,"updated":"2013-11-29 16:27:37.000000000","message":"For this one, is may be better to substitute into code down below (or at least assign when we use it).  But that is not part of this review.","commit_id":"0820c1225a92b4b07f5afeba4fca7d45615e7cd6"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"807bb669f64c3188bac2e7b4c66b8df98116f071","unresolved":false,"context_lines":[{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"def _find_iso_sr(session):"},{"line_number":1844,"context_line":"    \"\"\"Return the storage repository to hold ISO images.\"\"\""},{"line_number":1845,"context_line":"    host \u003d session.host_ref"},{"line_number":1846,"context_line":"    for sr_ref, sr_rec in session.get_all_refs_and_recs(\u0027SR\u0027):"},{"line_number":1847,"context_line":"        LOG.debug(_(\"ISO: looking at SR %s\"), sr_rec)"},{"line_number":1848,"context_line":"        if not sr_rec[\u0027content_type\u0027] \u003d\u003d \u0027iso\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BJpc%3D","line":1845,"in_reply_to":"AAAATn%2F%2BLcY%3D","updated":"2013-12-01 18:22:28.000000000","message":"Not sure what you mean about it making sense in another message?","commit_id":"0820c1225a92b4b07f5afeba4fca7d45615e7cd6"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"53f5c6a99e2830d5e1c3bb10d5e521f8aab561c6","unresolved":false,"context_lines":[{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"def _find_iso_sr(session):"},{"line_number":1844,"context_line":"    \"\"\"Return the storage repository to hold ISO images.\"\"\""},{"line_number":1845,"context_line":"    host \u003d session.host_ref"},{"line_number":1846,"context_line":"    for sr_ref, sr_rec in session.get_all_refs_and_recs(\u0027SR\u0027):"},{"line_number":1847,"context_line":"        LOG.debug(_(\"ISO: looking at SR %s\"), sr_rec)"},{"line_number":1848,"context_line":"        if not sr_rec[\u0027content_type\u0027] \u003d\u003d \u0027iso\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BLdI%3D","line":1845,"in_reply_to":"AAAATn%2F%2BLd8%3D","updated":"2013-11-29 16:31:09.000000000","message":"I\u0027d rather leave this one as-is. The code here isn\u0027t as simple as I\u0027d like - so I think that keeping the concept of which host we\u0027re looking at with the local variable is useful.\n\nThis is a good area to replace with get_all_records_where as a future optimization to substantially reduce the logic and execution time (when there are large numbers of SRs or you\u0027re in a pool)","commit_id":"0820c1225a92b4b07f5afeba4fca7d45615e7cd6"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"f0ec30dbe9fff5736d45034ee5eb23be44b2439b","unresolved":false,"context_lines":[{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"def _find_iso_sr(session):"},{"line_number":1844,"context_line":"    \"\"\"Return the storage repository to hold ISO images.\"\"\""},{"line_number":1845,"context_line":"    host \u003d session.host_ref"},{"line_number":1846,"context_line":"    for sr_ref, sr_rec in session.get_all_refs_and_recs(\u0027SR\u0027):"},{"line_number":1847,"context_line":"        LOG.debug(_(\"ISO: looking at SR %s\"), sr_rec)"},{"line_number":1848,"context_line":"        if not sr_rec[\u0027content_type\u0027] \u003d\u003d \u0027iso\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BLcY%3D","line":1845,"in_reply_to":"AAAATn%2F%2BLdI%3D","updated":"2013-11-29 16:35:40.000000000","message":"okay.  Was looking at code and got confused because diff didn\u0027t show host even in use in context.  Had to pull up file to get better context.  Does host make sense in any other message for tracking?","commit_id":"0820c1225a92b4b07f5afeba4fca7d45615e7cd6"}]}
