)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch aims at support microversion in Cyborg API."},{"line_number":10,"context_line":"The work items is the following:"},{"line_number":11,"context_line":"1. remove old api_version_request.py to avoid the redundancy."},{"line_number":12,"context_line":"2. add a header in every API request and support to parse it and"},{"line_number":13,"context_line":"route to the correct API method."},{"line_number":14,"context_line":"3. depracate v1 API."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1fa4df85_343e9929","line":11,"range":{"start_line":11,"start_character":36,"end_line":11,"end_character":61},"updated":"2020-03-16 14:29:39.000000000","message":"You can expalin more why it is redundant, such as where implement or replaced the api version request?","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch aims at support microversion in Cyborg API."},{"line_number":10,"context_line":"The work items is the following:"},{"line_number":11,"context_line":"1. remove old api_version_request.py to avoid the redundancy."},{"line_number":12,"context_line":"2. add a header in every API request and support to parse it and"},{"line_number":13,"context_line":"route to the correct API method."},{"line_number":14,"context_line":"3. depracate v1 API."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1fa4df85_14eefdb3","line":11,"range":{"start_line":11,"start_character":3,"end_line":11,"end_character":4},"updated":"2020-03-16 14:29:39.000000000","message":"nit: s/remove/Remove","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch aims at support microversion in Cyborg API."},{"line_number":10,"context_line":"The work items is the following:"},{"line_number":11,"context_line":"1. remove old api_version_request.py to avoid the redundancy."},{"line_number":12,"context_line":"2. add a header in every API request and support to parse it and"},{"line_number":13,"context_line":"route to the correct API method."},{"line_number":14,"context_line":"3. depracate v1 API."},{"line_number":15,"context_line":"4. add related UT."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1fa4df85_5439d53c","line":12,"range":{"start_line":12,"start_character":3,"end_line":12,"end_character":4},"updated":"2020-03-16 14:29:39.000000000","message":"nit: s/add/Add","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":10,"context_line":"The work items is the following:"},{"line_number":11,"context_line":"1. remove old api_version_request.py to avoid the redundancy."},{"line_number":12,"context_line":"2. add a header in every API request and support to parse it and"},{"line_number":13,"context_line":"route to the correct API method."},{"line_number":14,"context_line":"3. depracate v1 API."},{"line_number":15,"context_line":"4. add related UT."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1fa4df85_346c5935","line":13,"updated":"2020-03-16 14:29:39.000000000","message":"For readability, use indentation appropriately, bellow as 2:\n\n2. Add a header in every API request and support to parse it\n   and route to the correct API method.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":11,"context_line":"1. remove old api_version_request.py to avoid the redundancy."},{"line_number":12,"context_line":"2. add a header in every API request and support to parse it and"},{"line_number":13,"context_line":"route to the correct API method."},{"line_number":14,"context_line":"3. depracate v1 API."},{"line_number":15,"context_line":"4. add related UT."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id9c34dc134d59b2332cefbcae5bbd7e6632e970d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1fa4df85_34277915","line":14,"range":{"start_line":14,"start_character":3,"end_line":14,"end_character":12},"updated":"2020-03-16 14:29:39.000000000","message":"nit: s/depracate/Depracate","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":12,"context_line":"2. add a header in every API request and support to parse it and"},{"line_number":13,"context_line":"route to the correct API method."},{"line_number":14,"context_line":"3. depracate v1 API."},{"line_number":15,"context_line":"4. add related UT."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Id9c34dc134d59b2332cefbcae5bbd7e6632e970d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1fa4df85_54223503","line":15,"range":{"start_line":15,"start_character":3,"end_line":15,"end_character":6},"updated":"2020-03-16 14:29:39.000000000","message":"nit: s/add/Add","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"}],"cyborg/api/api_version_request.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d22318190f3c295fa980daef2809134c2c1854a5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":49,"context_line":"_MIN_API_VERSION \u003d \"2.0\""},{"line_number":50,"context_line":"_MAX_API_VERSION \u003d \"2.1\""},{"line_number":51,"context_line":"DEFAULT_API_VERSION \u003d _MAX_API_VERSION"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# NOTE(Sundar): min and max versions declared as functions so we can"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_d0f982c6","line":51,"range":{"start_line":51,"start_character":22,"end_line":51,"end_character":38},"updated":"2020-02-18 15:15:23.000000000","message":"Why are you change this to the _MAX_API_VERSION controller? I think it should keep with _MIN_API_VERSION, if the end user deploy Cyborg that they may not be the latest version, so IMO here should be the base (_MIN_API_VERSION) API version.","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"}],"cyborg/api/controllers/base.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d22318190f3c295fa980daef2809134c2c1854a5","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from cyborg.api import api_version_request as api_version"},{"line_number":17,"context_line":"from cyborg.api import versioned_method"},{"line_number":18,"context_line":"from cyborg.common import exception"},{"line_number":19,"context_line":"import datetime"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import inspect"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_10c71a69","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":35},"updated":"2020-02-18 15:15:23.000000000","message":"Put these packages under third-party software libraries, maybe it should in line28, and add a blank line between the third-party software libraries and Cyborg\u0027s libraries.","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d22318190f3c295fa980daef2809134c2c1854a5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        controller will use the list for each api to determine which"},{"line_number":83,"context_line":"        method to call."},{"line_number":84,"context_line":"        Example:"},{"line_number":85,"context_line":"            @base.Controller.api_version(\"1.1\", \"1.2\")"},{"line_number":86,"context_line":"            @expose.expose(Cluster, types.uuid_or_name)"},{"line_number":87,"context_line":"            def get_one(self, cluster_ident):"},{"line_number":88,"context_line":"            {...code for versions 1.1 to 1.2...}"},{"line_number":89,"context_line":"            @base.Controller.api_version(\"1.3\")"},{"line_number":90,"context_line":"            @expose.expose(Cluster, types.uuid_or_name)"},{"line_number":91,"context_line":"            def get_one(self, cluster_ident):"},{"line_number":92,"context_line":"            {...code for versions 1.3 to latest}"},{"line_number":93,"context_line":"        @min_ver: string representing minimum version"},{"line_number":94,"context_line":"        @max_ver: optional string representing maximum version"},{"line_number":95,"context_line":"        @raises: ApiVersionsIntersect if an version overlap is found between"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_30f8164a","line":92,"range":{"start_line":85,"start_character":12,"end_line":92,"end_character":48},"updated":"2020-02-18 15:15:23.000000000","message":"This looks not good, if the method will add more microversion that we will add the same method one by one, does it can controller as (if you will add a microversion of 2.2):\n\n            @base.Controller.api_version(\"2.0\", \"2.1\")\n            @base.Controller.api_version(\"2.2\")\n            @expose.expose(Cluster, types.uuid_or_name)\n            def get_one(self, cluster_ident):\n\nOr we should add the validation.schema in, such as in Nova https://github.com/openstack/nova/blob/master/nova/api/validation/__init__.py#L94, that this way we can reduce duplication of duplicate methods.\n\nI would like to get some others\u0027 suggestion of this.","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"2abdf40e705daeabc413adb1b29b0a7fb13ecf13","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        controller will use the list for each api to determine which"},{"line_number":83,"context_line":"        method to call."},{"line_number":84,"context_line":"        Example:"},{"line_number":85,"context_line":"            @base.Controller.api_version(\"1.1\", \"1.2\")"},{"line_number":86,"context_line":"            @expose.expose(Cluster, types.uuid_or_name)"},{"line_number":87,"context_line":"            def get_one(self, cluster_ident):"},{"line_number":88,"context_line":"            {...code for versions 1.1 to 1.2...}"},{"line_number":89,"context_line":"            @base.Controller.api_version(\"1.3\")"},{"line_number":90,"context_line":"            @expose.expose(Cluster, types.uuid_or_name)"},{"line_number":91,"context_line":"            def get_one(self, cluster_ident):"},{"line_number":92,"context_line":"            {...code for versions 1.3 to latest}"},{"line_number":93,"context_line":"        @min_ver: string representing minimum version"},{"line_number":94,"context_line":"        @max_ver: optional string representing maximum version"},{"line_number":95,"context_line":"        @raises: ApiVersionsIntersect if an version overlap is found between"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_c51756a3","line":92,"range":{"start_line":85,"start_character":12,"end_line":92,"end_character":48},"in_reply_to":"3fa7e38b_30f8164a","updated":"2020-03-02 11:12:48.000000000","message":"As we discussed in IRC meeting, the community agreed to support microversion firstly, and them have another bp and implementation of schema check. \nIRC meeting log: http://eavesdrop.openstack.org/meetings/openstack_cyborg/2020/openstack_cyborg.2020-02-27-03.00.log.html#l-29","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d22318190f3c295fa980daef2809134c2c1854a5","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            {...code for versions 1.3 to latest}"},{"line_number":93,"context_line":"        @min_ver: string representing minimum version"},{"line_number":94,"context_line":"        @max_ver: optional string representing maximum version"},{"line_number":95,"context_line":"        @raises: ApiVersionsIntersect if an version overlap is found between"},{"line_number":96,"context_line":"            method versions."},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_b0d96628","line":95,"range":{"start_line":95,"start_character":41,"end_line":95,"end_character":43},"updated":"2020-02-18 15:15:23.000000000","message":"a","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d22318190f3c295fa980daef2809134c2c1854a5","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                obj_max_ver \u003d api_version.APIVersionRequest(max_ver)"},{"line_number":103,"context_line":"            else:"},{"line_number":104,"context_line":"                obj_max_ver \u003d api_version.APIVersionRequest("},{"line_number":105,"context_line":"                    api_version._MAX_API_VERSION)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            # Add to list of versioned methods registered"},{"line_number":108,"context_line":"            func_name \u003d f.__name__"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_50a91276","line":105,"range":{"start_line":105,"start_character":32,"end_line":105,"end_character":48},"updated":"2020-02-18 15:15:23.000000000","message":"s/_MAX_API_VERSION/_MIN_API_VERSION or without parameters.","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":74,"context_line":"class Version(object):"},{"line_number":75,"context_line":"    \"\"\"API Version object.\"\"\""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    string \u003d \u0027OpenStack-API-Version\u0027"},{"line_number":78,"context_line":"    \"\"\"HTTP Header string carrying the requested version\"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    min_string \u003d \u0027OpenStack-API-Minimum-Version\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_d1262a17","line":77,"range":{"start_line":77,"start_character":4,"end_line":77,"end_character":10},"updated":"2020-03-17 04:28:51.000000000","message":"At [1], I would like you can changes it\u0027s define name, how about \"current_api\" or \"current_api_version\"?\n\n[1]https://review.opendev.org/#/c/696860/5/cyborg/api/controllers/v2/__init__.py@121","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7cb6628aaf3b203b3761d6956010f461718b6bc5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"class Version(object):"},{"line_number":75,"context_line":"    \"\"\"API Version object.\"\"\""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    string \u003d \u0027OpenStack-API-Version\u0027"},{"line_number":78,"context_line":"    \"\"\"HTTP Header string carrying the requested version\"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    min_string \u003d \u0027OpenStack-API-Minimum-Version\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_be59d235","line":77,"range":{"start_line":77,"start_character":4,"end_line":77,"end_character":10},"in_reply_to":"1fa4df85_d1262a17","updated":"2020-03-19 02:57:43.000000000","message":"Agree with Brin.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    string \u003d \u0027OpenStack-API-Version\u0027"},{"line_number":78,"context_line":"    \"\"\"HTTP Header string carrying the requested version\"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    min_string \u003d \u0027OpenStack-API-Minimum-Version\u0027"},{"line_number":81,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    max_string \u003d \u0027OpenStack-API-Maximum-Version\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_11ffe267","line":80,"range":{"start_line":80,"start_character":4,"end_line":80,"end_character":14},"updated":"2020-03-17 04:28:51.000000000","message":"How about \"min_api\" or \"min_api_version\"?","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    min_string \u003d \u0027OpenStack-API-Minimum-Version\u0027"},{"line_number":81,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    max_string \u003d \u0027OpenStack-API-Maximum-Version\u0027"},{"line_number":84,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __init__(self, headers, default_version, latest_version):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_d1f86a7d","line":83,"range":{"start_line":83,"start_character":4,"end_line":83,"end_character":14},"updated":"2020-03-17 04:28:51.000000000","message":"How about \"max_api\" or \"max_api_version\"?","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    string \u003d \u0027OpenStack-API-Version\u0027"},{"line_number":78,"context_line":"    \"\"\"HTTP Header string carrying the requested version\"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    min_string \u003d \u0027OpenStack-API-Minimum-Version\u0027"},{"line_number":81,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    max_string \u003d \u0027OpenStack-API-Maximum-Version\u0027"},{"line_number":84,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __init__(self, headers, default_version, latest_version):"},{"line_number":87,"context_line":"        \"\"\"Create an API Version object from the supplied headers."}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_94baed6b","line":84,"range":{"start_line":80,"start_character":0,"end_line":84,"end_character":30},"updated":"2020-03-16 14:29:39.000000000","message":"Why are you need these?\n\nI think we dont need these minimum and maximum version, if the user request \u0027OpenStack-API-Version\u0027: \u00272.0\u0027 we just should check whether it can be accessable, if yes, return \u0027OpenStack-API-Version\u0027 in response header with the expected result, otherwise raise Error with some messages.\n\nSo I think \u0027OpenStack-API-Minimum-Version\u0027 and \u0027OpenStack-API-Maximum-Version\u0027 should not be defined.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    string \u003d \u0027OpenStack-API-Version\u0027"},{"line_number":78,"context_line":"    \"\"\"HTTP Header string carrying the requested version\"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    min_string \u003d \u0027OpenStack-API-Minimum-Version\u0027"},{"line_number":81,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    max_string \u003d \u0027OpenStack-API-Maximum-Version\u0027"},{"line_number":84,"context_line":"    \"\"\"HTTP response header\"\"\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def __init__(self, headers, default_version, latest_version):"},{"line_number":87,"context_line":"        \"\"\"Create an API Version object from the supplied headers."}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_110e02e5","line":84,"range":{"start_line":80,"start_character":0,"end_line":84,"end_character":30},"in_reply_to":"1fa4df85_94baed6b","updated":"2020-03-17 04:28:51.000000000","message":"root@ubuntu-OpenStack:/opt/stack/cyborg# curl -g -i -X GET http://localhost/accelerator/devices -s -H \"$CTYPE\" -H \"$AUTH\" -H \"O-API-Version: accelerator 2.0\"\nHTTP/1.1 200 OK\nDate: Tue, 17 Mar 2020 03:11:30 GMT\nServer: Apache/2.4.29 (Ubuntu)\nVary: OpenStack-API-Version\nOpenStack-API-Minimum-Version: 2.0\nOpenStack-API-Maximum-Version: 2.0\nOpenStack-API-Version: 2.0\nContent-Length: 15\nContent-Type: application/json\nx-openstack-request-id: req-3826242d-ef82-4d89-9756-7628ec94961a\nConnection: close\n\nLooks good, it\u0027s ok keeps \"OpenStack-API-Minimum-Version\" and \"OpenStack-API-Maximum-Version\" in response.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        \"\"\"Create an API Version object from the supplied headers."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        :param headers: webob headers"},{"line_number":90,"context_line":"        :param default_version: version to use if not specified in headers"},{"line_number":91,"context_line":"        :param latest_version: version to use if latest is requested"},{"line_number":92,"context_line":"        :raises: webob.HTTPNotAcceptable"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_f42d61a8","line":90,"range":{"start_line":90,"start_character":15,"end_line":90,"end_character":30},"updated":"2020-03-16 14:29:39.000000000","message":"which version would want to use as default? \u00272.0\u0027? or \u0027latest\u0027?\n\nI suggest use \"2.0\", when we check the UT/FT, that we can use latest version inherit the base test case.\n\nI think you should add a global parameter of the default api version to match the request in header:\n\nsuch as:\n\n# The default api version request if none is requested in the headers\nDEFAULT_API_VERSION \u003d \"2.0\"\n\nnits: As microversion grows, it seems more appropriate to start with \"2.1\" than \"2.0\", \"1~10,11~20\" rather than \"0~9,10~19\", but in general the difference is not significant.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"a82b8484c703914b2647fd50d985dea820d22170","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        return \u0027%s.%s\u0027 % (self.major, self.minor)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    @staticmethod"},{"line_number":102,"context_line":"    def parse_headers(headers, default_version, latest_version):"},{"line_number":103,"context_line":"        \"\"\"Determine the API version requested based on the headers supplied."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        :param headers: webob headers"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_b7d28b33","line":102,"range":{"start_line":102,"start_character":31,"end_line":102,"end_character":62},"updated":"2020-03-16 14:29:39.000000000","message":"Ah, you mean default_version\u003d\u00272\u0027, latest_version\u003d\u0027latest\u0027, the all request OpenStack-API-Version is \"2.latest\".\n\nIMHO, you should use \u00272.0\u0027 as the default version, and use \u0027latest\u0027 represent the latest microversion, for example latest_version\u003d\u00272.1\u0027.\n\nWhen we validate the microversion of the request API, may be if we want add a new parameter to API, that we should define as:\n\n@validate_version(min_version\u003d\"2.3\")\n@validate_version(min_version\u003d\"2.0\", max_version\u003d\"2.2\")\ndef function_api():\n    ...","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"1bb3880835464ffb69844b43f91da6cf19dd6f40","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        minimal_version \u003d (2, 0)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        if version_str is None:"},{"line_number":118,"context_line":"            # If requested header is wrong, Watcher answers with the minimal"},{"line_number":119,"context_line":"            # supported version."},{"line_number":120,"context_line":"            return minimal_version"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_cdf2da9a","line":118,"range":{"start_line":118,"start_character":44,"end_line":118,"end_character":51},"updated":"2020-04-07 01:17:15.000000000","message":"Cyborg","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"19e203abc85f96dd154dba9af42a5bd3d84e79ee","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        minimal_version \u003d (2, 0)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        if version_str is None:"},{"line_number":118,"context_line":"            # If requested header is wrong, Watcher answers with the minimal"},{"line_number":119,"context_line":"            # supported version."},{"line_number":120,"context_line":"            return minimal_version"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_83f8a37c","line":118,"range":{"start_line":118,"start_character":44,"end_line":118,"end_character":51},"in_reply_to":"df33271e_cdf2da9a","updated":"2020-04-07 03:37:25.000000000","message":"Done","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"f0377ded84e3598b43c98a94af5d7754d18238eb","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    \"\"\"API Version object.\"\"\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    current_api_version \u003d \u0027OpenStack-API-Version\u0027"},{"line_number":77,"context_line":"    \"\"\"HTTP Header string carrying the requested version\"\"\""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    min_api_version \u003d \u0027OpenStack-API-Minimum-Version\u0027"},{"line_number":80,"context_line":"    \"\"\"HTTP response header\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"df33271e_f9db201e","line":77,"updated":"2020-04-07 06:22:12.000000000","message":"A suggestion inline, in order to increase the user\u0027s readability, we can write comments on the variable definition in the subsequent programming.","commit_id":"07a8e30f76c760c62b1061de934ff5b46ada42d9"}],"cyborg/api/controllers/root.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d1bd119e2a1bdfe0aa679c4d35a96b24670a2ce1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from cyborg.api import expose"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class APIStatus(object):"},{"line_number":30,"context_line":"    CURRENT \u003d \"CURRENT\""},{"line_number":31,"context_line":"    SUPPORTED \u003d \"SUPPORTED\""},{"line_number":32,"context_line":"    DEPRECATED \u003d \"DEPRECATED\""},{"line_number":33,"context_line":"    EXPERIMENTAL \u003d \"EXPERIMENTAL\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class Version(base.APIBase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_52c8254d","line":33,"range":{"start_line":29,"start_character":0,"end_line":33,"end_character":33},"updated":"2020-02-19 07:31:32.000000000","message":"nit: I\u0027m not sure if it\u0027s necessary to set up such a class, maybe it\u0027s hard-coded enough, we won\u0027t often modify the API version, just \"CURRENT\" and \"SUPPORTED\", if you want to show the deprecated API version that can add \"DEPRECATED\".","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d1bd119e2a1bdfe0aa679c4d35a96b24670a2ce1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    @staticmethod"},{"line_number":55,"context_line":"    def convert(id, status\u003dAPIStatus.CURRENT):"},{"line_number":56,"context_line":"        version \u003d Version()"},{"line_number":57,"context_line":"        if id \u003d\u003d \"v1\":"},{"line_number":58,"context_line":"            version.max_version \u003d None"},{"line_number":59,"context_line":"            version.min_version \u003d None"},{"line_number":60,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_32cfa955","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":22},"updated":"2020-02-19 07:31:32.000000000","message":"If request v1, raise unsupported excetion?","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"2568f876124fa729cd549a864a6b727329f72a8e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    \"\"\"The minimum version supported\"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    links \u003d [link.Link]"},{"line_number":50,"context_line":"    \"\"\"A Link that point to a specific version of the API\"\"\""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @staticmethod"},{"line_number":53,"context_line":"    def convert(id, status\u003dAPIStatus.CURRENT):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_2dbc2668","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":24},"updated":"2020-04-07 01:44:08.000000000","message":"nit: \"link that points\"","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"19e203abc85f96dd154dba9af42a5bd3d84e79ee","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    \"\"\"The minimum version supported\"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    links \u003d [link.Link]"},{"line_number":50,"context_line":"    \"\"\"A Link that point to a specific version of the API\"\"\""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @staticmethod"},{"line_number":53,"context_line":"    def convert(id, status\u003dAPIStatus.CURRENT):"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_2304377b","line":50,"range":{"start_line":50,"start_character":9,"end_line":50,"end_character":24},"in_reply_to":"df33271e_2dbc2668","updated":"2020-04-07 03:37:25.000000000","message":"Done","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"2568f876124fa729cd549a864a6b727329f72a8e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            \"Cyborg is the OpenStack project for lifecycle \""},{"line_number":89,"context_line":"            \"management of hardware accelerators, such as GPUs,\""},{"line_number":90,"context_line":"            \"FPGAs, AI chips, security accelerators, etc.\")"},{"line_number":91,"context_line":"        root.versions \u003d [Version.convert(\u0027v1\u0027, APIStatus.DEPRECATED),"},{"line_number":92,"context_line":"                         Version.convert(\u0027v2\u0027)]"},{"line_number":93,"context_line":"        root.default_version \u003d Version.convert(\u0027v2\u0027)"},{"line_number":94,"context_line":"        return root"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_ed66be29","line":91,"range":{"start_line":91,"start_character":25,"end_line":91,"end_character":68},"updated":"2020-04-07 01:44:08.000000000","message":"We have completely removed v1, not merely deprecated it, right?","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"19e203abc85f96dd154dba9af42a5bd3d84e79ee","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            \"Cyborg is the OpenStack project for lifecycle \""},{"line_number":89,"context_line":"            \"management of hardware accelerators, such as GPUs,\""},{"line_number":90,"context_line":"            \"FPGAs, AI chips, security accelerators, etc.\")"},{"line_number":91,"context_line":"        root.versions \u003d [Version.convert(\u0027v1\u0027, APIStatus.DEPRECATED),"},{"line_number":92,"context_line":"                         Version.convert(\u0027v2\u0027)]"},{"line_number":93,"context_line":"        root.default_version \u003d Version.convert(\u0027v2\u0027)"},{"line_number":94,"context_line":"        return root"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_8368a3ba","line":91,"range":{"start_line":91,"start_character":25,"end_line":91,"end_character":68},"in_reply_to":"df33271e_ed66be29","updated":"2020-04-07 03:37:25.000000000","message":"Agree, we should remove this.","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"}],"cyborg/api/controllers/v2/__init__.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        # The Vary header is used as a hint to caching proxies and user agents"},{"line_number":119,"context_line":"        # that the response is also dependent on the OpenStack-API-Version and"},{"line_number":120,"context_line":"        # not just the body and query parameters. See RFC 7231 for details."},{"line_number":121,"context_line":"        pecan.response.headers[\u0027Vary\u0027] \u003d base.Version.string"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        # Always set the min and max headers"},{"line_number":124,"context_line":"        pecan.response.headers[base.Version.min_string] \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_512a3ae7","line":121,"range":{"start_line":121,"start_character":54,"end_line":121,"end_character":60},"updated":"2020-03-17 04:28:51.000000000","message":"It\u0027s not easy to know what is it.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7cb6628aaf3b203b3761d6956010f461718b6bc5","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        # The Vary header is used as a hint to caching proxies and user agents"},{"line_number":119,"context_line":"        # that the response is also dependent on the OpenStack-API-Version and"},{"line_number":120,"context_line":"        # not just the body and query parameters. See RFC 7231 for details."},{"line_number":121,"context_line":"        pecan.response.headers[\u0027Vary\u0027] \u003d base.Version.string"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        # Always set the min and max headers"},{"line_number":124,"context_line":"        pecan.response.headers[base.Version.min_string] \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_5e3bfecf","line":121,"range":{"start_line":121,"start_character":54,"end_line":121,"end_character":60},"in_reply_to":"1fa4df85_512a3ae7","updated":"2020-03-19 02:57:43.000000000","message":"Agreed.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"}],"cyborg/api/controllers/v2/device_profiles.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"d1bd119e2a1bdfe0aa679c4d35a96b24670a2ce1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"class DeviceProfilesController(base.CyborgController):"},{"line_number":86,"context_line":"    \"\"\"REST controller for Device Profiles.\"\"\""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @base.CyborgController.api_version(\"2.0\")"},{"line_number":89,"context_line":"    @policy.authorize_wsgi(\"cyborg:device_profile\", \"create\", False)"},{"line_number":90,"context_line":"    @expose.expose(\u0027json\u0027, body\u003dtypes.jsontype,"},{"line_number":91,"context_line":"                   status_code\u003dhttp_client.CREATED)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_f2759100","line":88,"updated":"2020-02-19 07:31:32.000000000","message":"Lack of the UT is support for api version 2.0 to test device profile post(), and the corresponding anti-use case, if we call this API before v2.0, it will raise an exception (exception.ValidationError) than assertIn the exception message.","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ab8412938fcca0ddc361db45565235ea0ae9662e","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        return api_obj_devprofs"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    @base.CyborgController.api_version(\"2.0\")"},{"line_number":170,"context_line":"    @policy.authorize_wsgi(\"cyborg:device_profile\", \"get_all\", False)"},{"line_number":171,"context_line":"    @expose.expose(\u0027json\u0027, wtypes.text)"},{"line_number":172,"context_line":"    def get_all(self, name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_d2be557c","line":169,"updated":"2020-02-19 07:37:19.000000000","message":"The same as above post(), need to add some test cases.","commit_id":"a9c1d3ceca62477a51e0af0e80f872899135a283"}],"cyborg/api/controllers/v2/devices.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    @policy.authorize_wsgi(\"cyborg:device\", \"get_all\", False)"},{"line_number":107,"context_line":"    @expose.expose(DeviceCollection, wtypes.text, wtypes.text, wtypes.text,"},{"line_number":108,"context_line":"                   wtypes.ArrayType(types.FilterType))"},{"line_number":109,"context_line":"    def get_all(self, type\u003dNone, vendor\u003dNone, hostname\u003dNone, filters\u003dNone):"},{"line_number":110,"context_line":"        \"\"\"Retrieve a list of devices."},{"line_number":111,"context_line":"        :param type: type of a device."}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_d16b8a1c","line":108,"updated":"2020-03-17 04:28:51.000000000","message":"As talked in wechat, how we control the microversion check in API?","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"0712a10232bc78aa52181062145c58cbe6096c05","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        locates."},{"line_number":115,"context_line":"        :param filters: a filter of FilterType to get device list by filter."},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        print(pecan.request.headers.__dict__)"},{"line_number":118,"context_line":"        filters_dict \u003d {}"},{"line_number":119,"context_line":"        if type:"},{"line_number":120,"context_line":"            filters_dict[\"type\"] \u003d type"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_60f7d95a","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":45},"updated":"2020-03-09 13:10:39.000000000","message":"debug info. :)","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"383cef365b6d6ee7508fd3b388375691fc056678","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        locates."},{"line_number":115,"context_line":"        :param filters: a filter of FilterType to get device list by filter."},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        print(pecan.request.headers.__dict__)"},{"line_number":118,"context_line":"        filters_dict \u003d {}"},{"line_number":119,"context_line":"        if type:"},{"line_number":120,"context_line":"            filters_dict[\"type\"] \u003d type"}],"source_content_type":"text/x-python","patch_set":6,"id":"df33271e_1305a014","line":117,"updated":"2020-03-31 10:35:06.000000000","message":"Remove this debug log.","commit_id":"c1646199c2301274c97aac81dbabb9934b9b6681"}],"cyborg/api/controllers/v2/versions.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"7cb6628aaf3b203b3761d6956010f461718b6bc5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"#"},{"line_number":22,"context_line":"# v2.0: corresponds to Ussuri API"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"MINOR_0_USSURI \u003d 0"},{"line_number":25,"context_line":"# Add new microversion here if necessary, and update MINOR_MAX_VERSION."},{"line_number":26,"context_line":"MINOR_MAX_VERSION \u003d MINOR_0_USSURI"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_de4cce77","line":24,"range":{"start_line":24,"start_character":7,"end_line":24,"end_character":14},"updated":"2020-03-19 02:57:43.000000000","message":"Should we hardcode the release name like this? I don\u0027t think I\u0027ve seen this elsewhere.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":21,"context_line":"#"},{"line_number":22,"context_line":"# v2.0: corresponds to Ussuri API"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"MINOR_0_USSURI \u003d 0"},{"line_number":25,"context_line":"# Add new microversion here if necessary, and update MINOR_MAX_VERSION."},{"line_number":26,"context_line":"MINOR_MAX_VERSION \u003d MINOR_0_USSURI"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_11836206","line":24,"range":{"start_line":24,"start_character":17,"end_line":24,"end_character":18},"updated":"2020-03-17 04:28:51.000000000","message":"Why not we use 2.0 as the default minor version?","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"01864f1a3af88437a314e93e45cdc80f133871a6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"#"},{"line_number":22,"context_line":"# v2.0: corresponds to Ussuri API"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"MINOR_0_USSURI \u003d 0"},{"line_number":25,"context_line":"# Add new microversion here if necessary, and update MINOR_MAX_VERSION."},{"line_number":26,"context_line":"MINOR_MAX_VERSION \u003d MINOR_0_USSURI"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_ded12e59","line":24,"range":{"start_line":24,"start_character":7,"end_line":24,"end_character":14},"in_reply_to":"1fa4df85_de4cce77","updated":"2020-03-19 03:22:28.000000000","message":"In Nova used _MIN_API_VERSION and _MAX_API_VERSION are used to help developers control the changes of microversion, and I think the version should be the same, it should be a completed version number.\n\nIn nova https://opendev.org/openstack/nova/src/branch/master/nova/api/openstack/api_version_request.py#L234-L235","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"MINOR_0_USSURI \u003d 0"},{"line_number":25,"context_line":"# Add new microversion here if necessary, and update MINOR_MAX_VERSION."},{"line_number":26,"context_line":"MINOR_MAX_VERSION \u003d MINOR_0_USSURI"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# String representations of the minor and maximum versions"},{"line_number":29,"context_line":"_MIN_VERSION_STRING \u003d \u0027{}.{}\u0027.format(BASE_VERSION, MINOR_0_USSURI)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_f177a63a","line":26,"range":{"start_line":26,"start_character":20,"end_line":26,"end_character":34},"updated":"2020-03-17 04:28:51.000000000","message":"As the same, if I am a developer, I prefer to fill it with the full version.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"654009af8e956421729b0f9e26bdcfce50183161","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# String representations of the minor and maximum versions"},{"line_number":29,"context_line":"_MIN_VERSION_STRING \u003d \u0027{}.{}\u0027.format(BASE_VERSION, MINOR_0_USSURI)"},{"line_number":30,"context_line":"_MAX_VERSION_STRING \u003d \u0027{}.{}\u0027.format(BASE_VERSION, MINOR_MAX_VERSION)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def service_type_string():"}],"source_content_type":"text/x-python","patch_set":5,"id":"1fa4df85_d1a14a97","line":30,"updated":"2020-03-17 04:28:51.000000000","message":"How about directly use as bellow? I think that it will be decrepate \"MINOR_0_USSURI\" and \"MINOR_MAX_VERSION\".\n\n# The minimum and maximum versions of the API supported\n# The default api version request is defined to be the\n# minimum version of the API supported.\n_MIN_VERSION_STRING \u003d \u00272.0\u0027\n_MAX_VERSION_STRING \u003d \u00272.x\u0027\n\n\nAnd how about change these to \"_MIN_API_VERSION\" and \"_MAX_API_VERSION\"?\n\nIf we need to add a microversion to an API, that we just need to change _MAX_API_VERSION to the latest version.","commit_id":"ad8ef85514f4b783a192d2217006d201fd2d60b7"}],"cyborg/api/rest_api_version_history.rst":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"2568f876124fa729cd549a864a6b727329f72a8e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"df33271e_ad2af68c","updated":"2020-04-07 01:44:08.000000000","message":"Good documentation. +1.","commit_id":"922885472e0a609382907d5aedaeddd1bbe95e4e"}],"cyborg/tests/unit/api/controllers/v2/test_microversion.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"fd2c9589a68024549aa740353f12c6ed3d877a38","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":44,"context_line":"        self.assertIn(expected_error_msg, response.json[\u0027error_message\u0027])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_without_microversion(self):"},{"line_number":47,"context_line":"        response \u003d self.get_json(\u0027/v2\u0027, return_json\u003dFalse)"},{"line_number":48,"context_line":"        self.assertEqual(response.headers[H_MIN_VER], MIN_VER)"},{"line_number":49,"context_line":"        self.assertEqual(response.headers[H_MAX_VER], MAX_VER)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df33271e_835ee342","line":46,"updated":"2020-04-07 04:22:09.000000000","message":"nit: This test seems like to test the request will be set \" \u0027OpenStack-API-Version\u0027: accelerator MIN_VER\" by default, can you add some comment in this function?","commit_id":"6a733db74a30bd7f00234b3664812e00e3bd9362"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"21f058c5f349f79c3233b5295276ecf48ca60a40","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":44,"context_line":"        self.assertIn(expected_error_msg, response.json[\u0027error_message\u0027])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_without_microversion(self):"},{"line_number":47,"context_line":"        response \u003d self.get_json(\u0027/v2\u0027, return_json\u003dFalse)"},{"line_number":48,"context_line":"        self.assertEqual(response.headers[H_MIN_VER], MIN_VER)"},{"line_number":49,"context_line":"        self.assertEqual(response.headers[H_MAX_VER], MAX_VER)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df33271e_fe4b065c","line":46,"in_reply_to":"df33271e_835ee342","updated":"2020-04-07 05:01:58.000000000","message":"Sure, will do.","commit_id":"6a733db74a30bd7f00234b3664812e00e3bd9362"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"fd2c9589a68024549aa740353f12c6ed3d877a38","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        response \u003d self.get_json("},{"line_number":80,"context_line":"            \u0027/v2\u0027,"},{"line_number":81,"context_line":"            headers\u003d{\u0027OpenStack-API-Version\u0027: \u0027 \u0027.join([SERVICE_TYPE,"},{"line_number":82,"context_line":"                                                        \u00272.999\u0027])},"},{"line_number":83,"context_line":"            expect_errors\u003dTrue)"},{"line_number":84,"context_line":"        self.assertEqual(406, response.status_int)"},{"line_number":85,"context_line":"        self.assertEqual(response.headers[H_MIN_VER], MIN_VER)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df33271e_6320ffb1","line":82,"range":{"start_line":82,"start_character":56,"end_line":82,"end_character":63},"updated":"2020-04-07 04:22:09.000000000","message":"nit: maybe we can use \"MAX_VER + 1\" or \u0027latest+1\u0027 instead of \u00272.999\u0027, although that we can reach 2.999 for a long time.","commit_id":"6a733db74a30bd7f00234b3664812e00e3bd9362"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"21f058c5f349f79c3233b5295276ecf48ca60a40","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        response \u003d self.get_json("},{"line_number":80,"context_line":"            \u0027/v2\u0027,"},{"line_number":81,"context_line":"            headers\u003d{\u0027OpenStack-API-Version\u0027: \u0027 \u0027.join([SERVICE_TYPE,"},{"line_number":82,"context_line":"                                                        \u00272.999\u0027])},"},{"line_number":83,"context_line":"            expect_errors\u003dTrue)"},{"line_number":84,"context_line":"        self.assertEqual(406, response.status_int)"},{"line_number":85,"context_line":"        self.assertEqual(response.headers[H_MIN_VER], MIN_VER)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df33271e_be905e97","line":82,"range":{"start_line":82,"start_character":56,"end_line":82,"end_character":63},"in_reply_to":"df33271e_6320ffb1","updated":"2020-04-07 05:01:58.000000000","message":"Agree with you, but we should do like +0.1 instead of +1 because we need to keep the major version as the same.\nPlease see my latest update.:)","commit_id":"6a733db74a30bd7f00234b3664812e00e3bd9362"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ed562d4a60bce8c1ce52f861e08b0afebb29b5a6","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def test_without_specified_microversion(self):"},{"line_number":47,"context_line":"        \"\"\"If the header OpenStack-API-Version is absent in user\u0027s request,"},{"line_number":48,"context_line":"        the defauld microversion is MIN_VER."},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        response \u003d self.get_json(\u0027/v2\u0027, return_json\u003dFalse)"},{"line_number":51,"context_line":"        self.assertEqual(response.headers[H_MIN_VER], MIN_VER)"}],"source_content_type":"text/x-python","patch_set":11,"id":"df33271e_b99d1868","line":48,"range":{"start_line":48,"start_character":18,"end_line":48,"end_character":19},"updated":"2020-04-07 06:17:10.000000000","message":"s/defauld/default","commit_id":"7df28f6c2bdcc791f9b5a3cff264e5e7dd941ead"}],"releasenotes/notes/introduce-microversion-39c7f5cc6af4a139.yaml":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"23fb0cca84ee379ff0624d311c93749b946ed276","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Let Cyborg support microversion in order to allow changes to the API while"},{"line_number":5,"context_line":"    preserving backward compatibility. The basic idea is that a user has to"},{"line_number":6,"context_line":"    explicitly ask for their request to be treated with a particular version of"},{"line_number":7,"context_line":"    the API. So breaking changes can be added to the API without breaking users"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"df33271e_e37c0fed","line":4,"range":{"start_line":4,"start_character":3,"end_line":4,"end_character":35},"updated":"2020-04-07 03:54:02.000000000","message":"Cyborg now supports microversions","commit_id":"7efd75f9a1dbf41d5b755859821749d0588c2527"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"d51c30197cd0ee9eb04bb70bf2347b097a4b751d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Let Cyborg support microversion in order to allow changes to the API while"},{"line_number":5,"context_line":"    preserving backward compatibility. The basic idea is that a user has to"},{"line_number":6,"context_line":"    explicitly ask for their request to be treated with a particular version of"},{"line_number":7,"context_line":"    the API. So breaking changes can be added to the API without breaking users"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"df33271e_03c65317","line":4,"range":{"start_line":4,"start_character":3,"end_line":4,"end_character":35},"in_reply_to":"df33271e_e37c0fed","updated":"2020-04-07 04:06:41.000000000","message":"Done","commit_id":"7efd75f9a1dbf41d5b755859821749d0588c2527"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"23fb0cca84ee379ff0624d311c93749b946ed276","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    preserving backward compatibility. The basic idea is that a user has to"},{"line_number":6,"context_line":"    explicitly ask for their request to be treated with a particular version of"},{"line_number":7,"context_line":"    the API. So breaking changes can be added to the API without breaking users"},{"line_number":8,"context_line":"    who do not specifically ask for it. This is done with an HTTP header"},{"line_number":9,"context_line":"    ``OpenStack-API-Version: accelerator 2.0`` which is a monotonically increasing"},{"line_number":10,"context_line":"    semantic version number starting from 2.0."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"df33271e_6368ff20","line":8,"range":{"start_line":8,"start_character":58,"end_line":8,"end_character":65},"updated":"2020-04-07 03:54:02.000000000","message":"User requests must include an HTTP header ... \n\nIf that header is absent, the request defaults to the default microversion of 2.0.","commit_id":"7efd75f9a1dbf41d5b755859821749d0588c2527"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"23fb0cca84ee379ff0624d311c93749b946ed276","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Let Cyborg support microversion in order to allow changes to the API while"},{"line_number":5,"context_line":"    preserving backward compatibility. The basic idea is that a user has to"},{"line_number":6,"context_line":"    explicitly ask for their request to be treated with a particular version of"},{"line_number":7,"context_line":"    the API. So breaking changes can be added to the API without breaking users"},{"line_number":8,"context_line":"    who do not specifically ask for it. This is done with an HTTP header"},{"line_number":9,"context_line":"    ``OpenStack-API-Version: accelerator 2.0`` which is a monotonically increasing"},{"line_number":10,"context_line":"    semantic version number starting from 2.0."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"df33271e_238717da","line":8,"range":{"start_line":5,"start_character":38,"end_line":8,"end_character":57},"updated":"2020-04-07 03:54:02.000000000","message":"We can drop this IMHO.","commit_id":"7efd75f9a1dbf41d5b755859821749d0588c2527"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"d51c30197cd0ee9eb04bb70bf2347b097a4b751d","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    preserving backward compatibility. The basic idea is that a user has to"},{"line_number":6,"context_line":"    explicitly ask for their request to be treated with a particular version of"},{"line_number":7,"context_line":"    the API. So breaking changes can be added to the API without breaking users"},{"line_number":8,"context_line":"    who do not specifically ask for it. This is done with an HTTP header"},{"line_number":9,"context_line":"    ``OpenStack-API-Version: accelerator 2.0`` which is a monotonically increasing"},{"line_number":10,"context_line":"    semantic version number starting from 2.0."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"df33271e_a34b27ae","line":8,"range":{"start_line":8,"start_character":58,"end_line":8,"end_character":65},"in_reply_to":"df33271e_6368ff20","updated":"2020-04-07 04:06:41.000000000","message":"Done","commit_id":"7efd75f9a1dbf41d5b755859821749d0588c2527"}],"requirements.txt":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"383cef365b6d6ee7508fd3b388375691fc056678","unresolved":false,"context_lines":[{"line_number":31,"context_line":"oslo.privsep\u003e\u003d1.32.0 # Apache-2.0"},{"line_number":32,"context_line":"cursive\u003e\u003d0.2.1 # Apache-2.0"},{"line_number":33,"context_line":"microversion_parse\u003e\u003d0.2.1 # Apache-2.0"},{"line_number":34,"context_line":""}],"source_content_type":"text/plain","patch_set":6,"id":"df33271e_532c4801","line":34,"updated":"2020-03-31 10:35:06.000000000","message":"redundant blak line.","commit_id":"c1646199c2301274c97aac81dbabb9934b9b6681"}]}
