)]}'
{"rally_openstack/platforms/existing.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"af2b750f5a4848d00d84886dd72411d92e464d10","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        for user in users_to_check:"},{"line_number":186,"context_line":"            try:"},{"line_number":187,"context_line":"                if self.platform_data[\"admin\"] \u003d\u003d user:"},{"line_number":188,"context_line":"                    osclients.Clients(user).verified_keystone()"},{"line_number":189,"context_line":"                else:"},{"line_number":190,"context_line":"                    osclients.Clients(user).keystone()"},{"line_number":191,"context_line":"            except osclients.exceptions.RallyException as e:"},{"line_number":192,"context_line":"                # all rally native exceptions should provide user-friendly"},{"line_number":193,"context_line":"                # messages"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_7ade7111","line":190,"range":{"start_line":187,"start_character":16,"end_line":190,"end_character":54},"updated":"2018-09-10 09:14:05.000000000","message":"In theory, api_info can have some info for keystone as well, so it would be nice to add api_info here as well. \nAlso, here we have initialized keystone session, so let\u0027s save the first \"Clients\" object and use it for checks at L225","commit_id":"5b29d719f24e7c9e0e799f9d486f7239296c116f"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"83f33c20184ffc679f6e9da070b5ab930124fdec","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        for user in users_to_check:"},{"line_number":186,"context_line":"            try:"},{"line_number":187,"context_line":"                if self.platform_data[\"admin\"] \u003d\u003d user:"},{"line_number":188,"context_line":"                    osclients.Clients(user).verified_keystone()"},{"line_number":189,"context_line":"                else:"},{"line_number":190,"context_line":"                    osclients.Clients(user).keystone()"},{"line_number":191,"context_line":"            except osclients.exceptions.RallyException as e:"},{"line_number":192,"context_line":"                # all rally native exceptions should provide user-friendly"},{"line_number":193,"context_line":"                # messages"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6d21c8fc","line":190,"range":{"start_line":187,"start_character":16,"end_line":190,"end_character":54},"in_reply_to":"3f79a3b5_606c70d0","updated":"2018-09-11 06:48:59.000000000","message":"It is the same as for other options. For this purpose this method is designed for. I mean if something is missed and user asked to use something - we are detecting it and saying that there is an issue for doing this.\n\nIt is like openstackclient works. If it recognizes OS_IDENTITY_VERSION , no matter what other arguments are specified, it will try to use the version specified in that variable.","commit_id":"5b29d719f24e7c9e0e799f9d486f7239296c116f"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"95714b2afdf5a1397a715fa6860e43e4bfbd7e1e","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        for user in users_to_check:"},{"line_number":186,"context_line":"            try:"},{"line_number":187,"context_line":"                if self.platform_data[\"admin\"] \u003d\u003d user:"},{"line_number":188,"context_line":"                    osclients.Clients(user).verified_keystone()"},{"line_number":189,"context_line":"                else:"},{"line_number":190,"context_line":"                    osclients.Clients(user).keystone()"},{"line_number":191,"context_line":"            except osclients.exceptions.RallyException as e:"},{"line_number":192,"context_line":"                # all rally native exceptions should provide user-friendly"},{"line_number":193,"context_line":"                # messages"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_606c70d0","line":190,"range":{"start_line":187,"start_character":16,"end_line":190,"end_character":54},"in_reply_to":"3f79a3b5_7ade7111","updated":"2018-09-11 01:53:43.000000000","message":"But maybe lack some arguments for verification ( keystone v2 to v3), then this Clients did not contain right api_info. The verification also is required for base authorizes.","commit_id":"5b29d719f24e7c9e0e799f9d486f7239296c116f"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"af2b750f5a4848d00d84886dd72411d92e464d10","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                credential.update(self.platform_data[\"admin\"])"},{"line_number":223,"context_line":"            else:"},{"line_number":224,"context_line":"                credential.update(self.platform_data[\"users\"][0])"},{"line_number":225,"context_line":"            try:"},{"line_number":226,"context_line":"                clients \u003d osclients.Clients(credential)"},{"line_number":227,"context_line":"                for name in self.platform_data[\"api_info\"]:"},{"line_number":228,"context_line":"                    getattr(clients, name)()"},{"line_number":229,"context_line":"            except Exception:"},{"line_number":230,"context_line":"                return {"},{"line_number":231,"context_line":"                    \"available\": False,"},{"line_number":232,"context_line":"                    \"message\": \"None matched client: %s\" % name,"},{"line_number":233,"context_line":"                    \"traceback\": traceback.format_exc()"},{"line_number":234,"context_line":"                }"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return {\"available\": True}"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_ba708942","line":234,"range":{"start_line":225,"start_character":12,"end_line":234,"end_character":17},"updated":"2018-09-10 09:14:05.000000000","message":"1) L226 should not raise an exception. Let\u0027s place it outside try...except block\n\n2) if the client is not installed, the traceback is redundant, so let\u0027s do more simple check first:\n\n  if not hasattr(clients, name):\n       return {\"available\": False, \"message\": \"There is no OSClient plugin \u0027%s\u0027 for communicating with OpenStack API.\" % name}\n\n3) There is special validate_version method for checking that we support specified version - https://github.com/openstack/rally-openstack/blob/master/rally_openstack/osclients.py#L156 . Not sure that this method provides user-friendly informative  messages, but at least anything\n\n4) and after all, we can try initialize the actual client and here traceback can be useful in case of error.","commit_id":"5b29d719f24e7c9e0e799f9d486f7239296c116f"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"95714b2afdf5a1397a715fa6860e43e4bfbd7e1e","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                credential.update(self.platform_data[\"admin\"])"},{"line_number":223,"context_line":"            else:"},{"line_number":224,"context_line":"                credential.update(self.platform_data[\"users\"][0])"},{"line_number":225,"context_line":"            try:"},{"line_number":226,"context_line":"                clients \u003d osclients.Clients(credential)"},{"line_number":227,"context_line":"                for name in self.platform_data[\"api_info\"]:"},{"line_number":228,"context_line":"                    getattr(clients, name)()"},{"line_number":229,"context_line":"            except Exception:"},{"line_number":230,"context_line":"                return {"},{"line_number":231,"context_line":"                    \"available\": False,"},{"line_number":232,"context_line":"                    \"message\": \"None matched client: %s\" % name,"},{"line_number":233,"context_line":"                    \"traceback\": traceback.format_exc()"},{"line_number":234,"context_line":"                }"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return {\"available\": True}"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_206678f0","line":234,"range":{"start_line":225,"start_character":12,"end_line":234,"end_character":17},"in_reply_to":"3f79a3b5_ba708942","updated":"2018-09-11 01:53:43.000000000","message":"agree, we could detail the issues to users.","commit_id":"5b29d719f24e7c9e0e799f9d486f7239296c116f"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"066add0dedef53d9af1ed074601eddb38845c2b3","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                    \"traceback\": traceback.format_exc()"},{"line_number":219,"context_line":"                }"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if clients is not None:"},{"line_number":222,"context_line":"            for name in self.platform_data.get(\"api_info\", {}):"},{"line_number":223,"context_line":"                if name \u003d\u003d \"keystone\":"},{"line_number":224,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_be47eb1e","line":221,"range":{"start_line":221,"start_character":8,"end_line":221,"end_character":31},"updated":"2018-09-12 08:53:58.000000000","message":"I think we always should have clients not None, otherwise spec will not pass jsonschema","commit_id":"9132c2c37aa99fd43edf055ebadc881550989d7a"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"edc3515fe3025c26834f1268b462b214b06c6634","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                    \"traceback\": traceback.format_exc()"},{"line_number":219,"context_line":"                }"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if clients is not None:"},{"line_number":222,"context_line":"            for name in self.platform_data.get(\"api_info\", {}):"},{"line_number":223,"context_line":"                if name \u003d\u003d \"keystone\":"},{"line_number":224,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_2643bf41","line":221,"range":{"start_line":221,"start_character":8,"end_line":221,"end_character":31},"in_reply_to":"3f79a3b5_be47eb1e","updated":"2018-09-13 01:31:13.000000000","message":"Mm, fair enough.","commit_id":"9132c2c37aa99fd43edf055ebadc881550989d7a"}]}
