)]}'
{"tempest/lib/common/cred_client.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"class V3CredsClient(CredsClient):"},{"line_number":136,"context_line":"    project_id_param \u003d \u0027project_id\u0027"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self, identity_client, projects_client, users_client,"},{"line_number":139,"context_line":"                 roles_client, domains_client, domain_name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_bc95c9e6","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":35},"updated":"2020-07-08 21:24:03.000000000","message":"is it \u0027default_project_id\u0027 as per api-ref, is so then we are passing it wrongly since starting?\n\nhttps://docs.openstack.org/api-ref/identity/v3/index.html?expanded\u003dcreate-user-detail#users","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1c9a197174180d8f5f5c096a504650cb3301e8b9","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"class V3CredsClient(CredsClient):"},{"line_number":136,"context_line":"    project_id_param \u003d \u0027project_id\u0027"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self, identity_client, projects_client, users_client,"},{"line_number":139,"context_line":"                 roles_client, domains_client, domain_name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_5dab1d88","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":35},"in_reply_to":"bf51134e_b7282d97","updated":"2020-10-31 20:19:18.000000000","message":"ack, I will push to fix it anyways.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f642a6ab2d3ca525a2f28a7947dd7f432a8aec66","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"class V3CredsClient(CredsClient):"},{"line_number":136,"context_line":"    project_id_param \u003d \u0027project_id\u0027"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self, identity_client, projects_client, users_client,"},{"line_number":139,"context_line":"                 roles_client, domains_client, domain_name):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_b7282d97","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":35},"in_reply_to":"bf51134e_bc95c9e6","updated":"2020-07-09 22:30:24.000000000","message":"Looks like yes, this has been wrong all along and the project gets stored as an \"extra\" field in the user resource. It doesn\u0027t matter either way, the default project is never used for keystone v3.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"}],"tempest/lib/common/dynamic_creds.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"026e2622445c07d92751f3934dd1ffcf8893fa6a","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            # NOTE(andreaf) User and project can be distinguished from the"},{"line_number":196,"context_line":"            # context, having the same ID in both makes it easier to match them"},{"line_number":197,"context_line":"            # and debug."},{"line_number":198,"context_line":"            username \u003d project_name"},{"line_number":199,"context_line":"        elif scope \u003d\u003d \u0027domain\u0027:"},{"line_number":200,"context_line":"            domain_name \u003d data_utils.rand_name("},{"line_number":201,"context_line":"                root, prefix\u003dself.resource_prefix)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_5beee721","line":198,"range":{"start_line":198,"start_character":23,"end_line":198,"end_character":35},"updated":"2019-12-18 21:53:17.000000000","message":"Do we want to postfix this like we do with domains?","commit_id":"bb4e60e345d529999eab7da8ab0311688e201caa"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"607a3ce71a37c5ed3e1fa6813d830c04864243ca","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            # NOTE(andreaf) User and project can be distinguished from the"},{"line_number":196,"context_line":"            # context, having the same ID in both makes it easier to match them"},{"line_number":197,"context_line":"            # and debug."},{"line_number":198,"context_line":"            username \u003d project_name"},{"line_number":199,"context_line":"        elif scope \u003d\u003d \u0027domain\u0027:"},{"line_number":200,"context_line":"            domain_name \u003d data_utils.rand_name("},{"line_number":201,"context_line":"                root, prefix\u003dself.resource_prefix)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_b6410266","line":198,"range":{"start_line":198,"start_character":23,"end_line":198,"end_character":35},"in_reply_to":"3fa7e38b_5beee721","updated":"2019-12-23 18:05:41.000000000","message":"++ probably","commit_id":"bb4e60e345d529999eab7da8ab0311688e201caa"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            prefix \u003d data_utils.rand_name(root, prefix\u003dself.resource_prefix)"},{"line_number":208,"context_line":"            username \u003d prefix + \u0027-system\u0027"},{"line_number":209,"context_line":"        else:"},{"line_number":210,"context_line":"            raise Exception(\"Invalid scope: %s\" % scope)"},{"line_number":211,"context_line":"        if admin:"},{"line_number":212,"context_line":"            username +\u003d \u0027-admin\u0027"},{"line_number":213,"context_line":"        elif roles and len(roles) \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_37227253","line":210,"range":{"start_line":210,"start_character":18,"end_line":210,"end_character":27},"updated":"2020-07-08 21:24:03.000000000","message":"can you add new exception of InvalidScopeType in tempest/lib/exceptions.py which we can raise here and other places also.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e6e9dc040c875c3fc1f4cfccee04ee920babe11c","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            prefix \u003d data_utils.rand_name(root, prefix\u003dself.resource_prefix)"},{"line_number":208,"context_line":"            username \u003d prefix + \u0027-system\u0027"},{"line_number":209,"context_line":"        else:"},{"line_number":210,"context_line":"            raise Exception(\"Invalid scope: %s\" % scope)"},{"line_number":211,"context_line":"        if admin:"},{"line_number":212,"context_line":"            username +\u003d \u0027-admin\u0027"},{"line_number":213,"context_line":"        elif roles and len(roles) \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_a4973245","line":210,"range":{"start_line":210,"start_character":18,"end_line":210,"end_character":27},"in_reply_to":"bf51134e_37227253","updated":"2020-10-02 16:25:37.000000000","message":"Done","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":223,"context_line":"                self.creds_client.assign_user_role_on_domain("},{"line_number":224,"context_line":"                    user, self.identity_admin_role)"},{"line_number":225,"context_line":"                self.creds_client.assign_user_role("},{"line_number":226,"context_line":"                    user, project, self.identity_admin_role)"},{"line_number":227,"context_line":"        # Add roles specified in config file"},{"line_number":228,"context_line":"        roles_to_assign.extend(self.extra_roles)"},{"line_number":229,"context_line":"        # If there are still no roles, default to \u0027member\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_bc1ae979","line":226,"range":{"start_line":225,"start_character":0,"end_line":226,"end_character":60},"updated":"2020-07-08 21:24:03.000000000","message":"do we need to assign role on project also here? We should only assign role on domain onyl here and assign requested roles on project based on scope.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6e5f75a708d06e437c84404dbedc48a425c9c43c","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":223,"context_line":"                self.creds_client.assign_user_role_on_domain("},{"line_number":224,"context_line":"                    user, self.identity_admin_role)"},{"line_number":225,"context_line":"                self.creds_client.assign_user_role("},{"line_number":226,"context_line":"                    user, project, self.identity_admin_role)"},{"line_number":227,"context_line":"        # Add roles specified in config file"},{"line_number":228,"context_line":"        roles_to_assign.extend(self.extra_roles)"},{"line_number":229,"context_line":"        # If there are still no roles, default to \u0027member\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"4626502f_ce1d34cd","line":226,"range":{"start_line":225,"start_character":0,"end_line":226,"end_character":60},"in_reply_to":"1f621f24_61867c68","updated":"2021-01-20 19:41:59.000000000","message":"ah right in old like cases it is needed, got it.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"edfb2a54f3dd8ceaecc4f1057682c4baaa95b542","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":223,"context_line":"                self.creds_client.assign_user_role_on_domain("},{"line_number":224,"context_line":"                    user, self.identity_admin_role)"},{"line_number":225,"context_line":"                self.creds_client.assign_user_role("},{"line_number":226,"context_line":"                    user, project, self.identity_admin_role)"},{"line_number":227,"context_line":"        # Add roles specified in config file"},{"line_number":228,"context_line":"        roles_to_assign.extend(self.extra_roles)"},{"line_number":229,"context_line":"        # If there are still no roles, default to \u0027member\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_61867c68","line":226,"range":{"start_line":225,"start_character":0,"end_line":226,"end_character":60},"in_reply_to":"1f621f24_fdbca9bc","updated":"2020-11-17 01:44:28.000000000","message":"I don\u0027t think it\u0027s the same, I think \u0027if admin\u0027 is to handle the backwards-compatible case of the admin user being the global admin user, which means ensuring the user has the admin role on every scope. The roles_to_assign list on line 220 gets uses below on line 239 only for a particular scope.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f642a6ab2d3ca525a2f28a7947dd7f432a8aec66","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":223,"context_line":"                self.creds_client.assign_user_role_on_domain("},{"line_number":224,"context_line":"                    user, self.identity_admin_role)"},{"line_number":225,"context_line":"                self.creds_client.assign_user_role("},{"line_number":226,"context_line":"                    user, project, self.identity_admin_role)"},{"line_number":227,"context_line":"        # Add roles specified in config file"},{"line_number":228,"context_line":"        roles_to_assign.extend(self.extra_roles)"},{"line_number":229,"context_line":"        # If there are still no roles, default to \u0027member\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_f71f4569","line":226,"range":{"start_line":225,"start_character":0,"end_line":226,"end_character":60},"in_reply_to":"bf51134e_bc1ae979","updated":"2020-07-09 22:30:24.000000000","message":"It\u0027s been a while since I wrote this but I guess this was meant to go after line 219, the same assignment exists in the old version on line 197.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1c9a197174180d8f5f5c096a504650cb3301e8b9","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":223,"context_line":"                self.creds_client.assign_user_role_on_domain("},{"line_number":224,"context_line":"                    user, self.identity_admin_role)"},{"line_number":225,"context_line":"                self.creds_client.assign_user_role("},{"line_number":226,"context_line":"                    user, project, self.identity_admin_role)"},{"line_number":227,"context_line":"        # Add roles specified in config file"},{"line_number":228,"context_line":"        roles_to_assign.extend(self.extra_roles)"},{"line_number":229,"context_line":"        # If there are still no roles, default to \u0027member\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_fdbca9bc","line":226,"range":{"start_line":225,"start_character":0,"end_line":226,"end_character":60},"in_reply_to":"bf51134e_f71f4569","updated":"2020-10-31 20:19:18.000000000","message":"But you are adding that role (L197 in old version) at L220","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            elif scope \u003d\u003d \u0027system\u0027:"},{"line_number":246,"context_line":"                self.creds_client.assign_user_role_on_system(user, role)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        if scope \u003d\u003d \u0027project\u0027:"},{"line_number":249,"context_line":"            creds \u003d self.creds_client.get_credentials("},{"line_number":250,"context_line":"                user, project, user_password)"},{"line_number":251,"context_line":"        elif scope \u003d\u003d \u0027domain\u0027:"},{"line_number":252,"context_line":"            creds \u003d self.creds_client.get_credentials("},{"line_number":253,"context_line":"                user, None, user_password, domain\u003ddomain)"},{"line_number":254,"context_line":"        elif scope \u003d\u003d \u0027system\u0027:"},{"line_number":255,"context_line":"            creds \u003d self.creds_client.get_credentials("},{"line_number":256,"context_line":"                user, None, user_password, system\u003dTrue)"},{"line_number":257,"context_line":"        return cred_provider.TestResources(creds)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _create_network_resources(self, tenant_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_f7059a11","line":256,"range":{"start_line":248,"start_character":0,"end_line":256,"end_character":55},"updated":"2020-07-08 21:24:03.000000000","message":"we can prepare the param in earlier scope condition at L188.\n\ncred_param \u003d {\u0027project\u0027: None, \u0027domain\u0027: None, \u0027system\u0027: None} and then populate each value during scope checks in L188.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                                                       subnet_id\u003dsubnet_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def get_credentials(self, credential_type, scope\u003dNone):"},{"line_number":372,"context_line":"        if not scope and self._creds.get(str(credential_type)):"},{"line_number":373,"context_line":"            credentials \u003d self._creds[str(credential_type)]"},{"line_number":374,"context_line":"        elif scope and self._creds.get(\"%s_%s\" % (scope, credential_type[0])):"},{"line_number":375,"context_line":"            credentials \u003d self._creds[\"%s_%s\" % (scope, credential_type[0])]"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_eee66bb0","line":372,"range":{"start_line":372,"start_character":10,"end_line":372,"end_character":21},"updated":"2020-07-08 21:24:03.000000000","message":"we need to fallback the scope to project scope based on whether system scope is available (which depends on services with system scope capabilities on what all stable branches).\n\nWe need an extra flag to check which can indicate if system scope is available or not. For example in case of keystone:\n\n        if not scope and not CONF.identity.enforce_scope and  self._creds.get(str(credential_type)):\n\nbut we need that flag based on services having system scope available. For example, if compute test requesting the get_system_admin_creds() then we need to:\n\n- create the user with system scope for stable/ussuri onwards when nova implemented the system scope\n\n- create user with project scope for \u003c stable/ussuri testing.\n\nand it will be different for cinder also once cinder has system scope in their policy.\n\nWe cannot handle the service-based data/request here. One way is to handle that at test side. Any tests requesting the system scope cred then they request it according to their service\u0027s system scope availability based on service-based-flag.\n\nLet me try with compute service tests on top of your series.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"edfb2a54f3dd8ceaecc4f1057682c4baaa95b542","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                                                       subnet_id\u003dsubnet_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def get_credentials(self, credential_type, scope\u003dNone):"},{"line_number":372,"context_line":"        if not scope and self._creds.get(str(credential_type)):"},{"line_number":373,"context_line":"            credentials \u003d self._creds[str(credential_type)]"},{"line_number":374,"context_line":"        elif scope and self._creds.get(\"%s_%s\" % (scope, credential_type[0])):"},{"line_number":375,"context_line":"            credentials \u003d self._creds[\"%s_%s\" % (scope, credential_type[0])]"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_817f5864","line":372,"range":{"start_line":372,"start_character":10,"end_line":372,"end_character":21},"in_reply_to":"1f621f24_dd9e0d62","updated":"2020-11-17 01:44:28.000000000","message":"Sounds good","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f642a6ab2d3ca525a2f28a7947dd7f432a8aec66","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                                                       subnet_id\u003dsubnet_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def get_credentials(self, credential_type, scope\u003dNone):"},{"line_number":372,"context_line":"        if not scope and self._creds.get(str(credential_type)):"},{"line_number":373,"context_line":"            credentials \u003d self._creds[str(credential_type)]"},{"line_number":374,"context_line":"        elif scope and self._creds.get(\"%s_%s\" % (scope, credential_type[0])):"},{"line_number":375,"context_line":"            credentials \u003d self._creds[\"%s_%s\" % (scope, credential_type[0])]"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_fa044c17","line":372,"range":{"start_line":372,"start_character":10,"end_line":372,"end_character":21},"in_reply_to":"bf51134e_eee66bb0","updated":"2020-07-09 22:30:24.000000000","message":"I\u0027m not quite following your suggestion. I was thinking that only services that are trying to test system scope will pass a scope argument here, otherwise it behaves the same as before and uses project scope. Do you suggest I add the check for CONF.identity.enforce_scope here?","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1c9a197174180d8f5f5c096a504650cb3301e8b9","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                                                       subnet_id\u003dsubnet_id)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def get_credentials(self, credential_type, scope\u003dNone):"},{"line_number":372,"context_line":"        if not scope and self._creds.get(str(credential_type)):"},{"line_number":373,"context_line":"            credentials \u003d self._creds[str(credential_type)]"},{"line_number":374,"context_line":"        elif scope and self._creds.get(\"%s_%s\" % (scope, credential_type[0])):"},{"line_number":375,"context_line":"            credentials \u003d self._creds[\"%s_%s\" % (scope, credential_type[0])]"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_dd9e0d62","line":372,"range":{"start_line":372,"start_character":10,"end_line":372,"end_character":21},"in_reply_to":"bf51134e_fa044c17","updated":"2020-10-31 20:19:18.000000000","message":"Yeah but we do not need to add that flag in this patch, we can add when services tests start requesting it. like I am doing in https://review.opendev.org/#/c/740122/4/tempest/config.py\n\nSo that same test can be tested against service\u0027s master code where scope is implemented in their policy and on stable branch also.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":400,"context_line":"                         \" credentials: %s\", credentials)"},{"line_number":401,"context_line":"        return credentials"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def get_primary_creds(self):"},{"line_number":404,"context_line":"        return self.get_credentials(\u0027primary\u0027)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def get_admin_creds(self):"},{"line_number":407,"context_line":"        return self.get_credentials(\u0027admin\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_0e53df6c","line":404,"range":{"start_line":403,"start_character":0,"end_line":404,"end_character":46},"updated":"2020-07-08 21:24:03.000000000","message":"ditto as below comment this is same as get_project_member_creds","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    def get_primary_creds(self):"},{"line_number":404,"context_line":"        return self.get_credentials(\u0027primary\u0027)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def get_admin_creds(self):"},{"line_number":407,"context_line":"        return self.get_credentials(\u0027admin\u0027)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def get_alt_creds(self):"},{"line_number":410,"context_line":"        return self.get_credentials(\u0027alt\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_8e67ef4d","line":407,"range":{"start_line":406,"start_character":0,"end_line":407,"end_character":44},"updated":"2020-07-08 21:24:03.000000000","message":"this is project scope admin and new name get_project_admin_creds is much better, can you add a todo here to replace get_admin_creds usage with get_project_admin_creds and then remove get_admin_creds itself.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"edfb2a54f3dd8ceaecc4f1057682c4baaa95b542","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    def get_primary_creds(self):"},{"line_number":404,"context_line":"        return self.get_credentials(\u0027primary\u0027)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def get_admin_creds(self):"},{"line_number":407,"context_line":"        return self.get_credentials(\u0027admin\u0027)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def get_alt_creds(self):"},{"line_number":410,"context_line":"        return self.get_credentials(\u0027alt\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_c194b08d","line":407,"range":{"start_line":406,"start_character":0,"end_line":407,"end_character":44},"in_reply_to":"1f621f24_bd9b5170","updated":"2020-11-17 01:44:28.000000000","message":"thumbsup","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1c9a197174180d8f5f5c096a504650cb3301e8b9","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    def get_primary_creds(self):"},{"line_number":404,"context_line":"        return self.get_credentials(\u0027primary\u0027)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def get_admin_creds(self):"},{"line_number":407,"context_line":"        return self.get_credentials(\u0027admin\u0027)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def get_alt_creds(self):"},{"line_number":410,"context_line":"        return self.get_credentials(\u0027alt\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f621f24_bd9b5170","line":407,"range":{"start_line":406,"start_character":0,"end_line":407,"end_character":44},"in_reply_to":"bf51134e_64699a23","updated":"2020-10-31 20:19:18.000000000","message":"yeah they are stable interface and we need to change with deprecation phase. anyways I agree with you, let\u0027s do it later not in this patch.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e6e9dc040c875c3fc1f4cfccee04ee920babe11c","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    def get_primary_creds(self):"},{"line_number":404,"context_line":"        return self.get_credentials(\u0027primary\u0027)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def get_admin_creds(self):"},{"line_number":407,"context_line":"        return self.get_credentials(\u0027admin\u0027)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def get_alt_creds(self):"},{"line_number":410,"context_line":"        return self.get_credentials(\u0027alt\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_64699a23","line":407,"range":{"start_line":406,"start_character":0,"end_line":407,"end_character":44},"in_reply_to":"bf51134e_8e67ef4d","updated":"2020-10-02 16:25:37.000000000","message":"I didn\u0027t want to rename these because they are not private methods, they could in theory be called from outside of tempest.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":435,"context_line":""},{"line_number":436,"context_line":"    def get_project_reader_creds(self):"},{"line_number":437,"context_line":"        return self.get_credentials([\u0027reader\u0027], scope\u003d\u0027project\u0027)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def get_creds_by_roles(self, roles, force_new\u003dFalse):"},{"line_number":440,"context_line":"        roles \u003d list(set(roles))"},{"line_number":441,"context_line":"        # The roles list as a str will become the index as the dict key for"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_51a57646","line":438,"range":{"start_line":438,"start_character":0,"end_line":438,"end_character":0},"updated":"2020-07-08 21:24:03.000000000","message":"+1 for these. these are much consistent and readable.","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1a576ceb541a90ba2910113a0e59b5539b2a6364","unresolved":false,"context_lines":[{"line_number":448,"context_line":"            new_index \u003d str(roles) + \u0027-\u0027 + str(len(self._creds))"},{"line_number":449,"context_line":"            self._creds[new_index] \u003d exist_creds"},{"line_number":450,"context_line":"            del self._creds[str(roles)]"},{"line_number":451,"context_line":"        return self.get_credentials(roles)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    def _clear_isolated_router(self, router_id, router_name):"},{"line_number":454,"context_line":"        client \u003d self.routers_admin_client"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_97f53e5a","line":451,"range":{"start_line":451,"start_character":0,"end_line":451,"end_character":42},"updated":"2020-07-08 21:24:03.000000000","message":"we can add the scope type here too but that is not needed for now. creds_by_roles are used by swift tests only which does not need system scope.\n\n- https://github.com/openstack/tempest/blob/3800158de0c55fc2f8b519a4414a781a0e6752b7/tempest/api/object_storage/test_account_quotas.py#L26","commit_id":"ea9f87127784575ff71fdc4483b9e65e95712f29"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1c9a197174180d8f5f5c096a504650cb3301e8b9","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        roles_to_assign \u003d [r for r in roles]"},{"line_number":229,"context_line":"        if admin:"},{"line_number":230,"context_line":"            roles_to_assign.append(self.admin_role)"},{"line_number":231,"context_line":"            self.creds_client.assign_user_role("},{"line_number":232,"context_line":"                user, project, self.identity_admin_role)"},{"line_number":233,"context_line":"            if (self.identity_version \u003d\u003d \u0027v3\u0027 and"},{"line_number":234,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":235,"context_line":"                self.creds_client.assign_user_role_on_domain("}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_3db741d8","line":232,"range":{"start_line":231,"start_character":0,"end_line":232,"end_character":56},"updated":"2020-10-31 20:19:18.000000000","message":"L230 already adding admin role to assign in roles_to_assign so we do not need to add admin role on the project here. otherwise it end up assigning project admin role on all admin cred request even system/admin admin\n\nreplied in previous PS comment also.","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"edfb2a54f3dd8ceaecc4f1057682c4baaa95b542","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        roles_to_assign \u003d [r for r in roles]"},{"line_number":229,"context_line":"        if admin:"},{"line_number":230,"context_line":"            roles_to_assign.append(self.admin_role)"},{"line_number":231,"context_line":"            self.creds_client.assign_user_role("},{"line_number":232,"context_line":"                user, project, self.identity_admin_role)"},{"line_number":233,"context_line":"            if (self.identity_version \u003d\u003d \u0027v3\u0027 and"},{"line_number":234,"context_line":"                    self.identity_admin_domain_scope):"},{"line_number":235,"context_line":"                self.creds_client.assign_user_role_on_domain("}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_018b4867","line":232,"range":{"start_line":231,"start_character":0,"end_line":232,"end_character":56},"in_reply_to":"1f621f24_3db741d8","updated":"2020-11-17 01:44:28.000000000","message":"replied on the old PS, I think it\u0027s correct the way it is","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"fb1c3712f5f25d9fcd6e821dd2f9d92a423a4cb5","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            # if cred is domain scoped, delete ephemeral domain"},{"line_number":550,"context_line":"            # do not delete default domain"},{"line_number":551,"context_line":"            if (hasattr(creds, \u0027domain_id\u0027) and"},{"line_number":552,"context_line":"                    creds.domain_id !\u003d creds.project_domain_id):"},{"line_number":553,"context_line":"                try:"},{"line_number":554,"context_line":"                    self.creds_client.delete_domain(creds.domain_id)"},{"line_number":555,"context_line":"                except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_bda9a8e0","line":552,"range":{"start_line":552,"start_character":39,"end_line":552,"end_character":62},"updated":"2020-10-29 17:38:40.000000000","message":"Is this always the default domain ID?\n\nI noticed we also have the default domain ID available to us in configuration:\n\nhttps://github.com/openstack/tempest/blob/master/tempest/config.py#L149-L151","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e6febc72d59890314f43f6af5f8db3303f5ce252","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            # if cred is domain scoped, delete ephemeral domain"},{"line_number":550,"context_line":"            # do not delete default domain"},{"line_number":551,"context_line":"            if (hasattr(creds, \u0027domain_id\u0027) and"},{"line_number":552,"context_line":"                    creds.domain_id !\u003d creds.project_domain_id):"},{"line_number":553,"context_line":"                try:"},{"line_number":554,"context_line":"                    self.creds_client.delete_domain(creds.domain_id)"},{"line_number":555,"context_line":"                except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_9d54a7cc","line":552,"range":{"start_line":552,"start_character":39,"end_line":552,"end_character":62},"in_reply_to":"1f621f24_135fed41","updated":"2020-10-30 01:42:56.000000000","message":"Thanks for clarifying. I can propose a follow-on patch.","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"13f09958b7d27f7381cdc49cf114c9c6ccf9758e","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            # if cred is domain scoped, delete ephemeral domain"},{"line_number":550,"context_line":"            # do not delete default domain"},{"line_number":551,"context_line":"            if (hasattr(creds, \u0027domain_id\u0027) and"},{"line_number":552,"context_line":"                    creds.domain_id !\u003d creds.project_domain_id):"},{"line_number":553,"context_line":"                try:"},{"line_number":554,"context_line":"                    self.creds_client.delete_domain(creds.domain_id)"},{"line_number":555,"context_line":"                except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_135fed41","line":552,"range":{"start_line":552,"start_character":39,"end_line":552,"end_character":62},"in_reply_to":"1f621f24_789f1eb4","updated":"2020-10-29 21:16:43.000000000","message":"Ah no that\u0027s badly worded, I meant do not delete the domain being used for the tempest admin credentials since they aren\u0027t ephemeral.","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"599c72581fc9071de1b97d40b78aba507f77135b","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            # if cred is domain scoped, delete ephemeral domain"},{"line_number":550,"context_line":"            # do not delete default domain"},{"line_number":551,"context_line":"            if (hasattr(creds, \u0027domain_id\u0027) and"},{"line_number":552,"context_line":"                    creds.domain_id !\u003d creds.project_domain_id):"},{"line_number":553,"context_line":"                try:"},{"line_number":554,"context_line":"                    self.creds_client.delete_domain(creds.domain_id)"},{"line_number":555,"context_line":"                except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_789f1eb4","line":552,"range":{"start_line":552,"start_character":39,"end_line":552,"end_character":62},"in_reply_to":"1f621f24_9d366cb4","updated":"2020-10-29 18:47:20.000000000","message":"Oh - I missinterpretted the comment on line 548. I took that to mean we shouldn\u0027t delete the domain if it\u0027s the default domain for the deployment.","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"e9b493501261e317127db2459729831b25a69cf9","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            # if cred is domain scoped, delete ephemeral domain"},{"line_number":550,"context_line":"            # do not delete default domain"},{"line_number":551,"context_line":"            if (hasattr(creds, \u0027domain_id\u0027) and"},{"line_number":552,"context_line":"                    creds.domain_id !\u003d creds.project_domain_id):"},{"line_number":553,"context_line":"                try:"},{"line_number":554,"context_line":"                    self.creds_client.delete_domain(creds.domain_id)"},{"line_number":555,"context_line":"                except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1f621f24_9d366cb4","line":552,"range":{"start_line":552,"start_character":39,"end_line":552,"end_character":62},"in_reply_to":"1f621f24_bda9a8e0","updated":"2020-10-29 17:47:58.000000000","message":"No, it\u0027s the domain of the project used in the tempest creds: https://review.opendev.org/#/c/686073/8/tempest/config.py@102 it may or may not be the default domain","commit_id":"e9267ed4d9543c71341baabab16425525279aeea"}]}
