)]}'
{"ironicclient/common/http.py":[{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e4175efb80aa8bb0f11fd3a5e591ead134172a39","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            requested_version \u003d req_api_ver"},{"line_number":129,"context_line":"            # And then we shouldn\u0027t save the newly negotiated"},{"line_number":130,"context_line":"            # version of this negotiation."},{"line_number":131,"context_line":"            save_version \u003d False"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_585e7576","line":131,"updated":"2018-04-23 01:49:32.000000000","message":"save_version is set to False only if api_version_selected_state \u003d\u003d \u0027negotiated\u0027 here.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"b65cc1870c8c07038e74d15ac30edaf7b15fc0cc","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            requested_version \u003d req_api_ver"},{"line_number":129,"context_line":"            # And then we shouldn\u0027t save the newly negotiated"},{"line_number":130,"context_line":"            # version of this negotiation."},{"line_number":131,"context_line":"            save_version \u003d False"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_6cc4def5","line":131,"in_reply_to":"9f6a8fd7_585e7576","updated":"2018-04-23 04:15:05.000000000","message":"It seems enough to introduce a flag such as \u0027version_overridden\u0027 here instead and raise an error at L166 because this case is similar to the case where a user specifies the version explicitly at creating a client (api_version_select_state \u003d\u003d \u0027user\u0027).","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0f81c8d0d52cab3421e2741ec49c130ed867b596","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            requested_version \u003d req_api_ver"},{"line_number":129,"context_line":"            # And then we shouldn\u0027t save the newly negotiated"},{"line_number":130,"context_line":"            # version of this negotiation."},{"line_number":131,"context_line":"            save_version \u003d False"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_ede06dfd","line":131,"in_reply_to":"9f6a8fd7_6cc4def5","updated":"2018-04-27 19:12:23.000000000","message":"That is implied by line 124..","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e4175efb80aa8bb0f11fd3a5e591ead134172a39","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if (self.api_version_select_state \u003d\u003d \u0027user\u0027 and"},{"line_number":167,"context_line":"                not self._must_negotiate_version() or"},{"line_number":168,"context_line":"                self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":169,"context_line":"                not save_version):"},{"line_number":170,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("},{"line_number":171,"context_line":"                _(\"Requested API version %(req)s is not supported by the \""},{"line_number":172,"context_line":"                  \"server, client, or the requested operation is not \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_38ce212d","line":169,"updated":"2018-04-23 01:49:32.000000000","message":"This method always finishes here when save_version is False because this flag gets False only if api_version_selected_state is \u0027negotiated\u0027.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"cc859ac5d91502d4001f08f1b5f9f1cff04e046d","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if (self.api_version_select_state \u003d\u003d \u0027user\u0027 and"},{"line_number":167,"context_line":"                not self._must_negotiate_version() or"},{"line_number":168,"context_line":"                self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":169,"context_line":"                not save_version):"},{"line_number":170,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("},{"line_number":171,"context_line":"                _(\"Requested API version %(req)s is not supported by the \""},{"line_number":172,"context_line":"                  \"server, client, or the requested operation is not \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_a16eb493","line":169,"in_reply_to":"9f6a8fd7_38ce212d","updated":"2018-05-02 19:30:59.000000000","message":"My brain wanted to satisfy the case where it was not already negotiate by default and we received a request.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e4175efb80aa8bb0f11fd3a5e591ead134172a39","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                % {\u0027req\u0027: requested_version,"},{"line_number":177,"context_line":"                   \u0027min\u0027: min_ver, \u0027max\u0027: max_ver}))"},{"line_number":178,"context_line":"        if (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":179,"context_line":"           save_version):"},{"line_number":180,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("},{"line_number":181,"context_line":"                _(\"No API version was specified and the requested operation \""},{"line_number":182,"context_line":"                  \"was not supported by the client\u0027s negotiated API version \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_f8dbc9e9","line":179,"updated":"2018-04-23 01:49:32.000000000","message":"nit: This is redundant because an exception is raised above if save_version if False.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"cc859ac5d91502d4001f08f1b5f9f1cff04e046d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                % {\u0027req\u0027: requested_version,"},{"line_number":177,"context_line":"                   \u0027min\u0027: min_ver, \u0027max\u0027: max_ver}))"},{"line_number":178,"context_line":"        if (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":179,"context_line":"           save_version):"},{"line_number":180,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("},{"line_number":181,"context_line":"                _(\"No API version was specified and the requested operation \""},{"line_number":182,"context_line":"                  \"was not supported by the client\u0027s negotiated API version \""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_81dcd074","line":179,"in_reply_to":"9f6a8fd7_f8dbc9e9","updated":"2018-05-02 19:30:59.000000000","message":"Done","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e4175efb80aa8bb0f11fd3a5e591ead134172a39","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        if save_version:"},{"line_number":231,"context_line":"            # NOTE(TheJulia): We\u0027ve already determined that we likely"},{"line_number":232,"context_line":"            # have a situation where the request header had a specific"},{"line_number":233,"context_line":"            # microversion. We should never save this value over the"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_38e701af","line":230,"updated":"2018-04-23 01:49:32.000000000","message":"This is always True since this method already finishes with an exception if this flag is False.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"cc859ac5d91502d4001f08f1b5f9f1cff04e046d","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        if save_version:"},{"line_number":231,"context_line":"            # NOTE(TheJulia): We\u0027ve already determined that we likely"},{"line_number":232,"context_line":"            # have a situation where the request header had a specific"},{"line_number":233,"context_line":"            # microversion. We should never save this value over the"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_0184405d","line":230,"in_reply_to":"9f6a8fd7_2dbc25ba","updated":"2018-05-02 19:30:59.000000000","message":"Sorry, I misread your reply and it didn\u0027t quite add up. I understand what your saying and agree. I guess I put that in to be extra careful, but realistically it is never the case so there is no reason to really even have it. Removing","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0f81c8d0d52cab3421e2741ec49c130ed867b596","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        if save_version:"},{"line_number":231,"context_line":"            # NOTE(TheJulia): We\u0027ve already determined that we likely"},{"line_number":232,"context_line":"            # have a situation where the request header had a specific"},{"line_number":233,"context_line":"            # microversion. We should never save this value over the"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_2dbc25ba","line":230,"in_reply_to":"9f6a8fd7_38e701af","updated":"2018-04-27 19:12:23.000000000","message":"I don\u0027t understand, how is it that you think this raises an exception. in what condition?","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"b65cc1870c8c07038e74d15ac30edaf7b15fc0cc","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        # NOTE(TheJulia): self.os_ironic_api_version is reset in"},{"line_number":410,"context_line":"        # the self.negotiate_version() call if negotiation occurs."},{"line_number":411,"context_line":"        if self.os_ironic_api_version and self._must_negotiate_version():"},{"line_number":412,"context_line":"            self.negotiate_version(self.session, None)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        # Copy the kwargs so we can reuse the original in case of redirects"},{"line_number":415,"context_line":"        kwargs[\u0027headers\u0027] \u003d copy.deepcopy(kwargs.get(\u0027headers\u0027, {}))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_acf75659","line":412,"updated":"2018-04-23 04:15:05.000000000","message":"This negotiation runs at the first request even if the API version is overridden at this request. It might make it difficult to handle an error because a user needs to see which version is wrong at the client creation or at the overridden request. I wonder if we should skip this negotiation if the version is overridden.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"0f81c8d0d52cab3421e2741ec49c130ed867b596","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        # NOTE(TheJulia): self.os_ironic_api_version is reset in"},{"line_number":410,"context_line":"        # the self.negotiate_version() call if negotiation occurs."},{"line_number":411,"context_line":"        if self.os_ironic_api_version and self._must_negotiate_version():"},{"line_number":412,"context_line":"            self.negotiate_version(self.session, None)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        # Copy the kwargs so we can reuse the original in case of redirects"},{"line_number":415,"context_line":"        kwargs[\u0027headers\u0027] \u003d copy.deepcopy(kwargs.get(\u0027headers\u0027, {}))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_cd97a93a","line":412,"in_reply_to":"9f6a8fd7_acf75659","updated":"2018-04-27 19:12:23.000000000","message":"I feel like that is out of scope given that in most cases users will be requesting explicit data based upon the negotiated version, and whatever that version is should be fine as long as it fits the higher level version requirements. The user defined override in the reuqest is not intended to prevent or override the initial connection.","commit_id":"1898a6817e1089655deaca5210dae24d0b87f72b"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e74684e4e3eef473d238c6deb380b7d53e85f8b2","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            requested_version \u003d req_api_ver"},{"line_number":129,"context_line":"            # And then we shouldn\u0027t save the newly negotiated"},{"line_number":130,"context_line":"            # version of this negotiation because we have been"},{"line_number":131,"context_line":"            # overridden y a request."},{"line_number":132,"context_line":"            version_overridden \u003d True"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            requested_version \u003d self.os_ironic_api_version"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_9cb544d0","line":131,"range":{"start_line":131,"start_character":25,"end_line":131,"end_character":27},"updated":"2018-05-08 06:55:27.000000000","message":"nit: s/y//","commit_id":"74a4ff68e0d89f3423b9179be9643d61bd58634a"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e74684e4e3eef473d238c6deb380b7d53e85f8b2","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        # Copy the kwargs so we can reuse the original in case of redirects"},{"line_number":406,"context_line":"        kwargs[\u0027headers\u0027] \u003d copy.deepcopy(kwargs.get(\u0027headers\u0027, {}))"},{"line_number":407,"context_line":"        kwargs[\u0027headers\u0027].setdefault(\u0027User-Agent\u0027, USER_AGENT)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        if self.os_ironic_api_version:"},{"line_number":410,"context_line":"            kwargs[\u0027headers\u0027].setdefault(\u0027X-OpenStack-Ironic-API-Version\u0027,"},{"line_number":411,"context_line":"                                         self.os_ironic_api_version)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_bc2b60e9","line":408,"updated":"2018-05-08 06:55:27.000000000","message":"nit: There is an unnecessary change.","commit_id":"74a4ff68e0d89f3423b9179be9643d61bd58634a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            # And then we shouldn\u0027t save the newly negotiated"},{"line_number":130,"context_line":"            # version of this negotiation because we have been"},{"line_number":131,"context_line":"            # overridden a request."},{"line_number":132,"context_line":"            version_overridden \u003d True"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d84a0882","line":132,"updated":"2018-05-18 12:19:44.000000000","message":"I don\u0027t really see where is the parameter that allows you to override api version set as self.os_ironic_api_version? or does version_overriden\u003dTrue just mean that os_ironic_api_version was explicitly provided in the client constructor call? or does the override here mean override with some new microversion argument to a specific client method that will be added in subsequent patches?","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"efea3be8c490cc229c4c80075a2227844c4ed189","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            # And then we shouldn\u0027t save the newly negotiated"},{"line_number":130,"context_line":"            # version of this negotiation because we have been"},{"line_number":131,"context_line":"            # overridden a request."},{"line_number":132,"context_line":"            version_overridden \u003d True"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_0428e431","line":132,"in_reply_to":"5f7c97a3_d84a0882","updated":"2018-05-22 20:04:44.000000000","message":"yup next patch in chain answers the question","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # overridden a request."},{"line_number":132,"context_line":"            version_overridden \u003d True"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if not resp:"},{"line_number":137,"context_line":"            resp \u003d _query_server(conn)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9b07aa19","line":134,"range":{"start_line":134,"start_character":32,"end_line":134,"end_character":58},"updated":"2018-05-18 12:19:44.000000000","message":"don\u0027t we need to do req_api_ver or self.os_ironic_api_version here? otherwise req_api_ver just gets lost (if i correctly understand its purpose)","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # overridden a request."},{"line_number":132,"context_line":"            version_overridden \u003d True"},{"line_number":133,"context_line":"        else:"},{"line_number":134,"context_line":"            requested_version \u003d self.os_ironic_api_version"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if not resp:"},{"line_number":137,"context_line":"            resp \u003d _query_server(conn)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_aba3c29d","line":134,"range":{"start_line":134,"start_character":32,"end_line":134,"end_character":58},"in_reply_to":"5f7c97a3_9b07aa19","updated":"2018-05-28 14:01:27.000000000","message":"Seems to me that it would be an absolute \"it is this value\" and that value is a default setting otherwise.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if not resp:"},{"line_number":137,"context_line":"            resp \u003d _query_server(conn)"},{"line_number":138,"context_line":"        if self.api_version_select_state not in API_VERSION_SELECTED_STATES:"},{"line_number":139,"context_line":"            raise RuntimeError("},{"line_number":140,"context_line":"                _(\u0027Error: self.api_version_select_state should be one of the \u0027"},{"line_number":141,"context_line":"                  \u0027values in: \"%(valid)s\" but had the value: \"%(value)s\"\u0027) %"},{"line_number":142,"context_line":"                {\u0027valid\u0027: \u0027, \u0027.join(API_VERSION_SELECTED_STATES),"},{"line_number":143,"context_line":"                 \u0027value\u0027: self.api_version_select_state})"},{"line_number":144,"context_line":"        min_ver, max_ver \u003d self._parse_version_headers(resp)"},{"line_number":145,"context_line":"        # NOTE: servers before commit 32fb6e99 did not return version headers"},{"line_number":146,"context_line":"        # on error, so we need to perform a GET to determine"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_058ed92d","line":143,"range":{"start_line":138,"start_character":8,"end_line":143,"end_character":57},"updated":"2018-05-18 12:19:44.000000000","message":"side-note: shouldn\u0027t it be done before request?","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        if not resp:"},{"line_number":137,"context_line":"            resp \u003d _query_server(conn)"},{"line_number":138,"context_line":"        if self.api_version_select_state not in API_VERSION_SELECTED_STATES:"},{"line_number":139,"context_line":"            raise RuntimeError("},{"line_number":140,"context_line":"                _(\u0027Error: self.api_version_select_state should be one of the \u0027"},{"line_number":141,"context_line":"                  \u0027values in: \"%(valid)s\" but had the value: \"%(value)s\"\u0027) %"},{"line_number":142,"context_line":"                {\u0027valid\u0027: \u0027, \u0027.join(API_VERSION_SELECTED_STATES),"},{"line_number":143,"context_line":"                 \u0027value\u0027: self.api_version_select_state})"},{"line_number":144,"context_line":"        min_ver, max_ver \u003d self._parse_version_headers(resp)"},{"line_number":145,"context_line":"        # NOTE: servers before commit 32fb6e99 did not return version headers"},{"line_number":146,"context_line":"        # on error, so we need to perform a GET to determine"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_2bb9f2ca","line":143,"range":{"start_line":138,"start_character":8,"end_line":143,"end_character":57},"in_reply_to":"5f7c97a3_058ed92d","updated":"2018-05-28 14:01:27.000000000","message":"Likely, but that seems out of scope for this patch right now.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            resp \u003d _query_server(conn)"},{"line_number":151,"context_line":"            min_ver, max_ver \u003d self._parse_version_headers(resp)"},{"line_number":152,"context_line":"        # Reset the maximum version that we permit"},{"line_number":153,"context_line":"        if StrictVersion(max_ver) \u003e StrictVersion(LATEST_VERSION):"},{"line_number":154,"context_line":"            LOG.debug(\"Remote API version %(max_ver)s is greater than the \""},{"line_number":155,"context_line":"                      \"version supported by ironicclient. Maximum available \""},{"line_number":156,"context_line":"                      \"version is %(client_ver)s\","}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d8ee888a","line":153,"updated":"2018-05-18 12:19:44.000000000","message":"Another side note -- if resp passed to this method was None, and GET /v1 call failed with eg 500, there will be no max_ver here and this line will fail with smth like TypeError or AttributeError","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            resp \u003d _query_server(conn)"},{"line_number":151,"context_line":"            min_ver, max_ver \u003d self._parse_version_headers(resp)"},{"line_number":152,"context_line":"        # Reset the maximum version that we permit"},{"line_number":153,"context_line":"        if StrictVersion(max_ver) \u003e StrictVersion(LATEST_VERSION):"},{"line_number":154,"context_line":"            LOG.debug(\"Remote API version %(max_ver)s is greater than the \""},{"line_number":155,"context_line":"                      \"version supported by ironicclient. Maximum available \""},{"line_number":156,"context_line":"                      \"version is %(client_ver)s\","}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ebae9a7f","line":153,"in_reply_to":"5f7c97a3_d8ee888a","updated":"2018-05-28 14:01:27.000000000","message":"Lets address that as a follow-up.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            max_ver \u003d LATEST_VERSION"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        # If the user requested an explicit version or we have negotiated a"},{"line_number":162,"context_line":"        # version and still failing then error now.  The server could"},{"line_number":163,"context_line":"        # support the version requested but the requested operation may not"},{"line_number":164,"context_line":"        # be supported by the requested version."},{"line_number":165,"context_line":"        # TODO(TheJulia): We should break this method into several parts,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_b8386c3d","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":35},"updated":"2018-05-18 12:19:44.000000000","message":"I don\u0027t think I get this comment and the following condition -- where do we check we\u0027re failing? why don\u0027t we compare provided single api version with what server returned in the response?\n\nIf this follows the assumption that this method is only called after 406 -- this is incorrect, as it can be called on L377 as well, with no failures preceding the call.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            max_ver \u003d LATEST_VERSION"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        # If the user requested an explicit version or we have negotiated a"},{"line_number":162,"context_line":"        # version and still failing then error now.  The server could"},{"line_number":163,"context_line":"        # support the version requested but the requested operation may not"},{"line_number":164,"context_line":"        # be supported by the requested version."},{"line_number":165,"context_line":"        # TODO(TheJulia): We should break this method into several parts,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ebfc5a73","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":35},"in_reply_to":"5f7c97a3_b8386c3d","updated":"2018-05-28 14:01:27.000000000","message":"We don\u0027t get called in that case. If a user explicitly operates it as the first call, we don\u0027t get run through this logic at all, so if we are here at all then the client is attempting to recover from a version related conflict that was explicitly set by the user. What needs to be prevented is that version being miss-used and saved.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # be supported by the requested version."},{"line_number":165,"context_line":"        # TODO(TheJulia): We should break this method into several parts,"},{"line_number":166,"context_line":"        # such as a sanity check/error method."},{"line_number":167,"context_line":"        if ((self.api_version_select_state \u003d\u003d \u0027user\u0027 and"},{"line_number":168,"context_line":"                not self._must_negotiate_version()) or"},{"line_number":169,"context_line":"                (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":170,"context_line":"                    version_overridden)):"},{"line_number":171,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_985a5081","line":168,"range":{"start_line":167,"start_character":13,"end_line":168,"end_character":50},"updated":"2018-05-18 12:19:44.000000000","message":"The newly added condition in this if seems to be correct, but this one is not if my previous comment is correct.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # be supported by the requested version."},{"line_number":165,"context_line":"        # TODO(TheJulia): We should break this method into several parts,"},{"line_number":166,"context_line":"        # such as a sanity check/error method."},{"line_number":167,"context_line":"        if ((self.api_version_select_state \u003d\u003d \u0027user\u0027 and"},{"line_number":168,"context_line":"                not self._must_negotiate_version()) or"},{"line_number":169,"context_line":"                (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":170,"context_line":"                    version_overridden)):"},{"line_number":171,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ab3f4223","line":168,"range":{"start_line":167,"start_character":13,"end_line":168,"end_character":50},"in_reply_to":"5f7c97a3_985a5081","updated":"2018-05-28 14:01:27.000000000","message":"Please review my reply to your question.  Also, this was the prior logic.....  Line 169/170 was what was added.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"66c2e1de9b0bdb5f969787bcf320759452ae4fad","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # be supported by the requested version."},{"line_number":165,"context_line":"        # TODO(TheJulia): We should break this method into several parts,"},{"line_number":166,"context_line":"        # such as a sanity check/error method."},{"line_number":167,"context_line":"        if ((self.api_version_select_state \u003d\u003d \u0027user\u0027 and"},{"line_number":168,"context_line":"                not self._must_negotiate_version()) or"},{"line_number":169,"context_line":"                (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027 and"},{"line_number":170,"context_line":"                    version_overridden)):"},{"line_number":171,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_eac09d52","line":168,"range":{"start_line":167,"start_character":13,"end_line":168,"end_character":50},"in_reply_to":"5f7c97a3_ab3f4223","updated":"2018-05-31 11:18:26.000000000","message":"oh right, there is a not _must_negotiate here and _must_negotiate on L377 of original code, makes sense","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                  \"%(max)s\")"},{"line_number":177,"context_line":"                % {\u0027req\u0027: requested_version,"},{"line_number":178,"context_line":"                   \u0027min\u0027: min_ver, \u0027max\u0027: max_ver}))"},{"line_number":179,"context_line":"        if (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027):"},{"line_number":180,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("},{"line_number":181,"context_line":"                _(\"No API version was specified or the requested operation \""},{"line_number":182,"context_line":"                  \"was not supported by the client\u0027s negotiated API version \""},{"line_number":183,"context_line":"                  \"%(req)s.  Supported version range is: %(min)s to %(max)s\")"},{"line_number":184,"context_line":"                % {\u0027req\u0027: requested_version,"},{"line_number":185,"context_line":"                   \u0027min\u0027: min_ver, \u0027max\u0027: max_ver}))"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        if isinstance(requested_version, six.string_types):"},{"line_number":188,"context_line":"            if requested_version \u003d\u003d \u0027latest\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5887d8b7","line":185,"range":{"start_line":179,"start_character":8,"end_line":185,"end_character":52},"updated":"2018-05-18 12:19:44.000000000","message":"if the state is negotiated already, why do we even care to do the request on L137? Just to get min_ver and max_ver to log here?","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                  \"%(max)s\")"},{"line_number":177,"context_line":"                % {\u0027req\u0027: requested_version,"},{"line_number":178,"context_line":"                   \u0027min\u0027: min_ver, \u0027max\u0027: max_ver}))"},{"line_number":179,"context_line":"        if (self.api_version_select_state \u003d\u003d \u0027negotiated\u0027):"},{"line_number":180,"context_line":"            raise exc.UnsupportedVersion(textwrap.fill("},{"line_number":181,"context_line":"                _(\"No API version was specified or the requested operation \""},{"line_number":182,"context_line":"                  \"was not supported by the client\u0027s negotiated API version \""},{"line_number":183,"context_line":"                  \"%(req)s.  Supported version range is: %(min)s to %(max)s\")"},{"line_number":184,"context_line":"                % {\u0027req\u0027: requested_version,"},{"line_number":185,"context_line":"                   \u0027min\u0027: min_ver, \u0027max\u0027: max_ver}))"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        if isinstance(requested_version, six.string_types):"},{"line_number":188,"context_line":"            if requested_version \u003d\u003d \u0027latest\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8b4286aa","line":185,"range":{"start_line":179,"start_character":8,"end_line":185,"end_character":52},"in_reply_to":"5f7c97a3_5887d8b7","updated":"2018-05-28 14:01:27.000000000","message":"as I understand it, just to log which was the prior behavior and is reasonable in order to provide user feedback.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"362ab52fe296d229ecc3f475a1268846600b7036","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                % {\u0027req\u0027: requested_version}))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if StrictVersion(negotiated_ver) \u003c StrictVersion(min_ver):"},{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        self.api_version_select_state \u003d \u0027negotiated\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d861a813","line":227,"updated":"2018-05-18 12:19:44.000000000","message":"another side note -- don\u0027t we need another flag, like allow_api_version_upgrade for this case?","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"bbc32e91ec6a918f41bfb9c0d51c56f939f1690f","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                % {\u0027req\u0027: requested_version}))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if StrictVersion(negotiated_ver) \u003c StrictVersion(min_ver):"},{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        self.api_version_select_state \u003d \u0027negotiated\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8a81e9fd","line":227,"in_reply_to":"5f7c97a3_2b15729c","updated":"2018-05-31 11:22:54.000000000","message":"yeah out of scope of the current story but still I guess worth adding to avoid surprises :)","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"64c968360c5811a3ffa080d7b10cf8698448a403","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                % {\u0027req\u0027: requested_version}))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if StrictVersion(negotiated_ver) \u003c StrictVersion(min_ver):"},{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        self.api_version_select_state \u003d \u0027negotiated\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d7a540b6","line":227,"in_reply_to":"5f7c97a3_8a81e9fd","updated":"2018-06-01 00:22:53.000000000","message":"Maybe? I\u0027ve gotten strong resistance to documenting anything micro-version related in the client thus far... so we\u0027re not really offering a contract in a sense... *sigh*  At least there are doc strings...","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"62bc4fc9a2ee7e3dd3df96efa5d38e11a2c36b7d","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                % {\u0027req\u0027: requested_version}))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        if StrictVersion(negotiated_ver) \u003c StrictVersion(min_ver):"},{"line_number":227,"context_line":"            negotiated_ver \u003d min_ver"},{"line_number":228,"context_line":"        # server handles microversions, but doesn\u0027t support"},{"line_number":229,"context_line":"        # the requested version, so try a negotiated version"},{"line_number":230,"context_line":"        self.api_version_select_state \u003d \u0027negotiated\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_2b15729c","line":227,"in_reply_to":"5f7c97a3_d861a813","updated":"2018-05-28 14:01:27.000000000","message":"That would be out of scope, it is a call specific single request \"use this version for this call only\" sort of action.","commit_id":"1224f3ceda939a5276ae087d48d049fe1527a2f2"}],"ironicclient/tests/unit/common/test_http.py":[{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e74684e4e3eef473d238c6deb380b7d53e85f8b2","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                       autospec\u003dTrue)"},{"line_number":326,"context_line":"    def test_negotiate_version_explicit_version_request("},{"line_number":327,"context_line":"            self, mock_pvh, mock_msr, mock_save_data):"},{"line_number":328,"context_line":"        mock_pvh.side_effect \u003d iter([(None, None), (\u00271.1\u0027, \u00271.99\u0027)])"},{"line_number":329,"context_line":"        mock_conn \u003d mock.MagicMock()"},{"line_number":330,"context_line":"        self.test_object.api_version_select_state \u003d \u0027negotiated\u0027"},{"line_number":331,"context_line":"        self.test_object.os_ironic_api_version \u003d \u00271.30\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_1c8e14d0","line":328,"updated":"2018-05-08 06:55:27.000000000","message":"nit: This mocking looks unreal because this result supports the overridden version though this doesn\u0027t matter.","commit_id":"74a4ff68e0d89f3423b9179be9643d61bd58634a"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e74684e4e3eef473d238c6deb380b7d53e85f8b2","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        response \u003d utils.FakeResponse("},{"line_number":334,"context_line":"            {}, status\u003dhttp_client.NOT_ACCEPTABLE,"},{"line_number":335,"context_line":"            request_headers\u003dreq_header)"},{"line_number":336,"context_line":"        self.assertRaises(exc.UnsupportedVersion,"},{"line_number":337,"context_line":"                          self.test_object.negotiate_version,"},{"line_number":338,"context_line":"                          mock_conn, response)"},{"line_number":339,"context_line":"        self.assertTrue(mock_msr.called)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_fcab181a","line":336,"updated":"2018-05-08 06:55:27.000000000","message":"assertRaisesRegex would be better because UnsupportedVersion is raised whenever api_version_select_state is \u0027negotiated\u0027 regardless of overriding.","commit_id":"74a4ff68e0d89f3423b9179be9643d61bd58634a"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"e74684e4e3eef473d238c6deb380b7d53e85f8b2","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        self.assertEqual(1, mock_negotiate.call_count)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    @mock.patch.object(requests.Session, \u0027request\u0027, autospec\u003dTrue)"},{"line_number":538,"context_line":"    @mock.patch.object(http.VersionNegotiationMixin, \u0027negotiate_version\u0027,"},{"line_number":539,"context_line":"                       autospec\u003dFalse)"},{"line_number":540,"context_line":"    def test__http_request_explicit_version(self, mock_negotiate,"},{"line_number":541,"context_line":"                                            mock_session):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_bf9b52c7","line":538,"updated":"2018-05-08 06:55:27.000000000","message":"This mock doesn\u0027t seem necessary because negotiate_version is not called when api_version_select_state is \u0027negotiated\u0027 and the status code is not NOT_ACCEPTABLE.","commit_id":"74a4ff68e0d89f3423b9179be9643d61bd58634a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"eb27839efe12ce6051256a29edf762289b096cd9","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        self.assertRaisesRegexp(exc.UnsupportedVersion,"},{"line_number":337,"context_line":"                                \".*is not supported by the server.*\","},{"line_number":338,"context_line":"                                self.test_object.negotiate_version,"},{"line_number":339,"context_line":"                                mock_conn, response)"},{"line_number":340,"context_line":"        self.assertTrue(mock_msr.called)"},{"line_number":341,"context_line":"        self.assertEqual(2, mock_pvh.call_count)"},{"line_number":342,"context_line":"        self.assertFalse(mock_save_data.called)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_17973847","line":339,"updated":"2018-06-01 00:23:53.000000000","message":"Thanks vdrok!","commit_id":"5821bd91a04486bac0875d83e04b396fc0c7e989"}]}
