)]}'
{"openstackclient/api/compute_v2.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"893e2580ddd9da1ab6af228163d161d64efcd967","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        if zone:"},{"line_number":294,"context_line":"            url \u003d \u0027/os-hosts?zone\u003d%s\u0027 % zone"},{"line_number":295,"context_line":"        headers\u003d{}"},{"line_number":296,"context_line":"        if \u0027api_version\u0027 in kwargs:"},{"line_number":297,"context_line":"            headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d kwargs[\u0027api_version\u0027]"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        return self.list(url, headers\u003dheaders)[\"hosts\"]"},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_12ece7f1","line":297,"range":{"start_line":296,"start_character":8,"end_line":297,"end_character":75},"updated":"2018-08-17 14:47:00.000000000","message":"Microversion should be passed using the microversion paramter to the REST call on the underlying adapter.\n\nHowever, we really need to do negotiation, which is supported in SDK.","commit_id":"758358fdcc6e589920feb1efa1cfafe2e13f0af5"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"dd9a6d1898e7cd66ec43b9ca15ca2d41da9dd111","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        if zone:"},{"line_number":294,"context_line":"            url \u003d \u0027/os-hosts?zone\u003d%s\u0027 % zone"},{"line_number":295,"context_line":"        headers\u003d{}"},{"line_number":296,"context_line":"        if \u0027api_version\u0027 in kwargs:"},{"line_number":297,"context_line":"            headers[\u0027X-OpenStack-Nova-API-Version\u0027] \u003d kwargs[\u0027api_version\u0027]"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        return self.list(url, headers\u003dheaders)[\"hosts\"]"},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_63cc138a","line":297,"range":{"start_line":296,"start_character":8,"end_line":297,"end_character":75},"in_reply_to":"3f79a3b5_12ece7f1","updated":"2018-09-28 10:26:38.000000000","message":"The lastest openstack host commands (with latest openstacksdk installed ) still don\u0027t seem to respect --os-compute-api-version parameter. So I did some digging into the code path including the sdk and  osc_lib part. Totally new to how all these are chained together, but was trying my best to get things straight. Here is my take atm (which of course could be wrong) :\n\nUnlike many other openstack compute interfaces (which use novaclient.v2.client.Client that gets api versions from the underlying adapters [1], to make API calls), os-hosts API calls are made through osc_lib.api.api.BaseAPI at the bottom [2], which would have no idea about the api_versions if not passed by using headers [3].\n\nSo I think we might still need to pass the api_versions at this level to at least make api version specification work to host-related commands.\n\n[1] https://github.com/openstack/python-openstackclient/blob/master/openstackclient/compute/client.py#L82\n[2] https://github.com/openstack/python-openstackclient/blob/master/openstackclient/compute/client.py#L92\n[3] https://github.com/openstack/osc-lib/blob/master/osc_lib/api/api.py#L141","commit_id":"758358fdcc6e589920feb1efa1cfafe2e13f0af5"}]}
