)]}'
{"keystone/application_credential/backends/base.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b227b332a846f81ab03c796380b15b276a8d1fd7","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def get_application_credential(self, application_credential_id):"},{"line_number":47,"context_line":"        \"\"\"Get an application credential by the credential id."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        :param trust_id: the application credential identifier"},{"line_number":50,"context_line":"        :type trust_id: string"},{"line_number":51,"context_line":"        :param deleted: return the trust even if it is deleted, expired, or"},{"line_number":52,"context_line":"                        has no consumptions left"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_dabb936f","line":49,"range":{"start_line":49,"start_character":15,"end_line":49,"end_character":23},"updated":"2018-01-05 18:31:03.000000000","message":"Are these supposed to be passed in using hints? Or are they no longer used?","commit_id":"44ad208eae321a07a55d3b18dd3ac26f520e0d91"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"7077b7ce66567420425983cf62b300a78f9fb5d8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def get_application_credential(self, application_credential_id):"},{"line_number":47,"context_line":"        \"\"\"Get an application credential by the credential id."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        :param trust_id: the application credential identifier"},{"line_number":50,"context_line":"        :type trust_id: string"},{"line_number":51,"context_line":"        :param deleted: return the trust even if it is deleted, expired, or"},{"line_number":52,"context_line":"                        has no consumptions left"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_6e040c4b","line":49,"range":{"start_line":49,"start_character":15,"end_line":49,"end_character":23},"in_reply_to":"9f91af0f_dabb936f","updated":"2018-01-05 19:09:17.000000000","message":"Haha I think this is a copypasta fail, it\u0027s only supposed to take the app cred ID","commit_id":"44ad208eae321a07a55d3b18dd3ac26f520e0d91"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b227b332a846f81ab03c796380b15b276a8d1fd7","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        :param trust_id: the application credential identifier"},{"line_number":50,"context_line":"        :type trust_id: string"},{"line_number":51,"context_line":"        :param deleted: return the trust even if it is deleted, expired, or"},{"line_number":52,"context_line":"                        has no consumptions left"},{"line_number":53,"context_line":"        :type deleted: bool"},{"line_number":54,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_3aacff32","line":51,"range":{"start_line":51,"start_character":15,"end_line":51,"end_character":22},"updated":"2018-01-05 18:31:03.000000000","message":"Same comment here.","commit_id":"44ad208eae321a07a55d3b18dd3ac26f520e0d91"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"31b97c86e5a3fb14209477fa1450deb57d3aab3c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @abc.abstractmethod"},{"line_number":54,"context_line":"    def list_application_credentials_for_user(self, user_id):"},{"line_number":55,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_96cf807e","line":54,"updated":"2018-01-11 19:37:24.000000000","message":"nit: might as well add doc strings for this one","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"57a7b9b1889463ad4876d536af1206b995c11e8a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @abc.abstractmethod"},{"line_number":54,"context_line":"    def list_application_credentials_for_user(self, user_id):"},{"line_number":55,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_b7e39605","line":54,"in_reply_to":"7f96bb07_96cf807e","updated":"2018-01-11 21:25:03.000000000","message":"Done","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"31b97c86e5a3fb14209477fa1450deb57d3aab3c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @abc.abstractmethod"},{"line_number":58,"context_line":"    def delete_application_credential(self, application_credential_id):"},{"line_number":59,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_b6ccfc89","line":58,"updated":"2018-01-11 19:37:24.000000000","message":"nit: same comment here","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"57a7b9b1889463ad4876d536af1206b995c11e8a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @abc.abstractmethod"},{"line_number":58,"context_line":"    def delete_application_credential(self, application_credential_id):"},{"line_number":59,"context_line":"        raise exception.NotImplemented()  # pragma: no cover"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_57f012ca","line":58,"in_reply_to":"7f96bb07_b6ccfc89","updated":"2018-01-11 21:25:03.000000000","message":"Done","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"}],"keystone/application_credential/backends/sql.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"af8c059598a0e63f0a9e2add19c06c2576bdd1e4","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            return datetime.datetime.utcnow() \u003e\u003d app_cred_ref[\u0027expires_at\u0027]"},{"line_number":56,"context_line":"        return False"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def authenticate(self, application_credential_id, secret):"},{"line_number":59,"context_line":"        msg \u003d _(\u0027Invalid application credential ID or secret\u0027)"},{"line_number":60,"context_line":"        try:"},{"line_number":61,"context_line":"            app_cred_ref \u003d self.get_application_credential("}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_3f0b637d","line":58,"updated":"2018-01-08 22:41:58.000000000","message":"Do we want to test these methods in backends since we\u0027re adding a couple schema tests or do we want to hold of on that until we do the manager?","commit_id":"055ee3ac4f3701b5094909c6c1c646d468f95e96"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"31b97c86e5a3fb14209477fa1450deb57d3aab3c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                app_cred_role \u003d ApplicationCredentialRoleModel()"},{"line_number":86,"context_line":"                app_cred_role.application_credential_id \u003d ref[\u0027id\u0027]"},{"line_number":87,"context_line":"                app_cred_role.role_id \u003d role[\u0027id\u0027]"},{"line_number":88,"context_line":"                session.add(app_cred_role)"},{"line_number":89,"context_line":"            application_credential_dict \u003d ref.to_dict()"},{"line_number":90,"context_line":"            application_credential_dict.pop(\u0027secret_hash\u0027)"},{"line_number":91,"context_line":"            application_credential_dict[\u0027roles\u0027] \u003d roles"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_16061088","line":88,"updated":"2018-01-11 19:37:24.000000000","message":"Do we need to wrap this in a try/except for conflicting roles in the same application credential or are we going to check for that in the manager?","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8864e090f3fa7d1f57d4ef1c97f9fb96cb092858","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                app_cred_role \u003d ApplicationCredentialRoleModel()"},{"line_number":86,"context_line":"                app_cred_role.application_credential_id \u003d ref[\u0027id\u0027]"},{"line_number":87,"context_line":"                app_cred_role.role_id \u003d role[\u0027id\u0027]"},{"line_number":88,"context_line":"                session.add(app_cred_role)"},{"line_number":89,"context_line":"            application_credential_dict \u003d ref.to_dict()"},{"line_number":90,"context_line":"            application_credential_dict.pop(\u0027secret_hash\u0027)"},{"line_number":91,"context_line":"            application_credential_dict[\u0027roles\u0027] \u003d roles"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_712bde93","line":88,"in_reply_to":"7f96bb07_16061088","updated":"2018-01-11 20:35:42.000000000","message":"What do you mean by conflicting roles - like duplicate roles? I hadn\u0027t considered how to validate that.","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e1e4ab3496024ac8affe203e89d9a4144bc41632","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                    ApplicationCredentialRoleModel).filter_by("},{"line_number":106,"context_line":"                    application_credential_id\u003dapplication_credential_id):"},{"line_number":107,"context_line":"                app_cred_dict[\u0027roles\u0027].append({\u0027id\u0027: role.role_id})"},{"line_number":108,"context_line":"            return app_cred_dict"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _filter_app_cred(self, app_cred_ref):"},{"line_number":111,"context_line":"        app_cred_ref \u003d app_cred_ref.copy()"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_164cd09c","line":108,"updated":"2018-01-11 19:44:22.000000000","message":"Is there any reason to not use _filter_app_cred here instead of popping the secret_hash off in the manager? For listing we seem to handle the hash in the driver, but for getting a single app credential, we handle it in the manager. Just wondering if there is a reason for the difference?","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8864e090f3fa7d1f57d4ef1c97f9fb96cb092858","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                    ApplicationCredentialRoleModel).filter_by("},{"line_number":106,"context_line":"                    application_credential_id\u003dapplication_credential_id):"},{"line_number":107,"context_line":"                app_cred_dict[\u0027roles\u0027].append({\u0027id\u0027: role.role_id})"},{"line_number":108,"context_line":"            return app_cred_dict"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _filter_app_cred(self, app_cred_ref):"},{"line_number":111,"context_line":"        app_cred_ref \u003d app_cred_ref.copy()"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_3c7bed8c","line":108,"in_reply_to":"7f96bb07_164cd09c","updated":"2018-01-11 20:35:42.000000000","message":"The reason I don\u0027t filter it here is that the authenticate method here in the driver reuses it and needs the secret_hash from it. You\u0027re right, that looks kind of mixed up. Maybe the filtering for the list should also happen in the manager? Or maybe there should be a private method in the driver that doesn\u0027t pop the secret_hash so the authenticate method can use it?","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"57a7b9b1889463ad4876d536af1206b995c11e8a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                    ApplicationCredentialRoleModel).filter_by("},{"line_number":106,"context_line":"                    application_credential_id\u003dapplication_credential_id):"},{"line_number":107,"context_line":"                app_cred_dict[\u0027roles\u0027].append({\u0027id\u0027: role.role_id})"},{"line_number":108,"context_line":"            return app_cred_dict"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _filter_app_cred(self, app_cred_ref):"},{"line_number":111,"context_line":"        app_cred_ref \u003d app_cred_ref.copy()"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f96bb07_f7e11e00","line":108,"in_reply_to":"7f96bb07_3c7bed8c","updated":"2018-01-11 21:25:03.000000000","message":"I pushed it to the manager","commit_id":"93abb203244e872667cff5ccbdba32ac3d27eb07"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"da8c1c242a7b084d2e52e136a8e42cfb489d7955","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def create_application_credential(self, application_credential, roles):"},{"line_number":79,"context_line":"        app_cred \u003d application_credential.copy()"},{"line_number":80,"context_line":"        self._hash_secret(app_cred)"},{"line_number":81,"context_line":"        with sql.session_for_write() as session:"},{"line_number":82,"context_line":"            ref \u003d ApplicationCredentialModel.from_dict(app_cred)"},{"line_number":83,"context_line":"            session.add(ref)"},{"line_number":84,"context_line":"            for role in roles:"},{"line_number":85,"context_line":"                app_cred_role \u003d ApplicationCredentialRoleModel()"},{"line_number":86,"context_line":"                app_cred_role.application_credential_id \u003d ref[\u0027id\u0027]"},{"line_number":87,"context_line":"                app_cred_role.role_id \u003d role[\u0027id\u0027]"},{"line_number":88,"context_line":"                session.add(app_cred_role)"},{"line_number":89,"context_line":"            application_credential_dict \u003d ref.to_dict()"},{"line_number":90,"context_line":"            application_credential_dict.pop(\u0027secret_hash\u0027)"},{"line_number":91,"context_line":"            application_credential_dict[\u0027roles\u0027] \u003d roles"},{"line_number":92,"context_line":"            return application_credential_dict"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def get_application_credential(self, application_credential_id):"},{"line_number":95,"context_line":"        with sql.session_for_read() as session:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7f96bb07_9324670f","line":92,"range":{"start_line":81,"start_character":0,"end_line":92,"end_character":46},"updated":"2018-01-12 02:50:23.000000000","message":"I got DB reference error when I test this feature.\nIt seems that we can\u0027t do this in one routine.\nI changed to something like: http://paste.openstack.org/show/643383/ , then it works fine.","commit_id":"cfc49003bbbba41827481c79fdbb4eddaec364a3"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f8cf5b6b027e8bdb7e6d6667234012fa1f757421","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def create_application_credential(self, application_credential, roles):"},{"line_number":79,"context_line":"        app_cred \u003d application_credential.copy()"},{"line_number":80,"context_line":"        self._hash_secret(app_cred)"},{"line_number":81,"context_line":"        with sql.session_for_write() as session:"},{"line_number":82,"context_line":"            ref \u003d ApplicationCredentialModel.from_dict(app_cred)"},{"line_number":83,"context_line":"            session.add(ref)"},{"line_number":84,"context_line":"            for role in roles:"},{"line_number":85,"context_line":"                app_cred_role \u003d ApplicationCredentialRoleModel()"},{"line_number":86,"context_line":"                app_cred_role.application_credential_id \u003d ref[\u0027id\u0027]"},{"line_number":87,"context_line":"                app_cred_role.role_id \u003d role[\u0027id\u0027]"},{"line_number":88,"context_line":"                session.add(app_cred_role)"},{"line_number":89,"context_line":"            application_credential_dict \u003d ref.to_dict()"},{"line_number":90,"context_line":"            application_credential_dict.pop(\u0027secret_hash\u0027)"},{"line_number":91,"context_line":"            application_credential_dict[\u0027roles\u0027] \u003d roles"},{"line_number":92,"context_line":"            return application_credential_dict"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def get_application_credential(self, application_credential_id):"},{"line_number":95,"context_line":"        with sql.session_for_read() as session:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7f96bb07_1a894022","line":92,"range":{"start_line":81,"start_character":0,"end_line":92,"end_character":46},"in_reply_to":"7f96bb07_9324670f","updated":"2018-01-12 10:17:56.000000000","message":"Hmm, I\u0027m not seeing this error. Can you show what you did to get this error? This is what I tried: http://paste.openstack.org/show/643694/ I made sure I was using the version after I added the foreign key.","commit_id":"cfc49003bbbba41827481c79fdbb4eddaec364a3"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"da8c1c242a7b084d2e52e136a8e42cfb489d7955","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            if not app_cred_ref:"},{"line_number":124,"context_line":"                raise exception.ApplicationCredentialNotFound("},{"line_number":125,"context_line":"                    application_credential_id\u003dapplication_credential_id)"},{"line_number":126,"context_line":"            session.delete(app_cred_ref)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def delete_application_credentials_for_user(self, user_id):"},{"line_number":129,"context_line":"        with sql.session_for_write() as session:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7f96bb07_736c3b36","line":126,"updated":"2018-01-12 02:50:23.000000000","message":"A similar problem. We should delete the data in application_credential_role table first, otherwise a DB reference error will raise as well.","commit_id":"cfc49003bbbba41827481c79fdbb4eddaec364a3"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"da8c1c242a7b084d2e52e136a8e42cfb489d7955","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            query \u003d session.query(ApplicationCredentialModel)"},{"line_number":131,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":132,"context_line":"            query.delete()"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def delete_application_credentials_for_user_on_project(self, user_id,"},{"line_number":135,"context_line":"                                                           project_id):"},{"line_number":136,"context_line":"        with sql.session_for_write() as session:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7f96bb07_3376b308","line":133,"updated":"2018-01-12 02:50:23.000000000","message":"ditto","commit_id":"cfc49003bbbba41827481c79fdbb4eddaec364a3"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"da8c1c242a7b084d2e52e136a8e42cfb489d7955","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            query \u003d session.query(ApplicationCredentialModel)"},{"line_number":138,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":139,"context_line":"            query \u003d query.filter_by(project_id\u003dproject_id)"},{"line_number":140,"context_line":"            query.delete()"}],"source_content_type":"text/x-python","patch_set":22,"id":"7f96bb07_53733f16","line":140,"updated":"2018-01-12 02:50:23.000000000","message":"ditto","commit_id":"cfc49003bbbba41827481c79fdbb4eddaec364a3"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"0ea46d628497a625e885254c43671fc35ea7f9da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_5fea4f75","line":1,"range":{"start_line":1,"start_character":2,"end_line":1,"end_character":37},"updated":"2018-01-12 17:24:15.000000000","message":"Time flies.","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8631aced1caa5e96f99494505196de27fbc939ed","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_d62ba17f","line":1,"range":{"start_line":1,"start_character":2,"end_line":1,"end_character":37},"in_reply_to":"7f96bb07_5fea4f75","updated":"2018-01-12 22:28:43.000000000","message":"Done","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"0ea46d628497a625e885254c43671fc35ea7f9da","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    secret_hash \u003d sql.Column(sql.String(255), nullable\u003dFalse)"},{"line_number":34,"context_line":"    description \u003d sql.Column(sql.Text())"},{"line_number":35,"context_line":"    user_id \u003d sql.Column(sql.String(64), nullable\u003dFalse,)"},{"line_number":36,"context_line":"    project_id \u003d sql.Column(sql.String(64))"},{"line_number":37,"context_line":"    expires_at \u003d sql.Column(sql.DateTimeInt())"},{"line_number":38,"context_line":"    allow_application_credential_creation \u003d sql.Column(sql.Boolean)"},{"line_number":39,"context_line":"    __table_args__ \u003d (sql.UniqueConstraint(\u0027name\u0027, \u0027user_id\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_df92dff6","line":36,"range":{"start_line":36,"start_character":28,"end_line":36,"end_character":42},"updated":"2018-01-12 17:24:15.000000000","message":"This has been defined as nullable in the migration. Should be nullable here also.","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8631aced1caa5e96f99494505196de27fbc939ed","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    secret_hash \u003d sql.Column(sql.String(255), nullable\u003dFalse)"},{"line_number":34,"context_line":"    description \u003d sql.Column(sql.Text())"},{"line_number":35,"context_line":"    user_id \u003d sql.Column(sql.String(64), nullable\u003dFalse,)"},{"line_number":36,"context_line":"    project_id \u003d sql.Column(sql.String(64))"},{"line_number":37,"context_line":"    expires_at \u003d sql.Column(sql.DateTimeInt())"},{"line_number":38,"context_line":"    allow_application_credential_creation \u003d sql.Column(sql.Boolean)"},{"line_number":39,"context_line":"    __table_args__ \u003d (sql.UniqueConstraint(\u0027name\u0027, \u0027user_id\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_2b606101","line":36,"range":{"start_line":36,"start_character":28,"end_line":36,"end_character":42},"in_reply_to":"7f96bb07_df92dff6","updated":"2018-01-12 22:28:43.000000000","message":"*not nullable but yes","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"0ea46d628497a625e885254c43671fc35ea7f9da","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                raise exception.ApplicationCredentialNotFound("},{"line_number":107,"context_line":"                    application_credential_id\u003dapplication_credential_id)"},{"line_number":108,"context_line":"            app_cred_dict \u003d ref.to_dict()"},{"line_number":109,"context_line":"            app_cred_dict[\u0027roles\u0027] \u003d []"},{"line_number":110,"context_line":"            for role in session.query("},{"line_number":111,"context_line":"                    ApplicationCredentialRoleModel).filter_by("},{"line_number":112,"context_line":"                    application_credential_id\u003dapplication_credential_id):"},{"line_number":113,"context_line":"                app_cred_dict[\u0027roles\u0027].append({\u0027id\u0027: role.role_id})"},{"line_number":114,"context_line":"            return app_cred_dict"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def list_application_credentials_for_user(self, user_id, hints):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_4ad84b7e","line":113,"range":{"start_line":109,"start_character":12,"end_line":113,"end_character":67},"updated":"2018-01-12 17:24:15.000000000","message":"I\u0027m a little rusty and unfamiliar with some workings of sqlalchemy, but wouldn\u0027t this be automatically done with the \u0027backref\u0027 relationship?","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8631aced1caa5e96f99494505196de27fbc939ed","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                raise exception.ApplicationCredentialNotFound("},{"line_number":107,"context_line":"                    application_credential_id\u003dapplication_credential_id)"},{"line_number":108,"context_line":"            app_cred_dict \u003d ref.to_dict()"},{"line_number":109,"context_line":"            app_cred_dict[\u0027roles\u0027] \u003d []"},{"line_number":110,"context_line":"            for role in session.query("},{"line_number":111,"context_line":"                    ApplicationCredentialRoleModel).filter_by("},{"line_number":112,"context_line":"                    application_credential_id\u003dapplication_credential_id):"},{"line_number":113,"context_line":"                app_cred_dict[\u0027roles\u0027].append({\u0027id\u0027: role.role_id})"},{"line_number":114,"context_line":"            return app_cred_dict"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def list_application_credentials_for_user(self, user_id, hints):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_563791e4","line":113,"range":{"start_line":109,"start_character":12,"end_line":113,"end_character":67},"in_reply_to":"7f96bb07_4ad84b7e","updated":"2018-01-12 22:28:43.000000000","message":"Done","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"0ea46d628497a625e885254c43671fc35ea7f9da","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            if not app_cred_ref:"},{"line_number":130,"context_line":"                raise exception.ApplicationCredentialNotFound("},{"line_number":131,"context_line":"                    application_credential_id\u003dapplication_credential_id)"},{"line_number":132,"context_line":"            role_query \u003d session.query(ApplicationCredentialRoleModel)"},{"line_number":133,"context_line":"            role_refs \u003d role_query.filter_by("},{"line_number":134,"context_line":"                application_credential_id\u003dapp_cred_ref[\u0027id\u0027])"},{"line_number":135,"context_line":"            role_refs.delete()"},{"line_number":136,"context_line":"            session.delete(app_cred_ref)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def delete_application_credentials_for_user(self, user_id):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_aa378fb0","line":135,"range":{"start_line":132,"start_character":12,"end_line":135,"end_character":30},"updated":"2018-01-12 17:24:15.000000000","message":"This can be replaced by a cascade delete for the foreign key.","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8631aced1caa5e96f99494505196de27fbc939ed","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            if not app_cred_ref:"},{"line_number":130,"context_line":"                raise exception.ApplicationCredentialNotFound("},{"line_number":131,"context_line":"                    application_credential_id\u003dapplication_credential_id)"},{"line_number":132,"context_line":"            role_query \u003d session.query(ApplicationCredentialRoleModel)"},{"line_number":133,"context_line":"            role_refs \u003d role_query.filter_by("},{"line_number":134,"context_line":"                application_credential_id\u003dapp_cred_ref[\u0027id\u0027])"},{"line_number":135,"context_line":"            role_refs.delete()"},{"line_number":136,"context_line":"            session.delete(app_cred_ref)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def delete_application_credentials_for_user(self, user_id):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_f6357ddb","line":135,"range":{"start_line":132,"start_character":12,"end_line":135,"end_character":30},"in_reply_to":"7f96bb07_aa378fb0","updated":"2018-01-12 22:28:43.000000000","message":"Done","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"0ea46d628497a625e885254c43671fc35ea7f9da","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        with sql.session_for_write() as session:"},{"line_number":140,"context_line":"            query \u003d session.query(ApplicationCredentialModel)"},{"line_number":141,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":142,"context_line":"            query.delete()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def delete_application_credentials_for_user_on_project(self, user_id,"},{"line_number":145,"context_line":"                                                           project_id):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_4a1dab0d","line":142,"range":{"start_line":142,"start_character":12,"end_line":142,"end_character":26},"updated":"2018-01-12 17:24:15.000000000","message":"This would miss deleting the roles, unless the foreign key is set to cascade delete.","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8631aced1caa5e96f99494505196de27fbc939ed","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        with sql.session_for_write() as session:"},{"line_number":140,"context_line":"            query \u003d session.query(ApplicationCredentialModel)"},{"line_number":141,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":142,"context_line":"            query.delete()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def delete_application_credentials_for_user_on_project(self, user_id,"},{"line_number":145,"context_line":"                                                           project_id):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_b64db573","line":142,"range":{"start_line":142,"start_character":12,"end_line":142,"end_character":26},"in_reply_to":"7f96bb07_4a1dab0d","updated":"2018-01-12 22:28:43.000000000","message":"Done","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"0ea46d628497a625e885254c43671fc35ea7f9da","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            query \u003d session.query(ApplicationCredentialModel)"},{"line_number":148,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":149,"context_line":"            query \u003d query.filter_by(project_id\u003dproject_id)"},{"line_number":150,"context_line":"            query.delete()"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_0ac5635b","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":26},"updated":"2018-01-12 17:24:15.000000000","message":"Same comment as above.","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8631aced1caa5e96f99494505196de27fbc939ed","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            query \u003d session.query(ApplicationCredentialModel)"},{"line_number":148,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":149,"context_line":"            query \u003d query.filter_by(project_id\u003dproject_id)"},{"line_number":150,"context_line":"            query.delete()"}],"source_content_type":"text/x-python","patch_set":23,"id":"7f96bb07_d650810d","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":26},"in_reply_to":"7f96bb07_0ac5635b","updated":"2018-01-12 22:28:43.000000000","message":"Done","commit_id":"d470a9409714cd12a33e66dce2cf25f653deab7d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"779b529222f556a0aa4a26615cc7f87c65ed6a1d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    attributes \u003d [\u0027id\u0027, \u0027application_credential_id\u0027, \u0027name\u0027, \u0027secret_hash\u0027,"},{"line_number":29,"context_line":"                  \u0027description\u0027, \u0027user_id\u0027, \u0027project_id\u0027, \u0027expires_at\u0027,"},{"line_number":30,"context_line":"                  \u0027allow_application_credential_creation\u0027]"},{"line_number":31,"context_line":"    id \u003d sql.Column(sql.Integer, primary_key\u003dTrue, nullable\u003dFalse)"},{"line_number":32,"context_line":"    application_credential_id \u003d sql.Column(sql.String(64), nullable\u003dFalse)"},{"line_number":33,"context_line":"    name \u003d sql.Column(sql.String(255), nullable\u003dFalse)"},{"line_number":34,"context_line":"    secret_hash \u003d sql.Column(sql.String(255), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_d5ed82b7","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":6},"updated":"2018-01-16 20:47:03.000000000","message":"Where do we want to pop this off the reference before returning to the user?","commit_id":"ee01c022386ef844b6c55ae172cff74ae1e34256"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"fa5b238568d40b6314adcb37de49f0a7f43d37fb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    attributes \u003d [\u0027id\u0027, \u0027application_credential_id\u0027, \u0027name\u0027, \u0027secret_hash\u0027,"},{"line_number":29,"context_line":"                  \u0027description\u0027, \u0027user_id\u0027, \u0027project_id\u0027, \u0027expires_at\u0027,"},{"line_number":30,"context_line":"                  \u0027allow_application_credential_creation\u0027]"},{"line_number":31,"context_line":"    id \u003d sql.Column(sql.Integer, primary_key\u003dTrue, nullable\u003dFalse)"},{"line_number":32,"context_line":"    application_credential_id \u003d sql.Column(sql.String(64), nullable\u003dFalse)"},{"line_number":33,"context_line":"    name \u003d sql.Column(sql.String(255), nullable\u003dFalse)"},{"line_number":34,"context_line":"    secret_hash \u003d sql.Column(sql.String(255), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_bb4547b6","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":6},"in_reply_to":"7f96bb07_d5ed82b7","updated":"2018-01-16 22:06:32.000000000","message":"I have it in the manager currently, could move it down to the driver","commit_id":"ee01c022386ef844b6c55ae172cff74ae1e34256"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"36b5b7d4ccf7ae6f0e21a1c21a95ac2e32757cc6","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    attributes \u003d [\u0027id\u0027, \u0027application_credential_id\u0027, \u0027name\u0027, \u0027secret_hash\u0027,"},{"line_number":29,"context_line":"                  \u0027description\u0027, \u0027user_id\u0027, \u0027project_id\u0027, \u0027expires_at\u0027,"},{"line_number":30,"context_line":"                  \u0027allow_application_credential_creation\u0027]"},{"line_number":31,"context_line":"    id \u003d sql.Column(sql.Integer, primary_key\u003dTrue, nullable\u003dFalse)"},{"line_number":32,"context_line":"    application_credential_id \u003d sql.Column(sql.String(64), nullable\u003dFalse)"},{"line_number":33,"context_line":"    name \u003d sql.Column(sql.String(255), nullable\u003dFalse)"},{"line_number":34,"context_line":"    secret_hash \u003d sql.Column(sql.String(255), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f96bb07_1a3a1598","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":6},"updated":"2018-01-17 17:36:01.000000000","message":"We should make sure we keep this property internal to this specific driver.","commit_id":"8107a5fd10f4f626552cd5816c8a2760a9ce6534"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"36b5b7d4ccf7ae6f0e21a1c21a95ac2e32757cc6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            if ref is None:"},{"line_number":119,"context_line":"                raise exception.ApplicationCredentialNotFound("},{"line_number":120,"context_line":"                    application_credential_id\u003dapplication_credential_id)"},{"line_number":121,"context_line":"            app_cred_dict \u003d self._to_dict(ref)"},{"line_number":122,"context_line":"            return app_cred_dict"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def list_application_credentials_for_user(self, user_id, hints):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f96bb07_3a66f1c2","line":121,"range":{"start_line":121,"start_character":12,"end_line":121,"end_character":25},"updated":"2018-01-17 17:36:01.000000000","message":"We should make sure the internal id property is removed here and the application_credential[\u0027id\u0027] \u003d app_cred_dict[\u0027application_credential_id\u0027]","commit_id":"8107a5fd10f4f626552cd5816c8a2760a9ce6534"}]}
