)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adding keystone notification listener support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Iba7d50eb222edd43352ef82f629df2b3187c76ec"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_27878b5c","line":9,"updated":"2014-08-03 00:18:18.000000000","message":"can you add:\n\nImplements: blueprint consume-keystone-events","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"}],"barbican/model/repositories.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":498,"context_line":"                entity.delete(session\u003dsession)"},{"line_number":499,"context_line":"                deleted_count +\u003d 1"},{"line_number":500,"context_line":"        except sa_orm.exc.NoResultFound:"},{"line_number":501,"context_line":"            LOG.exception(\"Not found for {0}\".format(project_id))"},{"line_number":502,"context_line":"            if not suppress_exception:"},{"line_number":503,"context_line":"                raise exception.NotFound(\"No %s found with TenantID %s\""},{"line_number":504,"context_line":"                                         % (self._do_entity_name(),"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c7da4f78","line":501,"updated":"2014-08-03 00:18:18.000000000","message":"can you reword this one?   Perhaps:\n\nNo secrets found for project id {0}.","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        except sa_orm.exc.NoResultFound:"},{"line_number":501,"context_line":"            LOG.exception(\"Not found for {0}\".format(project_id))"},{"line_number":502,"context_line":"            if not suppress_exception:"},{"line_number":503,"context_line":"                raise exception.NotFound(\"No %s found with TenantID %s\""},{"line_number":504,"context_line":"                                         % (self._do_entity_name(),"},{"line_number":505,"context_line":"                                            project_id))"},{"line_number":506,"context_line":"        except sqlalchemy.exc.IntegrityError as ie:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_87edb726","line":503,"updated":"2014-08-03 00:18:18.000000000","message":"If someone deletes a project in keystone it might seem confusing that this error message says TenantID.  Should probably say Project rather than Tenant.","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":927,"context_line":"    def delete_project_entities(self, project_id, suppress_exception\u003dFalse,"},{"line_number":928,"context_line":"                                session\u003dNone):"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        return self._delete_project_entities(models.Container, project_id,"},{"line_number":931,"context_line":"            suppress_exception\u003dsuppress_exception, session\u003dsession)"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_27deab6a","line":930,"updated":"2014-08-03 00:18:18.000000000","message":"Can a container contain secrets with a different project ID?","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # TODO(jfwood): if \u0027mysql\u0027 in connection_dict.drivername:"},{"line_number":127,"context_line":"        # TODO(jfwood): sqlalchemy.event.listen(_ENGINE, \u0027checkout\u0027,"},{"line_number":128,"context_line":"        # TODO(jfwood):                         ping_listener)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            _ENGINE.connect \u003d wrap_db_error(_ENGINE.connect)"},{"line_number":131,"context_line":"            _ENGINE.connect()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_bf305fea","line":128,"updated":"2014-08-07 14:23:15.000000000","message":"I like how you did it above - howsabout one TODO comment above the 3 commented out lines?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # TODO(jfwood): if \u0027mysql\u0027 in connection_dict.drivername:"},{"line_number":127,"context_line":"        # TODO(jfwood): sqlalchemy.event.listen(_ENGINE, \u0027checkout\u0027,"},{"line_number":128,"context_line":"        # TODO(jfwood):                         ping_listener)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            _ENGINE.connect \u003d wrap_db_error(_ENGINE.connect)"},{"line_number":131,"context_line":"            _ENGINE.connect()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_508010bf","line":128,"in_reply_to":"baada198_bf305fea","updated":"2014-08-07 15:44:44.000000000","message":"I think eclipse is adding that space between # and TODO. That\u0027s why the the comment you mentioned crossed 80 limit and needs to split in two lines.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                entity.delete(session\u003dsession)"},{"line_number":500,"context_line":"                deleted_count +\u003d 1"},{"line_number":501,"context_line":"        except sa_orm.exc.NoResultFound:"},{"line_number":502,"context_line":"            LOG.exception(\"Not found for {0}\".format(project_id))"},{"line_number":503,"context_line":"            if not suppress_exception:"},{"line_number":504,"context_line":"                raise exception.NotFound(\"No %s found with TenantID %s\""},{"line_number":505,"context_line":"                                         % (self._do_entity_name(),"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7f6ec798","line":502,"updated":"2014-08-07 14:23:15.000000000","message":"Message should indicate that its a secret not found for project id X","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                entity.delete(session\u003dsession)"},{"line_number":500,"context_line":"                deleted_count +\u003d 1"},{"line_number":501,"context_line":"        except sa_orm.exc.NoResultFound:"},{"line_number":502,"context_line":"            LOG.exception(\"Not found for {0}\".format(project_id))"},{"line_number":503,"context_line":"            if not suppress_exception:"},{"line_number":504,"context_line":"                raise exception.NotFound(\"No %s found with TenantID %s\""},{"line_number":505,"context_line":"                                         % (self._do_entity_name(),"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_d04a60ac","line":502,"in_reply_to":"baada198_7f6ec798","updated":"2014-08-07 15:44:44.000000000","message":"This is a shared logic so using \u0027secret\u0027 would not be applicable in case of tenant, order etc.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        This will filter deleted entities if there."},{"line_number":498,"context_line":"        \"\"\""},{"line_number":499,"context_line":"        return None"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def get_project_entities(self, tenant_id, session\u003dNone):"},{"line_number":502,"context_line":"        \"\"\"Gets entities associated with a given project."}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_56af052a","line":499,"updated":"2014-08-20 19:35:19.000000000","message":"This really should either raise a not implemented or be some sort of abstract method.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        This will filter deleted entities if there."},{"line_number":498,"context_line":"        \"\"\""},{"line_number":499,"context_line":"        return None"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def get_project_entities(self, tenant_id, session\u003dNone):"},{"line_number":502,"context_line":"        \"\"\"Gets entities associated with a given project."}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_c406fa85","line":499,"in_reply_to":"1abeadc6_56af052a","updated":"2014-08-20 22:42:22.000000000","message":"As this function is used by base class \u0027get_project_entities\u0027 and \u0027delete_project_entities\u0027, so was thinking of avoiding error for sub classes which does not implement this method.\n\nBut as per your recommendation, it might be better to make caller aware known that specific repo class does not implement this error.\n\nWill raise not implemented error in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        if query:"},{"line_number":518,"context_line":"            total \u003d query.count()"},{"line_number":519,"context_line":"            entities \u003d query[0:total]"},{"line_number":520,"context_line":"        return entities"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    def delete_project_entities(self, tenant_id,"},{"line_number":523,"context_line":"                                suppress_exception\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_8fa8a878","line":520,"updated":"2014-08-20 19:35:19.000000000","message":"If you\u0027re really trying to get all entities wouldn\u0027t it be better to do something like;\n\n    return query.all() if query else []","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        if query:"},{"line_number":518,"context_line":"            total \u003d query.count()"},{"line_number":519,"context_line":"            entities \u003d query[0:total]"},{"line_number":520,"context_line":"        return entities"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    def delete_project_entities(self, tenant_id,"},{"line_number":523,"context_line":"                                suppress_exception\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_643e062a","line":520,"in_reply_to":"1abeadc6_8fa8a878","updated":"2014-08-20 22:42:22.000000000","message":"Yes. Will use that in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"        return entity"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    def _build_get_project_entities_query(self, tenant_id, session\u003dNone):"},{"line_number":590,"context_line":"        \"\"\"Builds query for retrieving project for given id."},{"line_number":591,"context_line":"        \"\"\""},{"line_number":592,"context_line":"        return session.query(models.Tenant) \\"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_5bdacee8","line":589,"updated":"2014-08-20 19:35:19.000000000","message":"According to the docstring in the base, session should be retrieved if not specified.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"        return entity"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"    def _build_get_project_entities_query(self, tenant_id, session\u003dNone):"},{"line_number":590,"context_line":"        \"\"\"Builds query for retrieving project for given id."},{"line_number":591,"context_line":"        \"\"\""},{"line_number":592,"context_line":"        return session.query(models.Tenant) \\"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_6453666b","line":589,"in_reply_to":"1abeadc6_5bdacee8","updated":"2014-08-20 22:42:22.000000000","message":"No need to get_session() in this method as its built in caller function if not provided. Will update the docstring in base class to reflect that.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        \"\"\""},{"line_number":592,"context_line":"        return session.query(models.Tenant) \\"},{"line_number":593,"context_line":"            .filter_by(id\u003dtenant_id) \\"},{"line_number":594,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"class SecretRepo(BaseRepo):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_efe67caf","line":594,"updated":"2014-08-20 19:35:19.000000000","message":"Wouldn\u0027t it be cleaner to do:\n\n    query \u003d session.query(models.Tenant)\n    return query.filter_by(id\u003dtenant_id, deleted\u003dFalse)","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        \"\"\""},{"line_number":592,"context_line":"        return session.query(models.Tenant) \\"},{"line_number":593,"context_line":"            .filter_by(id\u003dtenant_id) \\"},{"line_number":594,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"class SecretRepo(BaseRepo):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_243faed7","line":594,"in_reply_to":"1abeadc6_efe67caf","updated":"2014-08-20 22:42:22.000000000","message":"Yes, that is another approach to specify query. I am following the currently used pattern so that it can be read and understood in consistent manner. I was trying to avoid the situation where someone says why its done differently. I can certainly change it if its needed. Please let me know.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":689,"context_line":"        return session.query(models.Secret) \\"},{"line_number":690,"context_line":"            .filter_by(deleted\u003dFalse) \\"},{"line_number":691,"context_line":"            .join(models.TenantSecret, models.Secret.tenant_assocs) \\"},{"line_number":692,"context_line":"            .filter(models.TenantSecret.tenant_id \u003d\u003d tenant_id)"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"class EncryptedDatumRepo(BaseRepo):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_31d0d31e","line":692,"updated":"2014-08-20 19:35:19.000000000","message":"I wonder if we could clean up all of these so we aren\u0027t just using a large number of line continuations all the time.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":689,"context_line":"        return session.query(models.Secret) \\"},{"line_number":690,"context_line":"            .filter_by(deleted\u003dFalse) \\"},{"line_number":691,"context_line":"            .join(models.TenantSecret, models.Secret.tenant_assocs) \\"},{"line_number":692,"context_line":"            .filter(models.TenantSecret.tenant_id \u003d\u003d tenant_id)"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"class EncryptedDatumRepo(BaseRepo):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_0411d25c","line":692,"in_reply_to":"1abeadc6_31d0d31e","updated":"2014-08-20 22:42:22.000000000","message":"Same answer as earlier one. This is the pattern used throughout in this module.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    return offset, limit"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"def delete_all_project_resources(tenant_id, repos):"},{"line_number":242,"context_line":"    \"\"\"Logic to cleanup all project resources."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    This cleanup uses same alchemy session to perform all db operations as a"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_040cbf41","line":241,"updated":"2014-08-26 16:10:06.000000000","message":"nit: This function seems overly verbose, perhaps you could find a way to make it less verbose and more readable?\n\nMy reasoning is that, since delete_project_entities is being called with the same parameter for all the repo\u0027s, it kind of hides the intent, when what you actually want to express, it that for the container_repo, secret_repo, kek_repo, and so on, you want to do that action. Another helper function perhaps?","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    return offset, limit"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"def delete_all_project_resources(tenant_id, repos):"},{"line_number":242,"context_line":"    \"\"\"Logic to cleanup all project resources."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    This cleanup uses same alchemy session to perform all db operations as a"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_d36e07c9","line":241,"in_reply_to":"1abeadc6_040cbf41","updated":"2014-08-26 18:05:52.000000000","message":"I am not sure if I am following your comments. Can you please provide example or mention specific lines which are unnecessarily verbose?\n\nThe intent is to specify transaction (atomic) behavior across these multiple db delete operations. This is done by using same session which is I mentioned in comments. Sometimes this kind of behavior is not that obvious for everybody.\n\nI will remove the line \"Added here to keep session specific logic within this module.\" .\nThis was just added to explain why the code is here and not in calling class as based on earlier review comments around the same topic.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8d7eeaad108e2c0f8519a39e58b7c272176f387","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    return offset, limit"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"def delete_all_project_resources(tenant_id, repos):"},{"line_number":242,"context_line":"    \"\"\"Logic to cleanup all project resources."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    This cleanup uses same alchemy session to perform all db operations as a"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_8c17d644","line":241,"in_reply_to":"1abeadc6_d36e07c9","updated":"2014-08-27 21:29:31.000000000","message":"Juan, I\u0027m not sure I follow your ask here...are you looking for a way to not have to pass 3 args for each of those repo calls?","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8d7eeaad108e2c0f8519a39e58b7c272176f387","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        # secret children SecretStoreMetadatum, EncryptedDatum"},{"line_number":256,"context_line":"        # and container_secrets are deleted as part of secret delete"},{"line_number":257,"context_line":"        repos.secret_repo.delete_project_entities("},{"line_number":258,"context_line":"            tenant_id, suppress_exception\u003dTrue, session\u003dsession)"},{"line_number":259,"context_line":"        repos.kek_repo.delete_project_entities("},{"line_number":260,"context_line":"            tenant_id, suppress_exception\u003dTrue, session\u003dsession)"},{"line_number":261,"context_line":"        repos.tenant_secret_repo.delete_project_entities("}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_b87f6ddf","line":258,"updated":"2014-08-27 21:29:31.000000000","message":"Should this entire transaction be an all or nothing affair, so suppress_exception\u003dFalse (the default) all the way?  If a clean up attempt fails, I think operators should know about it, try to fix the problem (outside Barbican) and then re-attempt this.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1f8e5e681051d520e3b423be2cf31dfd9ceb5477","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        # secret children SecretStoreMetadatum, EncryptedDatum"},{"line_number":256,"context_line":"        # and container_secrets are deleted as part of secret delete"},{"line_number":257,"context_line":"        repos.secret_repo.delete_project_entities("},{"line_number":258,"context_line":"            tenant_id, suppress_exception\u003dTrue, session\u003dsession)"},{"line_number":259,"context_line":"        repos.kek_repo.delete_project_entities("},{"line_number":260,"context_line":"            tenant_id, suppress_exception\u003dTrue, session\u003dsession)"},{"line_number":261,"context_line":"        repos.tenant_secret_repo.delete_project_entities("}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_cf3700fe","line":258,"in_reply_to":"1abeadc6_b87f6ddf","updated":"2014-08-27 22:09:34.000000000","message":"John, yes you are correct. It should be False as we don\u0027t want to hide exception. True actually makes whole logic quite useless as leaves entities in inconsistent state.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                           kwargs)"},{"line_number":291,"context_line":"            self._set_repo(\u0027order_repo\u0027, OrderRepo, kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_e7298538","line":293,"updated":"2014-08-26 16:10:06.000000000","message":"Why was this line added? it seems that it was needed, but is it relevant to have it on this CR? or should it have been in a separate CR?","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8d7eeaad108e2c0f8519a39e58b7c272176f387","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                           kwargs)"},{"line_number":291,"context_line":"            self._set_repo(\u0027order_repo\u0027, OrderRepo, kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_0ca826da","line":293,"in_reply_to":"1abeadc6_b308abda","updated":"2014-08-27 21:29:31.000000000","message":"Just noting that this CR will allow for repository module accesses, without having to pass around repos: https://review.openstack.org/#/c/116387/\n\nI think this is fine for this CR.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                           kwargs)"},{"line_number":291,"context_line":"            self._set_repo(\u0027order_repo\u0027, OrderRepo, kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_b308abda","line":293,"in_reply_to":"1abeadc6_e7298538","updated":"2014-08-26 18:05:52.000000000","message":"I am using \u0027container_repo\u0027 in delete_all_project_resources logic above and that\u0027s why added here. Without this I will need to create this repo reference differently which is a variation from the pattern used throughout in the barbican code.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                for entity in query:"},{"line_number":564,"context_line":"                    # Its a soft delete so its more like entity update"},{"line_number":565,"context_line":"                    entity.delete(session\u003dsession)"},{"line_number":566,"context_line":"                    deleted_count +\u003d 1"},{"line_number":567,"context_line":"        except sqlalchemy.exc.SQLAlchemyError:"},{"line_number":568,"context_line":"            LOG.exception(\u0027Problem finding project related entity to delete\u0027)"},{"line_number":569,"context_line":"            if not suppress_exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_67d655f3","line":566,"updated":"2014-08-26 16:10:06.000000000","message":"what if the value of `query` is falsey? Wouldn\u0027t that be a failure for the _build_get_project_entities query? Perhaps the throwing of an exception would make sense here.\n\nAlso, perhaps, instead of having a variable with the count for the query, perhaps you could get the length of the query itself; the usage of query.count() would help.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                for entity in query:"},{"line_number":564,"context_line":"                    # Its a soft delete so its more like entity update"},{"line_number":565,"context_line":"                    entity.delete(session\u003dsession)"},{"line_number":566,"context_line":"                    deleted_count +\u003d 1"},{"line_number":567,"context_line":"        except sqlalchemy.exc.SQLAlchemyError:"},{"line_number":568,"context_line":"            LOG.exception(\u0027Problem finding project related entity to delete\u0027)"},{"line_number":569,"context_line":"            if not suppress_exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_6ec38a57","line":566,"in_reply_to":"1abeadc6_67d655f3","updated":"2014-08-26 18:05:52.000000000","message":"If specific repo class does not implement _build_get_project_entities_query method, then NotImplementedError is raised. In case its implemented, then query would not be false.\n\nIf I use query.count() mechanism for delete count, then actual number of delete can be different in case suppress_exception is True and there is error with one of soft delete.\n\nPlease let me know if you still have concern on this?","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8d7eeaad108e2c0f8519a39e58b7c272176f387","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                for entity in query:"},{"line_number":564,"context_line":"                    # Its a soft delete so its more like entity update"},{"line_number":565,"context_line":"                    entity.delete(session\u003dsession)"},{"line_number":566,"context_line":"                    deleted_count +\u003d 1"},{"line_number":567,"context_line":"        except sqlalchemy.exc.SQLAlchemyError:"},{"line_number":568,"context_line":"            LOG.exception(\u0027Problem finding project related entity to delete\u0027)"},{"line_number":569,"context_line":"            if not suppress_exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_d8da694a","line":566,"in_reply_to":"1abeadc6_6ec38a57","updated":"2014-08-27 21:29:31.000000000","message":"If _build_get_project_...() returns a query or NotImplemented, then the \u0027if query:\u0027 check is not needed...saving a level of indentation which is helpful.  That said, if the intent of \u0027suppress_exception\u0027 in this method is to suppress ALL exceptions, then even this NotImplemented exception should not be raised?\n\nRegarding the deletion count, I don\u0027t see code that uses this return value, including the main delete_all_project_resources() function above. Can this just be removed?","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1f8e5e681051d520e3b423be2cf31dfd9ceb5477","unresolved":false,"context_lines":[{"line_number":563,"context_line":"                for entity in query:"},{"line_number":564,"context_line":"                    # Its a soft delete so its more like entity update"},{"line_number":565,"context_line":"                    entity.delete(session\u003dsession)"},{"line_number":566,"context_line":"                    deleted_count +\u003d 1"},{"line_number":567,"context_line":"        except sqlalchemy.exc.SQLAlchemyError:"},{"line_number":568,"context_line":"            LOG.exception(\u0027Problem finding project related entity to delete\u0027)"},{"line_number":569,"context_line":"            if not suppress_exception:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_e2a213fb","line":566,"in_reply_to":"1abeadc6_d8da694a","updated":"2014-08-27 22:09:34.000000000","message":"As I see code in other places in this module, suppress_exception generally suppresses specific exception e.g. NoResultFound error. I will think, we should not suppress NotImplementedError as its incomplete usage of API (coding error) and want to highlight that during testing.\n\nI can remove deletion count as its not being used. Generally these kind of APIs provide count but its specific to this task, I can certainly remove it.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"452aadd7966f4c7db6908e7f52c3cbe3b0a23de3","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self._set_repo(\u0027order_plugin_meta_repo\u0027, OrderPluginMetadatumRepo,"},{"line_number":291,"context_line":"                           kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_eff4af5c","line":293,"updated":"2014-08-28 07:46:18.000000000","message":"As to John Wood\u0027s comment in patch 11, I think adding a TODO here would be the best approach; it would then state that this could be replaced subsequently by this singleton approach.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"c6709d3bc2490a1c79d4e138f139790f23d1d4ce","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self._set_repo(\u0027order_plugin_meta_repo\u0027, OrderPluginMetadatumRepo,"},{"line_number":291,"context_line":"                           kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_ff7a86b8","line":293,"in_reply_to":"1abeadc6_29cdb031","updated":"2014-08-28 17:36:31.000000000","message":"Okay. So I will leave this as-is now.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"521f37ea09cf0f296b29fce9f057621e9ca8a79e","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self._set_repo(\u0027order_plugin_meta_repo\u0027, OrderPluginMetadatumRepo,"},{"line_number":291,"context_line":"                           kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_29cdb031","line":293,"in_reply_to":"1abeadc6_69cc08bc","updated":"2014-08-28 16:37:46.000000000","message":"Arun, the singleton getters for some of the repositories are at the bottom of link you mention above.\n\nI think it\u0027s fine to add without a TODO here. Once 116387 lands, I was planning to put a CR that guts all of these pesky repo calls, but for the time being it is how things are getting done (as ugly as they are).","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"3aa4ea218cbac06f15500444c40ae8b65e1bf591","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self._set_repo(\u0027order_plugin_meta_repo\u0027, OrderPluginMetadatumRepo,"},{"line_number":291,"context_line":"                           kwargs)"},{"line_number":292,"context_line":"            self._set_repo(\u0027transport_key_repo\u0027, TransportKeyRepo, kwargs)"},{"line_number":293,"context_line":"            self._set_repo(\u0027container_repo\u0027, ContainerRepo, kwargs)"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def _set_repo(self, repo_name, repo_cls, specs):"},{"line_number":296,"context_line":"        if specs and repo_name in specs:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_69cc08bc","line":293,"in_reply_to":"1abeadc6_eff4af5c","updated":"2014-08-28 16:17:26.000000000","message":"I don\u0027t see any change in (other than this additional new repo reference in my CR) https://review.openstack.org/#/c/116387/3/barbican/model/repositories.py,cm \n\nIs not changes related to make usage of singleton approach will be part of separate CR? So if notification changes get merged before that, then it will be addressed with other existing repos references. If new CR changes get merged before, then I will have to take care of that as it will have merge conflicts.\n\nI can add TODO but don\u0027t see it if its any different from existing code. Please advise.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":549,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":550,"context_line":"        :param suppress_exception: Pass True if want to suppress exception"},{"line_number":551,"context_line":"        :param session: existing db session reference. If None, gets session."},{"line_number":552,"context_line":"        :returns: number of entities deleted"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        Sub-class should implement `_build_get_project_entities_query` function"},{"line_number":555,"context_line":"        to delete related entities otherwise it would not do anything."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_667cf673","line":552,"updated":"2014-08-31 03:36:03.000000000","message":"do we ever do this?","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":549,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":550,"context_line":"        :param suppress_exception: Pass True if want to suppress exception"},{"line_number":551,"context_line":"        :param session: existing db session reference. If None, gets session."},{"line_number":552,"context_line":"        :returns: number of entities deleted"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        Sub-class should implement `_build_get_project_entities_query` function"},{"line_number":555,"context_line":"        to delete related entities otherwise it would not do anything."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_afa55cb6","line":552,"in_reply_to":"fa98f980_667cf673","updated":"2014-09-02 21:15:50.000000000","message":"This is leftover from previous change. I will correct the comments as now there is no deleted record count returned.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"521f37ea09cf0f296b29fce9f057621e9ca8a79e","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            for entity in query:"},{"line_number":564,"context_line":"                # Its a soft delete so its more like entity update"},{"line_number":565,"context_line":"                entity.delete(session\u003dsession)"},{"line_number":566,"context_line":"        except sqlalchemy.exc.SQLAlchemyError:"},{"line_number":567,"context_line":"            LOG.exception(\u0027Problem finding project related entity to delete\u0027)"},{"line_number":568,"context_line":"            if not suppress_exception:"},{"line_number":569,"context_line":"                raise exception.BarbicanException(\u0027Error deleting project \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_490f4c39","line":566,"updated":"2014-08-28 16:37:46.000000000","message":"Good point about suppressing exception...that really is intended to suppress possible *datastore* exceptions, rather than programmer-foo-bar exceptions. You are correct. \n\nI\u0027m fine with the deleted count being returned, but it does seem that the query.count() would work as well. Incrementing as you do would save on the additional database connection call for the .count() call though, so I\u0027m preferring the increment approach. Make sense though?","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"c6709d3bc2490a1c79d4e138f139790f23d1d4ce","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            for entity in query:"},{"line_number":564,"context_line":"                # Its a soft delete so its more like entity update"},{"line_number":565,"context_line":"                entity.delete(session\u003dsession)"},{"line_number":566,"context_line":"        except sqlalchemy.exc.SQLAlchemyError:"},{"line_number":567,"context_line":"            LOG.exception(\u0027Problem finding project related entity to delete\u0027)"},{"line_number":568,"context_line":"            if not suppress_exception:"},{"line_number":569,"context_line":"                raise exception.BarbicanException(\u0027Error deleting project \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_9f77d2d3","line":566,"in_reply_to":"1abeadc6_490f4c39","updated":"2014-08-28 17:36:31.000000000","message":"I don\u0027t foresee that deletion count being used other than probably adding it in a  debug level statement. So I am okay leaving this as-is. Do you see any use for adding it back?","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":608,"context_line":"    def _build_get_project_entities_query(self, tenant_id, session):"},{"line_number":609,"context_line":"        \"\"\"Builds query for retrieving project for given id."},{"line_number":610,"context_line":"        \"\"\""},{"line_number":611,"context_line":"        return session.query(models.Tenant) \\"},{"line_number":612,"context_line":"            .filter_by(id\u003dtenant_id) \\"},{"line_number":613,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_a695fe89","line":611,"updated":"2014-08-31 03:36:03.000000000","message":"backslashes are a no-no when we update hacking, so probably a good idea to get in the habit of avoiding them now.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":608,"context_line":"    def _build_get_project_entities_query(self, tenant_id, session):"},{"line_number":609,"context_line":"        \"\"\"Builds query for retrieving project for given id."},{"line_number":610,"context_line":"        \"\"\""},{"line_number":611,"context_line":"        return session.query(models.Tenant) \\"},{"line_number":612,"context_line":"            .filter_by(id\u003dtenant_id) \\"},{"line_number":613,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_af08fc91","line":611,"in_reply_to":"fa98f980_a695fe89","updated":"2014-09-02 21:15:50.000000000","message":"Not sure if this kind of change should be done as part of another CR as there is lot of existing code which follows this convention. If I just change the new code, it will look little different. I will make change as per recommendation and will refer this patch if somebody has related concerns around this.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":706,"context_line":"        functions in BaseRepo class."},{"line_number":707,"context_line":"        \"\"\""},{"line_number":708,"context_line":"        return session.query(models.Secret) \\"},{"line_number":709,"context_line":"            .filter_by(deleted\u003dFalse) \\"},{"line_number":710,"context_line":"            .join(models.TenantSecret, models.Secret.tenant_assocs) \\"},{"line_number":711,"context_line":"            .filter(models.TenantSecret.tenant_id \u003d\u003d tenant_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_c692029f","line":708,"updated":"2014-08-31 03:36:03.000000000","message":"same as above re: backslashes","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":706,"context_line":"        functions in BaseRepo class."},{"line_number":707,"context_line":"        \"\"\""},{"line_number":708,"context_line":"        return session.query(models.Secret) \\"},{"line_number":709,"context_line":"            .filter_by(deleted\u003dFalse) \\"},{"line_number":710,"context_line":"            .join(models.TenantSecret, models.Secret.tenant_assocs) \\"},{"line_number":711,"context_line":"            .filter(models.TenantSecret.tenant_id \u003d\u003d tenant_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_0ff90880","line":708,"in_reply_to":"fa98f980_c692029f","updated":"2014-09-02 21:15:50.000000000","message":"Will address in next patch. Details are as mentioned above.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":836,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":837,"context_line":"        functions in BaseRepo class."},{"line_number":838,"context_line":"        \"\"\""},{"line_number":839,"context_line":"        return session.query(models.KEKDatum) \\"},{"line_number":840,"context_line":"            .filter_by(tenant_id\u003dtenant_id) \\"},{"line_number":841,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":842,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_e68f0674","line":839,"updated":"2014-08-31 03:36:03.000000000","message":"backslashes","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":836,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":837,"context_line":"        functions in BaseRepo class."},{"line_number":838,"context_line":"        \"\"\""},{"line_number":839,"context_line":"        return session.query(models.KEKDatum) \\"},{"line_number":840,"context_line":"            .filter_by(tenant_id\u003dtenant_id) \\"},{"line_number":841,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":842,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_2ff40c86","line":839,"in_reply_to":"fa98f980_e68f0674","updated":"2014-09-02 21:15:50.000000000","message":"Will address in next patch. Details are as mentioned above.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":869,"context_line":"        functions in BaseRepo class."},{"line_number":870,"context_line":"        \"\"\""},{"line_number":871,"context_line":"        return session.query(models.TenantSecret) \\"},{"line_number":872,"context_line":"            .filter_by(tenant_id\u003dtenant_id) \\"},{"line_number":873,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":874,"context_line":""},{"line_number":875,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_068dea7b","line":872,"updated":"2014-08-31 03:36:03.000000000","message":"more backslashes","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":869,"context_line":"        functions in BaseRepo class."},{"line_number":870,"context_line":"        \"\"\""},{"line_number":871,"context_line":"        return session.query(models.TenantSecret) \\"},{"line_number":872,"context_line":"            .filter_by(tenant_id\u003dtenant_id) \\"},{"line_number":873,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":874,"context_line":""},{"line_number":875,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_6fee14b6","line":872,"in_reply_to":"fa98f980_068dea7b","updated":"2014-09-02 21:15:50.000000000","message":"Will address in next patch. Details are as mentioned above.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":949,"context_line":"        functions in BaseRepo class."},{"line_number":950,"context_line":"        \"\"\""},{"line_number":951,"context_line":"        return session.query(models.Order) \\"},{"line_number":952,"context_line":"            .filter_by(tenant_id\u003dtenant_id) \\"},{"line_number":953,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":954,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_26e90e1b","line":951,"updated":"2014-08-31 03:36:03.000000000","message":"yep - backslashes again.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":949,"context_line":"        functions in BaseRepo class."},{"line_number":950,"context_line":"        \"\"\""},{"line_number":951,"context_line":"        return session.query(models.Order) \\"},{"line_number":952,"context_line":"            .filter_by(tenant_id\u003dtenant_id) \\"},{"line_number":953,"context_line":"            .filter_by(deleted\u003dFalse)"},{"line_number":954,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_8f2c1804","line":951,"in_reply_to":"fa98f980_26e90e1b","updated":"2014-09-02 21:15:50.000000000","message":"Will address in next patch. Details are as mentioned above.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":1057,"context_line":"        functions in BaseRepo class."},{"line_number":1058,"context_line":"        \"\"\""},{"line_number":1059,"context_line":"        return session.query(models.Container) \\"},{"line_number":1060,"context_line":"            .filter_by(deleted\u003dFalse) \\"},{"line_number":1061,"context_line":"            .filter_by(tenant_id\u003dtenant_id)"},{"line_number":1062,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_46ee1224","line":1059,"updated":"2014-08-31 03:36:03.000000000","message":"backslashes","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":1057,"context_line":"        functions in BaseRepo class."},{"line_number":1058,"context_line":"        \"\"\""},{"line_number":1059,"context_line":"        return session.query(models.Container) \\"},{"line_number":1060,"context_line":"            .filter_by(deleted\u003dFalse) \\"},{"line_number":1061,"context_line":"            .filter_by(tenant_id\u003dtenant_id)"},{"line_number":1062,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_cf362052","line":1059,"in_reply_to":"fa98f980_46ee1224","updated":"2014-09-02 21:15:50.000000000","message":"Will address in next patch. Details are as mentioned above.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ff355d96c2ff6d3c8a30e07da52c7fc579167ccf","unresolved":false,"context_lines":[{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        session \u003d self.get_session(session)"},{"line_number":550,"context_line":"        query \u003d self._build_get_project_entities_query(tenant_id, session)"},{"line_number":551,"context_line":"        return query.all() if query else []"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def delete_project_entities(self, tenant_id,"},{"line_number":554,"context_line":"                                suppress_exception\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_af02236d","line":551,"updated":"2014-09-08 11:57:54.000000000","message":"please expand to the canonical (or verbose) form of this:\n\nif query:\n    return query.all()\nelse\n    return []\n\nSince the inline version you used doesn\u0027t properly show the code coverage.","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7331757bfd74a46fe6421af0d02e7af239fa7aa3","unresolved":false,"context_lines":[{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        session \u003d self.get_session(session)"},{"line_number":550,"context_line":"        query \u003d self._build_get_project_entities_query(tenant_id, session)"},{"line_number":551,"context_line":"        return query.all() if query else []"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def delete_project_entities(self, tenant_id,"},{"line_number":554,"context_line":"                                suppress_exception\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_244abf27","line":551,"in_reply_to":"fa98f980_af02236d","updated":"2014-09-08 18:52:46.000000000","message":"Okay will change it.","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"c9ae581841cd499c4c9d56d9e090b8fb7853ec60","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    return offset, limit"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"def delete_all_project_resources(tenant_id, repos):"},{"line_number":245,"context_line":"    \"\"\"Logic to cleanup all project resources."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    This cleanup uses same alchemy session to perform all db operations as a"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_aad1fcce","line":244,"updated":"2014-09-09 14:46:02.000000000","message":"Nit, I think we should replace tenant_id with project _id. After all everywhere we are calling it project.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b05014ef3450018584fbceeca8192e58f98c87cf","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    return offset, limit"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"def delete_all_project_resources(tenant_id, repos):"},{"line_number":245,"context_line":"    \"\"\"Logic to cleanup all project resources."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    This cleanup uses same alchemy session to perform all db operations as a"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_4ce8a57c","line":244,"in_reply_to":"fa98f980_aad1fcce","updated":"2014-09-09 19:54:31.000000000","message":"Actually this is *not* project_id. Its the value of \u0027id\u0027 field in barbican tenants table which is a indirect reference to keystone project id. That\u0027s why I avoided using project_id reference and kept it as tenant_id.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"c9ae581841cd499c4c9d56d9e090b8fb7853ec60","unresolved":false,"context_lines":[{"line_number":516,"context_line":"            if getattr(entity_ref, k) !\u003d values[k]:"},{"line_number":517,"context_line":"                setattr(entity_ref, k, values[k])"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def _build_get_project_entities_query(self, tenant_id, session):"},{"line_number":520,"context_line":"        \"\"\"Sub-class hook: build a query to retrieve entities for a given"},{"line_number":521,"context_line":"        project."},{"line_number":522,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_2a4eecc1","line":519,"updated":"2014-09-09 14:46:02.000000000","message":"Nit, I think we should replace tenant_id with project _id. After all everywhere we are calling it project.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b05014ef3450018584fbceeca8192e58f98c87cf","unresolved":false,"context_lines":[{"line_number":516,"context_line":"            if getattr(entity_ref, k) !\u003d values[k]:"},{"line_number":517,"context_line":"                setattr(entity_ref, k, values[k])"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def _build_get_project_entities_query(self, tenant_id, session):"},{"line_number":520,"context_line":"        \"\"\"Sub-class hook: build a query to retrieve entities for a given"},{"line_number":521,"context_line":"        project."},{"line_number":522,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_ecbeb9ad","line":519,"in_reply_to":"fa98f980_2a4eecc1","updated":"2014-09-09 19:54:31.000000000","message":"Actually this is *not* project_id. Its the value of \u0027id\u0027 field in barbican tenants table which is a indirect reference to keystone project id. That\u0027s why I avoided using project_id reference and kept it as tenant_id.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"c9ae581841cd499c4c9d56d9e090b8fb7853ec60","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                  \"entities.\").format(self._do_entity_name())"},{"line_number":534,"context_line":"        raise NotImplementedError(msg)"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def get_project_entities(self, tenant_id, session\u003dNone):"},{"line_number":537,"context_line":"        \"\"\"Gets entities associated with a given project."},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_eada24e8","line":536,"updated":"2014-09-09 14:46:02.000000000","message":"Nit, I think we should replace tenant_id with project _id. After all everywhere we are calling it project.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b05014ef3450018584fbceeca8192e58f98c87cf","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                  \"entities.\").format(self._do_entity_name())"},{"line_number":534,"context_line":"        raise NotImplementedError(msg)"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def get_project_entities(self, tenant_id, session\u003dNone):"},{"line_number":537,"context_line":"        \"\"\"Gets entities associated with a given project."},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_0cc77d13","line":536,"in_reply_to":"fa98f980_eada24e8","updated":"2014-09-09 19:54:31.000000000","message":"Actually this is *not* project_id. Its the value of \u0027id\u0027 field in barbican tenants table which is a indirect reference to keystone project id. That\u0027s why I avoided using project_id reference and kept it as tenant_id.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"c9ae581841cd499c4c9d56d9e090b8fb7853ec60","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        else:"},{"line_number":554,"context_line":"            return []"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def delete_project_entities(self, tenant_id,"},{"line_number":557,"context_line":"                                suppress_exception\u003dFalse,"},{"line_number":558,"context_line":"                                session\u003dNone):"},{"line_number":559,"context_line":"        \"\"\"Deletes entities for a given project."}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_aa5adc80","line":556,"updated":"2014-09-09 14:46:02.000000000","message":"Nit, I think we should replace tenant_id with project _id. After all everywhere we are calling it project.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b05014ef3450018584fbceeca8192e58f98c87cf","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        else:"},{"line_number":554,"context_line":"            return []"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def delete_project_entities(self, tenant_id,"},{"line_number":557,"context_line":"                                suppress_exception\u003dFalse,"},{"line_number":558,"context_line":"                                session\u003dNone):"},{"line_number":559,"context_line":"        \"\"\"Deletes entities for a given project."}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_6ceba978","line":556,"in_reply_to":"fa98f980_aa5adc80","updated":"2014-09-09 19:54:31.000000000","message":"Actually this is *not* project_id. Its the value of \u0027id\u0027 field in barbican tenants table which is a indirect reference to keystone project id. That\u0027s why I avoided using project_id reference and kept it as tenant_id.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            tenant_id, suppress_exception\u003dFalse, session\u003dsession)"},{"line_number":263,"context_line":"        # secret children SecretStoreMetadatum, EncryptedDatum"},{"line_number":264,"context_line":"        # and container_secrets are deleted as part of secret delete"},{"line_number":265,"context_line":"        repos.secret_repo.delete_project_entities("},{"line_number":266,"context_line":"            tenant_id, suppress_exception\u003dFalse, session\u003dsession)"},{"line_number":267,"context_line":"        repos.kek_repo.delete_project_entities("},{"line_number":268,"context_line":"            tenant_id, suppress_exception\u003dFalse, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_ee76e6d7","line":265,"updated":"2014-09-30 01:36:10.000000000","message":"just a question here - should we do this AFTER tenant_secret?  Does it matter?","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"4023846112d959218c393c5d7525e13edaef9904","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            tenant_id, suppress_exception\u003dFalse, session\u003dsession)"},{"line_number":263,"context_line":"        # secret children SecretStoreMetadatum, EncryptedDatum"},{"line_number":264,"context_line":"        # and container_secrets are deleted as part of secret delete"},{"line_number":265,"context_line":"        repos.secret_repo.delete_project_entities("},{"line_number":266,"context_line":"            tenant_id, suppress_exception\u003dFalse, session\u003dsession)"},{"line_number":267,"context_line":"        repos.kek_repo.delete_project_entities("},{"line_number":268,"context_line":"            tenant_id, suppress_exception\u003dFalse, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_42ffb734","line":265,"in_reply_to":"baa201ad_ee76e6d7","updated":"2014-09-30 14:21:39.000000000","message":"I don\u0027t think it matters as this is being performed in a SQLAlchemy transaction.","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        :returns: A query object for getting all project related entities"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"        This query is used by `get_project_entities` and"},{"line_number":537,"context_line":"        `delete_project_entities` functions in BaseRepo class."},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        This will filter deleted entities if there."},{"line_number":540,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_ae44de74","line":537,"updated":"2014-09-30 01:36:10.000000000","message":"always dangerous to put things like this in a comment...as soon as someone refactors then this comment will be obsolete.  I would say remove it - easy enough to find who uses this function.","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"4023846112d959218c393c5d7525e13edaef9904","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        :returns: A query object for getting all project related entities"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"        This query is used by `get_project_entities` and"},{"line_number":537,"context_line":"        `delete_project_entities` functions in BaseRepo class."},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"        This will filter deleted entities if there."},{"line_number":540,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_2289d3ca","line":537,"in_reply_to":"baa201ad_ae44de74","updated":"2014-09-30 14:21:39.000000000","message":"Ha, I see Juan has already gotten after this, so not an issue for this CR.","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":728,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":729,"context_line":"        :param session: existing db session reference."},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":732,"context_line":"        functions in BaseRepo class."},{"line_number":733,"context_line":"        \"\"\""},{"line_number":734,"context_line":"        query \u003d session.query(models.Secret).filter_by(deleted\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_ae121e60","line":731,"updated":"2014-09-30 01:36:10.000000000","message":"same comment as above","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":863,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":864,"context_line":"        :param session: existing db session reference."},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":867,"context_line":"        functions in BaseRepo class."},{"line_number":868,"context_line":"        \"\"\""},{"line_number":869,"context_line":"        return session.query(models.KEKDatum).filter_by("}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_4e2c52ac","line":866,"updated":"2014-09-30 01:36:10.000000000","message":"same comment as above - do we need this here?","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":894,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":895,"context_line":"        :param session: existing db session reference."},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":898,"context_line":"        functions in BaseRepo class."},{"line_number":899,"context_line":"        \"\"\""},{"line_number":900,"context_line":"        return session.query(models.TenantSecret).filter_by("}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_6e183685","line":897,"updated":"2014-09-30 01:36:10.000000000","message":"same comment as above","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":976,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":977,"context_line":"        :param session: existing db session reference."},{"line_number":978,"context_line":""},{"line_number":979,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":980,"context_line":"        functions in BaseRepo class."},{"line_number":981,"context_line":"        \"\"\""},{"line_number":982,"context_line":"        return session.query(models.Order).filter_by("}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_ee0b4629","line":979,"updated":"2014-09-30 01:36:10.000000000","message":"same comment as above","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"        :param tenant_id: id of barbican tenant (project) entity"},{"line_number":1107,"context_line":"        :param session: existing db session reference."},{"line_number":1108,"context_line":""},{"line_number":1109,"context_line":"        This query is used by get_project_entities and delete_project_entities"},{"line_number":1110,"context_line":"        functions in BaseRepo class."},{"line_number":1111,"context_line":"        \"\"\""},{"line_number":1112,"context_line":"        return session.query(models.Container).filter_by("}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_2e062e21","line":1109,"updated":"2014-09-30 01:36:10.000000000","message":"same comment as above","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"},{"author":{"_account_id":27385,"name":"lvxianguo","email":"lvxianguo@inspur.com","username":"lvxianguo"},"change_message_id":"5670734aa1d6bd8664a89775f2deac9522bc2b7a","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    \"\"\""},{"line_number":303,"context_line":"    session \u003d get_session()"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    repos.container_repo.delete_project_entities("},{"line_number":306,"context_line":"        tenant_id, suppress_exception\u003dFalse, session\u003dsession)"},{"line_number":307,"context_line":"    # secret children SecretStoreMetadatum, EncryptedDatum"},{"line_number":308,"context_line":"    # and container_secrets are deleted as part of secret delete"}],"source_content_type":"text/x-python","patch_set":24,"id":"df87a7cf_1a045a49","line":305,"range":{"start_line":305,"start_character":25,"end_line":305,"end_character":48},"updated":"2017-12-20 08:32:19.000000000","message":"is here need to ensure the project exist？","commit_id":"758904848fef8ede9b248d8cb303cef94e6ed9bf"},{"author":{"_account_id":7136,"name":"Chad Lung","email":"chad.lung@gmail.com","username":"chadlung"},"change_message_id":"c8b247a8e43189b4ad64fcaec638fd961941bf67","unresolved":false,"context_lines":[{"line_number":572,"context_line":"        This query is used by `get_project_entities` and"},{"line_number":573,"context_line":"        `delete_project_entities` functions in BaseRepo class."},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        This will filter deleted entities if there."},{"line_number":576,"context_line":"        \"\"\""},{"line_number":577,"context_line":"        msg \u003d u._(\"{0} is missing query build method for get project \""},{"line_number":578,"context_line":"                  \"entities.\").format(self._do_entity_name())"}],"source_content_type":"text/x-python","patch_set":24,"id":"baa201ad_ee845f0c","line":575,"updated":"2014-10-08 14:58:43.000000000","message":"\"This will filter deleted entities if there\" -\u003e \"This will filter deleted entities if present\"","commit_id":"758904848fef8ede9b248d8cb303cef94e6ed9bf"}],"barbican/queue/__init__.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"               help\u003du._(\u0027Server name for RPC task processing server\u0027)),"},{"line_number":46,"context_line":"]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"ks_queue_opt_group \u003d cfg.OptGroup(name\u003d\u0027keystone_notifications\u0027,"},{"line_number":49,"context_line":"                                  title\u003d\u0027Keystone Notification Options\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"ks_queue_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_87c4d794","line":48,"updated":"2014-08-03 00:18:18.000000000","message":"Are there any issues here for HA?  Or is this all handled by the rest of the Barbican queueing HA?","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                        \u0027 the transport_url option.\u0027)),"},{"line_number":61,"context_line":"    cfg.StrOpt(\u0027topic\u0027, default\u003d\u0027notifications\u0027,"},{"line_number":62,"context_line":"               help\u003du._(\"Keystone notification queue topic name. This name \""},{"line_number":63,"context_line":"                        \"needs to match with one of value mentioned in \""},{"line_number":64,"context_line":"                        \" Keystone deployment\\\u0027s \u0027notification_topics\u0027 \""},{"line_number":65,"context_line":"                        \" configuration e.g.\""},{"line_number":66,"context_line":"                        \"    notification_topics\u003dnotifications, \""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_df42733a","line":63,"updated":"2014-08-07 14:23:15.000000000","message":"\"needs to match one of the values mentioned in\" would sound better","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                        \u0027 the transport_url option.\u0027)),"},{"line_number":61,"context_line":"    cfg.StrOpt(\u0027topic\u0027, default\u003d\u0027notifications\u0027,"},{"line_number":62,"context_line":"               help\u003du._(\"Keystone notification queue topic name. This name \""},{"line_number":63,"context_line":"                        \"needs to match with one of value mentioned in \""},{"line_number":64,"context_line":"                        \" Keystone deployment\\\u0027s \u0027notification_topics\u0027 \""},{"line_number":65,"context_line":"                        \" configuration e.g.\""},{"line_number":66,"context_line":"                        \"    notification_topics\u003dnotifications, \""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_50ce502e","line":63,"in_reply_to":"baada198_df42733a","updated":"2014-08-07 15:44:44.000000000","message":"Okay. Will address in next patch.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def get_server(target, endpoints, serializer\u003dNone):"},{"line_number":136,"context_line":"    assert TRANSPORT is not None"},{"line_number":137,"context_line":"    return messaging.get_rpc_server(TRANSPORT,"},{"line_number":138,"context_line":"                                    target,"},{"line_number":139,"context_line":"                                    endpoints,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_9f8d5b80","line":136,"updated":"2014-08-07 14:23:15.000000000","message":"I see we set TRANSPORT\u003dNone above - how does it get set to an actual value?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def get_server(target, endpoints, serializer\u003dNone):"},{"line_number":136,"context_line":"    assert TRANSPORT is not None"},{"line_number":137,"context_line":"    return messaging.get_rpc_server(TRANSPORT,"},{"line_number":138,"context_line":"                                    target,"},{"line_number":139,"context_line":"                                    endpoints,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_10b9387c","line":136,"in_reply_to":"baada198_9f8d5b80","updated":"2014-08-07 15:44:44.000000000","message":"Its initialized by init(...) method, specifically line # 105 in this file. This init is called by startup logic.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    # barbican functionality like async order processing"},{"line_number":155,"context_line":"    # Assumption is that messaging infrastructure is going to be shared (same)"},{"line_number":156,"context_line":"    # among different barbican features."},{"line_number":157,"context_line":"    assert TRANSPORT is not None"},{"line_number":158,"context_line":"    allow_requeue \u003d CONF.keystone_notifications.allow_requeue"},{"line_number":159,"context_line":"    TRANSPORT._require_driver_features(requeue\u003dallow_requeue)"},{"line_number":160,"context_line":"    dispatcher \u003d notfiy_dispatcher.NotificationDispatcher(targets, endpoints,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3ff0cffc","line":157,"updated":"2014-08-07 14:23:15.000000000","message":"same as above","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    # barbican functionality like async order processing"},{"line_number":155,"context_line":"    # Assumption is that messaging infrastructure is going to be shared (same)"},{"line_number":156,"context_line":"    # among different barbican features."},{"line_number":157,"context_line":"    assert TRANSPORT is not None"},{"line_number":158,"context_line":"    allow_requeue \u003d CONF.keystone_notifications.allow_requeue"},{"line_number":159,"context_line":"    TRANSPORT._require_driver_features(requeue\u003dallow_requeue)"},{"line_number":160,"context_line":"    dispatcher \u003d notfiy_dispatcher.NotificationDispatcher(targets, endpoints,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_50b3b099","line":157,"in_reply_to":"baada198_3ff0cffc","updated":"2014-08-07 15:44:44.000000000","message":"Please see above reply.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               help\u003du._(\u0027The default exchange under which topics are scoped. \u0027"},{"line_number":60,"context_line":"                        \u0027May be overridden by an exchange name specified in \u0027"},{"line_number":61,"context_line":"                        \u0027 the transport_url option.\u0027)),"},{"line_number":62,"context_line":"    cfg.StrOpt(\u0027topic\u0027, default\u003d\u0027notifications\u0027,"},{"line_number":63,"context_line":"               help\u003du._(\"Keystone notification queue topic name. This name \""},{"line_number":64,"context_line":"                        \"needs to match one of values mentioned in Keystone \""},{"line_number":65,"context_line":"                        \"deployment\\\u0027s \u0027notification_topics\u0027 configuration \""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_86463a22","line":62,"updated":"2014-08-31 03:36:03.000000000","message":"default in the config is barbican_notifications.  We should match.\n\nhttps://review.openstack.org/#/c/110817/13/etc/barbican/barbican-api.conf","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               help\u003du._(\u0027The default exchange under which topics are scoped. \u0027"},{"line_number":60,"context_line":"                        \u0027May be overridden by an exchange name specified in \u0027"},{"line_number":61,"context_line":"                        \u0027 the transport_url option.\u0027)),"},{"line_number":62,"context_line":"    cfg.StrOpt(\u0027topic\u0027, default\u003d\u0027notifications\u0027,"},{"line_number":63,"context_line":"               help\u003du._(\"Keystone notification queue topic name. This name \""},{"line_number":64,"context_line":"                        \"needs to match one of values mentioned in Keystone \""},{"line_number":65,"context_line":"                        \"deployment\\\u0027s \u0027notification_topics\u0027 configuration \""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_af163ca5","line":62,"in_reply_to":"fa98f980_86463a22","updated":"2014-09-02 21:15:50.000000000","message":"Will address in next patch.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ff355d96c2ff6d3c8a30e07da52c7fc579167ccf","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    # barbican functionality like async order processing"},{"line_number":157,"context_line":"    # Assumption is that messaging infrastructure is going to be shared (same)"},{"line_number":158,"context_line":"    # among different barbican features."},{"line_number":159,"context_line":"    assert TRANSPORT is not None"},{"line_number":160,"context_line":"    allow_requeue \u003d getattr(getattr(CONF, KS_NOTIFICATIONS_GRP_NAME),"},{"line_number":161,"context_line":"                            \u0027allow_requeue\u0027)"},{"line_number":162,"context_line":"    TRANSPORT._require_driver_features(requeue\u003dallow_requeue)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_5b02560c","line":159,"updated":"2014-09-08 11:57:54.000000000","message":"I\u0027m against using asserts in production code (though I acknowledge they\u0027re good for debugging purposes). Since it does not necessarily run; as specificed in the documentation [1]. If you really want to check for TRANSPORT not being None, I suggest a simple if...else.\n\n[1] https://docs.python.org/2/reference/simple_stmts.html#the-assert-statement","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7331757bfd74a46fe6421af0d02e7af239fa7aa3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    # barbican functionality like async order processing"},{"line_number":157,"context_line":"    # Assumption is that messaging infrastructure is going to be shared (same)"},{"line_number":158,"context_line":"    # among different barbican features."},{"line_number":159,"context_line":"    assert TRANSPORT is not None"},{"line_number":160,"context_line":"    allow_requeue \u003d getattr(getattr(CONF, KS_NOTIFICATIONS_GRP_NAME),"},{"line_number":161,"context_line":"                            \u0027allow_requeue\u0027)"},{"line_number":162,"context_line":"    TRANSPORT._require_driver_features(requeue\u003dallow_requeue)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_4950be5e","line":159,"in_reply_to":"fa98f980_5b02560c","updated":"2014-09-08 18:52:46.000000000","message":"In barbican code, assert statement is used in number of places. Its just checking pre-condition before usage of TRANSPORT (kind of defensive programming) and seems like a good candidate for assert usage. Even order processing logic has the similar assert.\nI am not too adamant on keeping this but IMHO it seems legit usage of assert here. Not sure where else \u0027assert\u0027 kind of checks should be used then?","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"36700854edd7a814d8ba2f9a9357b50ba58a8ba7","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"def get_notification_server(targets, endpoints,"},{"line_number":154,"context_line":"                            serializer\u003dNone):"},{"line_number":155,"context_line":"    # Notification server uses same transport configuration as used by other"},{"line_number":156,"context_line":"    # barbican functionality like async order processing"},{"line_number":157,"context_line":"    # Assumption is that messaging infrastructure is going to be shared (same)"},{"line_number":158,"context_line":"    # among different barbican features."}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_acff8700","line":155,"updated":"2014-09-30 01:36:10.000000000","message":"any reason this isn\u0027t a docstring?","commit_id":"f21ce3ec1057f978643aaf028f35ee810d4a5f53"}],"barbican/queue/keystone_listener.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class NotificationTask(object):"},{"line_number":31,"context_line":"    \"\"\"Notification task which exposes API for consuming priority based"},{"line_number":32,"context_line":"    notifications."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Oslo notification framework delivers notifications based on priority to"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_5a504cd4","line":31,"updated":"2014-08-26 16:10:06.000000000","message":"- the API","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class NotificationTask(object):"},{"line_number":31,"context_line":"    \"\"\"Notification task which exposes API for consuming priority based"},{"line_number":32,"context_line":"    notifications."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Oslo notification framework delivers notifications based on priority to"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_ee015a6b","line":31,"in_reply_to":"1abeadc6_5a504cd4","updated":"2014-08-26 18:05:52.000000000","message":"Okay. Will add this in next patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \"\"\"Notification task which exposes API for consuming priority based"},{"line_number":32,"context_line":"    notifications."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Oslo notification framework delivers notifications based on priority to"},{"line_number":35,"context_line":"    matching callback APIs as defined in its notification listener endpoint"},{"line_number":36,"context_line":"    list."},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_9a0824db","line":34,"updated":"2014-08-26 16:10:06.000000000","message":"The Oslo notification","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \"\"\"Notification task which exposes API for consuming priority based"},{"line_number":32,"context_line":"    notifications."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Oslo notification framework delivers notifications based on priority to"},{"line_number":35,"context_line":"    matching callback APIs as defined in its notification listener endpoint"},{"line_number":36,"context_line":"    list."},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_4ef24e9b","line":34,"in_reply_to":"1abeadc6_9a0824db","updated":"2014-08-26 18:05:52.000000000","message":"Okay. Will add this in next patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def process_event(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":52,"context_line":"        \"\"\"Process Keystone Event based on event_type and payload data."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        Parses notification data to identify if event is related to delete"},{"line_number":55,"context_line":"        project or not. In case of delete project event, it passes project_id"},{"line_number":56,"context_line":"        to KsEventConsumer logic for further processing. Barbican service is"},{"line_number":57,"context_line":"        not interested in other events so in that case it just returns None"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_7a2c284b","line":54,"updated":"2014-08-26 16:10:06.000000000","message":"- the event","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def process_event(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":52,"context_line":"        \"\"\"Process Keystone Event based on event_type and payload data."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        Parses notification data to identify if event is related to delete"},{"line_number":55,"context_line":"        project or not. In case of delete project event, it passes project_id"},{"line_number":56,"context_line":"        to KsEventConsumer logic for further processing. Barbican service is"},{"line_number":57,"context_line":"        not interested in other events so in that case it just returns None"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_6eed4ab7","line":54,"in_reply_to":"1abeadc6_7a2c284b","updated":"2014-08-26 18:05:52.000000000","message":"Okay. Will add this in next patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        Messaging server considers message is acknowledged when either return"},{"line_number":61,"context_line":"        value is `messaging.NotificationResult.HANDLED` or None."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        In case of successful processing of notification, returned value is"},{"line_number":64,"context_line":"        `messaging.NotificationResult.HANDLED`"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        In case of notification processing error, value returned is"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_7ad34838","line":63,"updated":"2014-08-26 16:10:06.000000000","message":"- the returned value","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        Messaging server considers message is acknowledged when either return"},{"line_number":61,"context_line":"        value is `messaging.NotificationResult.HANDLED` or None."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        In case of successful processing of notification, returned value is"},{"line_number":64,"context_line":"        `messaging.NotificationResult.HANDLED`"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        In case of notification processing error, value returned is"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_ce357e47","line":63,"in_reply_to":"1abeadc6_7ad34838","updated":"2014-08-26 18:05:52.000000000","message":"Okay. Will add this in next patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        In case of successful processing of notification, returned value is"},{"line_number":64,"context_line":"        `messaging.NotificationResult.HANDLED`"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        In case of notification processing error, value returned is"},{"line_number":67,"context_line":"        messaging.NotificationResult.REQUEUE when transport supports this"},{"line_number":68,"context_line":"        feature otherwise `messaging.NotificationResult.HANDLED` is returned."},{"line_number":69,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_badde044","line":66,"updated":"2014-08-26 16:10:06.000000000","message":"- the value","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        In case of successful processing of notification, returned value is"},{"line_number":64,"context_line":"        `messaging.NotificationResult.HANDLED`"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        In case of notification processing error, value returned is"},{"line_number":67,"context_line":"        messaging.NotificationResult.REQUEUE when transport supports this"},{"line_number":68,"context_line":"        feature otherwise `messaging.NotificationResult.HANDLED` is returned."},{"line_number":69,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_ee387a3f","line":66,"in_reply_to":"1abeadc6_badde044","updated":"2014-08-26 18:05:52.000000000","message":"Okay. Will add this in next patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    result \u003d messaging.NotificationResult.REQUEUE"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    result \u003d messaging.NotificationResult.HANDLED"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _parse_event_type(self, event_type):"},{"line_number":101,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_1ac97479","line":98,"updated":"2014-08-26 16:10:06.000000000","message":"I would get rid of the `result` variably, and just return the NotificationResult in place.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1f8e5e681051d520e3b423be2cf31dfd9ceb5477","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    result \u003d messaging.NotificationResult.REQUEUE"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    result \u003d messaging.NotificationResult.HANDLED"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _parse_event_type(self, event_type):"},{"line_number":101,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_42702772","line":98,"in_reply_to":"1abeadc6_0cf666f9","updated":"2014-08-27 22:09:34.000000000","message":"Well, I changed the method in next patch as per Juan suggestion. I can easily revert it if preference is the way its implemented in this patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    result \u003d messaging.NotificationResult.REQUEUE"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    result \u003d messaging.NotificationResult.HANDLED"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _parse_event_type(self, event_type):"},{"line_number":101,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_692f0489","line":98,"in_reply_to":"1abeadc6_1ac97479","updated":"2014-08-26 18:05:52.000000000","message":"Out of habit, following single return approach. Also was trying to differentiate between \"processed event\" vs \"different event type\" case.\n\nIf its confusing, I can certainly change that.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8d7eeaad108e2c0f8519a39e58b7c272176f387","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                    result \u003d messaging.NotificationResult.REQUEUE"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    result \u003d messaging.NotificationResult.HANDLED"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def _parse_event_type(self, event_type):"},{"line_number":101,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_0cf666f9","line":98,"in_reply_to":"1abeadc6_692f0489","updated":"2014-08-27 21:29:31.000000000","message":"Well, returns from the middle of longer methods can be a little confusing as well. I\u0027d prefer the return-local approach for this method. Thoughts though?","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            identity.domain.updated"},{"line_number":108,"context_line":"            identity.authenticate"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        resource_type \u003d operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            if len(type_list) \u003e 2:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_daae1c98","line":110,"updated":"2014-08-26 16:10:06.000000000","message":"nit: Even though this is legal in python, I would prefer to have this expanded to avoid any confusion.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            identity.domain.updated"},{"line_number":108,"context_line":"            identity.authenticate"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        resource_type \u003d operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            if len(type_list) \u003e 2:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_4e208ef7","line":110,"in_reply_to":"1abeadc6_daae1c98","updated":"2014-08-26 18:05:52.000000000","message":"Okay. Will add it in separate line.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        resource_type \u003d operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            if len(type_list) \u003e 2:"},{"line_number":114,"context_line":"                resource_type \u003d type_list[-2].lower()"},{"line_number":115,"context_line":"                operation_type \u003d type_list[-1].lower()"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_7a2b48eb","line":113,"updated":"2014-08-26 16:10:06.000000000","message":"what does this number two represent? I would rather have this as a constant so the intent is expressed explicitly.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        resource_type \u003d operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            if len(type_list) \u003e 2:"},{"line_number":114,"context_line":"                resource_type \u003d type_list[-2].lower()"},{"line_number":115,"context_line":"                operation_type \u003d type_list[-1].lower()"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_c9b018e0","line":113,"in_reply_to":"1abeadc6_7a2b48eb","updated":"2014-08-26 18:05:52.000000000","message":"Check is to make sure that event type data is in expected format. 2 is the min. number of dot delimiters in event_type string.\n\nI was thinking that samples provided in doctstring will help in understanding this aspect.\n\nIts internal logic so constant would not be used anywhere else. Are you okay if I add following comment before this line.\n# 2 is number of dot delimiters expected in event_type value.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8d7eeaad108e2c0f8519a39e58b7c272176f387","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        resource_type \u003d operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            if len(type_list) \u003e 2:"},{"line_number":114,"context_line":"                resource_type \u003d type_list[-2].lower()"},{"line_number":115,"context_line":"                operation_type \u003d type_list[-1].lower()"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_2cc5e28d","line":113,"in_reply_to":"1abeadc6_c9b018e0","updated":"2014-08-27 21:29:31.000000000","message":"That would work for me, Arun.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"452aadd7966f4c7db6908e7f52c3cbe3b0a23de3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                    return messaging.NotificationResult.REQUEUE"},{"line_number":95,"context_line":"                else:"},{"line_number":96,"context_line":"                    return messaging.NotificationResult.HANDLED"},{"line_number":97,"context_line":"        return None  # in case event is not project delete"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _parse_event_type(self, event_type):"},{"line_number":100,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_8ab6c93c","line":97,"updated":"2014-08-28 07:46:18.000000000","message":"I actually prefer this style better. The function is not long, so it\u0027s not an issue to have the multiple return statements.\n\nI do agree with John that this wouldn\u0027t work if the function was longer, but I think functions shouldn\u0027t be long to start with, and when they are, they should be refactored :D .","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"521f37ea09cf0f296b29fce9f057621e9ca8a79e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                    return messaging.NotificationResult.REQUEUE"},{"line_number":95,"context_line":"                else:"},{"line_number":96,"context_line":"                    return messaging.NotificationResult.HANDLED"},{"line_number":97,"context_line":"        return None  # in case event is not project delete"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _parse_event_type(self, event_type):"},{"line_number":100,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_840b0b23","line":97,"in_reply_to":"1abeadc6_8ab6c93c","updated":"2014-08-28 16:37:46.000000000","message":"That\u0027s cool. Jvrbanac might disagree though?","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"452aadd7966f4c7db6908e7f52c3cbe3b0a23de3","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            # 2 is min. number of dot delimiters expected in event_type value."},{"line_number":114,"context_line":"            if len(type_list) \u003e 2:"},{"line_number":115,"context_line":"                resource_type \u003d type_list[-2].lower()"},{"line_number":116,"context_line":"                operation_type \u003d type_list[-1].lower()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_2a7f7567","line":113,"updated":"2014-08-28 07:46:18.000000000","message":"I usually don\u0027t like comments on the code (only documenting the functions) but I\u0027m fine with this :)","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"521f37ea09cf0f296b29fce9f057621e9ca8a79e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        operation_type \u003d None"},{"line_number":111,"context_line":"        if event_type:"},{"line_number":112,"context_line":"            type_list \u003d event_type.split(\u0027.\u0027)"},{"line_number":113,"context_line":"            # 2 is min. number of dot delimiters expected in event_type value."},{"line_number":114,"context_line":"            if len(type_list) \u003e 2:"},{"line_number":115,"context_line":"                resource_type \u003d type_list[-2].lower()"},{"line_number":116,"context_line":"                operation_type \u003d type_list[-1].lower()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_e4191f7b","line":113,"in_reply_to":"1abeadc6_2a7f7567","updated":"2014-08-28 16:37:46.000000000","message":"Agreed.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"}],"barbican/queue/ks_listener.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def wait(self):"},{"line_number":126,"context_line":"        super(MessageServer, self).wait()"},{"line_number":127,"context_line":"        # self._msg_server.wait()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_673a6399","line":127,"updated":"2014-08-03 00:18:18.000000000","message":"was this for debug?","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"6d7ae1d557501d24ba5f040a89be759c56bb1eab","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # Create an oslo messaging server, that calls back on to this class"},{"line_number":109,"context_line":"        # instance to pass severity based notifications to related API"},{"line_number":110,"context_line":"        # mentioned in endpoint API"},{"line_number":111,"context_line":"        # , warn(...) or error(...) as mentioned in extended Tasks class above."},{"line_number":112,"context_line":"        self._msg_server \u003d queue.get_notification_server(self.transport,"},{"line_number":113,"context_line":"                                                         targets\u003d[self.target],"},{"line_number":114,"context_line":"                                                         endpoints\u003d[self])"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_529de6b9","line":111,"updated":"2014-08-05 00:45:13.000000000","message":"might want to reword this - confusing.","commit_id":"0d987791958d4e85220663d8abf495553ceda543"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    list."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    Currently from Keystone perspective, `info` API is sufficient as Keystone"},{"line_number":39,"context_line":"    sends notification at `info` priority only. Other APIs are just added in"},{"line_number":40,"context_line":"    case if Keystone decides to change it as Oslo messaging supports"},{"line_number":41,"context_line":"    notification delivery at `info`, `warn` and `error` priority."},{"line_number":42,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_dffa73b9","line":39,"updated":"2014-08-07 14:23:15.000000000","message":"nit - notifications (plural)","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    list."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    Currently from Keystone perspective, `info` API is sufficient as Keystone"},{"line_number":39,"context_line":"    sends notification at `info` priority only. Other APIs are just added in"},{"line_number":40,"context_line":"    case if Keystone decides to change it as Oslo messaging supports"},{"line_number":41,"context_line":"    notification delivery at `info`, `warn` and `error` priority."},{"line_number":42,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_f0a1243b","line":39,"in_reply_to":"baada198_dffa73b9","updated":"2014-08-07 15:44:44.000000000","message":"Will correct in next patch.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        \"\"\"Process Keystone Event based on event_type and payload data."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        Parses notification data to identify if event is related to delete"},{"line_number":63,"context_line":"        project or not? In case of delete project event, it passes project_id"},{"line_number":64,"context_line":"        to KsEventConsumer logic for further processing. Barbican service is"},{"line_number":65,"context_line":"        not interested in other events so in that case it just returns None"},{"line_number":66,"context_line":"        as acknowledgment."}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_ffcf3789","line":63,"updated":"2014-08-07 14:23:15.000000000","message":"nit - period not question mark.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        \"\"\"Process Keystone Event based on event_type and payload data."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        Parses notification data to identify if event is related to delete"},{"line_number":63,"context_line":"        project or not? In case of delete project event, it passes project_id"},{"line_number":64,"context_line":"        to KsEventConsumer logic for further processing. Barbican service is"},{"line_number":65,"context_line":"        not interested in other events so in that case it just returns None"},{"line_number":66,"context_line":"        as acknowledgment."}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_30639c1a","line":63,"in_reply_to":"baada198_ffcf3789","updated":"2014-08-07 15:44:44.000000000","message":"Will correct in next patch.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        In case of successful processing of notification, returned value is"},{"line_number":72,"context_line":"        `messaging.NotificationResult.HANDLED`"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        In case of notification processing error, the requeue is returned when"},{"line_number":75,"context_line":"        transport supports this feature otherwise acknowledgment"},{"line_number":76,"context_line":"        `messaging.NotificationResult.HANDLED` is returned."},{"line_number":77,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3fad2f85","line":74,"updated":"2014-08-07 14:23:15.000000000","message":"instead of \"the requeue\" should say \"messaging.NotificationResult.REQUEUE\"","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        In case of successful processing of notification, returned value is"},{"line_number":72,"context_line":"        `messaging.NotificationResult.HANDLED`"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        In case of notification processing error, the requeue is returned when"},{"line_number":75,"context_line":"        transport supports this feature otherwise acknowledgment"},{"line_number":76,"context_line":"        `messaging.NotificationResult.HANDLED` is returned."},{"line_number":77,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_706d1403","line":74,"in_reply_to":"baada198_3fad2f85","updated":"2014-08-07 15:44:44.000000000","message":"Okay. Will make it specific.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        LOG.debug(\"Input keystone event payload \u003d %s\", payload)"},{"line_number":81,"context_line":"        LOG.debug(\"Input keystone event type \u003d %s\", event_type)"},{"line_number":82,"context_line":"        LOG.debug(\"Input keystone event metadata \u003d %s\", metadata)"},{"line_number":83,"context_line":"        keystone_id \u003d self._parse_payload_for_project_id(payload)"},{"line_number":84,"context_line":"        resource_type, operation_type \u003d self._parse_event_type(event_type)"},{"line_number":85,"context_line":"        LOG.debug(\u0027Keystone Event: resource type\u003d{0}, operation type\u003d{1}, \u0027"},{"line_number":86,"context_line":"                  \u0027keystone id\u003d{2}\u0027.format(resource_type, operation_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_df96f348","line":83,"updated":"2014-08-07 14:23:15.000000000","message":"can we call this project_id rather than keystone_id?  Makes it clearer what kind of ID it is.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        LOG.debug(\"Input keystone event payload \u003d %s\", payload)"},{"line_number":81,"context_line":"        LOG.debug(\"Input keystone event type \u003d %s\", event_type)"},{"line_number":82,"context_line":"        LOG.debug(\"Input keystone event metadata \u003d %s\", metadata)"},{"line_number":83,"context_line":"        keystone_id \u003d self._parse_payload_for_project_id(payload)"},{"line_number":84,"context_line":"        resource_type, operation_type \u003d self._parse_event_type(event_type)"},{"line_number":85,"context_line":"        LOG.debug(\u0027Keystone Event: resource type\u003d{0}, operation type\u003d{1}, \u0027"},{"line_number":86,"context_line":"                  \u0027keystone id\u003d{2}\u0027.format(resource_type, operation_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_b06eccfc","line":83,"in_reply_to":"baada198_df96f348","updated":"2014-08-07 15:44:44.000000000","message":"Will change this in next patch.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                                           keystone_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        result \u003d None"},{"line_number":90,"context_line":"        if (keystone_id and resource_type \u003d\u003d \u0027project\u0027 and"},{"line_number":91,"context_line":"                operation_type \u003d\u003d \u0027deleted\u0027):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            task \u003d resources.KsEventConsumer()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3fe44fdf","line":90,"updated":"2014-08-07 14:23:15.000000000","message":"are the resource_type and operation_type guaranteed to always be lower case?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                                           keystone_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        result \u003d None"},{"line_number":90,"context_line":"        if (keystone_id and resource_type \u003d\u003d \u0027project\u0027 and"},{"line_number":91,"context_line":"                operation_type \u003d\u003d \u0027deleted\u0027):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            task \u003d resources.KsEventConsumer()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1015b84b","line":90,"in_reply_to":"baada198_3fe44fdf","updated":"2014-08-07 15:44:44.000000000","message":"Yes, it is lowercase in keystone.\nhttp://docs.openstack.org/developer/keystone/event_notifications.html","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"},{"line_number":110,"context_line":"        operation is performed and on which Keystone resource."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        Few of event type sample values are provided below::"},{"line_number":113,"context_line":"            identity.project.deleted"},{"line_number":114,"context_line":"            identity.role.created"},{"line_number":115,"context_line":"            identity.domain.updated"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_dfd273fc","line":112,"updated":"2014-08-07 14:23:15.000000000","message":"nit - \"A few event type sample values...\"","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        \"\"\"Parses event type provided as part of notification to identify what"},{"line_number":110,"context_line":"        operation is performed and on which Keystone resource."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        Few of event type sample values are provided below::"},{"line_number":113,"context_line":"            identity.project.deleted"},{"line_number":114,"context_line":"            identity.role.created"},{"line_number":115,"context_line":"            identity.domain.updated"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_70127462","line":112,"in_reply_to":"baada198_dfd273fc","updated":"2014-08-07 15:44:44.000000000","message":"Okay..will reword this.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"class MessageServer(NotificationTask, service.Service):"},{"line_number":140,"context_line":"    \"\"\"Server to retrieve messages from queue used by Keystone to sent public"},{"line_number":141,"context_line":"    notifications for openstack service consumption."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    This server is an Oslo notification server that exposes set of standard"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_9f363b4e","line":140,"updated":"2014-08-07 14:23:15.000000000","message":"\"to send\"","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"class MessageServer(NotificationTask, service.Service):"},{"line_number":140,"context_line":"    \"\"\"Server to retrieve messages from queue used by Keystone to sent public"},{"line_number":141,"context_line":"    notifications for openstack service consumption."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    This server is an Oslo notification server that exposes set of standard"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_eb2bf979","line":140,"in_reply_to":"baada198_9f363b4e","updated":"2014-08-07 15:44:44.000000000","message":"Actually here logic is at consumer end so its reading messages (notification) from queue. \"to send\" is more appropriate for producer end.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def wait(self):"},{"line_number":168,"context_line":"        super(MessageServer, self).wait()"},{"line_number":169,"context_line":"        # self._msg_server.wait()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7f696725","line":169,"updated":"2014-08-07 14:23:15.000000000","message":"dead code?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def wait(self):"},{"line_number":168,"context_line":"        super(MessageServer, self).wait()"},{"line_number":169,"context_line":"        # self._msg_server.wait()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_eb42193a","line":169,"in_reply_to":"baada198_7f696725","updated":"2014-08-07 15:44:44.000000000","message":"Yes..will remove commented line.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"09a370759d57fed73e346f888149f818a3bec5e4","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"class MessageServer(NotificationTask, service.Service):"},{"line_number":140,"context_line":"    \"\"\"Server to retrieve messages from queue used by Keystone to sent public"},{"line_number":141,"context_line":"    notifications for openstack service consumption."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    This server is an Oslo notification server that exposes set of standard"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ac7a964_ef0313b6","line":140,"updated":"2014-08-15 14:34:48.000000000","message":"nit - \"to send\" rather than \"to sent\"","commit_id":"9facffd441ab0c102ab8038ed4f0d6acf3e3ec42"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                                  metadata)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def warn(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":52,"context_line":"        return self.process_event(ctxt, publisher_id, event_type, payload,"},{"line_number":53,"context_line":"                                  metadata)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def error(self, ctxt, publisher_id, event_type, payload, metadata):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_9149a7b9","line":52,"updated":"2014-08-20 19:35:19.000000000","message":"Shouldn\u0027t we log the level of this event? It seems there is no difference between info, warn, and error.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                                  metadata)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def warn(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":52,"context_line":"        return self.process_event(ctxt, publisher_id, event_type, payload,"},{"line_number":53,"context_line":"                                  metadata)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def error(self, ctxt, publisher_id, event_type, payload, metadata):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_0f564b06","line":52,"in_reply_to":"1abeadc6_9149a7b9","updated":"2014-08-20 22:42:22.000000000","message":"So far, its a common logic and there is no priority significance in processing logic. As mentioned in comments, keystone so far uses only #info(...) handler in notification dispatcher.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        if payload_s:"},{"line_number":134,"context_line":"            return payload_s.get(\u0027resource_info\u0027)"},{"line_number":135,"context_line":"        else:"},{"line_number":136,"context_line":"            return None"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_318b73c4","line":135,"updated":"2014-08-20 19:35:19.000000000","message":"The else isn\u0027t required","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        if payload_s:"},{"line_number":134,"context_line":"            return payload_s.get(\u0027resource_info\u0027)"},{"line_number":135,"context_line":"        else:"},{"line_number":136,"context_line":"            return None"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_2f7227ad","line":135,"in_reply_to":"1abeadc6_318b73c4","updated":"2014-08-20 22:42:22.000000000","message":"I was trying to be explicit about return value. Will remove it in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        queue.cleanup()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def wait(self):"},{"line_number":168,"context_line":"        super(MessageServer, self).wait()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_51af0f2a","line":168,"updated":"2014-08-20 19:35:19.000000000","message":"If you\u0027re not overriding anything within wait() then you don\u0027t need to define it.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        queue.cleanup()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def wait(self):"},{"line_number":168,"context_line":"        super(MessageServer, self).wait()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_afb9d716","line":168,"in_reply_to":"1abeadc6_51af0f2a","updated":"2014-08-20 22:42:22.000000000","message":"Earlier I used to have function invoked but then commented it and removed in earlier patch. Left it here just to highlight functions availablilty.\n\nWill remove it in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"}],"barbican/tasks/keystone_consumer.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"6bde4d8183bf667cdce4147e92a5e20d1a5a7bfe","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        session \u003d rep.get_session(autocommit\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        tenant_id \u003d project.id"},{"line_number":102,"context_line":"        with session.begin():"},{"line_number":103,"context_line":"            self.repos.container_repo.delete_project_entities("},{"line_number":104,"context_line":"                tenant_id, suppress_exception\u003dTrue, session\u003dsession)"},{"line_number":105,"context_line":"            # secret children SecretStoreMetadatum, EncryptedDatum"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_b86f0cfb","line":102,"updated":"2014-08-22 22:16:36.000000000","message":"I\u0027d be more comfortable with this block of code being placed into the models/repositories.py module, just to segregate the SQLAlchemy session sort of logic from task/business-logic modules.","commit_id":"7668bf3674dfb4958ca82e4849b0a6823cc4f7bc"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"582e75e1f4253624d4e9c1ea2da42b8892458ae3","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        session \u003d rep.get_session(autocommit\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        tenant_id \u003d project.id"},{"line_number":102,"context_line":"        with session.begin():"},{"line_number":103,"context_line":"            self.repos.container_repo.delete_project_entities("},{"line_number":104,"context_line":"                tenant_id, suppress_exception\u003dTrue, session\u003dsession)"},{"line_number":105,"context_line":"            # secret children SecretStoreMetadatum, EncryptedDatum"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_87c63f15","line":102,"in_reply_to":"1abeadc6_b86f0cfb","updated":"2014-08-25 16:03:33.000000000","message":"Okay. As this logic spans across multiple repos so I am not sure under which specific repo I should enter. I will try to move the code to models/repositories module.","commit_id":"7668bf3674dfb4958ca82e4849b0a6823cc4f7bc"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d utils.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class KsEventConsumer(resources.BaseTask):"},{"line_number":30,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":31,"context_line":"    deployment."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_fa8838c8","line":29,"updated":"2014-08-26 16:10:06.000000000","message":"I rather have this as a longer name: KeystoneEventConsumer.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d utils.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class KsEventConsumer(resources.BaseTask):"},{"line_number":30,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":31,"context_line":"    deployment."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_c90c9897","line":29,"in_reply_to":"1abeadc6_fa8838c8","updated":"2014-08-26 18:05:52.000000000","message":"Its already part of keystone_consumer module so its namespace is quite explicit. As big names in python creates line wrapping issue so was trying to offset it little bit.\n\nI think this is second comment about this. So will change it in next patch.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class KeystoneEventConsumer(resources.BaseTask):"},{"line_number":30,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":31,"context_line":"    deployment."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    Currently this processes only Keystone project delete event."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_66f3160b","line":30,"updated":"2014-08-31 03:36:03.000000000","message":"nit - change to \"event\" to match class name (which is singular)","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class KeystoneEventConsumer(resources.BaseTask):"},{"line_number":30,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":31,"context_line":"    deployment."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    Currently this processes only Keystone project delete event."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_48695124","line":30,"in_reply_to":"fa98f980_66f3160b","updated":"2014-09-02 21:15:50.000000000","message":"Will change it in next patch.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                 datum_repo\u003dNone, kek_repo\u003dNone, secret_meta_repo\u003dNone,"},{"line_number":42,"context_line":"                 container_repo\u003dNone):"},{"line_number":43,"context_line":"        LOG.debug(\u0027Creating KeystoneEventConsumer task processor\u0027)"},{"line_number":44,"context_line":"        self.repos \u003d rep.Repositories(tenant_repo\u003dtenant_repo,"},{"line_number":45,"context_line":"                                      tenant_secret_repo\u003dtenant_secret_repo,"},{"line_number":46,"context_line":"                                      secret_repo\u003dsecret_repo,"},{"line_number":47,"context_line":"                                      datum_repo\u003ddatum_repo,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_a6dc1e76","line":44,"updated":"2014-08-31 03:36:03.000000000","message":"I asked this in one of chellygel\u0027s reviews, so I\u0027ll ask it here.  Can we match the order of the repos in the c\u0027tor signature to the order here?  Makes it easier to review and ensure we don\u0027t miss any.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                 datum_repo\u003dNone, kek_repo\u003dNone, secret_meta_repo\u003dNone,"},{"line_number":42,"context_line":"                 container_repo\u003dNone):"},{"line_number":43,"context_line":"        LOG.debug(\u0027Creating KeystoneEventConsumer task processor\u0027)"},{"line_number":44,"context_line":"        self.repos \u003d rep.Repositories(tenant_repo\u003dtenant_repo,"},{"line_number":45,"context_line":"                                      tenant_secret_repo\u003dtenant_secret_repo,"},{"line_number":46,"context_line":"                                      secret_repo\u003dsecret_repo,"},{"line_number":47,"context_line":"                                      datum_repo\u003ddatum_repo,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_28408da4","line":44,"in_reply_to":"fa98f980_a6dc1e76","updated":"2014-09-02 21:15:50.000000000","message":"Okay. Will re-order them.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param project: Barbican project entity which is retrieved by project"},{"line_number":82,"context_line":"        id available in Keystone notification."},{"line_number":83,"context_line":"        :param project_id: project identifier as present in Keystone"},{"line_number":84,"context_line":"        notification."},{"line_number":85,"context_line":"        :param resource_type: type of resource updated as part of Keystone"},{"line_number":86,"context_line":"        notification e.g. Keystone project, domain, user etc."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_c6c0427f","line":83,"updated":"2014-08-31 03:36:03.000000000","message":"why do we have project_id parameter if the project entity is REQUIRED and it contains the id?","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        :param project: Barbican project entity which is retrieved by project"},{"line_number":82,"context_line":"        id available in Keystone notification."},{"line_number":83,"context_line":"        :param project_id: project identifier as present in Keystone"},{"line_number":84,"context_line":"        notification."},{"line_number":85,"context_line":"        :param resource_type: type of resource updated as part of Keystone"},{"line_number":86,"context_line":"        notification e.g. Keystone project, domain, user etc."}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_1a407355","line":83,"in_reply_to":"fa98f980_c6c0427f","updated":"2014-09-02 21:15:50.000000000","message":"\u0027project\u0027 entity will be present only when there are barbican resources available. Not every keystone project will necessarily have barbican resources.\nSo in cases, where there is no corresponding barbican resource for a given keystone project_id, \u0027project\u0027 entity will be None and will still have project_id. Please note that project_id is identified from project delete notification event. That\u0027s why we need both arguments and similar flow is used in Line# 91 to log message.\nDoes it make sense?","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # project resources are referred via barbican tenant identifier and not"},{"line_number":96,"context_line":"        # keystone project identifier so need to use `id` field ."},{"line_number":97,"context_line":"        tenant_id \u003d project.id"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        rep.delete_all_project_resources(tenant_id, self.repos)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_46d53242","line":97,"updated":"2014-08-31 03:36:03.000000000","message":"isn\u0027t this the same as the project_id parameter?  If we need that parameter then maybe change this to something like:\n\ntenant_id  \u003d project_id or project.id","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # project resources are referred via barbican tenant identifier and not"},{"line_number":96,"context_line":"        # keystone project identifier so need to use `id` field ."},{"line_number":97,"context_line":"        tenant_id \u003d project.id"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        rep.delete_all_project_resources(tenant_id, self.repos)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_a8de3d0f","line":97,"in_reply_to":"fa98f980_46d53242","updated":"2014-09-02 21:15:50.000000000","message":"I tried to explain this in comments above. Looks like need to explain it better.\nTenant table has \u0027id\u0027 and \u0027keystone_id\u0027 field. From event data, the resource id maps to keystone_id. But all tables associations are referred via \u0027id\u0027 field. So delete operation uses \u0027id\u0027 directly, instead of using \u0027keystone_id\u0027 which requires another join with tenant table to query records.\n\nThis is mentioned above and also in docstring of delete APIs.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # reached here means there is no error so log the successful"},{"line_number":102,"context_line":"        # cleanup log entry."},{"line_number":103,"context_line":"        LOG.info(\u0027Successfully completed Barbican resources cleanup for \u0027"},{"line_number":104,"context_line":"                 \u0027Keystone project_id\u003d{0}\u0027.format(project_id))"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_a6c33e89","line":104,"updated":"2014-08-31 03:36:03.000000000","message":"should be tenant_id","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # reached here means there is no error so log the successful"},{"line_number":102,"context_line":"        # cleanup log entry."},{"line_number":103,"context_line":"        LOG.info(\u0027Successfully completed Barbican resources cleanup for \u0027"},{"line_number":104,"context_line":"                 \u0027Keystone project_id\u003d{0}\u0027.format(project_id))"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_e8368551","line":104,"in_reply_to":"fa98f980_a6c33e89","updated":"2014-09-02 21:15:50.000000000","message":"Here log is referring to Keystone project id and not tenant_id as there is no related barbican resources present in the system.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"643e8c0a9c11046f94d6f30802f503127e00dd4b","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self.handle_cleanup(barbican_project, *args, **kwargs)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def handle_error(self, project, status, message, exception,"},{"line_number":63,"context_line":"                     project_id\u003dNone, resource_type\u003dNone, operation_type\u003dNone):"},{"line_number":64,"context_line":"        LOG.error(\u0027Error processing Keystone event, project_id\u003d{0}, event \u0027"},{"line_number":65,"context_line":"                  \u0027resource\u003d{1}, event operation\u003d{2}, status\u003d{3}, error \u0027"},{"line_number":66,"context_line":"                  \u0027message\u003d{4}\u0027.format(project.tenant_id, resource_type,"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_121236b4","line":63,"updated":"2014-09-09 21:01:14.000000000","message":"Seems we are changing the signature of the method, please make sure if it is correct practice in python.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1a57076c650e1a0f7601913f7e72cfe590e3384a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self.handle_cleanup(barbican_project, *args, **kwargs)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def handle_error(self, project, status, message, exception,"},{"line_number":63,"context_line":"                     project_id\u003dNone, resource_type\u003dNone, operation_type\u003dNone):"},{"line_number":64,"context_line":"        LOG.error(\u0027Error processing Keystone event, project_id\u003d{0}, event \u0027"},{"line_number":65,"context_line":"                  \u0027resource\u003d{1}, event operation\u003d{2}, status\u003d{3}, error \u0027"},{"line_number":66,"context_line":"                  \u0027message\u003d{4}\u0027.format(project.tenant_id, resource_type,"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_8226d166","line":63,"in_reply_to":"fa98f980_121236b4","updated":"2014-09-09 23:17:58.000000000","message":"I am just using unpacked kw arguments as base class method allows *args and **kwargs instead of explicitly doing this within function logic as it reduces the number of lines.\n\nI did not find any negative impact of this approach other than its not pythonic way so will change it to as you suggested.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"643e8c0a9c11046f94d6f30802f503127e00dd4b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                                       operation_type, status, message))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def handle_success(self, project, project_id\u003dNone, resource_type\u003dNone,"},{"line_number":70,"context_line":"                       operation_type\u003dNone):"},{"line_number":71,"context_line":"        LOG.info(\u0027Successfully handled Keystone event, project_id\u003d{0}, event \u0027"},{"line_number":72,"context_line":"                 \u0027resource\u003d{1}, event operation\u003d{2}\u0027.format(project_id,"},{"line_number":73,"context_line":"                                                            resource_type,"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_7238e23d","line":70,"updated":"2014-09-09 21:01:14.000000000","message":"Seems we are changing the signature of the method, please make sure if it is correct practice in python.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1a57076c650e1a0f7601913f7e72cfe590e3384a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                                       operation_type, status, message))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def handle_success(self, project, project_id\u003dNone, resource_type\u003dNone,"},{"line_number":70,"context_line":"                       operation_type\u003dNone):"},{"line_number":71,"context_line":"        LOG.info(\u0027Successfully handled Keystone event, project_id\u003d{0}, event \u0027"},{"line_number":72,"context_line":"                 \u0027resource\u003d{1}, event operation\u003d{2}\u0027.format(project_id,"},{"line_number":73,"context_line":"                                                            resource_type,"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_e21a3d17","line":70,"in_reply_to":"fa98f980_7238e23d","updated":"2014-09-09 23:17:58.000000000","message":"I am just using unpacked kw arguments as base class method allows *args and **kwargs instead of explicitly doing this within function logic as it reduces the number of lines.\n\nI did not find any negative impact of this approach other than its not pythonic way so will change it to as you suggested.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"643e8c0a9c11046f94d6f30802f503127e00dd4b","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # barbican entities use tenants table \u0027id\u0027 field as foreign key. Delete"},{"line_number":96,"context_line":"        # apis are using that id to lookup related entities and not ketstone"},{"line_number":97,"context_line":"        # project id which requires additional tenant table join."},{"line_number":98,"context_line":"        tenant_id \u003d project.id"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_e7009204","line":96,"updated":"2014-09-09 21:01:14.000000000","message":"nit, ketstone \u003e keystone","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"1a57076c650e1a0f7601913f7e72cfe590e3384a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # barbican entities use tenants table \u0027id\u0027 field as foreign key. Delete"},{"line_number":96,"context_line":"        # apis are using that id to lookup related entities and not ketstone"},{"line_number":97,"context_line":"        # project id which requires additional tenant table join."},{"line_number":98,"context_line":"        tenant_id \u003d project.id"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_221525e5","line":96,"in_reply_to":"fa98f980_e7009204","updated":"2014-09-09 23:17:58.000000000","message":"Yes, this needs to be corrected.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"fd0728c987772f10f44d3798d76ced5529fc240d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def handle_processing(self, barbican_project, *args, **kwargs):"},{"line_number":60,"context_line":"        self.handle_cleanup(barbican_project, *args, **kwargs)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def handle_error(self, project, status, message, exception,"},{"line_number":63,"context_line":"                     *args, **kwargs):"},{"line_number":64,"context_line":"        resource_type \u003d kwargs.get(\u0027resource_type\u0027)"},{"line_number":65,"context_line":"        operation_type \u003d kwargs.get(\u0027operation_type\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da9df570_ac65ba46","line":62,"updated":"2014-09-22 20:00:50.000000000","message":"I actually preferred the original form to this one. The other BaseTask sub classes also specify explicit args. To me it\u0027s more robust to hard define the args than to rely on the kwargs unpacking to do this.","commit_id":"9c8b7481c2190c9e604e7ad08547b61a1b351b4c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"381e89ff7c4e2f7e58e4079c1c471df3d9f4bf74","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def handle_processing(self, barbican_project, *args, **kwargs):"},{"line_number":60,"context_line":"        self.handle_cleanup(barbican_project, *args, **kwargs)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def handle_error(self, project, status, message, exception,"},{"line_number":63,"context_line":"                     *args, **kwargs):"},{"line_number":64,"context_line":"        resource_type \u003d kwargs.get(\u0027resource_type\u0027)"},{"line_number":65,"context_line":"        operation_type \u003d kwargs.get(\u0027operation_type\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da9df570_87ab311c","line":62,"in_reply_to":"da9df570_286d1699","updated":"2014-09-24 16:24:56.000000000","message":"Actually the sub-class is intended to enforce the actual args/kwargs needed. The super class has the generic args/kwargs. So unless the intent is for some other class to extend this one (which is a bad idea IMHO), it is better to be rigorous here I\u0027m thinking. I\u0027m reaching out to others to make a comment here though.","commit_id":"9c8b7481c2190c9e604e7ad08547b61a1b351b4c"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"fc04bc7449fee4dbf314b574d905df0cbf35601c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def handle_processing(self, barbican_project, *args, **kwargs):"},{"line_number":60,"context_line":"        self.handle_cleanup(barbican_project, *args, **kwargs)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def handle_error(self, project, status, message, exception,"},{"line_number":63,"context_line":"                     *args, **kwargs):"},{"line_number":64,"context_line":"        resource_type \u003d kwargs.get(\u0027resource_type\u0027)"},{"line_number":65,"context_line":"        operation_type \u003d kwargs.get(\u0027operation_type\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da9df570_286d1699","line":62,"in_reply_to":"da9df570_ac65ba46","updated":"2014-09-23 16:29:49.000000000","message":"To me, its okay either way as both have different merits. With args and kwargs in methods, its sub-class has the flexibility to have different arguments from its parent.\nThe specific argument approach provides more tighter and clear coupling.\n\nI am inclining to leave this as-is as this is falling into grey area of specific (personal) style of python programming.\nAlso want to avoid another patch just for this as then this change will go into another review wait cycle and can miss Juno merge target.","commit_id":"9c8b7481c2190c9e604e7ad08547b61a1b351b4c"}],"barbican/tasks/resources.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":207,"context_line":"    deployment."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    Currently this process only keystone project delete event."},{"line_number":210,"context_line":"    \"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_name(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_274ceb3e","line":209,"updated":"2014-08-03 00:18:18.000000000","message":"I think you mean \"processes\"","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def handle_error(self, project, status, message, exception,"},{"line_number":239,"context_line":"                     project_id\u003dNone, resource_type\u003dNone, operation_type\u003dNone):"},{"line_number":240,"context_line":"        LOG.error(\u0027Error processing KS event, project_id\u003d{0}, event resource\u003d\u0027"},{"line_number":241,"context_line":"                  \u0027{1}, event operation\u003d{2}, status\u003d{3}, error message\u003d{4}\u0027"},{"line_number":242,"context_line":"                  \u0027\u0027.format(project.tenant_id, resource_type, operation_type,"},{"line_number":243,"context_line":"                            status, message))"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_475c7ff0","line":240,"updated":"2014-08-03 00:18:18.000000000","message":"spell out Keystone?","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def handle_success(self, project, project_id\u003dNone, resource_type\u003dNone,"},{"line_number":246,"context_line":"                       operation_type\u003dNone):"},{"line_number":247,"context_line":"        LOG.info(\u0027Successfully handled Kyestone event, project_id\u003d{0}, event \u0027"},{"line_number":248,"context_line":"                  \u0027resource\u003d{1}, event operation\u003d{2}\u0027.format(project_id,"},{"line_number":249,"context_line":"                                                             resource_type,"},{"line_number":250,"context_line":"                                                             operation_type))"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_875217d8","line":247,"updated":"2014-08-03 00:18:18.000000000","message":"typo in Keystone","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        LOG.debug(\"...done creating order\u0027s secret.\")"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"class KsEventConsumer(BaseTask):"},{"line_number":206,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":207,"context_line":"    deployment."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_ff5c9782","line":205,"updated":"2014-08-07 14:23:15.000000000","message":"can you spell out Keystone in the class name?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        LOG.debug(\"...done creating order\u0027s secret.\")"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"class KsEventConsumer(BaseTask):"},{"line_number":206,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":207,"context_line":"    deployment."},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_4ba225fd","line":205,"in_reply_to":"baada198_ff5c9782","updated":"2014-08-07 15:44:44.000000000","message":"It becomes long name. Let me see if I can find make it shorter with Keystone...","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":207,"context_line":"    deployment."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    Currently this processes only Keystone project delete event."},{"line_number":210,"context_line":"    \"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_name(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_bf4a1fab","line":209,"updated":"2014-08-07 14:23:15.000000000","message":"Thinking about this more - what do you think about just getting rid of this comment as that limitation is handled in the listener? That way, if we change things then this comment doesn\u0027t get outdated.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    \"\"\"Keystone events consumer listening for notifications sent by Keystone"},{"line_number":207,"context_line":"    deployment."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    Currently this processes only Keystone project delete event."},{"line_number":210,"context_line":"    \"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_name(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_4b3ea58c","line":209,"in_reply_to":"baada198_bf4a1fab","updated":"2014-08-07 15:44:44.000000000","message":"Kind of makes sense though logic here only deals with delete project event. If there is change in event type handling, then I will think, consumer logic will also have related change.\nSo I was trying to highlight that. What do you think?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                     \u0027present for keystone project\u003d{0}\u0027.format(project_id))"},{"line_number":273,"context_line":"            return"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        session \u003d rep.get_session(autocommit\u003dFalse)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        with session.begin():"},{"line_number":278,"context_line":"            self.repos.container_repo.delete_project_entities("}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_a23126f0","line":275,"updated":"2014-08-07 14:23:15.000000000","message":"why change from self.repos?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"44bfeb58821e9ed28c465aa7343c5895445398e8","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                     \u0027present for keystone project\u003d{0}\u0027.format(project_id))"},{"line_number":273,"context_line":"            return"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        session \u003d rep.get_session(autocommit\u003dFalse)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        with session.begin():"},{"line_number":278,"context_line":"            self.repos.container_repo.delete_project_entities("}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_0b02edb9","line":275,"in_reply_to":"baada198_a23126f0","updated":"2014-08-07 15:44:44.000000000","message":"It was a correction as found out through unit tests.\nself.repos is rep.Repositories class instance which does not have this method.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                                      order_repo\u003dorder_repo,"},{"line_number":306,"context_line":"                                      container_repo\u003dcontainer_repo)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def retrieve_entity(self, project_id\u003dNone, resource_type\u003dNone,"},{"line_number":309,"context_line":"                        operation_type\u003dNone):"},{"line_number":310,"context_line":"        tenant_repo \u003d self.repos.tenant_repo"},{"line_number":311,"context_line":"        return tenant_repo.find_by_keystone_id(keystone_id\u003dproject_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_b11a237b","line":308,"updated":"2014-08-20 19:35:19.000000000","message":"project_id doesn\u0027t look optional here.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                                      order_repo\u003dorder_repo,"},{"line_number":306,"context_line":"                                      container_repo\u003dcontainer_repo)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def retrieve_entity(self, project_id\u003dNone, resource_type\u003dNone,"},{"line_number":309,"context_line":"                        operation_type\u003dNone):"},{"line_number":310,"context_line":"        tenant_repo \u003d self.repos.tenant_repo"},{"line_number":311,"context_line":"        return tenant_repo.find_by_keystone_id(keystone_id\u003dproject_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_ef658fb5","line":308,"in_reply_to":"1abeadc6_b11a237b","updated":"2014-08-20 22:42:22.000000000","message":"Yes. Its not optional. Will change it in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        session \u003d rep.get_session(autocommit\u003dFalse)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        tenant_id \u003d project.id"},{"line_number":357,"context_line":"        with session.begin():"},{"line_number":358,"context_line":"            self.repos.container_repo.delete_project_entities("},{"line_number":359,"context_line":"                tenant_id, suppress_exception\u003dTrue, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_75123658","line":356,"updated":"2014-08-20 19:35:19.000000000","message":"Why are we getting project.id when we\u0027re passing in project_id? Shouldn\u0027t we just use project_id?","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        session \u003d rep.get_session(autocommit\u003dFalse)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        tenant_id \u003d project.id"},{"line_number":357,"context_line":"        with session.begin():"},{"line_number":358,"context_line":"            self.repos.container_repo.delete_project_entities("},{"line_number":359,"context_line":"                tenant_id, suppress_exception\u003dTrue, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_0f0e4be5","line":356,"in_reply_to":"1abeadc6_75123658","updated":"2014-08-20 22:42:22.000000000","message":"All of delete APIs expects id (not keystone project id) of barbican tenant. Otherwise, related queries will have to unnecessarily make join with tenant entity to use its \u0027id\u0027 which is referred in other associations.\n\nAs mentioned in docstring of all delete APIs\n\ntenant_id: id of barbican tenant (project) entity","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"}],"barbican/tests/plugin/test_resource.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ff355d96c2ff6d3c8a30e07da52c7fc579167ccf","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        asymmetric_meta_dto \u003d secret_store.AsymmetricKeyMetadataDTO()"},{"line_number":35,"context_line":"        # Mock plug-in"},{"line_number":36,"context_line":"        self.generate_plugin \u003d mock.MagicMock()"},{"line_number":37,"context_line":"        self.generate_plugin.generate_asymmetric_key.return_value \u003d \\"},{"line_number":38,"context_line":"            asymmetric_meta_dto"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        gen_plugin_config \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_76d2cf35","line":37,"updated":"2014-09-08 11:57:54.000000000","message":"same comment as below","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7331757bfd74a46fe6421af0d02e7af239fa7aa3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        asymmetric_meta_dto \u003d secret_store.AsymmetricKeyMetadataDTO()"},{"line_number":35,"context_line":"        # Mock plug-in"},{"line_number":36,"context_line":"        self.generate_plugin \u003d mock.MagicMock()"},{"line_number":37,"context_line":"        self.generate_plugin.generate_asymmetric_key.return_value \u003d \\"},{"line_number":38,"context_line":"            asymmetric_meta_dto"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        gen_plugin_config \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_09ecf6c6","line":37,"in_reply_to":"fa98f980_76d2cf35","updated":"2014-09-08 18:52:46.000000000","message":"Actually I have not made any change in this code. This is existing code. I think my editor just added space before \\.\n\nI will remove that auto-correction. So that its not included as change.","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ff355d96c2ff6d3c8a30e07da52c7fc579167ccf","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        \"\"\"test asymmetric secret generation without passphrase.\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        del self.spec[\u0027passphrase\u0027]"},{"line_number":97,"context_line":"        secret_container \u003d \\"},{"line_number":98,"context_line":"            self.plugin_resource.\\"},{"line_number":99,"context_line":"            generate_asymmetric_secret(self.spec,"},{"line_number":100,"context_line":"                                       self.content_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_36192723","line":97,"updated":"2014-09-08 11:57:54.000000000","message":"Could you please not use the \"\\\" notation? it will not be legal in the newer hacking checks.","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7331757bfd74a46fe6421af0d02e7af239fa7aa3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        \"\"\"test asymmetric secret generation without passphrase.\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        del self.spec[\u0027passphrase\u0027]"},{"line_number":97,"context_line":"        secret_container \u003d \\"},{"line_number":98,"context_line":"            self.plugin_resource.\\"},{"line_number":99,"context_line":"            generate_asymmetric_secret(self.spec,"},{"line_number":100,"context_line":"                                       self.content_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_49cd1e5d","line":97,"in_reply_to":"fa98f980_36192723","updated":"2014-09-08 18:52:46.000000000","message":"Actually I have not made any change in this code. This is existing code. I think my editor just added space before \\.\n\nI will remove that auto-correction. So that its not included as change.","commit_id":"ce7c6f2d1b0556fd81a3de8f966c3b77015849a5"}],"barbican/tests/queue/test_keystone_listener.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from barbican.tests import utils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class UtilMixin(object):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":32,"context_line":"        super(UtilMixin, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_bdca3a9f","line":29,"updated":"2014-08-26 16:10:06.000000000","message":"not relevant: props to you expressing Mixin pattern! :D I find your naming and usage of this class to be quite classy and explicit.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"}],"barbican/tests/queue/test_ks_listener.py":[{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def revert_overrides(self):"},{"line_number":37,"context_line":"        \u0027\u0027\u0027Reverts configuration override values after test end.\u0027\u0027\u0027"},{"line_number":38,"context_line":"        for k, v in self.overrides.iteritems():"},{"line_number":39,"context_line":"            value, group \u003d v"},{"line_number":40,"context_line":"            self.conf.set_override(k, value, group)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_55437a41","line":38,"updated":"2014-08-20 19:35:19.000000000","message":"Should be using six.iteritems(...)","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def revert_overrides(self):"},{"line_number":37,"context_line":"        \u0027\u0027\u0027Reverts configuration override values after test end.\u0027\u0027\u0027"},{"line_number":38,"context_line":"        for k, v in self.overrides.iteritems():"},{"line_number":39,"context_line":"            value, group \u003d v"},{"line_number":40,"context_line":"            self.conf.set_override(k, value, group)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_afec77f4","line":38,"in_reply_to":"1abeadc6_55437a41","updated":"2014-08-20 22:42:22.000000000","message":"Yes..will fix in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"}],"barbican/tests/tasks/test_keystone_consumer.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import testtools"},{"line_number":17,"context_line":"import uuid"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_fd7bd226","line":16,"updated":"2014-08-26 16:10:06.000000000","message":"you should take a look at this CR https://review.openstack.org/#/c/116700/ by Steve, maybe your commit should depend on it.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import testtools"},{"line_number":17,"context_line":"import uuid"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_e9b9547a","line":16,"in_reply_to":"1abeadc6_fd7bd226","updated":"2014-08-26 18:05:52.000000000","message":"Thanks for pointing that out. Not sure how to add dependency now. I have tried in past and it used to be difficult to keep in sync with original dependency patch updates.\n\nWill use oslotest in my tests and will rebase once more after  above mentioned patch is merged.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b87e9fdf5e4d5e00df87c27441050dfe2a48639c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from barbican.tests.queue import test_keystone_listener as listener_test"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class WhenUsingKsEventConsumer(listener_test.UtilMixin, testtools.TestCase):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    IN_MEM_DB_CONN_STRING \u003d \u0027sqlite://\u0027"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_7d8fc223","line":29,"updated":"2014-08-26 16:10:06.000000000","message":"This would be changed if you depend on the CR mentioned above.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"7becad2ee7c88a4e1728b1cd583ab745b19fdcf5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from barbican.tests.queue import test_keystone_listener as listener_test"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class WhenUsingKsEventConsumer(listener_test.UtilMixin, testtools.TestCase):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    IN_MEM_DB_CONN_STRING \u003d \u0027sqlite://\u0027"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_09b0508a","line":29,"in_reply_to":"1abeadc6_7d8fc223","updated":"2014-08-26 18:05:52.000000000","message":"Same reply as above.","commit_id":"49adba8aa0541638d3ea65e7cf21418ab03b904d"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        super(WhenUsingKeystoneEventConsumer, self).setUp()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.conf \u003d cfg.CONF"},{"line_number":40,"context_line":"        self.addCleanup(self._cleanup)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _cleanup(self):"},{"line_number":43,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_460a92d3","line":40,"updated":"2014-08-31 03:36:03.000000000","message":"dstufft is also doing some work setting up tests using in-memory db.  See https://review.openstack.org/#/c/117030/1/barbican/tests/model/test_repositories.py","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        super(WhenUsingKeystoneEventConsumer, self).setUp()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.conf \u003d cfg.CONF"},{"line_number":40,"context_line":"        self.addCleanup(self._cleanup)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _cleanup(self):"},{"line_number":43,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_6fe1b499","line":40,"in_reply_to":"fa98f980_460a92d3","updated":"2014-09-02 21:15:50.000000000","message":"Thanks. Will check that patch and see if I can improve on.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"}],"bin/barbican-keystone-listener.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"import os"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# Oslo messaging RPC server uses eventlet."},{"line_number":29,"context_line":"# eventlet.monkey_patch()"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# To debug, disable thread module monkey_patch"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_a7255b5c","line":28,"updated":"2014-08-03 00:18:18.000000000","message":"a comment on why this is commented out would be great.","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# Oslo messaging RPC server uses eventlet."},{"line_number":29,"context_line":"# eventlet.monkey_patch()"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# To debug, disable thread module monkey_patch"},{"line_number":32,"context_line":"eventlet.monkey_patch(thread\u003dFalse)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# \u0027Borrowed\u0027 from the Glance project:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c71def11","line":31,"updated":"2014-08-03 00:18:18.000000000","message":"A nice big comment on what\u0027s needed for debugging would be awesome (like uncommenting the config.setup_remote_pydev_debugging call below).","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"}],"bin/barbican-keystone-listener.sh":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# barbican-worker - Script run Cloudkeep\u0027s Barbican worker app."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"python bin/barbican-keystone-listener.py"}],"source_content_type":"text/x-sh","patch_set":1,"id":"baada198_870937de","line":3,"updated":"2014-08-03 00:18:18.000000000","message":"Script \"to run\" ...","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"}],"etc/barbican/barbican-api.conf":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":157,"context_line":"# True enables keystone notification listener functionality."},{"line_number":158,"context_line":"enable \u003d False"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"# The default exchange under which topics are scoped. "},{"line_number":161,"context_line":"# May be overridden by an exchange name specified in the transport_url option."},{"line_number":162,"context_line":"control_exchange \u003d \u0027openstack\u0027"},{"line_number":163,"context_line":""}],"source_content_type":"text/plain","patch_set":1,"id":"baada198_a70e3be2","line":160,"updated":"2014-08-03 00:18:18.000000000","message":"might want to zap those trailing spaces and make Gerrit happier.","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"34e510b06c981275d68dedf2abd6df48a8edfb66","unresolved":false,"context_lines":[{"line_number":185,"context_line":"version \u003d \u00271.0\u0027"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"# Define the number of max threads to be used for notification server "},{"line_number":188,"context_line":"# processing functionality."},{"line_number":189,"context_line":"thread_pool_size \u003d 10"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Crypto plugin \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":3,"id":"baada198_c28c5a83","line":188,"updated":"2014-08-07 14:23:15.000000000","message":"how do we decide how many threads to use?","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"0cfe214031f433114bb32b87739b31bb4caa9778","unresolved":false,"context_lines":[{"line_number":185,"context_line":"version \u003d \u00271.0\u0027"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"# Define the number of max threads to be used for notification server "},{"line_number":188,"context_line":"# processing functionality."},{"line_number":189,"context_line":"thread_pool_size \u003d 10"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Crypto plugin \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":3,"id":"baada198_1134daaa","line":188,"in_reply_to":"baada198_c28c5a83","updated":"2014-08-07 16:42:08.000000000","message":"barbican.openstack.common.service.Service class by default uses 1000. That seems pretty high and decided to add override value for notification processing. I think project delete is not a frequent occurrence in keystone so generally we don\u0027t need to have such a high value. \nIf needed, deployment can tune it as per their setup but 10 (coming from 1000) seems reasonable default. Also in internal  performance testing of python application(s), observation is that lower number of threads is better (w.r.t. multi-process) in terms of context switching overhead with green threads.","commit_id":"f2b7553492136d286e31c816de24acae7deea004"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"e5accb907560236738061b9c459bad515ae4b47b","unresolved":false,"context_lines":[{"line_number":175,"context_line":"# of the servers in a round-robin fashion. That\u0027s why Barbican service should"},{"line_number":176,"context_line":"# have its own dedicated notification queue so that it receives all of Keystone"},{"line_number":177,"context_line":"# notifications."},{"line_number":178,"context_line":"topic \u003d \u0027barbican_notifications\u0027"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"# True enables requeue feature in case of notification processing error."},{"line_number":181,"context_line":"# Enable this only when underlying transport supports this feature."}],"source_content_type":"text/plain","patch_set":13,"id":"fa98f980_a64a5e25","line":178,"updated":"2014-08-31 03:36:03.000000000","message":"should match the default in the code (which is just \"notifications\").  I put a comment in the code as well.\n\nhttps://review.openstack.org/#/c/110817/13/barbican/queue/__init__.py","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"dd20f1a4d149f8f7c9bd25dbf99915e78744146d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"# of the servers in a round-robin fashion. That\u0027s why Barbican service should"},{"line_number":176,"context_line":"# have its own dedicated notification queue so that it receives all of Keystone"},{"line_number":177,"context_line":"# notifications."},{"line_number":178,"context_line":"topic \u003d \u0027barbican_notifications\u0027"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"# True enables requeue feature in case of notification processing error."},{"line_number":181,"context_line":"# Enable this only when underlying transport supports this feature."}],"source_content_type":"text/plain","patch_set":13,"id":"fa98f980_6f1614f3","line":178,"in_reply_to":"fa98f980_a64a5e25","updated":"2014-09-02 21:15:50.000000000","message":"Yes, it should match. I will correct this in sync in next patch.","commit_id":"ec7292f36685c51b904d631c75bfbc690cdd665e"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"17d65527ee1db244ccb7b82fb2d58bbe38ee9365","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"# Keystone notification functionality uses transport related configuration"},{"line_number":159,"context_line":"# from barbican common configuration as defined under"},{"line_number":160,"context_line":"# `Queue Options - oslo.messaging` comments."},{"line_number":161,"context_line":"# The HA related configuration is also shared with notification server."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"# True enables keystone notification listener functionality."}],"source_content_type":"text/plain","patch_set":17,"id":"fa98f980_e0124308","line":160,"updated":"2014-09-09 15:25:51.000000000","message":"nit - I think you need to use single quotes \u0027 vs `","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"b05014ef3450018584fbceeca8192e58f98c87cf","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"# Keystone notification functionality uses transport related configuration"},{"line_number":159,"context_line":"# from barbican common configuration as defined under"},{"line_number":160,"context_line":"# `Queue Options - oslo.messaging` comments."},{"line_number":161,"context_line":"# The HA related configuration is also shared with notification server."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"# True enables keystone notification listener functionality."}],"source_content_type":"text/plain","patch_set":17,"id":"fa98f980_ec8dd9d4","line":160,"in_reply_to":"fa98f980_e0124308","updated":"2014-09-09 19:54:31.000000000","message":"Correct. I think I was in sphinx documentation mode (highlight text) when I was writing this. Will correct if I have to push next version.","commit_id":"6ecbe5cc580bc930ee6ea6f0931bedabdc35b462"}],"requirements.txt":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9335edbf244d9e2f873875b88d7b360439106f2e","unresolved":false,"context_lines":[{"line_number":8,"context_line":"kombu\u003e\u003d2.4.8"},{"line_number":9,"context_line":"netaddr\u003e\u003d0.7.6"},{"line_number":10,"context_line":"oslo.config\u003e\u003d1.2.0"},{"line_number":11,"context_line":"oslo.messaging\u003e\u003d1.3.0"},{"line_number":12,"context_line":"Paste"},{"line_number":13,"context_line":"PasteDeploy\u003e\u003d1.5.0"},{"line_number":14,"context_line":"pbr\u003e\u003d0.6,!\u003d0.7,\u003c1.0"}],"source_content_type":"text/plain","patch_set":1,"id":"baada198_672fc33e","line":11,"updated":"2014-08-03 00:18:18.000000000","message":"So we can use v1.3.0a2?  I notice that there isn\u0027t a 1.3.0a4 listed in http://docs.openstack.org/developer/oslo.messaging/","commit_id":"c4dc809c8a119f4acb82e277647054c3ff55a7b5"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"f97aabb06b774394c41b350ff093a75d2b66db64","unresolved":false,"context_lines":[{"line_number":8,"context_line":"kombu\u003e\u003d2.4.8"},{"line_number":9,"context_line":"netaddr\u003e\u003d0.7.6"},{"line_number":10,"context_line":"oslo.config\u003e\u003d1.2.0"},{"line_number":11,"context_line":"oslo.messaging\u003e\u003d1.3.0"},{"line_number":12,"context_line":"Paste"},{"line_number":13,"context_line":"PasteDeploy\u003e\u003d1.5.0"},{"line_number":14,"context_line":"pbr\u003e\u003d0.6,!\u003d0.7,\u003c1.0"}],"source_content_type":"text/plain","patch_set":7,"id":"1abeadc6_f5f00600","line":11,"updated":"2014-08-20 19:35:19.000000000","message":"Global Requirements specifies: oslo.messaging\u003e\u003d1.4.0.0a3","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"5d05663f792b1ac84003e1c9904fc0e83e24d354","unresolved":false,"context_lines":[{"line_number":8,"context_line":"kombu\u003e\u003d2.4.8"},{"line_number":9,"context_line":"netaddr\u003e\u003d0.7.6"},{"line_number":10,"context_line":"oslo.config\u003e\u003d1.2.0"},{"line_number":11,"context_line":"oslo.messaging\u003e\u003d1.3.0"},{"line_number":12,"context_line":"Paste"},{"line_number":13,"context_line":"PasteDeploy\u003e\u003d1.5.0"},{"line_number":14,"context_line":"pbr\u003e\u003d0.6,!\u003d0.7,\u003c1.0"}],"source_content_type":"text/plain","patch_set":7,"id":"1abeadc6_cfb8d3ca","line":11,"in_reply_to":"1abeadc6_f5f00600","updated":"2014-08-20 22:42:22.000000000","message":"Yes. When I started, it was compliant. \n\nWill change in next patch.","commit_id":"0e7b2f8be0f383cb853051aee7a306549f7492d6"}]}
