)]}'
{"rally/benchmark/validation.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2036176bdf23e2224b1a8cbce908759caf70445b","unresolved":false,"context_lines":[{"line_number":581,"context_line":""},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"@validator"},{"line_number":584,"context_line":"def required_keystone(config, clients, deployment, version):"},{"line_number":585,"context_line":"    \"\"\"Validator check keystone API version.\"\"\""},{"line_number":586,"context_line":"    if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":587,"context_line":"        return ValidationResult(False, _(\"Keystone V2.0 API required\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_317127a9","line":584,"updated":"2015-06-09 10:59:33.000000000","message":"This is required for all kinds of projects... We should do this centralized for all python clients (without having 100500 validators)","commit_id":"781d6463df5afa91d6c8dd85ee77685fdb42cd1d"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"aeec4c7384046d0b3563fdb50905993893ec4fd4","unresolved":false,"context_lines":[{"line_number":584,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":585,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":586,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":587,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":588,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":589,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":590,"context_line":"            return ValidationResult(False, _(\"Keystone V3 API required\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_77cd0830","line":587,"updated":"2015-06-10 16:12:49.000000000","message":"How about to realize it without \u0027if\u0027 for each component?","commit_id":"6cdc82b0086fb19f0201630a7772b9d970bbbe24"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"f88720036e86b756b5ad690310f1a4e5dbe9555b","unresolved":false,"context_lines":[{"line_number":584,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":585,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":586,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":587,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":588,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":589,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":590,"context_line":"            return ValidationResult(False, _(\"Keystone V3 API required\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_55a792bc","line":587,"in_reply_to":"3afb71cf_77cd0830","updated":"2015-06-11 00:40:26.000000000","message":"Don\u0027t have any ideas how to do this, any suggestions?","commit_id":"6cdc82b0086fb19f0201630a7772b9d970bbbe24"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"4d346ad3f4f80570e4f815dc96e85369befefb5e","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":588,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":589,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":590,"context_line":"            return ValidationResult(False, _(\"Keystone V3 API required\"))"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"@validator"}],"source_content_type":"text/x-python","patch_set":5,"id":"dab17558_c6e2c4d4","line":590,"updated":"2016-05-16 14:29:39.000000000","message":"There is OSClient.choose_method which can return selected version. Most of clients use it.\n\nIt would be nice if you add some check, like:\n\n  if component \u003d\u003d \"keystone\":\n     # do your check\n  else:\n     used_version \u003d getattr(clients, component).choose_version()\n     if not used_version:\n        # there is no way to check version. Should we return ValidationError in such casses?\n        return\n     if version !\u003d used_version:\n        raise","commit_id":"4c4ce3552772decce016feaa3affc082cbdecaaa"}],"rally/task/validation.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"6eb2bb19f0e558bb92064555f446a1123dfb6081","unresolved":false,"context_lines":[{"line_number":613,"context_line":"@validator"},{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":617,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":618,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":619,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_c96f355e","line":616,"updated":"2016-05-17 14:51:25.000000000","message":"I prefer to add additional check for version to ensure that all next checks will work as expected.\n\n    version \u003d str(version)","commit_id":"0e3da8dc01b2998b3c55bddfa9ebbf3c888dcc20"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"8b3220a52c3ad0e883b54edbf72b306cd27c1438","unresolved":false,"context_lines":[{"line_number":613,"context_line":"@validator"},{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":617,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":618,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":619,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_cfde15d9","line":616,"in_reply_to":"dab17558_c96f355e","updated":"2016-05-17 15:29:17.000000000","message":"Done","commit_id":"0e3da8dc01b2998b3c55bddfa9ebbf3c888dcc20"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"6eb2bb19f0e558bb92064555f446a1123dfb6081","unresolved":false,"context_lines":[{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":617,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":618,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":619,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":620,"context_line":"            return ValidationResult(False, _(\"Keystone V3 API required\"))"},{"line_number":621,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_4945056d","line":618,"range":{"start_line":618,"start_character":46,"end_line":618,"end_character":72},"updated":"2016-05-17 14:51:25.000000000","message":"This and other messages are wrong. It is better to say something like \"task is designed to be used with %(component)s V%(version)s, but V%(found_version)s is selected.\"","commit_id":"0e3da8dc01b2998b3c55bddfa9ebbf3c888dcc20"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"8b3220a52c3ad0e883b54edbf72b306cd27c1438","unresolved":false,"context_lines":[{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":617,"context_line":"        if version \u003d\u003d 2.0 and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":618,"context_line":"            return ValidationResult(False, _(\"Keystone V2.0 API required\"))"},{"line_number":619,"context_line":"        if version \u003d\u003d 3 and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":620,"context_line":"            return ValidationResult(False, _(\"Keystone V3 API required\"))"},{"line_number":621,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_2ff08166","line":618,"range":{"start_line":618,"start_character":46,"end_line":618,"end_character":72},"in_reply_to":"dab17558_4945056d","updated":"2016-05-17 15:29:17.000000000","message":"Done","commit_id":"0e3da8dc01b2998b3c55bddfa9ebbf3c888dcc20"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"a3ff676cdfdf5e1df8486b880a62423b01165615","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"@validator"},{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    version \u003d str(version)"},{"line_number":617,"context_line":"    msg \u003d _(\"Task is designed to be used with %(component)s \""}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_ca7d34b3","line":614,"updated":"2016-06-02 21:28:06.000000000","message":"How about to have validator for different versions? Clients can have more that two versions of api. For example glance have three versions.","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"065956fde422c4456ffc712feea919c371d66c60","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"@validator"},{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    version \u003d str(version)"},{"line_number":617,"context_line":"    msg \u003d _(\"Task is designed to be used with %(component)s \""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_717cfc20","line":614,"in_reply_to":"9abb7d3a_ca7d34b3","updated":"2016-06-06 02:31:00.000000000","message":"Reasonable to me. Done","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"d8fe946b2de8e68d5358118527f517c6c5a2e56d","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"@validator"},{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    version \u003d str(version)"},{"line_number":617,"context_line":"    msg \u003d _(\"Task is designed to be used with %(component)s \""}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_a0039a75","line":614,"in_reply_to":"9abb7d3a_ca7d34b3","updated":"2016-06-02 21:37:13.000000000","message":"the same is true for cinder","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"a3ff676cdfdf5e1df8486b880a62423b01165615","unresolved":false,"context_lines":[{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    version \u003d str(version)"},{"line_number":617,"context_line":"    msg \u003d _(\"Task is designed to be used with %(component)s \""},{"line_number":618,"context_line":"            \"V%(version)s, but V%(found_version)s is \""},{"line_number":619,"context_line":"            \"selected.\")"},{"line_number":620,"context_line":"    if component \u003d\u003d \"keystone\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_6a408808","line":617,"updated":"2016-06-02 21:28:06.000000000","message":"Task was designed - Past Simple?\nTask is designed - I don\u0027t what time is it","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"065956fde422c4456ffc712feea919c371d66c60","unresolved":false,"context_lines":[{"line_number":614,"context_line":"def required_api_version(config, clients, deployment, component, version):"},{"line_number":615,"context_line":"    \"\"\"Validator checks component API version.\"\"\""},{"line_number":616,"context_line":"    version \u003d str(version)"},{"line_number":617,"context_line":"    msg \u003d _(\"Task is designed to be used with %(component)s \""},{"line_number":618,"context_line":"            \"V%(version)s, but V%(found_version)s is \""},{"line_number":619,"context_line":"            \"selected.\")"},{"line_number":620,"context_line":"    if component \u003d\u003d \"keystone\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_f18e2c26","line":617,"in_reply_to":"9abb7d3a_6a408808","updated":"2016-06-06 02:31:00.000000000","message":":) Changed to was","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"a3ff676cdfdf5e1df8486b880a62423b01165615","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            \"V%(version)s, but V%(found_version)s is \""},{"line_number":619,"context_line":"            \"selected.\")"},{"line_number":620,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":621,"context_line":"        if version \u003d\u003d \"2.0\" and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":622,"context_line":"            return ValidationResult(False, msg % {\"component\": component,"},{"line_number":623,"context_line":"                                                  \"version\": version,"},{"line_number":624,"context_line":"                                                  \"found_version\": \"3\"})"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_fd8549ad","line":621,"updated":"2016-06-02 21:28:06.000000000","message":"1) If this is api versions. Why not to cast to integer? To avoid astonishment why `version\u003d\"2\"` can\u0027t be determined\n\n2) Why we don\u0027t use version attribute but use ad-hoc solution? https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v3/client.py#L191\n\nhttps://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v2_0/client.py#L146","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"32c87ee761ad4f622bfc8eb113f7bb942ec486fe","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            \"V%(version)s, but V%(found_version)s is \""},{"line_number":619,"context_line":"            \"selected.\")"},{"line_number":620,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":621,"context_line":"        if version \u003d\u003d \"2.0\" and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":622,"context_line":"            return ValidationResult(False, msg % {\"component\": component,"},{"line_number":623,"context_line":"                                                  \"version\": version,"},{"line_number":624,"context_line":"                                                  \"found_version\": \"3\"})"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_23ca1450","line":621,"in_reply_to":"9abb7d3a_e09e4206","updated":"2016-06-02 21:51:36.000000000","message":"\u003e If so all clients(with possibly different names for attribute that store version) have self.version therefore we could iterate through components and get there version, compare with required for scenario version\n\nL620-628 relate only to keystoneclient. This code is too specific, since we can determine \"current\" version only after client initialization, for all other clients we don\u0027t need to initialize them(we don\u0027t need wast time to to create keystone session, token and so on). All clients have choose_version method which returns the right \"current\" version(if user specify version via api_versions context - this version will be returned, if version is not specified - default one will be returned).","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"32c87ee761ad4f622bfc8eb113f7bb942ec486fe","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            \"V%(version)s, but V%(found_version)s is \""},{"line_number":619,"context_line":"            \"selected.\")"},{"line_number":620,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":621,"context_line":"        if version \u003d\u003d \"2.0\" and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":622,"context_line":"            return ValidationResult(False, msg % {\"component\": component,"},{"line_number":623,"context_line":"                                                  \"version\": version,"},{"line_number":624,"context_line":"                                                  \"found_version\": \"3\"})"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_43e4783a","line":621,"in_reply_to":"9abb7d3a_fd8549ad","updated":"2016-06-02 21:51:36.000000000","message":"1) we use string representation of version everywhere.","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"d8fe946b2de8e68d5358118527f517c6c5a2e56d","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            \"V%(version)s, but V%(found_version)s is \""},{"line_number":619,"context_line":"            \"selected.\")"},{"line_number":620,"context_line":"    if component \u003d\u003d \"keystone\":"},{"line_number":621,"context_line":"        if version \u003d\u003d \"2.0\" and not hasattr(clients.keystone(), \"tenants\"):"},{"line_number":622,"context_line":"            return ValidationResult(False, msg % {\"component\": component,"},{"line_number":623,"context_line":"                                                  \"version\": version,"},{"line_number":624,"context_line":"                                                  \"found_version\": \"3\"})"}],"source_content_type":"text/x-python","patch_set":8,"id":"9abb7d3a_e09e4206","line":621,"in_reply_to":"9abb7d3a_fd8549ad","updated":"2016-06-02 21:37:13.000000000","message":"The same attribute exist for glance https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v2/client.py#L41 https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v1/client.py#L37\nCinder https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/client.py#L62\nhttps://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/client.py#L62\n\nIf so all clients(with possibly different names for attribute that store version) have self.version therefore we could iterate through components and get there version, compare with required for scenario version","commit_id":"e19e6a5e89ecb58be5efce1e57a31b88f5ac338f"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"4c9ddfe2e2c0bbad95a42db6b8907d5010a29fe1","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        if \"3\" in versions and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":628,"context_line":"            return ValidationResult(False, msg % {\"component\": component,"},{"line_number":629,"context_line":"                                                  \"version\": versions_str,"},{"line_number":630,"context_line":"                                                  \"found_version\": \"2.0\"})"},{"line_number":631,"context_line":"    else:"},{"line_number":632,"context_line":"        used_version \u003d getattr(clients, component).choose_version()"},{"line_number":633,"context_line":"        if not used_version:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_954a06ab","line":630,"updated":"2016-06-06 17:50:27.000000000","message":"I don\u0027t understand why we have to treat keystone specially -- doesn\u0027t it have choose_version() too? Can\u0027t we just use the same logic for everything?","commit_id":"124597685050e00c8f354c790d5c048bb66f90c2"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"5f514f39170045d622c519bb8f3dd7dc67c8a709","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        if \"3\" in versions and not hasattr(clients.keystone(), \"projects\"):"},{"line_number":628,"context_line":"            return ValidationResult(False, msg % {\"component\": component,"},{"line_number":629,"context_line":"                                                  \"version\": versions_str,"},{"line_number":630,"context_line":"                                                  \"found_version\": \"2.0\"})"},{"line_number":631,"context_line":"    else:"},{"line_number":632,"context_line":"        used_version \u003d getattr(clients, component).choose_version()"},{"line_number":633,"context_line":"        if not used_version:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_66ab6bd7","line":630,"in_reply_to":"7aa08908_954a06ab","updated":"2016-06-06 19:50:49.000000000","message":"Because keystone is too specific:) there is no default version for every cloud. Default version bases on auth_url in deployment config. It can be localhost/v2(in this case we can determine version before keystoneclient initialization), but keystone support url without hardcoded version(in this case keystoneclient will determine version from API reply), so we should initialize keystoneclient and obtain version after that.","commit_id":"124597685050e00c8f354c790d5c048bb66f90c2"}]}
