)]}'
{"keystone/credential/controllers.py":[{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"8a611184366e088ff67763af11b0f2f4f8914f38","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if old_cred[\u0027type\u0027] !\u003d \u0027ec2\u0027 and not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_f2d45f48","line":112,"range":{"start_line":112,"start_character":15,"end_line":112,"end_character":45},"updated":"2016-08-19 16:55:03.000000000","message":"this check is not necessary","commit_id":"e3e2adc5b71a065dd7379d057ea2afc86d797c52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"fe6141b8130be550120c4974df7e11912775547c","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if old_cred[\u0027type\u0027] !\u003d \u0027ec2\u0027 and not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_6de4120d","line":112,"range":{"start_line":112,"start_character":15,"end_line":112,"end_character":45},"in_reply_to":"1ac06dbe_f2d45f48","updated":"2016-08-19 16:59:34.000000000","message":"Done","commit_id":"e3e2adc5b71a065dd7379d057ea2afc86d797c52"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1c2306517521e2bd8724345b07f4f1d510c8b7d5","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_19f0dbfd","line":105,"range":{"start_line":102,"start_character":27,"end_line":105,"end_character":21},"updated":"2016-08-22 18:21:13.000000000","message":"suggested wording change:\n\n\"ec2 credentials require a \"project_id\" to be functional. Before we update, check the case where a non-ec2 credential changes its type to be \"ec2\", but has no associated \"project_id\", either in the request or already set in the database.\"","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"92b291d3892e343a181c0fbdf78bf822c668098d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_fc74cd36","line":105,"range":{"start_line":102,"start_character":27,"end_line":105,"end_character":21},"in_reply_to":"1ac06dbe_19f0dbfd","updated":"2016-08-22 18:46:11.000000000","message":"Done","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1c2306517521e2bd8724345b07f4f1d510c8b7d5","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_394f976c","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":44},"updated":"2016-08-22 18:21:13.000000000","message":"this is only used once, just call it","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"92b291d3892e343a181c0fbdf78bf822c668098d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_1c96093f","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":44},"in_reply_to":"1ac06dbe_394f976c","updated":"2016-08-22 18:46:11.000000000","message":"Done","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"1c2306517521e2bd8724345b07f4f1d510c8b7d5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_595a532b","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":25},"updated":"2016-08-22 18:21:13.000000000","message":"same","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"92b291d3892e343a181c0fbdf78bf822c668098d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_5c9c015d","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":25},"in_reply_to":"1ac06dbe_595a532b","updated":"2016-08-22 18:46:11.000000000","message":"Done","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"325c6f2ff2002da1d45b91bfe5b0baee62d5e3e6","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        ref \u003d self.credential_api.update_credential(credential_id, credential)"},{"line_number":117,"context_line":"        return CredentialV3.wrap_member(request.context_dict, ref)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_430c8794","line":114,"range":{"start_line":102,"start_character":8,"end_line":114,"end_character":68},"updated":"2016-08-19 18:00:43.000000000","message":"While we do schema validation in the controller, business logic validation should be done in the manager layer.","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b8e56d3e7cd03ade9dfe5a2d9d33ee45aaf3657c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        ref \u003d self.credential_api.update_credential(credential_id, credential)"},{"line_number":117,"context_line":"        return CredentialV3.wrap_member(request.context_dict, ref)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_47d01254","line":114,"range":{"start_line":102,"start_character":8,"end_line":114,"end_character":68},"in_reply_to":"1ac06dbe_430c8794","updated":"2016-08-19 18:17:44.000000000","message":"I tend to disagree since this is more a request check than a business logic validation. The only reason to keep it here instead of using a JSON schema e that we need to check the previous stored credential.","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"3204fbfd385f030cc2940d6df3d524df35786eed","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        ref \u003d self.credential_api.update_credential(credential_id, credential)"},{"line_number":117,"context_line":"        return CredentialV3.wrap_member(request.context_dict, ref)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_f0aa926f","line":114,"range":{"start_line":102,"start_character":8,"end_line":114,"end_character":68},"in_reply_to":"1ac06dbe_47d01254","updated":"2016-08-19 19:36:02.000000000","message":"I can see the request check argument, however this still feels more like validation that belongs in the manager class. Especially if it is not part of schema validation. We do similar kinds of checking already in the manager classes:\n* https://github.com/openstack/keystone/blob/master/keystone/assignment/core.py#L1207\n* https://github.com/openstack/keystone/blob/master/keystone/identity/core.py#L956\n...\n\nI just think we need to be consistent with where this type of validation belongs.","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"cb9a990e7d4038cd51612e64b4642b0c7acdde41","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        ref \u003d self.credential_api.update_credential(credential_id, credential)"},{"line_number":117,"context_line":"        return CredentialV3.wrap_member(request.context_dict, ref)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_81baa86c","line":114,"range":{"start_line":102,"start_character":8,"end_line":114,"end_character":68},"in_reply_to":"1ac06dbe_9ed4cd20","updated":"2016-08-22 14:30:45.000000000","message":"thinking clearly about this, I would like to have the controller layer only handling parsing and query parameters, will put this in the manager layer","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"ee011fed947a7e3d4aa0ce4a52caa810b66dae53","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def update_credential(self, request, credential_id, credential):"},{"line_number":100,"context_line":"        validation.lazy_validate(schema.credential_update, credential)"},{"line_number":101,"context_line":"        self._require_matching_id(credential_id, credential)"},{"line_number":102,"context_line":"        # NOTE(rodrigods): credentials of the ec2 type require a project_id."},{"line_number":103,"context_line":"        # We need to check if the new credential provides a project_id or if"},{"line_number":104,"context_line":"        # the old credential already has a project_id set when updating the"},{"line_number":105,"context_line":"        # type to ec2"},{"line_number":106,"context_line":"        update_type \u003d credential.get(\u0027type\u0027)"},{"line_number":107,"context_line":"        update_project_id \u003d credential.get(\u0027project_id\u0027)"},{"line_number":108,"context_line":"        # There is no need to check the old credential unless the request"},{"line_number":109,"context_line":"        # contains the ec2 type without providing a project_id"},{"line_number":110,"context_line":"        if update_type \u003d\u003d \u0027ec2\u0027 and not update_project_id:"},{"line_number":111,"context_line":"            old_cred \u003d self.credential_api.get_credential(credential_id)"},{"line_number":112,"context_line":"            if not old_cred[\u0027project_id\u0027]:"},{"line_number":113,"context_line":"                raise exception.ValidationError(attribute\u003d\u0027project_id\u0027,"},{"line_number":114,"context_line":"                                                target\u003d\u0027credential\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        ref \u003d self.credential_api.update_credential(credential_id, credential)"},{"line_number":117,"context_line":"        return CredentialV3.wrap_member(request.context_dict, ref)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_9ed4cd20","line":114,"range":{"start_line":102,"start_character":8,"end_line":114,"end_character":68},"in_reply_to":"1ac06dbe_f0aa926f","updated":"2016-08-22 12:08:06.000000000","message":"Yep, consistency is a good thing but we have examples of such validations in both layers not only in the Manager. Similar checks are even implemented in the common controller: https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L667-L687","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"}],"keystone/tests/unit/test_v3_credential.py":[{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"325c6f2ff2002da1d45b91bfe5b0baee62d5e3e6","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            \u0027/credentials/%(credential_id)s\u0027 % {"},{"line_number":207,"context_line":"                \u0027credential_id\u0027: credential_id},"},{"line_number":208,"context_line":"            body\u003d{\u0027credential\u0027: update_ref},"},{"line_number":209,"context_line":"            expected_status\u003dhttp_client.BAD_REQUEST)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_update_credential_to_ec2_with_previously_set_project_id(self):"},{"line_number":212,"context_line":"        \"\"\"Call ``PATCH /credentials/{credential_id}``.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_63238306","line":209,"range":{"start_line":209,"start_character":40,"end_line":209,"end_character":51},"updated":"2016-08-19 18:00:43.000000000","message":"You also need a test (maybe in a different module) that test for exception.ValidationError.","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b8e56d3e7cd03ade9dfe5a2d9d33ee45aaf3657c","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            \u0027/credentials/%(credential_id)s\u0027 % {"},{"line_number":207,"context_line":"                \u0027credential_id\u0027: credential_id},"},{"line_number":208,"context_line":"            body\u003d{\u0027credential\u0027: update_ref},"},{"line_number":209,"context_line":"            expected_status\u003dhttp_client.BAD_REQUEST)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_update_credential_to_ec2_with_previously_set_project_id(self):"},{"line_number":212,"context_line":"        \"\"\"Call ``PATCH /credentials/{credential_id}``.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_a748e62e","line":209,"range":{"start_line":209,"start_character":40,"end_line":209,"end_character":51},"in_reply_to":"1ac06dbe_63238306","updated":"2016-08-19 18:17:44.000000000","message":"Why? Isn\u0027t the check made in the controller layer? Checking the content of the exception is more like testing if it is converted to the correct HTTP error.","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"3204fbfd385f030cc2940d6df3d524df35786eed","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            \u0027/credentials/%(credential_id)s\u0027 % {"},{"line_number":207,"context_line":"                \u0027credential_id\u0027: credential_id},"},{"line_number":208,"context_line":"            body\u003d{\u0027credential\u0027: update_ref},"},{"line_number":209,"context_line":"            expected_status\u003dhttp_client.BAD_REQUEST)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_update_credential_to_ec2_with_previously_set_project_id(self):"},{"line_number":212,"context_line":"        \"\"\"Call ``PATCH /credentials/{credential_id}``.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_dbafb7e1","line":209,"range":{"start_line":209,"start_character":40,"end_line":209,"end_character":51},"in_reply_to":"1ac06dbe_a748e62e","updated":"2016-08-19 19:36:02.000000000","message":"Don\u0027t other exceptions convert into a BAD_REQUEST? How do you know that a ValidationError was raised?","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"ee011fed947a7e3d4aa0ce4a52caa810b66dae53","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            \u0027/credentials/%(credential_id)s\u0027 % {"},{"line_number":207,"context_line":"                \u0027credential_id\u0027: credential_id},"},{"line_number":208,"context_line":"            body\u003d{\u0027credential\u0027: update_ref},"},{"line_number":209,"context_line":"            expected_status\u003dhttp_client.BAD_REQUEST)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_update_credential_to_ec2_with_previously_set_project_id(self):"},{"line_number":212,"context_line":"        \"\"\"Call ``PATCH /credentials/{credential_id}``.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_e4e8d4b6","line":209,"range":{"start_line":209,"start_character":40,"end_line":209,"end_character":51},"in_reply_to":"1ac06dbe_dbafb7e1","updated":"2016-08-22 12:08:06.000000000","message":"Yes, similar Validation...Error ones, but the test is not for the exception type but to guarantee that such calls made to the API will fail.","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"}],"releasenotes/notes/bug-1613466-credential-update-ec2-type-8fb51ff3ad3a449c.yaml":[{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"325c6f2ff2002da1d45b91bfe5b0baee62d5e3e6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"  - \u003e"},{"line_number":3,"context_line":"    [`bug 1613466 \u003chttps://bugs.launchpad.net/keystone/+bug/1613466\u003e`_]"},{"line_number":4,"context_line":"    Credentials update to ec2 type originally accepted credentials with no"},{"line_number":5,"context_line":"    project set, this would lead to an error when trying to use such credential."},{"line_number":6,"context_line":"    This behavior has been blocked, so creating a non-ec2 credential with no"},{"line_number":7,"context_line":"    project and updating it to ec2 without providing a project will fail with a"},{"line_number":8,"context_line":"    `404 Bad Request` error."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"1ac06dbe_a3745bfd","line":5,"range":{"start_line":5,"start_character":17,"end_line":5,"end_character":21},"updated":"2016-08-19 18:00:43.000000000","message":"nit: which would...","commit_id":"aa4189b799bbddfe0e18356b95e0e5c08c2fcb52"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3159192eba1472c2333bf940f705cae87bf54e61","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Credentials update to ec2 type originally accepted credentials with no"},{"line_number":5,"context_line":"    project set, this would lead to an error when trying to use such credential."},{"line_number":6,"context_line":"    This behavior has been blocked, so creating a non-ec2 credential with no"},{"line_number":7,"context_line":"    project and updating it to ec2 without providing a project will fail with a"},{"line_number":8,"context_line":"    `404 Bad Request` error."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1ac06dbe_3dd768ee","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":11},"updated":"2016-08-23 06:56:34.000000000","message":"project id","commit_id":"e0d5302c24a153a7bb9e0ea579af0f03e163669c"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3159192eba1472c2333bf940f705cae87bf54e61","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Credentials update to ec2 type originally accepted credentials with no"},{"line_number":5,"context_line":"    project set, this would lead to an error when trying to use such credential."},{"line_number":6,"context_line":"    This behavior has been blocked, so creating a non-ec2 credential with no"},{"line_number":7,"context_line":"    project and updating it to ec2 without providing a project will fail with a"},{"line_number":8,"context_line":"    `404 Bad Request` error."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1ac06dbe_bd01986c","line":7,"range":{"start_line":7,"start_character":55,"end_line":7,"end_character":62},"updated":"2016-08-23 06:56:34.000000000","message":"project id","commit_id":"e0d5302c24a153a7bb9e0ea579af0f03e163669c"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3159192eba1472c2333bf940f705cae87bf54e61","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    project set, this would lead to an error when trying to use such credential."},{"line_number":6,"context_line":"    This behavior has been blocked, so creating a non-ec2 credential with no"},{"line_number":7,"context_line":"    project and updating it to ec2 without providing a project will fail with a"},{"line_number":8,"context_line":"    `404 Bad Request` error."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1ac06dbe_7de440e0","line":8,"range":{"start_line":8,"start_character":5,"end_line":8,"end_character":8},"updated":"2016-08-23 06:56:34.000000000","message":"pls update this to 400, 404 is for \u0027NOT FOUND\u0027.","commit_id":"e0d5302c24a153a7bb9e0ea579af0f03e163669c"}]}
