)]}'
{"tempest/common/accounts.py":[{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"01eebc73e12317d163f25f058d167d61a108524a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    hash_dict \u003d cls._append_role("},{"line_number":86,"context_line":"                        CONF.object_storage.reseller_admin_role,"},{"line_number":87,"context_line":"                        temp_hash_key,"},{"line_number":88,"context_line":"                        hash_dict)"},{"line_number":89,"context_line":"        return hash_dict"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def is_multi_user(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_d37d781d","line":88,"updated":"2014-12-24 08:05:33.000000000","message":"Here or in accounts.yaml.sample file, description about above three types should be contained.","commit_id":"bb07f29ec65fe826a2a75f8470c9bd928d9fd9c9"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ded23a79404a49b99504add20c687bfd4176e546","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    hash_dict \u003d cls._append_role("},{"line_number":86,"context_line":"                        CONF.object_storage.reseller_admin_role,"},{"line_number":87,"context_line":"                        temp_hash_key,"},{"line_number":88,"context_line":"                        hash_dict)"},{"line_number":89,"context_line":"        return hash_dict"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def is_multi_user(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_0f9e8207","line":88,"in_reply_to":"3a961159_d37d781d","updated":"2015-01-14 01:41:57.000000000","message":"Yes, I\u0027ll add it both. But I was just pulling these in from the existing config options. My intent of the types section was to provide a 1:1 mapping between config options and the new yaml format.","commit_id":"bb07f29ec65fe826a2a75f8470c9bd928d9fd9c9"},{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"543e75068f0d95c5f8b0ffa9c47b0bbf5dd8ee33","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    def get_admin_creds(self):"},{"line_number":269,"context_line":"        return auth.get_default_credentials(\"identity_admin\", fill_in\u003dFalse)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def get_creds_by_roles(self, role):"},{"line_number":272,"context_line":"        if self.isolated_creds.get(role):"},{"line_number":273,"context_line":"            return self.isolated_creds.get(role)"},{"line_number":274,"context_line":"        if not self.use_default_creds:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa81d914_d13a5d33","line":271,"updated":"2015-01-29 11:39:34.000000000","message":"This method should be also modified as Accounts class.","commit_id":"15b728834f1ebaec9d60e1540d9f0643a37e38c0"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"e1a924e41c424c4130b9c344d1bb145b715248c3","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    def get_admin_creds(self):"},{"line_number":269,"context_line":"        return auth.get_default_credentials(\"identity_admin\", fill_in\u003dFalse)"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def get_creds_by_roles(self, role):"},{"line_number":272,"context_line":"        if self.isolated_creds.get(role):"},{"line_number":273,"context_line":"            return self.isolated_creds.get(role)"},{"line_number":274,"context_line":"        if not self.use_default_creds:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa81d914_0f98141b","line":271,"in_reply_to":"fa81d914_d13a5d33","updated":"2015-02-21 01:09:19.000000000","message":"Yep nice catch, I forgot about the non-locking provider here","commit_id":"15b728834f1ebaec9d60e1540d9f0643a37e38c0"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"a882820c81dc81bd24cd97875bdb54d50c737151","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                temp_list \u003d set(hashes[0])"},{"line_number":286,"context_line":"                for hash_list in hashes[1:]:"},{"line_number":287,"context_line":"                    temp_list \u003d temp_list \u0026 set(hash_list)"},{"line_number":288,"context_line":"                _hash \u003d self.temp_list[id]"},{"line_number":289,"context_line":"        except IndexError:"},{"line_number":290,"context_line":"            msg \u003d \u0027Insufficient number of users provided\u0027"},{"line_number":291,"context_line":"            raise exceptions.InvalidConfiguration(msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba7be1f8_21030b11","line":288,"updated":"2015-03-03 20:19:29.000000000","message":"Presumably this is not supposed to have \"self.\" since there is no self.temp_list and temp_list is unused. Also, most of this dozen or so lines of code is duplicated from the same in _get_creds, which also has some comments which are not here. Would be better to abstract this logic in one place.","commit_id":"08d4efd882eadfee0e0a90adc0da4331e0eb087d"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d2bea706f23bd78178a700c2dbe4f0887924128c","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                temp_list \u003d set(hashes[0])"},{"line_number":286,"context_line":"                for hash_list in hashes[1:]:"},{"line_number":287,"context_line":"                    temp_list \u003d temp_list \u0026 set(hash_list)"},{"line_number":288,"context_line":"                _hash \u003d self.temp_list[id]"},{"line_number":289,"context_line":"        except IndexError:"},{"line_number":290,"context_line":"            msg \u003d \u0027Insufficient number of users provided\u0027"},{"line_number":291,"context_line":"            raise exceptions.InvalidConfiguration(msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba7be1f8_fc86f8b7","line":288,"in_reply_to":"ba7be1f8_21030b11","updated":"2015-03-03 20:37:04.000000000","message":"Yeah that shouldn\u0027t have self it should just be temp_list. Yeah I can refactor this to be a shared method to get a creds list. That\u0027s a good suggestion, I\u0027ll respin this shortly.","commit_id":"08d4efd882eadfee0e0a90adc0da4331e0eb087d"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e95643e2389470fca5acd682d247440a5da5c6c1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                             hash_dict)"},{"line_number":77,"context_line":"            # If types are set for the account append the matching role"},{"line_number":78,"context_line":"            # subdict with the hash"},{"line_number":79,"context_line":"            for type in types:"},{"line_number":80,"context_line":"                if type \u003d\u003d \u0027admin\u0027:"},{"line_number":81,"context_line":"                    hash_dict \u003d cls._append_role(CONF.identity.admin_role,"},{"line_number":82,"context_line":"                                                 temp_hash_key, hash_dict)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_294d6473","line":79,"updated":"2015-03-04 11:53:08.000000000","message":"What about getting the list of types and roles associated to them to a class level variable?\n\nACCOUNT_TYPES \u003d [ {\u0027admin\u0027: [CONF.identity.admin_role] }, {\u0027operator\u0027: ... ]\n\nI\u0027m using list in the example above so that a type may represent a collection of roles.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"965482427a1c3d3fcb95ff1147eede7ffb8f70f1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                             hash_dict)"},{"line_number":77,"context_line":"            # If types are set for the account append the matching role"},{"line_number":78,"context_line":"            # subdict with the hash"},{"line_number":79,"context_line":"            for type in types:"},{"line_number":80,"context_line":"                if type \u003d\u003d \u0027admin\u0027:"},{"line_number":81,"context_line":"                    hash_dict \u003d cls._append_role(CONF.identity.admin_role,"},{"line_number":82,"context_line":"                                                 temp_hash_key, hash_dict)"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_2daac770","line":79,"in_reply_to":"9a80dd14_294d6473","updated":"2015-03-04 15:14:20.000000000","message":"So I\u0027d agree using a high level map like this if we were going to expand the types at all. Right now they\u0027re just keyword replacements for config options, and I think that\u0027s fine.\n\nI really would not like to see an expansion of these honestly. I try to avoid using types here, this is really an artificial construct we have in tempest. I just wanted to have a mapping between what we\u0027re using now and the roles we\u0027re expecting.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e95643e2389470fca5acd682d247440a5da5c6c1","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        if ((not roles or CONF.identity.admin_role not in roles) and"},{"line_number":163,"context_line":"                admin_hashes):"},{"line_number":164,"context_line":"            useable_hashes \u003d []"},{"line_number":165,"context_line":"            for hash in hashes:"},{"line_number":166,"context_line":"                if hash in admin_hashes:"},{"line_number":167,"context_line":"                    continue"},{"line_number":168,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_496378b1","line":165,"updated":"2015-03-04 11:53:08.000000000","message":"L165..169 can be one line:\n\nusable_hashes \u003d [x for x in hashes and x not in admin_hashes]","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"965482427a1c3d3fcb95ff1147eede7ffb8f70f1","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        if ((not roles or CONF.identity.admin_role not in roles) and"},{"line_number":163,"context_line":"                admin_hashes):"},{"line_number":164,"context_line":"            useable_hashes \u003d []"},{"line_number":165,"context_line":"            for hash in hashes:"},{"line_number":166,"context_line":"                if hash in admin_hashes:"},{"line_number":167,"context_line":"                    continue"},{"line_number":168,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_82870261","line":165,"in_reply_to":"9a80dd14_496378b1","updated":"2015-03-04 15:14:20.000000000","message":"Done","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e95643e2389470fca5acd682d247440a5da5c6c1","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":222,"context_line":"        roles \u003d list(set(roles))"},{"line_number":223,"context_line":"        exist_creds \u003d self.isolated_creds.get(str(roles), None)"},{"line_number":224,"context_line":"        # The force kwarg is used to allocate a second set of creds with the"},{"line_number":225,"context_line":"        # same role list. Once the second is allocated the index stored for"},{"line_number":226,"context_line":"        # the original will be moved."},{"line_number":227,"context_line":"        if exist_creds and not force:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_895f3072","line":224,"updated":"2015-03-04 11:53:08.000000000","message":"It\u0027s not only a second one, right? It will be possible to get a generic number of them.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"965482427a1c3d3fcb95ff1147eede7ffb8f70f1","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":222,"context_line":"        roles \u003d list(set(roles))"},{"line_number":223,"context_line":"        exist_creds \u003d self.isolated_creds.get(str(roles), None)"},{"line_number":224,"context_line":"        # The force kwarg is used to allocate a second set of creds with the"},{"line_number":225,"context_line":"        # same role list. Once the second is allocated the index stored for"},{"line_number":226,"context_line":"        # the original will be moved."},{"line_number":227,"context_line":"        if exist_creds and not force:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_225576c6","line":224,"in_reply_to":"9a80dd14_895f3072","updated":"2015-03-04 15:14:20.000000000","message":"Sure it can be an arbitrary number of creds, in practice we only have a max of 2 right now, which I think would probably continue to be the case moving forward. But, that really isn\u0027t a limitation of this. I\u0027ll update  the comment to reflect this.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"fd7365b5b43347c416e4ee05b222d526b5d24f1f","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        return self.get_creds_by_roles([CONF.identity.admin_role])"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def admin_available(self):"},{"line_number":240,"context_line":"        if not self.hash_dict.get(CONF.identity.admin_role):"},{"line_number":241,"context_line":"            return False"},{"line_number":242,"context_line":"        return True"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9a80dd14_cb5e2912","line":240,"updated":"2015-03-05 18:59:49.000000000","message":"Shouldn\u0027t this be hash_dict[\u0027roles\u0027].get ?","commit_id":"428f408dbef5953dcf52490d9f7308cdafe42ec5"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"0877c12e327738e0b0c00903d1f1ea9c75cd73ab","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        return self.get_creds_by_roles([CONF.identity.admin_role])"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def admin_available(self):"},{"line_number":240,"context_line":"        if not self.hash_dict.get(CONF.identity.admin_role):"},{"line_number":241,"context_line":"            return False"},{"line_number":242,"context_line":"        return True"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"9a80dd14_cb4549b4","line":240,"in_reply_to":"9a80dd14_cb5e2912","updated":"2015-03-05 19:04:48.000000000","message":"Good catch. Done","commit_id":"428f408dbef5953dcf52490d9f7308cdafe42ec5"}],"tempest/common/cred_provider.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"a61c2516a4e4b660243675441bc973eb304ed72c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    @abc.abstractmethod"},{"line_number":118,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":119,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_df0f162d","line":118,"updated":"2015-03-04 11:56:19.000000000","message":"\"force_new\" might be more intuitive then just \"force\" for the parameter. Else adding docstring would help.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"965482427a1c3d3fcb95ff1147eede7ffb8f70f1","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    @abc.abstractmethod"},{"line_number":118,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":119,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_625e8eeb","line":118,"in_reply_to":"9a80dd14_df0f162d","updated":"2015-03-04 15:14:20.000000000","message":"Done. I think a future patch we should add docstrings to the public interface for all of this just to make it easier to follow. But, I don\u0027t want to hold up this patch on that.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"}],"tempest/common/credentials.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e95643e2389470fca5acd682d247440a5da5c6c1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def is_admin_available():"},{"line_number":50,"context_line":"    is_admin \u003d True"},{"line_number":51,"context_line":"    # Check whether test accounts file has the admin specified or not"},{"line_number":52,"context_line":"    if os.path.isfile(CONF.auth.test_accounts_file):"},{"line_number":53,"context_line":"        hashes \u003d accounts.Accounts(name\u003d\u0027check_admin\u0027).hash_dict"},{"line_number":54,"context_line":"        if not hashes[\u0027roles\u0027].get(CONF.identity.admin_role, None):"},{"line_number":55,"context_line":"            is_admin \u003d False"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_4437dfb0","line":52,"updated":"2015-03-04 11:53:08.000000000","message":"This checks if admin credentials are available in the YAML file, however it does not take in account configuration - the content of the YAML file is not relevant if use_default_credentials is True or allow_tenant_isolation is True.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"965482427a1c3d3fcb95ff1147eede7ffb8f70f1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def is_admin_available():"},{"line_number":50,"context_line":"    is_admin \u003d True"},{"line_number":51,"context_line":"    # Check whether test accounts file has the admin specified or not"},{"line_number":52,"context_line":"    if os.path.isfile(CONF.auth.test_accounts_file):"},{"line_number":53,"context_line":"        hashes \u003d accounts.Accounts(name\u003d\u0027check_admin\u0027).hash_dict"},{"line_number":54,"context_line":"        if not hashes[\u0027roles\u0027].get(CONF.identity.admin_role, None):"},{"line_number":55,"context_line":"            is_admin \u003d False"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_224e56c2","line":52,"in_reply_to":"9a80dd14_4437dfb0","updated":"2015-03-04 15:14:20.000000000","message":"Use default credentials is only ever true if the yaml file doesn\u0027t exist which is why I viewed this check as covering that case. You\u0027re correct on tenant_isolation not being taken into account though. For whatever reason I had assumed people wouldn\u0027t be creating a yaml file and be using tenant isolation which is not true. I\u0027ll fix this in the respin.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e95643e2389470fca5acd682d247440a5da5c6c1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    is_admin \u003d True"},{"line_number":51,"context_line":"    # Check whether test accounts file has the admin specified or not"},{"line_number":52,"context_line":"    if os.path.isfile(CONF.auth.test_accounts_file):"},{"line_number":53,"context_line":"        hashes \u003d accounts.Accounts(name\u003d\u0027check_admin\u0027).hash_dict"},{"line_number":54,"context_line":"        if not hashes[\u0027roles\u0027].get(CONF.identity.admin_role, None):"},{"line_number":55,"context_line":"            is_admin \u003d False"},{"line_number":56,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_e41c5316","line":53,"updated":"2015-03-04 11:53:08.000000000","message":"This works but it\u0027s seems to rely on the internals of Accounts implementation rather than on a public interface.\n\nI think it would be best to add a method in cred_provider to check for availability of admin creds - the implementation should avoid putting a lock on admin creds.\n\nElse we could use a NonLockingAccounts here, and try to get admin credentials from it with get_admin_creds.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"965482427a1c3d3fcb95ff1147eede7ffb8f70f1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    is_admin \u003d True"},{"line_number":51,"context_line":"    # Check whether test accounts file has the admin specified or not"},{"line_number":52,"context_line":"    if os.path.isfile(CONF.auth.test_accounts_file):"},{"line_number":53,"context_line":"        hashes \u003d accounts.Accounts(name\u003d\u0027check_admin\u0027).hash_dict"},{"line_number":54,"context_line":"        if not hashes[\u0027roles\u0027].get(CONF.identity.admin_role, None):"},{"line_number":55,"context_line":"            is_admin \u003d False"},{"line_number":56,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_c2873a0e","line":53,"in_reply_to":"9a80dd14_e41c5316","updated":"2015-03-04 15:14:20.000000000","message":"Sure I\u0027ll add a helper method to the accounts to return this. FWIW, this actually doesn\u0027t lock anything, it just reads the file and uses the generated hash_dict.","commit_id":"857d98f69a1c05123d9a6fe68d61639f0042d3cc"}],"tempest/common/isolated_creds.py":[{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"01eebc73e12317d163f25f058d167d61a108524a","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":258,"context_line":"                credentials \u003d self._create_creds(admin\u003dis_admin)"},{"line_number":259,"context_line":"            else:"},{"line_number":260,"context_line":"                credentials \u003d self._create_creds(role\u003dcredential_type)"},{"line_number":261,"context_line":"            self.isolated_creds[credential_type] \u003d credentials"},{"line_number":262,"context_line":"            # Maintained until tests are ported"},{"line_number":263,"context_line":"            LOG.info(\"Acquired isolated creds:\\n credentials: %s\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_53d5081a","line":260,"updated":"2014-12-24 08:05:33.000000000","message":"If I do not miss something, this code cannot assign multiple roles to one account. This code does not allow admin user to be also reseller_admin.","commit_id":"bb07f29ec65fe826a2a75f8470c9bd928d9fd9c9"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ded23a79404a49b99504add20c687bfd4176e546","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":258,"context_line":"                credentials \u003d self._create_creds(admin\u003dis_admin)"},{"line_number":259,"context_line":"            else:"},{"line_number":260,"context_line":"                credentials \u003d self._create_creds(role\u003dcredential_type)"},{"line_number":261,"context_line":"            self.isolated_creds[credential_type] \u003d credentials"},{"line_number":262,"context_line":"            # Maintained until tests are ported"},{"line_number":263,"context_line":"            LOG.info(\"Acquired isolated creds:\\n credentials: %s\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_f932dc0d","line":260,"in_reply_to":"3a961159_53d5081a","updated":"2015-01-14 01:41:57.000000000","message":"You\u0027re correct, I did this intentionally to match the limitations for the current implementation of this with the accounts file cred provider. I have an idea to get around that limitation so when I respin this I will update them both at the same time.","commit_id":"bb07f29ec65fe826a2a75f8470c9bd928d9fd9c9"},{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"543e75068f0d95c5f8b0ffa9c47b0bbf5dd8ee33","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":263,"context_line":"                credentials \u003d self._create_creds(admin\u003dis_admin)"},{"line_number":264,"context_line":"            else:"},{"line_number":265,"context_line":"                credentials \u003d self._create_creds(role\u003dcredential_type)"},{"line_number":266,"context_line":"            self.isolated_creds[credential_type] \u003d credentials"},{"line_number":267,"context_line":"            # Maintained until tests are ported"},{"line_number":268,"context_line":"            LOG.info(\"Acquired isolated creds:\\n credentials: %s\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa81d914_f1904197","line":265,"updated":"2015-01-29 11:39:34.000000000","message":"The attribute name is not \u0027role\u0027 but \u0027roles\u0027, right?","commit_id":"15b728834f1ebaec9d60e1540d9f0643a37e38c0"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"e1a924e41c424c4130b9c344d1bb145b715248c3","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                is_admin \u003d (credential_type \u003d\u003d \u0027admin\u0027)"},{"line_number":263,"context_line":"                credentials \u003d self._create_creds(admin\u003dis_admin)"},{"line_number":264,"context_line":"            else:"},{"line_number":265,"context_line":"                credentials \u003d self._create_creds(role\u003dcredential_type)"},{"line_number":266,"context_line":"            self.isolated_creds[credential_type] \u003d credentials"},{"line_number":267,"context_line":"            # Maintained until tests are ported"},{"line_number":268,"context_line":"            LOG.info(\"Acquired isolated creds:\\n credentials: %s\""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_1ff4295a","line":265,"in_reply_to":"fa81d914_f1904197","updated":"2015-02-21 01:09:19.000000000","message":"Done","commit_id":"15b728834f1ebaec9d60e1540d9f0643a37e38c0"},{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"543e75068f0d95c5f8b0ffa9c47b0bbf5dd8ee33","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        return self.get_credentials(\u0027alt\u0027)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def get_creds_by_roles(self, role):"},{"line_number":290,"context_line":"        return self.get_credentials(role)"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def _clear_isolated_router(self, router_id, router_name):"},{"line_number":293,"context_line":"        net_client \u003d self.network_admin_client"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa81d914_f1c84176","line":290,"updated":"2015-01-29 11:39:34.000000000","message":"ditto","commit_id":"15b728834f1ebaec9d60e1540d9f0643a37e38c0"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"e1a924e41c424c4130b9c344d1bb145b715248c3","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        return self.get_credentials(\u0027alt\u0027)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def get_creds_by_roles(self, role):"},{"line_number":290,"context_line":"        return self.get_credentials(role)"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def _clear_isolated_router(self, router_id, router_name):"},{"line_number":293,"context_line":"        net_client \u003d self.network_admin_client"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_3fe9ed80","line":290,"in_reply_to":"fa81d914_f1c84176","updated":"2015-02-21 01:09:19.000000000","message":"Done","commit_id":"15b728834f1ebaec9d60e1540d9f0643a37e38c0"},{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"4b9f3ab7c0e090f3e63579bd690fdfb032749e77","unresolved":false,"context_lines":[{"line_number":286,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":287,"context_line":"        exist_creds \u003d self.isolated_creds.get(str(roles))"},{"line_number":288,"context_line":"        if exist_creds and force:"},{"line_number":289,"context_line":"            new_index \u003d str(roles) + \u0027-\u0027 + len(self.isolated_creds)"},{"line_number":290,"context_line":"            self.isolated_creds[new_index] \u003d exist_creds"},{"line_number":291,"context_line":"            del self.isolated_creds[str(roles)]"},{"line_number":292,"context_line":"        return self.get_credentials(list(set(roles)))"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_bc829dc5","line":289,"updated":"2015-02-26 07:26:24.000000000","message":"In swift test patch, we can see the following error so it should be enclosed by str( ).\n\n2015-02-26 00:59:40.750 |       File \"tempest/common/isolated_creds.py\", line 291, in get_creds_by_roles\n\n2015-02-26 00:59:40.751 |         new_index \u003d str(roles) + \u0027-\u0027 + len(self.isolated_creds)\n\n2015-02-26 00:59:40.751 |     TypeError: cannot concatenate \u0027str\u0027 and \u0027int\u0027 objects","commit_id":"26d617dfe194ac01043cdbfe8a73dc173bc3b015"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"a882820c81dc81bd24cd97875bdb54d50c737151","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":287,"context_line":"        roles \u003d list(set(roles))"},{"line_number":288,"context_line":"        exist_creds \u003d self.isolated_creds.get(str(roles))"},{"line_number":289,"context_line":"        # If force flag is True 2 cred sets with the same roles are needed"},{"line_number":290,"context_line":"        # handle this by creating a separate index for old one to store it"},{"line_number":291,"context_line":"        # separately for cleanup"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba7be1f8_9c0c1cee","line":288,"updated":"2015-03-03 20:19:29.000000000","message":"I can\u0027t follow all the code well enough to be sure this is an issue, but calling str on a list here seems odd. I think a comment would help.","commit_id":"08d4efd882eadfee0e0a90adc0da4331e0eb087d"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"3defe449ddff778b92ea6beb4221e7cdff124d74","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":287,"context_line":"        roles \u003d list(set(roles))"},{"line_number":288,"context_line":"        exist_creds \u003d self.isolated_creds.get(str(roles))"},{"line_number":289,"context_line":"        # If force flag is True 2 cred sets with the same roles are needed"},{"line_number":290,"context_line":"        # handle this by creating a separate index for old one to store it"},{"line_number":291,"context_line":"        # separately for cleanup"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba7be1f8_b2110706","line":288,"in_reply_to":"ba7be1f8_17b6453e","updated":"2015-03-03 21:02:20.000000000","message":"I understand it has to be a string. My wondering was about how stringing a list freezes the order of the roles. And in other areas of the code it does not matter what the order of roles is in a list. So perhaps there is something that canonicalizes this but it was not clear to me.","commit_id":"08d4efd882eadfee0e0a90adc0da4331e0eb087d"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d2bea706f23bd78178a700c2dbe4f0887924128c","unresolved":false,"context_lines":[{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def get_creds_by_roles(self, roles, force\u003dFalse):"},{"line_number":287,"context_line":"        roles \u003d list(set(roles))"},{"line_number":288,"context_line":"        exist_creds \u003d self.isolated_creds.get(str(roles))"},{"line_number":289,"context_line":"        # If force flag is True 2 cred sets with the same roles are needed"},{"line_number":290,"context_line":"        # handle this by creating a separate index for old one to store it"},{"line_number":291,"context_line":"        # separately for cleanup"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba7be1f8_17b6453e","line":288,"in_reply_to":"ba7be1f8_9c0c1cee","updated":"2015-03-03 20:37:04.000000000","message":"It has to be cast as a string, because you can\u0027t use a list as a dict key. Roles here is the same as credential_type in get_credentials() which is used as the dict key when the creds are created. I\u0027ll add a comment when I respin this.","commit_id":"08d4efd882eadfee0e0a90adc0da4331e0eb087d"}]}
