)]}'
{"nova/tests/unit/virt/xenapi/test_vm_utils.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"7f7e0795ab0ed0f6bc22f11e42150c00c210c54b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"class FetchVhdImageTestCase(VMUtilsTestBase):"},{"line_number":270,"context_line":"    def setUp(self):"},{"line_number":271,"context_line":"        super(FetchVhdImageTestCase, self).setUp()"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        self.context \u003d context.get_admin_context()"},{"line_number":274,"context_line":"        self.context.auth_token \u003d \u0027auth_token\u0027"},{"line_number":275,"context_line":"        self.session \u003d FakeSession()"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a57f1b5_fe648522","line":272,"updated":"2016-02-12 09:27:16.000000000","message":"Not needed; remove if there is a new patchset.","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"}],"nova/virt/xenapi/image/glance.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"fcbd2e33cf72f73feb1cd85f855352df0194c228","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def download_image(self, context, session, instance, image_id):"},{"line_number":62,"context_line":"        params \u003d self._make_params(context, session, image_id)"},{"line_number":63,"context_line":"        params[\u0027uuid_stack\u0027] \u003d vm_utils._make_uuid_stack()"},{"line_number":64,"context_line":"        if glance.GLANCE_VER:"},{"line_number":65,"context_line":"            params[\u0027api_version\u0027] \u003d glance.GLANCE_VER"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a57f1b5_a45b9e2d","line":64,"updated":"2016-02-11 09:07:51.000000000","message":"Why might GLANCE_VER not be set?\nI think the code to check the glance version should be in this file rather than in the plugin, and make the api_version a required parameter.","commit_id":"bc9caebbe5ae6617eb58c8d7efa2df6f66dc7d25"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"e2f1d7d9e585b4206c2146e5ee38ff502319f6df","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        def pick_glance(kwargs):"},{"line_number":39,"context_line":"            server \u003d next(glance_api_servers)"},{"line_number":40,"context_line":"            kwargs[\u0027endpoint\u0027] \u003d server"},{"line_number":41,"context_line":"            # NOTE(sdague): is the return significant here at all?"},{"line_number":42,"context_line":"            return server"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_21e9d5e6","line":40,"updated":"2016-02-11 12:02:28.000000000","message":"set kwargs[\u0027api_version\u0027] \u003d glance.GLANCE_VER here","commit_id":"05b983827ed217b18e667bff25f75dc3db6e8486"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"e2f1d7d9e585b4206c2146e5ee38ff502319f6df","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        params \u003d self._make_params(context, session, image_id)"},{"line_number":63,"context_line":"        params[\u0027uuid_stack\u0027] \u003d vm_utils._make_uuid_stack()"},{"line_number":64,"context_line":"        if not glance.GLANCE_VER:"},{"line_number":65,"context_line":"            glance_server \u003d next(glance.get_api_servers())"},{"line_number":66,"context_line":"            glance.determine_curr_major_version(glance_server)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        params[\u0027api_version\u0027] \u003d glance.GLANCE_VER"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a57f1b5_e11bbd19","line":65,"updated":"2016-02-11 12:02:28.000000000","message":"Sorry - I should have realised.  We\u0027d need to move this to the _call_glance_plugin function since that gets the endpoint to use.  I can\u0027t imagine having multiple glance servers with different api_versions, but I still think this isn\u0027t the right place to add it.","commit_id":"05b983827ed217b18e667bff25f75dc3db6e8486"}],"plugins/xenserver/xenapi/etc/xapi.d/plugins/glance":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a63e34c54aa2556a2ccc56bbd9cfdc37f93cd3ab","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    :returns Integer version number or None if unable to determine version"},{"line_number":57,"context_line":"    \"\"\""},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        conn \u003d httplib.HTTPConnection(endpoint)"},{"line_number":60,"context_line":"        conn.request(\u0027GET\u0027, \u0027/versions\u0027)"},{"line_number":61,"context_line":"        resp \u003d conn.getresponse()"},{"line_number":62,"context_line":"        if resp.status !\u003d 200:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"da6ed579_e7189177","line":59,"updated":"2016-01-14 04:05:07.000000000","message":"Add check on glance_use_ssl to use http or https?","commit_id":"1e7c128c53f6e8320fdb9dec013bfec3b555c69c"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"d8bba566716c869d39d31decdef44992cda2b07b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    :returns Integer version number or None if unable to determine version"},{"line_number":57,"context_line":"    \"\"\""},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        conn \u003d httplib.HTTPConnection(endpoint)"},{"line_number":60,"context_line":"        conn.request(\u0027GET\u0027, \u0027/versions\u0027)"},{"line_number":61,"context_line":"        resp \u003d conn.getresponse()"},{"line_number":62,"context_line":"        if resp.status !\u003d 200:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"da6ed579_15194179","line":59,"in_reply_to":"da6ed579_e7189177","updated":"2016-01-14 10:47:13.000000000","message":"Thanks Jianghua! Currently I want it to work somehow... Your comment will be addressed in future patches.","commit_id":"1e7c128c53f6e8320fdb9dec013bfec3b555c69c"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"62f28d7afd0dbf1f0565910df205e174199c7642","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                # The \u0027id\u0027 value looks like \"v2.2\","},{"line_number":69,"context_line":"                # so grab the major version number which is 2 in this case"},{"line_number":70,"context_line":"                res \u003d int(res[1:res.find(\".\")])"},{"line_number":71,"context_line":"                return res if res in supported_glance_versions else None"},{"line_number":72,"context_line":"    except Exception:"},{"line_number":73,"context_line":"        logging.error(\"Unable to determine the glance API version\")"},{"line_number":74,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"da6ed579_60e90b80","line":71,"updated":"2016-01-13 15:57:58.000000000","message":"FWIW the current failure from the XenServer CI is:\n\n2016-01-13 14:41:37.532 7542 ERROR nova.utils [instance: b8bd7b01-36ea-4aa0-b362-be71568719df] Failure: [\u0027XENAPI_PLUGIN_FAILURE\u0027, \u0027non-zero exit\u0027, \u0027\u0027, \u0027  File \"/etc/xapi.d/plugins/glance\", line 71\\n    return res if res in supported_glance_versions else None\\n                ^\\nSyntaxError: invalid syntax\\n\u0027]\n\nThe plugins are run in dom0, which is unfortunately a python 2.4 environment.  It seems that the construct used here is not supported in Python 2.4","commit_id":"1e7c128c53f6e8320fdb9dec013bfec3b555c69c"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"d8bba566716c869d39d31decdef44992cda2b07b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                # The \u0027id\u0027 value looks like \"v2.2\","},{"line_number":69,"context_line":"                # so grab the major version number which is 2 in this case"},{"line_number":70,"context_line":"                res \u003d int(res[1:res.find(\".\")])"},{"line_number":71,"context_line":"                return res if res in supported_glance_versions else None"},{"line_number":72,"context_line":"    except Exception:"},{"line_number":73,"context_line":"        logging.error(\"Unable to determine the glance API version\")"},{"line_number":74,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"da6ed579_ba338213","line":71,"in_reply_to":"da6ed579_60e90b80","updated":"2016-01-14 10:47:13.000000000","message":"Done! Thanks Bob :)","commit_id":"1e7c128c53f6e8320fdb9dec013bfec3b555c69c"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"bd4c8162d1cff7c664f439dcc151e778ae8ae312","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                    return None"},{"line_number":79,"context_line":"                return res"},{"line_number":80,"context_line":"    except Exception:"},{"line_number":81,"context_line":"        logging.error(\"Unable to determine the glance API version\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _get_image_url(endpoint):"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"ba63e191_2bf9254e","line":81,"updated":"2016-01-18 17:14:19.000000000","message":"We\u0027re hitting this exception block, but because you\u0027re swallowing the exception, we return None.  In the get_image_url method, %d is attempting to format \"None\" and raising the \"int argument required\".\n\nJan 18 12:36:06 localhost glance: ERROR    Unable to determine the glance API version","commit_id":"85b3e20b0150d641f08a5e909aafed2ad466a384"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"4e3772a1f227c82d35dc0910f6a0138f23764e10","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                    return None"},{"line_number":79,"context_line":"                return res"},{"line_number":80,"context_line":"    except Exception:"},{"line_number":81,"context_line":"        logging.error(\"Unable to determine the glance API version\")"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"def _get_image_url(endpoint):"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"ba63e191_65dbc1ee","line":81,"in_reply_to":"ba63e191_2bf9254e","updated":"2016-01-18 20:38:39.000000000","message":"Yeah, thanks! I noticed. I forgot that it\u0027s python 2.4 and there are no attributes after urlparse. I fixed it by using tuples like they did on line 222\n\nFortunately I was able to deploy environment with Xen server. So now I can test all things locally without your CI.","commit_id":"85b3e20b0150d641f08a5e909aafed2ad466a384"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"fcbd2e33cf72f73feb1cd85f855352df0194c228","unresolved":false,"context_lines":[{"line_number":621,"context_line":""},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"def download_vhd(session, image_id, glance_host, glance_port, glance_use_ssl,"},{"line_number":624,"context_line":"                 uuid_stack, sr_path, extra_headers, api_version\u003dNone):"},{"line_number":625,"context_line":"    \"\"\"Download an image from Glance, unbundle it, and then deposit the VHDs"},{"line_number":626,"context_line":"    into the storage repository"},{"line_number":627,"context_line":"    \"\"\""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"3a57f1b5_04e95214","line":624,"updated":"2016-02-11 09:07:51.000000000","message":"Never called (see below)","commit_id":"bc9caebbe5ae6617eb58c8d7efa2df6f66dc7d25"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"fcbd2e33cf72f73feb1cd85f855352df0194c228","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"def upload_vhd(session, vdi_uuids, image_id, glance_host, glance_port,"},{"line_number":656,"context_line":"               glance_use_ssl, sr_path, extra_headers, properties,"},{"line_number":657,"context_line":"               api_version\u003dNone):"},{"line_number":658,"context_line":"    \"\"\"Bundle the VHDs comprising an image and then stream them into Glance."},{"line_number":659,"context_line":"    \"\"\""},{"line_number":660,"context_line":"    logging.info(\"Using api version: %s\" % str(api_version))"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"3a57f1b5_a4f71ef4","line":657,"updated":"2016-02-11 09:07:51.000000000","message":"This is no longer called, and was just left in for backward compatibility with the old version of nova.  api_version will therefore never be set here.\nCan we assume glance v1 instead?","commit_id":"bc9caebbe5ae6617eb58c8d7efa2df6f66dc7d25"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"7f7e0795ab0ed0f6bc22f11e42150c00c210c54b","unresolved":false,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"def _update_image_meta_v2(conn, image_id, extra_headers, properties):"},{"line_number":277,"context_line":"    # NOTE(sirp): There is some confusion around OVF. Here\u0027s a summary"},{"line_number":278,"context_line":"    # of where we currently stand:"},{"line_number":279,"context_line":"    #   1. OVF as a container format is misnamed. We really should be"},{"line_number":280,"context_line":"    #      using OVA since that is the name for the container format;"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a57f1b5_0107c4ca","line":277,"updated":"2016-02-12 09:27:16.000000000","message":"This comment seems misplaced?\nIt seems that the refactoring of the common parts between the v1 and v2 upload should be a little tidier with less copy+paste","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"ace018919af4b98075dd7a26f0a185a7c60ed9bf","unresolved":false,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"def _update_image_meta_v2(conn, image_id, extra_headers, properties):"},{"line_number":277,"context_line":"    # NOTE(sirp): There is some confusion around OVF. Here\u0027s a summary"},{"line_number":278,"context_line":"    # of where we currently stand:"},{"line_number":279,"context_line":"    #   1. OVF as a container format is misnamed. We really should be"},{"line_number":280,"context_line":"    #      using OVA since that is the name for the container format;"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a57f1b5_44b858c8","line":277,"in_reply_to":"3a57f1b5_0107c4ca","updated":"2016-02-12 15:05:24.000000000","message":"Yeah, I suppose we can remove this comment easily.","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"7f7e0795ab0ed0f6bc22f11e42150c00c210c54b","unresolved":false,"context_lines":[{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        callback_data \u003d {\u0027bytes_written\u0027: 0}"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        def send_chunked_transfer_encoded(chunk):"},{"line_number":355,"context_line":"            chunk_len \u003d len(chunk)"},{"line_number":356,"context_line":"            callback_data[\u0027bytes_written\u0027] +\u003d chunk_len"},{"line_number":357,"context_line":"            try:"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a57f1b5_61b9d814","line":354,"updated":"2016-02-12 09:27:16.000000000","message":"I really don\u0027t like that methods such as this one are now copy+pasted...\nThe majority of this method seems to be the same for v1+v2; could this be split out into a new common method or make use of callbacks for the v1/v2 differences?\nOr - to make it more obvious where the differences are - could we have one upload method which takes the glance version as a parameter and just switches between the v1/v2 code?\n\nI don\u0027t know much about the differences between v1+v2 and the future direction, so if there\u0027s a good reason these must be kept separate I\u0027d be keen to know.","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"ace018919af4b98075dd7a26f0a185a7c60ed9bf","unresolved":false,"context_lines":[{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        callback_data \u003d {\u0027bytes_written\u0027: 0}"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        def send_chunked_transfer_encoded(chunk):"},{"line_number":355,"context_line":"            chunk_len \u003d len(chunk)"},{"line_number":356,"context_line":"            callback_data[\u0027bytes_written\u0027] +\u003d chunk_len"},{"line_number":357,"context_line":"            try:"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a57f1b5_e494e443","line":354,"in_reply_to":"3a57f1b5_61b9d814","updated":"2016-02-12 15:05:24.000000000","message":"Makes sense! I\u0027ll try to do it.","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"7f7e0795ab0ed0f6bc22f11e42150c00c210c54b","unresolved":false,"context_lines":[{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        conn.request(\u0027HEAD\u0027, path, headers\u003dextra_headers)"},{"line_number":476,"context_line":"        head_resp \u003d conn.getresponse()"},{"line_number":477,"context_line":"        # NOTE(nikhil): read the response to re-use the conn object."},{"line_number":478,"context_line":"        body_data \u003d head_resp.read(8192)"},{"line_number":479,"context_line":"        if len(body_data) \u003e 8:"},{"line_number":480,"context_line":"            err_msg \u003d (\u0027Cannot upload data for image %(image_id)s as the \u0027"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a57f1b5_218f602b","line":477,"updated":"2016-02-12 09:27:16.000000000","message":"This looks useful; does it not apply to v2?","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"ace018919af4b98075dd7a26f0a185a7c60ed9bf","unresolved":false,"context_lines":[{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        conn.request(\u0027HEAD\u0027, path, headers\u003dextra_headers)"},{"line_number":476,"context_line":"        head_resp \u003d conn.getresponse()"},{"line_number":477,"context_line":"        # NOTE(nikhil): read the response to re-use the conn object."},{"line_number":478,"context_line":"        body_data \u003d head_resp.read(8192)"},{"line_number":479,"context_line":"        if len(body_data) \u003e 8:"},{"line_number":480,"context_line":"            err_msg \u003d (\u0027Cannot upload data for image %(image_id)s as the \u0027"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"3a57f1b5_64c1d453","line":477,"in_reply_to":"3a57f1b5_218f602b","updated":"2016-02-12 15:05:24.000000000","message":"Yes, I do it on line 567.","commit_id":"a633d9fe0caccb435113fc08a540dd6fc4943786"}]}
