)]}'
{"vitrage/datasources/alarm_driver_base.py":[{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"1d5f59b49ba9dc8bbaa1060c9ed002835ca80fff","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                # delete state changed alarm: alarm-\u003eOK"},{"line_number":107,"context_line":"                if not self._is_erroneous(alarm):"},{"line_number":108,"context_line":"                    alarm[DSProps.EVENT_TYPE] \u003d EventAction.DELETE_ENTITY"},{"line_number":109,"context_line":"                alarms_to_update.append(alarm)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            self.cache[alarm_key] \u003d alarm, now"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_d1d3de5d","line":109,"updated":"2016-11-24 11:32:46.000000000","message":"Let me explain more detailedly. I didn\u0027t change the logical here. Here filter three alarms which need to be handled.\n1)new added alarm \n2)alarm state changed form \"alarm\" to \"ok\"\n3)alarm delete.\ncurrently:\n1) action added by update. \n3) action added at line118.\n2) action added in alarm_transformer_base.py.\n\nHere I just add the delete action for 2), so we don\u0027t need to handle the situation specically in alarm_transformer_base.py.\nAnd in the transformer_base.py, we should add a process which entity already has an action. This can be a common process for all entities.","commit_id":"a6b1c73c60124cfc55e7c16d736ffb54c5a359cb"}],"vitrage/datasources/alarm_transformer_base.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"cb0bd198205831a52fe281e70051cdc279ca725d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        LOG.info(\u0027An alarm cannot be a placeholder\u0027)"},{"line_number":38,"context_line":"        pass"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _extract_action_type(self, entity_event):"},{"line_number":41,"context_line":"        # TODO(ifat_afek): this method should reside together with the cache,"},{"line_number":42,"context_line":"        # in the transformer code"},{"line_number":43,"context_line":"        if DSProps.EVENT_TYPE in entity_event and \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_c256c805","side":"PARENT","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":28},"updated":"2016-11-22 07:23:50.000000000","message":"Did you move this code to another place?","commit_id":"e070c4a135a54b7c9ccb7ee17ce2b82ffdaab0ef"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"23b1015bbd69335e62f8def1ee2bf935cae61be3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        LOG.info(\u0027An alarm cannot be a placeholder\u0027)"},{"line_number":38,"context_line":"        pass"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _extract_action_type(self, entity_event):"},{"line_number":41,"context_line":"        # TODO(ifat_afek): this method should reside together with the cache,"},{"line_number":42,"context_line":"        # in the transformer code"},{"line_number":43,"context_line":"        if DSProps.EVENT_TYPE in entity_event and \\"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_2fbe84ff","side":"PARENT","line":40,"range":{"start_line":40,"start_character":8,"end_line":40,"end_character":28},"in_reply_to":"7a77a97e_c256c805","updated":"2016-11-22 08:28:46.000000000","message":"Yes, move to transformer_base.py.","commit_id":"e070c4a135a54b7c9ccb7ee17ce2b82ffdaab0ef"}],"vitrage/datasources/transformer_base.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7914adc9419495767b28fb5dbf9c71f6c475272b","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        :rtype: str"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if DSProps.EVENT_TYPE in entity_event and \\"},{"line_number":216,"context_line":"            entity_event[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":217,"context_line":"            return entity_event[DSProps.EVENT_TYPE]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        action_type \u003d entity_event[DSProps.ACTION_TYPE]"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_22db6c1c","line":217,"range":{"start_line":215,"start_character":0,"end_line":217,"end_character":51},"updated":"2016-11-28 16:16:10.000000000","message":"This code is very hard to understand. This is not your fault - it was written this way before. But as I keep getting confused between action type, event type and event action - can you please add a few comments, something like: \n\n- event_type is the type of event/notification that comes from the datasource.\n- event_action is used to tell the evaluator what to do with the entity - create, update or delete it.\n- action_type is the type of action that was performed by the driver: init_snapshot, snapshot or update.\n\nAnd please add also, above the first line:\nevent_type is being abused by the driver in order to ask the transformer to delete the entity.\n\nFeel free to rephrase in a way that seems more clear to you.\n\nAlexey - I think we should approve Dong\u0027s change, after these small fixes, but then we should consider renaming the constants again. The function is called _extract_action_type, but it returns EventAction, while ACTION_TYPE is something different. Very confusing.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"a5c67512ef33b044475e3f3aaec8162ebdbc92f5","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        :rtype: str"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if DSProps.EVENT_TYPE in entity_event and \\"},{"line_number":216,"context_line":"            entity_event[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":217,"context_line":"            return entity_event[DSProps.EVENT_TYPE]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        action_type \u003d entity_event[DSProps.ACTION_TYPE]"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_e55c197f","line":217,"range":{"start_line":215,"start_character":0,"end_line":217,"end_character":51},"in_reply_to":"5a74a57a_22db6c1c","updated":"2016-11-28 18:15:58.000000000","message":"1. I don\u0027t think we need to add that \"event_type is being abused..\" because Dongs\u0027 comments of what each variable means will explain it any way.\n2. I think that if we add those commits mentioned above about what each variable means, it should be explained in the beginning of the _extract_action_type method.\n3. I don\u0027t think we will need to change the constants but change only the methods\u0027 name.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"b26cf02e5d18403edd02334d03b0097a69d9fd53","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        :rtype: str"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if DSProps.EVENT_TYPE in entity_event and \\"},{"line_number":216,"context_line":"            entity_event[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":217,"context_line":"            return entity_event[DSProps.EVENT_TYPE]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        action_type \u003d entity_event[DSProps.ACTION_TYPE]"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_5a43d512","line":217,"range":{"start_line":215,"start_character":0,"end_line":217,"end_character":51},"in_reply_to":"5a74a57a_93d3a1d4","updated":"2016-11-29 06:51:42.000000000","message":"Replying to Alexey:\n1. event_type is supposed to hold for example cinder.volume.update. It is not supposed to hold EventAction.DELETE_ENTITY. The fact that it does - is an abuse (originally written by me, I believe)\n2. agree\n3. I think changing the method name is good, but not enough\n\nAnyway - this discussion does not belong in this patch... and is not supposed to stop us from approving it. We can make these changes later if we want.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"8fe6182b9138e95102584788b58faa5a2c74b506","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        :rtype: str"},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        if DSProps.EVENT_TYPE in entity_event and \\"},{"line_number":216,"context_line":"            entity_event[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":217,"context_line":"            return entity_event[DSProps.EVENT_TYPE]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        action_type \u003d entity_event[DSProps.ACTION_TYPE]"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_93d3a1d4","line":217,"range":{"start_line":215,"start_character":0,"end_line":217,"end_character":51},"in_reply_to":"5a74a57a_e55c197f","updated":"2016-11-29 02:06:12.000000000","message":"I\u0027ll rename the method\u0027s name.\nI agree that it\u0027s confused the `event_type` sometimes filled with notification event, sometimes as event_action. We can improve it in another patch.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"}],"vitrage/tests/unit/datasources/nagios/test_nagios_transformer.py":[{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"ba36cf6d7fc3e432efd478a2c42d9c031c78a38c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        sync_mode \u003d alarm[DSProps.SYNC_MODE]"},{"line_number":107,"context_line":"        if sync_mode in (SyncMode.SNAPSHOT, SyncMode.UPDATE):"},{"line_number":108,"context_line":"            if alarm[NagiosProperties.STATUS] \u003d\u003d \u0027OK\u0027:"},{"line_number":109,"context_line":"                self.assertEqual(EventAction.DELETE_ENTITY, wrapper.action)"},{"line_number":110,"context_line":"            else:"},{"line_number":111,"context_line":"                self.assertEqual(EventAction.UPDATE_ENTITY, wrapper.action)"},{"line_number":112,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_5f243eae","side":"PARENT","line":109,"updated":"2016-11-24 09:26:36.000000000","message":"Not understanding how this branch is covered after modification. No more DELETE_ENTITY action?","commit_id":"e070c4a135a54b7c9ccb7ee17ce2b82ffdaab0ef"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"8670600d29b1fa0e36e077a33f361824a793862e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        sync_mode \u003d alarm[DSProps.SYNC_MODE]"},{"line_number":107,"context_line":"        if sync_mode in (SyncMode.SNAPSHOT, SyncMode.UPDATE):"},{"line_number":108,"context_line":"            if alarm[NagiosProperties.STATUS] \u003d\u003d \u0027OK\u0027:"},{"line_number":109,"context_line":"                self.assertEqual(EventAction.DELETE_ENTITY, wrapper.action)"},{"line_number":110,"context_line":"            else:"},{"line_number":111,"context_line":"                self.assertEqual(EventAction.UPDATE_ENTITY, wrapper.action)"},{"line_number":112,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_9f6ed694","side":"PARENT","line":109,"in_reply_to":"5a74a57a_5f243eae","updated":"2016-11-24 09:31:10.000000000","message":"No，alarm[DSProps.EVENT_TYPE] \u003d DELETE_ENTITY， it can be  checked as I add these code:\n        if DSProps.EVENT_TYPE in alarm \\\n            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():\n            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)","commit_id":"e070c4a135a54b7c9ccb7ee17ce2b82ffdaab0ef"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"5060d995b69ace87a744747ea78235957ee2c1fa","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def _validate_action(self, alarm, wrapper):"},{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        sync_mode \u003d alarm[DSProps.SYNC_MODE]"},{"line_number":111,"context_line":"        if sync_mode in (SyncMode.SNAPSHOT, SyncMode.UPDATE):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_d5590f5c","line":108,"updated":"2016-11-24 10:06:50.000000000","message":"But this branch does not return immediately. It will continue execution.\n \nIs there a condition that wrapper.action equals DELETE_ENTITY? If yes, what will happen? If no, why tested before the change?","commit_id":"a6b1c73c60124cfc55e7c16d736ffb54c5a359cb"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"1d5f59b49ba9dc8bbaa1060c9ed002835ca80fff","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def _validate_action(self, alarm, wrapper):"},{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        sync_mode \u003d alarm[DSProps.SYNC_MODE]"},{"line_number":111,"context_line":"        if sync_mode in (SyncMode.SNAPSHOT, SyncMode.UPDATE):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_4e6e4997","line":108,"in_reply_to":"5a74a57a_d5590f5c","updated":"2016-11-24 11:32:46.000000000","message":"The wrapper.action equals to DELETE_ENTITY when the alarm which is deleted or state changed from \u0027alarm\u0027 to \u0027ok\u0027.\nEm....Here should return immediately. Strange to pass.","commit_id":"a6b1c73c60124cfc55e7c16d736ffb54c5a359cb"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7914adc9419495767b28fb5dbf9c71f6c475272b","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_87953234","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"updated":"2016-11-28 16:16:10.000000000","message":"I would not return here. Instead, I would keep the old test in addition to the new one.\nI understand that the new test should work now; but I would also like to verify in the test, that alarms with state OK have a DELETE_ENTITY event action.\n\nWhat I mean is to have:\n\n        if DSProps.EVENT_TYPE in alarm \\\n            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():\n            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)\n\n        action_type \u003d alarm[DSProps.ACTION_TYPE]\n        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):\n            if alarm[NagiosProperties.STATUS] \u003d\u003d \u0027OK\u0027:\n                self.assertEqual(EventAction.DELETE_ENTITY, wrapper.action)\n            else:\n                self.assertEqual(EventAction.UPDATE_ENTITY, wrapper.action)\n        else:\n            self.assertEqual(EventAction.CREATE_ENTITY, wrapper.action)","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0d844829fd19c3547e0672951ee4a83c0b7b94ca","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_4b8225c9","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"in_reply_to":"5a74a57a_406cc407","updated":"2016-11-29 08:12:56.000000000","message":"It is covered in your current implementation. Tomorrow someone will slightly modify the implementation, and there can be a case that your test will succeed but the old (deleted) test will fail.\nThe old test is much more important than the new one, since it covers a real use case and not a specific implementation.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"8a519f36a6cf1561f10838ecbbb3e825f9f974c3","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_66cc78bb","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"in_reply_to":"5a74a57a_4b8225c9","updated":"2016-11-29 08:28:28.000000000","message":"Ok,i\u0027ll add it in another patch. The patch is already merged. Thanks~","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"cd1906734980e1aa3bcc77fe8b52a82f72f4ec14","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_406cc407","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"in_reply_to":"5a74a57a_5a7035a4","updated":"2016-11-29 07:52:10.000000000","message":"The alarm_entity with \u0027ok\u0027 state is filled with `DSProps.EVENT_TYPE` as `EventAction.DELETE_ENTITY`.\nL106-108 already covered the use case. :)","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8b18a43694296829c8febdf9c7961759a6cc9421","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_660e388d","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"in_reply_to":"5a74a57a_66cc78bb","updated":"2016-11-29 08:40:57.000000000","message":"ok, thanks","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"b26cf02e5d18403edd02334d03b0097a69d9fd53","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_5a7035a4","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"in_reply_to":"5a74a57a_788262c9","updated":"2016-11-29 06:51:42.000000000","message":"Why do you think the event type should be different in this case, and not update? do you have an example for that?\n\nI think that the fact that you changed the implementation and made it nicer/more efficient should not affect the results of the tests. Eventually, for a specific alarm we expect the datasource to behave the same, right? it is all a matter of where in the code you make the decision, but the decision itself is not supposed to be different. \n\nThe important thing IMO is that if the alarm is of state OK, then the test must verify that the alarm is being deleted. This is an important use case, and if someone breaks it we need to know about it.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"8fe6182b9138e95102584788b58faa5a2c74b506","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":107,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":108,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":109,"context_line":"            return"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":112,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_788262c9","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":18},"in_reply_to":"5a74a57a_87953234","updated":"2016-11-29 02:06:12.000000000","message":"Em...I think here needs return. If the alarm without \u0027OK\u0027 status, maybe fill `DSProps.EVENT_TYPE` with other action, not update, the test case will run failed.","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"}],"vitrage/tests/unit/datasources/zabbix/test_zabbix_transformer.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7914adc9419495767b28fb5dbf9c71f6c475272b","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if DSProps.EVENT_TYPE in alarm \\"},{"line_number":113,"context_line":"            and alarm[DSProps.EVENT_TYPE] in EventAction.__dict__.values():"},{"line_number":114,"context_line":"            self.assertEqual(alarm[DSProps.EVENT_TYPE], wrapper.action)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        action_type \u003d alarm[DSProps.ACTION_TYPE]"},{"line_number":118,"context_line":"        if action_type in (ActionType.SNAPSHOT, ActionType.UPDATE):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a74a57a_e7cd0667","line":115,"range":{"start_line":115,"start_character":12,"end_line":115,"end_character":18},"updated":"2016-11-28 16:16:10.000000000","message":"Same comment as for Nagios","commit_id":"988bbb215a6cf0ce9cb8032744b5d13298a02aee"}]}
