)]}'
{"trove/instance/models.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"956b7e685c4dd363e81591700424d987041061d4","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        LOG.error(msg)"},{"line_number":1027,"context_line":"        raise exception.UnprocessableEntity(msg)"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    def _validate_can_perform_assign(self):"},{"line_number":1030,"context_line":"        \"\"\""},{"line_number":1031,"context_line":"        Raises exception if a configuration assign cannot"},{"line_number":1032,"context_line":"        currently be performed"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_c046b24e","line":1029,"updated":"2015-10-08 03:44:38.000000000","message":"Validation should probably happen here.","commit_id":"85a76da5167e7f28a3d296d6a0f829ef01fce6fb"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"956b7e685c4dd363e81591700424d987041061d4","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"            raise exception.NotFound("},{"line_number":1093,"context_line":"                message\u003d\u0027Configuration group id: %s could not be found.\u0027"},{"line_number":1094,"context_line":"                % configuration_id)"},{"line_number":1095,"context_line":"        from trove.cluster.models import is_cluster_deleting"},{"line_number":1096,"context_line":"        if (self.db_info.cluster_id is not None and not"},{"line_number":1097,"context_line":"           is_cluster_deleting(self.context, self.db_info.cluster_id)):"},{"line_number":1098,"context_line":"            raise exception.ClusterInstanceOperationNotSupported()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_407f0266","line":1095,"updated":"2015-10-08 03:44:38.000000000","message":"Why exactly do we need to check for deleting here? Does it mean it\u0027s ok to assign configuration to instances that are being deleted...? That does not make much sense. I don\u0027t think this is the same situation as with the \u0027delete\u0027 command...","commit_id":"85a76da5167e7f28a3d296d6a0f829ef01fce6fb"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"b19ebe1dd1e04ab876c6fa6f55668ff9ffbf3e26","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            raise exception.ConfigurationAlreadyAttached("},{"line_number":1037,"context_line":"                instance_id\u003dself.id,"},{"line_number":1038,"context_line":"                configuration_id\u003dself.db_info.configuration_id)"},{"line_number":1039,"context_line":"        # check if the instance is not the part of a cluster"},{"line_number":1040,"context_line":"        if self.db_info.cluster_id is not None:"},{"line_number":1041,"context_line":"            raise exception.ClusterInstanceOperationNotSupported()"},{"line_number":1042,"context_line":"        # check if the instance is not ACTIVE or has tasks"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_33f53cec","line":1039,"updated":"2015-12-08 17:01:31.000000000","message":"This comment isn\u0027t necessary (it\u0027s pretty much obvious from the code that it is making sure you can\u0027t do the operation if the instance is in a cluster), but if you really want to put one you should at least make it correct.  The code is checking if the instance is in a cluster, not checking that it is not in a cluster.  Also, the \"is not None\" is not necessary, not pythonic, and is not consistent with usage elsewhere in this method.","commit_id":"029b3f02f4044dc4aa0172331ad1140efc3c2d0d"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"cabe7ac191c9b88966fb778721f7bce389833946","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            raise exception.ConfigurationAlreadyAttached("},{"line_number":1037,"context_line":"                instance_id\u003dself.id,"},{"line_number":1038,"context_line":"                configuration_id\u003dself.db_info.configuration_id)"},{"line_number":1039,"context_line":"        # check if the instance is not the part of a cluster"},{"line_number":1040,"context_line":"        if self.db_info.cluster_id is not None:"},{"line_number":1041,"context_line":"            raise exception.ClusterInstanceOperationNotSupported()"},{"line_number":1042,"context_line":"        # check if the instance is not ACTIVE or has tasks"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_bf921d56","line":1039,"in_reply_to":"7a740942_33f53cec","updated":"2016-01-20 16:32:34.000000000","message":"Maybe change the comment to\n\n  \"ensure the instance is not ...\"\n  \n\nI\u0027d have to disagree that \u0027is not None\u0027 is not pythonic, since \"if var:\" and \"if var is not None:\" are not identical.  That said, in this case\n\n  \"if self.db_info.cluster_id:\"\nis probably the correct code to use, as an ID of \u0027\u0027 or \u00270\u0027 is likely wrong.","commit_id":"029b3f02f4044dc4aa0172331ad1140efc3c2d0d"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"2ad9cc0c795a977fe79e77ad6b898961cba8894a","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            raise exception.ConfigurationAlreadyAttached("},{"line_number":1037,"context_line":"                instance_id\u003dself.id,"},{"line_number":1038,"context_line":"                configuration_id\u003dself.db_info.configuration_id)"},{"line_number":1039,"context_line":"        # check if the instance is not the part of a cluster"},{"line_number":1040,"context_line":"        if self.db_info.cluster_id is not None:"},{"line_number":1041,"context_line":"            raise exception.ClusterInstanceOperationNotSupported()"},{"line_number":1042,"context_line":"        # check if the instance is not ACTIVE or has tasks"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_eaa4eaa6","line":1039,"in_reply_to":"9a68dd71_bf921d56","updated":"2016-01-29 08:43:22.000000000","message":"i agree it should not be checking for None here as Peter mentioned.","commit_id":"029b3f02f4044dc4aa0172331ad1140efc3c2d0d"}]}
