)]}'
{"doc/source/contributor/notifier-webhook-plugin.rst":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Vitrage can be configured to support webhooks for the sending of"},{"line_number":6,"context_line":"notifications regarding raised alarms, deactivated alarms, state changes,"},{"line_number":7,"context_line":"RCA or other to any registered targets."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Enable Webhook Workflow Execution"},{"line_number":10,"context_line":"---------------------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_5de9e117","line":7,"range":{"start_line":6,"start_character":24,"end_line":7,"end_character":38},"updated":"2018-01-04 10:30:56.000000000","message":"Are all of these supported?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Vitrage can be configured to support webhooks for the sending of"},{"line_number":6,"context_line":"notifications regarding raised alarms, deactivated alarms, state changes,"},{"line_number":7,"context_line":"RCA or other to any registered targets."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Enable Webhook Workflow Execution"},{"line_number":10,"context_line":"---------------------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_326527e2","line":7,"range":{"start_line":6,"start_character":24,"end_line":7,"end_character":38},"in_reply_to":"9f91af0f_5de9e117","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":6,"context_line":"notifications regarding raised alarms, deactivated alarms, state changes,"},{"line_number":7,"context_line":"RCA or other to any registered targets."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Enable Webhook Workflow Execution"},{"line_number":10,"context_line":"---------------------------------"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To enable webhook workflow execution, add webhook to the list of notifiers in"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_7dd5c542","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":33},"updated":"2018-01-04 10:30:56.000000000","message":"\u0027workflow execution\u0027 is a term used for the Mistral project. Why not just say \u0027enable webhooks\u0027?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":6,"context_line":"notifications regarding raised alarms, deactivated alarms, state changes,"},{"line_number":7,"context_line":"RCA or other to any registered targets."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Enable Webhook Workflow Execution"},{"line_number":10,"context_line":"---------------------------------"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To enable webhook workflow execution, add webhook to the list of notifiers in"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_7273afb2","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":33},"in_reply_to":"9f91af0f_7dd5c542","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Enable Webhook Workflow Execution"},{"line_number":10,"context_line":"---------------------------------"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To enable webhook workflow execution, add webhook to the list of notifiers in"},{"line_number":13,"context_line":"/etc/vitrage/vitrage.conf file:"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"   .. code::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_1dccb9ba","line":12,"range":{"start_line":12,"start_character":18,"end_line":12,"end_character":36},"updated":"2018-01-04 10:30:56.000000000","message":"Same here","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Enable Webhook Workflow Execution"},{"line_number":10,"context_line":"---------------------------------"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To enable webhook workflow execution, add webhook to the list of notifiers in"},{"line_number":13,"context_line":"/etc/vitrage/vitrage.conf file:"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"   .. code::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_126a63b2","line":12,"range":{"start_line":12,"start_character":18,"end_line":12,"end_character":36},"in_reply_to":"9f91af0f_1dccb9ba","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"---"},{"line_number":28,"context_line":"To add a new webhook to the database, use the command \u0027vitrage webhook add\u0027."},{"line_number":29,"context_line":"The mandatory fields are:"},{"line_number":30,"context_line":"\u0027--url\u0027 - URL which the event will be sent to."},{"line_number":31,"context_line":"The optional fields are:"},{"line_number":32,"context_line":"\u0027--regex_filter\u0027 - A JSON string to filter for specific events."},{"line_number":33,"context_line":"\u0027--headers\u0027 - A JSON string specifying additional headers to the notification"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_9d5449cc","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":46},"updated":"2018-01-04 10:30:56.000000000","message":"I think a table view is more clear. See for example static-config.rst","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"---"},{"line_number":28,"context_line":"To add a new webhook to the database, use the command \u0027vitrage webhook add\u0027."},{"line_number":29,"context_line":"The mandatory fields are:"},{"line_number":30,"context_line":"\u0027--url\u0027 - URL which the event will be sent to."},{"line_number":31,"context_line":"The optional fields are:"},{"line_number":32,"context_line":"\u0027--regex_filter\u0027 - A JSON string to filter for specific events."},{"line_number":33,"context_line":"\u0027--headers\u0027 - A JSON string specifying additional headers to the notification"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_f2301feb","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":46},"in_reply_to":"9f91af0f_9d5449cc","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"The optional fields are:"},{"line_number":32,"context_line":"\u0027--regex_filter\u0027 - A JSON string to filter for specific events."},{"line_number":33,"context_line":"\u0027--headers\u0027 - A JSON string specifying additional headers to the notification"},{"line_number":34,"context_line":"There exists a unique constraint on the combination of the URL and the"},{"line_number":35,"context_line":"filters, so webhooks with the same URL may be added if they contain"},{"line_number":36,"context_line":"different filters."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Usage example::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_3d2bbd30","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":11},"updated":"2018-01-04 10:30:56.000000000","message":"I think you can delete this part. Just say \"webhooks with...\"\n\nOr maybe even delete it all, and simply give a warning if someone tries to do it: \"This URL is already registered with the same filter\".","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"The optional fields are:"},{"line_number":32,"context_line":"\u0027--regex_filter\u0027 - A JSON string to filter for specific events."},{"line_number":33,"context_line":"\u0027--headers\u0027 - A JSON string specifying additional headers to the notification"},{"line_number":34,"context_line":"There exists a unique constraint on the combination of the URL and the"},{"line_number":35,"context_line":"filters, so webhooks with the same URL may be added if they contain"},{"line_number":36,"context_line":"different filters."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Usage example::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_d235dbdb","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":11},"in_reply_to":"9f91af0f_3d2bbd30","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Usage example::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    vitrage webhook add --url https://www.myserver.com --headers"},{"line_number":41,"context_line":"    \u0027{\u0027content-type\u0027: \u0027application/json\u0027}\u0027 --regex_filter \u0027{\u0027vitrage_type\u0027: \u0027.*\u0027}\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"- If no regex filter is supplied, all notifications will be sent."},{"line_number":44,"context_line":"- The defaults headers are : \u0027{\u0027content-type\u0027: \u0027application/json\u0027}\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_7dd6252a","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":82},"updated":"2018-01-04 10:30:56.000000000","message":"Are you sure it works? isn\u0027t there a problem with the multiple \u0027 \u0027 in the command line?\n\nWe usually give as an example the API and not the CLI.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Usage example::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    vitrage webhook add --url https://www.myserver.com --headers"},{"line_number":41,"context_line":"    \u0027{\u0027content-type\u0027: \u0027application/json\u0027}\u0027 --regex_filter \u0027{\u0027vitrage_type\u0027: \u0027.*\u0027}\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"- If no regex filter is supplied, all notifications will be sent."},{"line_number":44,"context_line":"- The defaults headers are : \u0027{\u0027content-type\u0027: \u0027application/json\u0027}\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_412257a6","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":82},"in_reply_to":"9f91af0f_7dd6252a","updated":"2018-01-04 17:30:35.000000000","message":"?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Usage example::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    vitrage webhook add --url https://www.myserver.com --headers"},{"line_number":41,"context_line":"    \u0027{\u0027content-type\u0027: \u0027application/json\u0027}\u0027 --regex_filter \u0027{\u0027vitrage_type\u0027: \u0027.*\u0027}\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"- If no regex filter is supplied, all notifications will be sent."},{"line_number":44,"context_line":"- The defaults headers are : \u0027{\u0027content-type\u0027: \u0027application/json\u0027}\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_f25edf10","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":82},"in_reply_to":"9f91af0f_7dd6252a","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"List"},{"line_number":48,"context_line":"----"},{"line_number":49,"context_line":"Lists all webhooks currently in the DB::"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    vitrage webhook list"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_eaa4b2bb","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":5},"updated":"2018-01-04 03:42:53.000000000","message":"List?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"List"},{"line_number":48,"context_line":"----"},{"line_number":49,"context_line":"Lists all webhooks currently in the DB::"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    vitrage webhook list"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9f91af0f_d2df20d4","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":5},"in_reply_to":"9f91af0f_eaa4b2bb","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":6,"context_line":"notifications regarding raised alarms, deactivated alarms and state changes,"},{"line_number":7,"context_line":"to any registered targets."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Enable Webhook Plugin"},{"line_number":10,"context_line":"---------------------"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To enable the webhook plugin, add it to the list of notifiers in"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f91af0f_c11c276c","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":21},"updated":"2018-01-04 17:30:35.000000000","message":"Notifier","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":6,"context_line":"notifications regarding raised alarms, deactivated alarms and state changes,"},{"line_number":7,"context_line":"to any registered targets."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Enable Webhook Plugin"},{"line_number":10,"context_line":"---------------------"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"To enable the webhook plugin, add it to the list of notifiers in"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9f91af0f_84ada4ea","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":21},"in_reply_to":"9f91af0f_c11c276c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"a3b1c6054d733af88b20a32f8aaccf61a79e7c50","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    \"source\": \"sample_monitor\","},{"line_number":59,"context_line":"    \"state\": \"Active\","},{"line_number":60,"context_line":"    \"vitrage_operational_severity\": \"CRITICAL\","},{"line_number":61,"context_line":"    \"vitrage_is_placeholder\": false,"},{"line_number":62,"context_line":"    \"vitrage_aggregated_severity\": \"CRITICAL\","},{"line_number":63,"context_line":"    \"vitrage_resource_id\": \"f740fb55-375b-4677-97a9-11920eb4b343\","},{"line_number":64,"context_line":"    \"vitrage_resource_type\": \"nova.host\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_389cf868","line":61,"range":{"start_line":61,"start_character":4,"end_line":61,"end_character":36},"updated":"2018-01-07 13:45:49.000000000","message":"Please filter out this property. It\u0027s for internal use. Alarms are never placeholders, but please check the flag and verify that placeholder alarms and resources are not sent to the webhook. Please add a test that verifies that. \n\nSomething to think about: what if an alarm is raised on a resource that was not added to the graph yet?","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    \"source\": \"sample_monitor\","},{"line_number":59,"context_line":"    \"state\": \"Active\","},{"line_number":60,"context_line":"    \"vitrage_operational_severity\": \"CRITICAL\","},{"line_number":61,"context_line":"    \"vitrage_is_placeholder\": false,"},{"line_number":62,"context_line":"    \"vitrage_aggregated_severity\": \"CRITICAL\","},{"line_number":63,"context_line":"    \"vitrage_resource_id\": \"f740fb55-375b-4677-97a9-11920eb4b343\","},{"line_number":64,"context_line":"    \"vitrage_resource_type\": \"nova.host\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_baa518a4","line":61,"range":{"start_line":61,"start_character":4,"end_line":61,"end_character":36},"in_reply_to":"9f91af0f_389cf868","updated":"2018-01-10 09:51:07.000000000","message":"Done","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"a3b1c6054d733af88b20a32f8aaccf61a79e7c50","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"vitrage_aggregated_severity\": \"CRITICAL\","},{"line_number":63,"context_line":"    \"vitrage_resource_id\": \"f740fb55-375b-4677-97a9-11920eb4b343\","},{"line_number":64,"context_line":"    \"vitrage_resource_type\": \"nova.host\","},{"line_number":65,"context_line":"    \"is_real_vitrage_id\": true,"},{"line_number":66,"context_line":"    \"vitrage_id\": \"9a58fa5a-3999-4771-81a4-3f8d148b710f\","},{"line_number":67,"context_line":"    \"vitrage_category\": \"ALARM\","},{"line_number":68,"context_line":"    \"vitrage_type\": \"doctor\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_38ee38ed","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":31},"updated":"2018-01-07 13:45:49.000000000","message":"Please filter out this property. It\u0027s for internal use, and we should remove it completely","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"vitrage_aggregated_severity\": \"CRITICAL\","},{"line_number":63,"context_line":"    \"vitrage_resource_id\": \"f740fb55-375b-4677-97a9-11920eb4b343\","},{"line_number":64,"context_line":"    \"vitrage_resource_type\": \"nova.host\","},{"line_number":65,"context_line":"    \"is_real_vitrage_id\": true,"},{"line_number":66,"context_line":"    \"vitrage_id\": \"9a58fa5a-3999-4771-81a4-3f8d148b710f\","},{"line_number":67,"context_line":"    \"vitrage_category\": \"ALARM\","},{"line_number":68,"context_line":"    \"vitrage_type\": \"doctor\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_fa3f2084","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":31},"in_reply_to":"9f91af0f_38ee38ed","updated":"2018-01-10 09:51:07.000000000","message":"Done","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"a3b1c6054d733af88b20a32f8aaccf61a79e7c50","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"vitrage_category\": \"ALARM\","},{"line_number":68,"context_line":"    \"vitrage_type\": \"doctor\","},{"line_number":69,"context_line":"    \"vitrage_sample_timestamp\": \"2018-01-07 13:00:56.693199+00:00\","},{"line_number":70,"context_line":"    \"vitrage_is_deleted\": true,"},{"line_number":71,"context_line":"    \"resource\": {"},{"line_number":72,"context_line":"        \"vitrage_id\": \"f740fb55-375b-4677-97a9-11920eb4b343\","},{"line_number":73,"context_line":"        \"name\": \"compute-0-0\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_58ebfcda","line":70,"range":{"start_line":70,"start_character":4,"end_line":70,"end_character":30},"updated":"2018-01-07 13:45:49.000000000","message":"Please filter out this property as well.","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"vitrage_category\": \"ALARM\","},{"line_number":68,"context_line":"    \"vitrage_type\": \"doctor\","},{"line_number":69,"context_line":"    \"vitrage_sample_timestamp\": \"2018-01-07 13:00:56.693199+00:00\","},{"line_number":70,"context_line":"    \"vitrage_is_deleted\": true,"},{"line_number":71,"context_line":"    \"resource\": {"},{"line_number":72,"context_line":"        \"vitrage_id\": \"f740fb55-375b-4677-97a9-11920eb4b343\","},{"line_number":73,"context_line":"        \"name\": \"compute-0-0\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_5a3dec8c","line":70,"range":{"start_line":70,"start_character":4,"end_line":70,"end_character":30},"in_reply_to":"9f91af0f_58ebfcda","updated":"2018-01-10 09:51:07.000000000","message":"Done","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"a3b1c6054d733af88b20a32f8aaccf61a79e7c50","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"vitrage_aggregated_state\": \"AVAILABLE\","},{"line_number":81,"context_line":"        \"vitrage_is_placeholder\": false,"},{"line_number":82,"context_line":"        \"id\": \"compute-0-0\","},{"line_number":83,"context_line":"        \"is_real_vitrage_id\": true,"},{"line_number":84,"context_line":"        \"vitrage_is_deleted\": false"},{"line_number":85,"context_line":"    },"},{"line_number":86,"context_line":"    \"name\": \"e2e.test_webhook.alarm1\","},{"line_number":87,"context_line":"    \"monitor_id\": \"sample monitor\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_b881e8fd","line":84,"range":{"start_line":83,"start_character":8,"end_line":84,"end_character":35},"updated":"2018-01-07 13:45:49.000000000","message":"Both should be filtered out","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \"vitrage_aggregated_state\": \"AVAILABLE\","},{"line_number":81,"context_line":"        \"vitrage_is_placeholder\": false,"},{"line_number":82,"context_line":"        \"id\": \"compute-0-0\","},{"line_number":83,"context_line":"        \"is_real_vitrage_id\": true,"},{"line_number":84,"context_line":"        \"vitrage_is_deleted\": false"},{"line_number":85,"context_line":"    },"},{"line_number":86,"context_line":"    \"name\": \"e2e.test_webhook.alarm1\","},{"line_number":87,"context_line":"    \"monitor_id\": \"sample monitor\","}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_3a3a6898","line":84,"range":{"start_line":83,"start_character":8,"end_line":84,"end_character":35},"in_reply_to":"9f91af0f_b881e8fd","updated":"2018-01-10 09:51:07.000000000","message":"Done","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"a3b1c6054d733af88b20a32f8aaccf61a79e7c50","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"vitrage_is_deleted\": false"},{"line_number":85,"context_line":"    },"},{"line_number":86,"context_line":"    \"name\": \"e2e.test_webhook.alarm1\","},{"line_number":87,"context_line":"    \"monitor_id\": \"sample monitor\","},{"line_number":88,"context_line":"    \"cause\": \"another alarm\","},{"line_number":89,"context_line":"    \"monitor_event_id\": \"456\","},{"line_number":90,"context_line":"    \"time\": \"2018-01-07T13:00:55Z\""},{"line_number":91,"context_line":"    }"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_d8ce2cb3","line":89,"range":{"start_line":87,"start_character":0,"end_line":89,"end_character":30},"updated":"2018-01-07 13:45:49.000000000","message":"These parameters are somewhat fake, and are based on the Doctor datasource that is not in use. Can you please give an example that is based on Zabbix?","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"vitrage_is_deleted\": false"},{"line_number":85,"context_line":"    },"},{"line_number":86,"context_line":"    \"name\": \"e2e.test_webhook.alarm1\","},{"line_number":87,"context_line":"    \"monitor_id\": \"sample monitor\","},{"line_number":88,"context_line":"    \"cause\": \"another alarm\","},{"line_number":89,"context_line":"    \"monitor_event_id\": \"456\","},{"line_number":90,"context_line":"    \"time\": \"2018-01-07T13:00:55Z\""},{"line_number":91,"context_line":"    }"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"9f91af0f_1b06ce1e","line":89,"range":{"start_line":87,"start_character":0,"end_line":89,"end_character":30},"in_reply_to":"9f91af0f_d8ce2cb3","updated":"2018-01-10 09:51:07.000000000","message":"Done","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"}],"doc/source/contributor/vitrage-api.rst":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0d7714dad142fde0831eba519a556ea4129aab85","unresolved":false,"context_lines":[{"line_number":1698,"context_line":"      \"regex_filter\":\"{\u0027name\u0027:\u0027e2e.*\u0027}\""},{"line_number":1699,"context_line":"   }"},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"Webhook Add"},{"line_number":1702,"context_line":"^^^^^^^^^^^"},{"line_number":1703,"context_line":"Add a webhook to the database, to be used by the notifier."},{"line_number":1704,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9f91af0f_185494fe","line":1701,"range":{"start_line":1701,"start_character":0,"end_line":1701,"end_character":11},"updated":"2018-01-07 12:39:12.000000000","message":"Please also document the format of the messages that are sent to the webhook","commit_id":"5cc8235a8af92c70148efae24565719675d551d8"}],"vitrage/api/controllers/v1/notifier_webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_d3619d3b","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":73},"updated":"2017-12-31 16:17:48.000000000","message":"The first line should be (copy it from another file):\n\n# Copyright 2017 - Nokia Corporation\n\nOr better change it to 2018 ;-)","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_4f3ce292","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":73},"in_reply_to":"9f91af0f_d3619d3b","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":56,"context_line":"    def get(self, id):"},{"line_number":57,"context_line":"        LOG.info(\u0027list notifier webhooks with id: %s\u0027, id)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        enforce(\u0027notifier-webhook show\u0027, pecan.request.headers,"},{"line_number":60,"context_line":"                pecan.request.enforcer, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_13fdc539","line":57,"range":{"start_line":57,"start_character":18,"end_line":57,"end_character":48},"updated":"2017-12-31 16:17:48.000000000","message":"Can there be more than one?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":56,"context_line":"    def get(self, id):"},{"line_number":57,"context_line":"        LOG.info(\u0027list notifier webhooks with id: %s\u0027, id)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        enforce(\u0027notifier-webhook show\u0027, pecan.request.headers,"},{"line_number":60,"context_line":"                pecan.request.enforcer, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_2fd2be5d","line":57,"range":{"start_line":57,"start_character":18,"end_line":57,"end_character":48},"in_reply_to":"9f91af0f_13fdc539","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        try:"},{"line_number":63,"context_line":"            return self._get(id)"},{"line_number":64,"context_line":"        except Exception as e:"},{"line_number":65,"context_line":"            LOG.exception(\u0027failed to get webhooks %s\u0027, e)"},{"line_number":66,"context_line":"            abort(404, str(e))"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @staticmethod"},{"line_number":69,"context_line":"    def _get(id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_939eb505","line":66,"range":{"start_line":64,"start_character":8,"end_line":66,"end_character":30},"updated":"2017-12-31 16:17:48.000000000","message":"You do try/except also in _get. Are you sure you need it twice?\n(same question for the other methods as well)","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        try:"},{"line_number":63,"context_line":"            return self._get(id)"},{"line_number":64,"context_line":"        except Exception as e:"},{"line_number":65,"context_line":"            LOG.exception(\u0027failed to get webhooks %s\u0027, e)"},{"line_number":66,"context_line":"            abort(404, str(e))"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @staticmethod"},{"line_number":69,"context_line":"    def _get(id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_6fbf66fb","line":66,"range":{"start_line":64,"start_character":8,"end_line":66,"end_character":30},"in_reply_to":"9f91af0f_939eb505","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":83,"context_line":"    def put(self, **kwargs):"},{"line_number":84,"context_line":"        LOG.info(\"Trying to add webhook with following props: %s\" % str("},{"line_number":85,"context_line":"            kwargs))"},{"line_number":86,"context_line":"        enforce(\u0027notifier-webhook add\u0027, pecan.request.headers,"},{"line_number":87,"context_line":"                pecan.request.enforcer, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_f399411f","line":84,"range":{"start_line":84,"start_character":18,"end_line":84,"end_character":28},"updated":"2017-12-31 16:17:48.000000000","message":"I would remove the \"trying to\". If it fails, there will be an error later on.","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":83,"context_line":"    def put(self, **kwargs):"},{"line_number":84,"context_line":"        LOG.info(\"Trying to add webhook with following props: %s\" % str("},{"line_number":85,"context_line":"            kwargs))"},{"line_number":86,"context_line":"        enforce(\u0027notifier-webhook add\u0027, pecan.request.headers,"},{"line_number":87,"context_line":"                pecan.request.enforcer, {})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_8fbc2a06","line":84,"range":{"start_line":84,"start_character":18,"end_line":84,"end_character":28},"in_reply_to":"9f91af0f_f399411f","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            return self._put(**kwargs)"},{"line_number":90,"context_line":"        except Exception as e:"},{"line_number":91,"context_line":"            LOG.exception(\u0027failed to list webhooks %s\u0027, e)"},{"line_number":92,"context_line":"            abort(404, str(e))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_d3943deb","line":91,"range":{"start_line":91,"start_character":37,"end_line":91,"end_character":41},"updated":"2017-12-31 16:17:48.000000000","message":"add","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        try:"},{"line_number":89,"context_line":"            return self._put(**kwargs)"},{"line_number":90,"context_line":"        except Exception as e:"},{"line_number":91,"context_line":"            LOG.exception(\u0027failed to list webhooks %s\u0027, e)"},{"line_number":92,"context_line":"            abort(404, str(e))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_2f371eb3","line":91,"range":{"start_line":91,"start_character":37,"end_line":91,"end_character":41},"in_reply_to":"9f91af0f_d3943deb","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage/api/controllers/v1/webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":53,"context_line":"    def get(self, id):"},{"line_number":54,"context_line":"        LOG.info(\u0027list webhook with id: %s\u0027, id)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        enforce(\u0027webhook show\u0027, pecan.request.headers,"},{"line_number":57,"context_line":"                pecan.request.enforcer, {})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_dd7df11c","line":54,"range":{"start_line":54,"start_character":18,"end_line":54,"end_character":38},"updated":"2018-01-04 10:30:56.000000000","message":"Can there be more than one?\n\nI think the info should be either: \" list webhooks with id\" (multiple) or \"show webhook with id\" (single)","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":53,"context_line":"    def get(self, id):"},{"line_number":54,"context_line":"        LOG.info(\u0027list webhook with id: %s\u0027, id)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        enforce(\u0027webhook show\u0027, pecan.request.headers,"},{"line_number":57,"context_line":"                pecan.request.enforcer, {})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_72a88fda","line":54,"range":{"start_line":54,"start_character":18,"end_line":54,"end_character":38},"in_reply_to":"9f91af0f_dd7df11c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @staticmethod"},{"line_number":87,"context_line":"    def _post(**kwargs):"},{"line_number":88,"context_line":"        url \u003d kwargs.get(\u0027url\u0027, None)"},{"line_number":89,"context_line":"        regex_filter \u003d kwargs.get(\u0027regex_filter\u0027, None)"},{"line_number":90,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027, None)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_aa878a0f","line":88,"range":{"start_line":88,"start_character":8,"end_line":88,"end_character":37},"updated":"2018-01-04 03:42:53.000000000","message":"\u0027url\u0027 is mandtory. I think here we can raise an exception if url is None, so it can not be needed to send a RPC call to Apihandler.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @staticmethod"},{"line_number":87,"context_line":"    def _post(**kwargs):"},{"line_number":88,"context_line":"        url \u003d kwargs.get(\u0027url\u0027, None)"},{"line_number":89,"context_line":"        regex_filter \u003d kwargs.get(\u0027regex_filter\u0027, None)"},{"line_number":90,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027, None)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_d2a64054","line":88,"range":{"start_line":88,"start_character":8,"end_line":88,"end_character":37},"in_reply_to":"9f91af0f_aa878a0f","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @staticmethod"},{"line_number":87,"context_line":"    def _post(**kwargs):"},{"line_number":88,"context_line":"        url \u003d kwargs.get(\u0027url\u0027, None)"},{"line_number":89,"context_line":"        regex_filter \u003d kwargs.get(\u0027regex_filter\u0027, None)"},{"line_number":90,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027, None)"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_c191879b","line":88,"range":{"start_line":88,"start_character":8,"end_line":88,"end_character":37},"in_reply_to":"9f91af0f_aa878a0f","updated":"2018-01-04 17:30:35.000000000","message":"I think there is a way to mark the parameter as mandatory, so this check will be done automatically. I don\u0027t remember where.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            return self._post(**kwargs)"},{"line_number":84,"context_line":"        except Exception as e:"},{"line_number":85,"context_line":"            LOG.exception(\u0027Failed to add webhooks %s\u0027, e)"},{"line_number":86,"context_line":"            abort(400, str(e))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @staticmethod"},{"line_number":89,"context_line":"    def _post(**kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_e1b36b4c","line":86,"range":{"start_line":86,"start_character":18,"end_line":86,"end_character":21},"updated":"2018-01-04 17:30:35.000000000","message":"Why do you return sometimes 400 and sometimes 404?","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            return self._post(**kwargs)"},{"line_number":84,"context_line":"        except Exception as e:"},{"line_number":85,"context_line":"            LOG.exception(\u0027Failed to add webhooks %s\u0027, e)"},{"line_number":86,"context_line":"            abort(400, str(e))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @staticmethod"},{"line_number":89,"context_line":"    def _post(**kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_50bc51ba","line":86,"range":{"start_line":86,"start_character":18,"end_line":86,"end_character":21},"in_reply_to":"9f91af0f_e1b36b4c","updated":"2018-01-07 11:46:08.000000000","message":"404 - means not found (when searching by ID for example)\n400 - means bad request","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6e374036f207a9d87dd3a074bf7e93d207bd24ad","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def get_all(self, **kwargs):"},{"line_number":34,"context_line":"        LOG.info(\u0027list all webhooks with args: %s\u0027, kwargs)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        all_tenants \u003d kwargs.get(\u0027all_tenants\u0027, False)"},{"line_number":37,"context_line":"        all_tenants \u003d bool_from_string(all_tenants)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        if all_tenants:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_9b833957","line":36,"range":{"start_line":36,"start_character":33,"end_line":36,"end_character":46},"updated":"2018-01-11 08:46:02.000000000","message":"Please add a constant for it (maybe it already exists)","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"8f4ce7de974f057cfa7709c16ebc52c6ed2ef7c6","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def get_all(self, **kwargs):"},{"line_number":34,"context_line":"        LOG.info(\u0027list all webhooks with args: %s\u0027, kwargs)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        all_tenants \u003d kwargs.get(\u0027all_tenants\u0027, False)"},{"line_number":37,"context_line":"        all_tenants \u003d bool_from_string(all_tenants)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        if all_tenants:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_7e661b2c","line":36,"range":{"start_line":36,"start_character":33,"end_line":36,"end_character":46},"in_reply_to":"7f96bb07_9b833957","updated":"2018-01-14 10:20:59.000000000","message":"Done","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"}],"vitrage/api_handler/apis/notifier_webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Nokia"},{"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":1,"id":"9f91af0f_53882dc5","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2017-12-31 16:17:48.000000000","message":"2018 :-)","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Nokia"},{"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":1,"id":"9f91af0f_6eab08d6","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"9f91af0f_53882dc5","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.notifier_webhooks.query()"},{"line_number":55,"context_line":"        LOG.info(res)"},{"line_number":56,"context_line":"        webhooks \u003d []"},{"line_number":57,"context_line":"        for webhook in res:"},{"line_number":58,"context_line":"            webhooks.append("},{"line_number":59,"context_line":"                {"},{"line_number":60,"context_line":"                    \u0027created_at\u0027: webhook.created_at,"},{"line_number":61,"context_line":"                    \u0027id\u0027: webhook.id,"},{"line_number":62,"context_line":"                    \u0027url\u0027: webhook.url,"},{"line_number":63,"context_line":"                    \u0027regex_filter\u0027: webhook.regex_filter,"},{"line_number":64,"context_line":"                    \u0027headers\u0027: webhook.headers"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"                }"},{"line_number":67,"context_line":"            )"},{"line_number":68,"context_line":"        return webhooks"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def add_webhook(self, ctx, url, headers\u003dNone, regex_filter\u003dNone):"},{"line_number":71,"context_line":"        db_row \u003d self._webhook_to_db_row(url, headers, regex_filter)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_73cd315c","line":68,"range":{"start_line":56,"start_character":7,"end_line":68,"end_character":23},"updated":"2017-12-31 14:32:27.000000000","message":"use comprehension lists","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.notifier_webhooks.query()"},{"line_number":55,"context_line":"        LOG.info(res)"},{"line_number":56,"context_line":"        webhooks \u003d []"},{"line_number":57,"context_line":"        for webhook in res:"},{"line_number":58,"context_line":"            webhooks.append("},{"line_number":59,"context_line":"                {"},{"line_number":60,"context_line":"                    \u0027created_at\u0027: webhook.created_at,"},{"line_number":61,"context_line":"                    \u0027id\u0027: webhook.id,"},{"line_number":62,"context_line":"                    \u0027url\u0027: webhook.url,"},{"line_number":63,"context_line":"                    \u0027regex_filter\u0027: webhook.regex_filter,"},{"line_number":64,"context_line":"                    \u0027headers\u0027: webhook.headers"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"                }"},{"line_number":67,"context_line":"            )"},{"line_number":68,"context_line":"        return webhooks"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def add_webhook(self, ctx, url, headers\u003dNone, regex_filter\u003dNone):"},{"line_number":71,"context_line":"        db_row \u003d self._webhook_to_db_row(url, headers, regex_filter)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_33fa4942","line":68,"range":{"start_line":56,"start_character":7,"end_line":68,"end_character":23},"in_reply_to":"9f91af0f_73cd315c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def add_webhook(self, ctx, url, headers\u003dNone, regex_filter\u003dNone):"},{"line_number":71,"context_line":"        db_row \u003d self._webhook_to_db_row(url, headers, regex_filter)"},{"line_number":72,"context_line":"        res \u003d self._check_valid_webhook(url, headers, regex_filter)"},{"line_number":73,"context_line":"        if not res.is_valid:"},{"line_number":74,"context_line":"            return (res.message)"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_53b10d8f","line":72,"range":{"start_line":72,"start_character":19,"end_line":72,"end_character":39},"updated":"2017-12-31 16:17:48.000000000","message":"This should be done before converting to db_row","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def add_webhook(self, ctx, url, headers\u003dNone, regex_filter\u003dNone):"},{"line_number":71,"context_line":"        db_row \u003d self._webhook_to_db_row(url, headers, regex_filter)"},{"line_number":72,"context_line":"        res \u003d self._check_valid_webhook(url, headers, regex_filter)"},{"line_number":73,"context_line":"        if not res.is_valid:"},{"line_number":74,"context_line":"            return (res.message)"},{"line_number":75,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_aea910e0","line":72,"range":{"start_line":72,"start_character":19,"end_line":72,"end_character":39},"in_reply_to":"9f91af0f_53b10d8f","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            return (res.message)"},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            self.db_conn.notifier_webhooks.create(db_row)"},{"line_number":77,"context_line":"            return (db_row_to_dict(db_row))"},{"line_number":78,"context_line":"        except Exception as e:"},{"line_number":79,"context_line":"            LOG.exception(\"failed to add webhook to DB: %s\", str(e))"},{"line_number":80,"context_line":"            return ({\"ERROR\": str(e)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_13daa516","line":77,"range":{"start_line":77,"start_character":18,"end_line":77,"end_character":43},"updated":"2017-12-31 14:32:27.000000000","message":"why parenthesis ?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            return (res.message)"},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            self.db_conn.notifier_webhooks.create(db_row)"},{"line_number":77,"context_line":"            return (db_row_to_dict(db_row))"},{"line_number":78,"context_line":"        except Exception as e:"},{"line_number":79,"context_line":"            LOG.exception(\"failed to add webhook to DB: %s\", str(e))"},{"line_number":80,"context_line":"            return ({\"ERROR\": str(e)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_33732918","line":77,"range":{"start_line":77,"start_character":18,"end_line":77,"end_character":43},"in_reply_to":"9f91af0f_13daa516","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            if len(res) \u003d\u003d 1:"},{"line_number":86,"context_line":"                return (res[0])"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                return ({\"ERROR\": \u0027ID %s does not exist\u0027 % str(id)})"},{"line_number":89,"context_line":"        except Exception as e:"},{"line_number":90,"context_line":"            LOG.info(\"Failed to get webhook: %s\", str(e))"},{"line_number":91,"context_line":"            return ({\"ERROR\": str(e)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_93ff9566","line":88,"range":{"start_line":88,"start_character":59,"end_line":88,"end_character":62},"updated":"2017-12-31 14:32:27.000000000","message":"I don\u0027t think you need str str is run automaticly","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            if len(res) \u003d\u003d 1:"},{"line_number":86,"context_line":"                return (res[0])"},{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                return ({\"ERROR\": \u0027ID %s does not exist\u0027 % str(id)})"},{"line_number":89,"context_line":"        except Exception as e:"},{"line_number":90,"context_line":"            LOG.info(\"Failed to get webhook: %s\", str(e))"},{"line_number":91,"context_line":"            return ({\"ERROR\": str(e)})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_13762508","line":88,"range":{"start_line":88,"start_character":59,"end_line":88,"end_character":62},"in_reply_to":"9f91af0f_93ff9566","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                return ({\"ERROR\": \u0027ID %s does not exist\u0027 % str(id)})"},{"line_number":89,"context_line":"        except Exception as e:"},{"line_number":90,"context_line":"            LOG.info(\"Failed to get webhook: %s\", str(e))"},{"line_number":91,"context_line":"            return ({\"ERROR\": str(e)})"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _webhook_to_db_row(self, url, headers, regex_filter):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_13ab851d","line":90,"range":{"start_line":90,"start_character":16,"end_line":90,"end_character":20},"updated":"2017-12-31 16:17:48.000000000","message":"LOG.exception","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            else:"},{"line_number":88,"context_line":"                return ({\"ERROR\": \u0027ID %s does not exist\u0027 % str(id)})"},{"line_number":89,"context_line":"        except Exception as e:"},{"line_number":90,"context_line":"            LOG.info(\"Failed to get webhook: %s\", str(e))"},{"line_number":91,"context_line":"            return ({\"ERROR\": str(e)})"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _webhook_to_db_row(self, url, headers, regex_filter):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_4eae44e8","line":90,"range":{"start_line":90,"start_character":16,"end_line":90,"end_character":20},"in_reply_to":"9f91af0f_13ab851d","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        uuid \u003d uuidutils.generate_uuid()"},{"line_number":95,"context_line":"        created_at \u003d str(datetime.datetime.now())"},{"line_number":96,"context_line":"        if regex_filter is None:"},{"line_number":97,"context_line":"            regex_filter \u003d \u0027None\u0027"},{"line_number":98,"context_line":"        db_row \u003d NotifierWebhooks(id\u003duuid,"},{"line_number":99,"context_line":"                                  created_at\u003dcreated_at,"},{"line_number":100,"context_line":"                                  url\u003durl,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_33d7a9f0","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":33},"updated":"2017-12-31 14:32:27.000000000","message":"make it a default parameter None","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        uuid \u003d uuidutils.generate_uuid()"},{"line_number":95,"context_line":"        created_at \u003d str(datetime.datetime.now())"},{"line_number":96,"context_line":"        if regex_filter is None:"},{"line_number":97,"context_line":"            regex_filter \u003d \u0027None\u0027"},{"line_number":98,"context_line":"        db_row \u003d NotifierWebhooks(id\u003duuid,"},{"line_number":99,"context_line":"                                  created_at\u003dcreated_at,"},{"line_number":100,"context_line":"                                  url\u003durl,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_7369b123","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":33},"in_reply_to":"9f91af0f_33d7a9f0","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return Result(True, \"\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _validate_url(self, url):"},{"line_number":115,"context_line":"        val \u003d URLValidator()"},{"line_number":116,"context_line":"        try:"},{"line_number":117,"context_line":"            val(url)"},{"line_number":118,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_f30aa188","line":115,"range":{"start_line":115,"start_character":14,"end_line":115,"end_character":26},"updated":"2017-12-31 14:32:27.000000000","message":"don\u0027t use django pecan has one","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return Result(True, \"\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _validate_url(self, url):"},{"line_number":115,"context_line":"        val \u003d URLValidator()"},{"line_number":116,"context_line":"        try:"},{"line_number":117,"context_line":"            val(url)"},{"line_number":118,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_132e25a5","line":115,"range":{"start_line":115,"start_character":14,"end_line":115,"end_character":26},"in_reply_to":"9f91af0f_935b1586","updated":"2018-01-07 11:46:08.000000000","message":"urllib parse doesn\u0027t detect malformed URLs, and I can\u0027t find a pecan validator.","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"779d12655a0f9f7369a6e83595365299405cba9c","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return Result(True, \"\")"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _validate_url(self, url):"},{"line_number":115,"context_line":"        val \u003d URLValidator()"},{"line_number":116,"context_line":"        try:"},{"line_number":117,"context_line":"            val(url)"},{"line_number":118,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_935b1586","line":115,"range":{"start_line":115,"start_character":14,"end_line":115,"end_character":26},"in_reply_to":"9f91af0f_f30aa188","updated":"2017-12-31 14:58:03.000000000","message":"use urllib parse","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            filter_dict \u003d ast.literal_eval(regex_filter)"},{"line_number":125,"context_line":"            if not isinstance(filter_dict, dict):"},{"line_number":126,"context_line":"                return False"},{"line_number":127,"context_line":"            for key, filter in filter_dict.items():"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    re.compile(filter)"},{"line_number":130,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_73f69192","line":127,"range":{"start_line":127,"start_character":16,"end_line":127,"end_character":35},"updated":"2017-12-31 14:32:27.000000000","message":"you are not using key here why not values ?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            filter_dict \u003d ast.literal_eval(regex_filter)"},{"line_number":125,"context_line":"            if not isinstance(filter_dict, dict):"},{"line_number":126,"context_line":"                return False"},{"line_number":127,"context_line":"            for key, filter in filter_dict.items():"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    re.compile(filter)"},{"line_number":130,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_f3662152","line":127,"range":{"start_line":127,"start_character":16,"end_line":127,"end_character":35},"in_reply_to":"9f91af0f_73f69192","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage/api_handler/apis/webhook.py":[{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        res \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if res \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_8ae726e5","line":46,"range":{"start_line":46,"start_character":18,"end_line":46,"end_character":19},"updated":"2018-01-04 03:42:53.000000000","message":"Please don\u0027t use the magic number, use a macro to indicate what does \u00271\u0027 mean.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        res \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if res \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_c1e66745","line":46,"range":{"start_line":46,"start_character":18,"end_line":46,"end_character":19},"in_reply_to":"9f91af0f_589b2fc8","updated":"2018-01-04 17:30:35.000000000","message":"+1 still not fixed","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        res \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if res \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_439ca45c","line":46,"range":{"start_line":46,"start_character":18,"end_line":46,"end_character":19},"in_reply_to":"9f91af0f_589b2fc8","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"ff497dd018cc4a73b6239e13e5fde76a079e205a","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        res \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if res \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_589b2fc8","line":46,"range":{"start_line":46,"start_character":18,"end_line":46,"end_character":19},"in_reply_to":"9f91af0f_8ae726e5","updated":"2018-01-04 10:39:59.000000000","message":"+1\ndeleted_success \u003d self.db_conn.webhooks.delete(id)\nShould be a boolean","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        res \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if res \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_b2805c8d","line":46,"range":{"start_line":46,"start_character":18,"end_line":46,"end_character":19},"in_reply_to":"9f91af0f_8ae726e5","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def get_all_webhooks(self, ctx, **kwargs):"},{"line_number":52,"context_line":"        LOG.info(\"Webhooks get_all_webhooks\")"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.webhooks.query()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_ea92724b","line":51,"range":{"start_line":51,"start_character":35,"end_line":51,"end_character":44},"updated":"2018-01-04 03:42:53.000000000","message":"You don\u0027t pass it to API_handler from WebhookController.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def get_all_webhooks(self, ctx, **kwargs):"},{"line_number":52,"context_line":"        LOG.info(\"Webhooks get_all_webhooks\")"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.webhooks.query()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_d27ba0bb","line":51,"range":{"start_line":51,"start_character":35,"end_line":51,"end_character":44},"in_reply_to":"9f91af0f_ea92724b","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def get_all_webhooks(self, ctx, **kwargs):"},{"line_number":52,"context_line":"        LOG.info(\"Webhooks get_all_webhooks\")"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.webhooks.query()"},{"line_number":55,"context_line":"        LOG.info(res)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_bdc02d2c","line":52,"range":{"start_line":52,"start_character":18,"end_line":52,"end_character":43},"updated":"2018-01-04 10:30:56.000000000","message":"I think \"Get all webhooks\" or \"List all webhooks\" will look nicer","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            return {\u0027ERROR\u0027: \u0027id %s is incorrect\u0027 % id}"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def get_all_webhooks(self, ctx, **kwargs):"},{"line_number":52,"context_line":"        LOG.info(\"Webhooks get_all_webhooks\")"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.webhooks.query()"},{"line_number":55,"context_line":"        LOG.info(res)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_c3a754a7","line":52,"range":{"start_line":52,"start_character":18,"end_line":52,"end_character":43},"in_reply_to":"9f91af0f_bdc02d2c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"ff497dd018cc4a73b6239e13e5fde76a079e205a","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.webhooks.query()"},{"line_number":55,"context_line":"        LOG.info(res)"},{"line_number":56,"context_line":"        webhooks \u003d [{"},{"line_number":57,"context_line":"            \u0027created_at\u0027: webhook.created_at,"},{"line_number":58,"context_line":"            \u0027id\u0027: webhook.id,"},{"line_number":59,"context_line":"            \u0027url\u0027: webhook.url,"},{"line_number":60,"context_line":"            \u0027regex_filter\u0027: webhook.regex_filter,"},{"line_number":61,"context_line":"            \u0027headers\u0027: webhook.headers"},{"line_number":62,"context_line":"        } for webhook in res]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return webhooks"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_f83b23c5","line":62,"range":{"start_line":56,"start_character":20,"end_line":62,"end_character":9},"updated":"2018-01-04 10:39:59.000000000","message":"why not use db_row_to_dict?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        res \u003d self.db_conn.webhooks.query()"},{"line_number":55,"context_line":"        LOG.info(res)"},{"line_number":56,"context_line":"        webhooks \u003d [{"},{"line_number":57,"context_line":"            \u0027created_at\u0027: webhook.created_at,"},{"line_number":58,"context_line":"            \u0027id\u0027: webhook.id,"},{"line_number":59,"context_line":"            \u0027url\u0027: webhook.url,"},{"line_number":60,"context_line":"            \u0027regex_filter\u0027: webhook.regex_filter,"},{"line_number":61,"context_line":"            \u0027headers\u0027: webhook.headers"},{"line_number":62,"context_line":"        } for webhook in res]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        return webhooks"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_638f6823","line":62,"range":{"start_line":56,"start_character":20,"end_line":62,"end_character":9},"in_reply_to":"9f91af0f_f83b23c5","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def get_webhook(self, ctx, id):"},{"line_number":79,"context_line":"        try:"},{"line_number":80,"context_line":"            res \u003d self.db_conn.webhooks.query(id\u003did)"},{"line_number":81,"context_line":"            if len(res) \u003d\u003d 1:"},{"line_number":82,"context_line":"                return (res[0])"},{"line_number":83,"context_line":"            else:"},{"line_number":84,"context_line":"                return {\"ERROR\": \u0027ID %s does not exist\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_aa030a73","line":81,"range":{"start_line":81,"start_character":27,"end_line":81,"end_character":28},"updated":"2018-01-04 03:42:53.000000000","message":"same as above.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def get_webhook(self, ctx, id):"},{"line_number":79,"context_line":"        try:"},{"line_number":80,"context_line":"            res \u003d self.db_conn.webhooks.query(id\u003did)"},{"line_number":81,"context_line":"            if len(res) \u003d\u003d 1:"},{"line_number":82,"context_line":"                return (res[0])"},{"line_number":83,"context_line":"            else:"},{"line_number":84,"context_line":"                return {\"ERROR\": \u0027ID %s does not exist\u0027 % id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_924f5891","line":81,"range":{"start_line":81,"start_character":27,"end_line":81,"end_character":28},"in_reply_to":"9f91af0f_aa030a73","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            if not result.scheme or not result.netloc:"},{"line_number":112,"context_line":"                return False"},{"line_number":113,"context_line":"        except Exception:"},{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return True"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _validate_regex(self, regex_filter):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_9df3e99e","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":24},"updated":"2018-01-04 10:30:56.000000000","message":"Write the error to the log. And will the user get an indication about the problem?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            if not result.scheme or not result.netloc:"},{"line_number":112,"context_line":"                return False"},{"line_number":113,"context_line":"        except Exception:"},{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return True"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _validate_regex(self, regex_filter):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_a3c5703e","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":24},"in_reply_to":"9f91af0f_9df3e99e","updated":"2018-01-07 11:46:08.000000000","message":"Done, and yes. an error message is returned","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"0c89e7ee97c48956a869cb9b3aab29661ac96afc","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        deleted_rows \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if deleted_rows \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_1c31a9a3","line":46,"range":{"start_line":46,"start_character":27,"end_line":46,"end_character":28},"updated":"2018-01-10 02:29:15.000000000","message":"still not fixed. :)","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"8f4ce7de974f057cfa7709c16ebc52c6ed2ef7c6","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        deleted_rows \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if deleted_rows \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_be7b43bc","line":46,"range":{"start_line":46,"start_character":27,"end_line":46,"end_character":28},"in_reply_to":"7f96bb07_f994a98d","updated":"2018-01-14 10:20:59.000000000","message":"Understood, done.","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        deleted_rows \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if deleted_rows \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_df748ed1","line":46,"range":{"start_line":46,"start_character":27,"end_line":46,"end_character":28},"in_reply_to":"9f91af0f_1c31a9a3","updated":"2018-01-10 09:51:07.000000000","message":"The webhooks.delete() is an sql method which returns the number of rows deleted according to the given query. Not sure I understand what you would like me to change it to?","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"e3835fc60838c06d3aa41ded2b3d6151b730f5b1","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        deleted_rows \u003d self.db_conn.webhooks.delete(id)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if deleted_rows \u003d\u003d 1:"},{"line_number":47,"context_line":"            return {\u0027SUCCESS\u0027: \u0027Webhook %s deleted\u0027 % id}"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_f994a98d","line":46,"range":{"start_line":46,"start_character":27,"end_line":46,"end_character":28},"in_reply_to":"9f91af0f_df748ed1","updated":"2018-01-12 06:18:41.000000000","message":"I mean that you should not use \u00271\u0027, it\u0027s a magic number, only you know \u00271\u0027 means operate the database successfully. You can define a marco something like \u0027database_ret_success\u003d1\u0027 or a better name, and then use the marco anywhere.","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"0c89e7ee97c48956a869cb9b3aab29661ac96afc","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            if not result.scheme or not result.netloc:"},{"line_number":107,"context_line":"                return False"},{"line_number":108,"context_line":"        except Exception:"},{"line_number":109,"context_line":"            return False"},{"line_number":110,"context_line":"        return True"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _validate_regex(self, regex_filter):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_fc296536","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":24},"updated":"2018-01-10 02:29:15.000000000","message":"still not fix, add the error log.","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"e3835fc60838c06d3aa41ded2b3d6151b730f5b1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            if not result.scheme or not result.netloc:"},{"line_number":107,"context_line":"                return False"},{"line_number":108,"context_line":"        except Exception:"},{"line_number":109,"context_line":"            return False"},{"line_number":110,"context_line":"        return True"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _validate_regex(self, regex_filter):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_f93d89bb","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":24},"in_reply_to":"9f91af0f_3f4fba93","updated":"2018-01-12 06:18:41.000000000","message":"OK.","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"ba42e09bf270100558e22d10133ad659f34657a4","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            if not result.scheme or not result.netloc:"},{"line_number":107,"context_line":"                return False"},{"line_number":108,"context_line":"        except Exception:"},{"line_number":109,"context_line":"            return False"},{"line_number":110,"context_line":"        return True"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _validate_regex(self, regex_filter):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_3f4fba93","line":109,"range":{"start_line":109,"start_character":12,"end_line":109,"end_character":24},"in_reply_to":"9f91af0f_fc296536","updated":"2018-01-10 09:51:07.000000000","message":"The if one of the validations fail, the error is logged above in the add_webhook() method.","commit_id":"5c1ef4a323e9a1640a49929cef6dff52ff1a3f0e"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6e374036f207a9d87dd3a074bf7e93d207bd24ad","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Result \u003d namedtuple(\"Result\", [\"is_valid\", \"message\"])"},{"line_number":29,"context_line":"TENANT \u003d \u0027tenant\u0027"},{"line_number":30,"context_line":"IS_ADMIN \u003d \u0027is_admin\u0027"},{"line_number":31,"context_line":"PROJECT_ID \u003d \u0027project_id\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"@profiler.trace_cls(\"webhook apis\","}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_bb64f5ba","line":31,"range":{"start_line":29,"start_character":0,"end_line":31,"end_character":25},"updated":"2018-01-11 08:46:02.000000000","message":"These are already defined in EntityGraphApisBase. Consider moving them to a common place.","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"8f4ce7de974f057cfa7709c16ebc52c6ed2ef7c6","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Result \u003d namedtuple(\"Result\", [\"is_valid\", \"message\"])"},{"line_number":29,"context_line":"TENANT \u003d \u0027tenant\u0027"},{"line_number":30,"context_line":"IS_ADMIN \u003d \u0027is_admin\u0027"},{"line_number":31,"context_line":"PROJECT_ID \u003d \u0027project_id\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"@profiler.trace_cls(\"webhook apis\","}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_3e7093dc","line":31,"range":{"start_line":29,"start_character":0,"end_line":31,"end_character":25},"in_reply_to":"7f96bb07_bb64f5ba","updated":"2018-01-14 10:20:59.000000000","message":"Done","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6e374036f207a9d87dd3a074bf7e93d207bd24ad","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            # Check that webhook belongs to current tenant or current tenant"},{"line_number":83,"context_line":"            #  is admin"},{"line_number":84,"context_line":"            if len(webhooks) \u003d\u003d 0:"},{"line_number":85,"context_line":"                LOG.info(\"Webhook not found - %s\" % id)"},{"line_number":86,"context_line":"                return None"},{"line_number":87,"context_line":"            if ctx.get(TENANT, \"\") \u003d\u003d \\"},{"line_number":88,"context_line":"                    webhooks[0][PROJECT_ID] or ctx.get(IS_ADMIN, False):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_3b70e572","line":85,"range":{"start_line":85,"start_character":20,"end_line":85,"end_character":24},"updated":"2018-01-11 08:46:02.000000000","message":"I think it should be either warning or debug (depending on how often this method is called)","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"8f4ce7de974f057cfa7709c16ebc52c6ed2ef7c6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            # Check that webhook belongs to current tenant or current tenant"},{"line_number":83,"context_line":"            #  is admin"},{"line_number":84,"context_line":"            if len(webhooks) \u003d\u003d 0:"},{"line_number":85,"context_line":"                LOG.info(\"Webhook not found - %s\" % id)"},{"line_number":86,"context_line":"                return None"},{"line_number":87,"context_line":"            if ctx.get(TENANT, \"\") \u003d\u003d \\"},{"line_number":88,"context_line":"                    webhooks[0][PROJECT_ID] or ctx.get(IS_ADMIN, False):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_de764fd9","line":85,"range":{"start_line":85,"start_character":20,"end_line":85,"end_character":24},"in_reply_to":"7f96bb07_3b70e572","updated":"2018-01-14 10:20:59.000000000","message":"Done","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"}],"vitrage/common/policies/notifier_webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_d362fd16","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":73},"updated":"2017-12-31 16:17:48.000000000","message":"Missing copyright Nokia","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_0f46da24","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":73},"in_reply_to":"9f91af0f_d362fd16","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage/common/policies/webhook.py":[{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"ca851d20e8f01e3e4b3e6c459ba462d9ed257afc","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        description\u003d\u0027Delete a webhook registration\u0027,"},{"line_number":26,"context_line":"        operations\u003d["},{"line_number":27,"context_line":"            {"},{"line_number":28,"context_line":"                \u0027path\u0027: \u0027/webhook\u0027,"},{"line_number":29,"context_line":"                \u0027method\u0027: \u0027DELETE\u0027"},{"line_number":30,"context_line":"            }"},{"line_number":31,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_0a9316fc","line":28,"range":{"start_line":28,"start_character":25,"end_line":28,"end_character":34},"updated":"2018-01-04 03:49:51.000000000","message":"Missing `{registration_id}`? Form you vitrageclient code, it should be needed.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        description\u003d\u0027Delete a webhook registration\u0027,"},{"line_number":26,"context_line":"        operations\u003d["},{"line_number":27,"context_line":"            {"},{"line_number":28,"context_line":"                \u0027path\u0027: \u0027/webhook\u0027,"},{"line_number":29,"context_line":"                \u0027method\u0027: \u0027DELETE\u0027"},{"line_number":30,"context_line":"            }"},{"line_number":31,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_52d470bd","line":28,"range":{"start_line":28,"start_character":25,"end_line":28,"end_character":34},"in_reply_to":"9f91af0f_0a9316fc","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":45,"context_line":"        name\u003dwebhook % \u0027show\u0027,"},{"line_number":46,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":47,"context_line":"        description\u003d\u0027Show an webhook registration with given id\u0027,"},{"line_number":48,"context_line":"        operations\u003d["},{"line_number":49,"context_line":"            {"},{"line_number":50,"context_line":"                \u0027path\u0027: \u0027/webhook/{registration_id}\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_7d1705a5","line":47,"range":{"start_line":47,"start_character":26,"end_line":47,"end_character":28},"updated":"2018-01-04 10:30:56.000000000","message":"a","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":45,"context_line":"        name\u003dwebhook % \u0027show\u0027,"},{"line_number":46,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":47,"context_line":"        description\u003d\u0027Show an webhook registration with given id\u0027,"},{"line_number":48,"context_line":"        operations\u003d["},{"line_number":49,"context_line":"            {"},{"line_number":50,"context_line":"                \u0027path\u0027: \u0027/webhook/{registration_id}\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_fd223501","line":47,"range":{"start_line":47,"start_character":55,"end_line":47,"end_character":60},"updated":"2018-01-04 10:30:56.000000000","message":"a given","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":45,"context_line":"        name\u003dwebhook % \u0027show\u0027,"},{"line_number":46,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":47,"context_line":"        description\u003d\u0027Show an webhook registration with given id\u0027,"},{"line_number":48,"context_line":"        operations\u003d["},{"line_number":49,"context_line":"            {"},{"line_number":50,"context_line":"                \u0027path\u0027: \u0027/webhook/{registration_id}\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_b287f761","line":47,"range":{"start_line":47,"start_character":26,"end_line":47,"end_character":28},"in_reply_to":"9f91af0f_7d1705a5","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":45,"context_line":"        name\u003dwebhook % \u0027show\u0027,"},{"line_number":46,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":47,"context_line":"        description\u003d\u0027Show an webhook registration with given id\u0027,"},{"line_number":48,"context_line":"        operations\u003d["},{"line_number":49,"context_line":"            {"},{"line_number":50,"context_line":"                \u0027path\u0027: \u0027/webhook/{registration_id}\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_92843360","line":47,"range":{"start_line":47,"start_character":55,"end_line":47,"end_character":60},"in_reply_to":"9f91af0f_fd223501","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"}],"vitrage/entity_graph/processor/notifier.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    if not is_vertex:"},{"line_number":103,"context_line":"        return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # TODO(danoffek) add Handling Before / After state change notification"},{"line_number":106,"context_line":"    def notification_type(is_active,"},{"line_number":107,"context_line":"                          activate_event_type,"},{"line_number":108,"context_line":"                          deactivate_event_type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_f3670125","line":105,"range":{"start_line":105,"start_character":11,"end_line":105,"end_character":19},"updated":"2017-12-31 16:17:48.000000000","message":"TODO(nivo)...\n\nAnd what is the meaning of this todo?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    if not is_vertex:"},{"line_number":103,"context_line":"        return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # TODO(danoffek) add Handling Before / After state change notification"},{"line_number":106,"context_line":"    def notification_type(is_active,"},{"line_number":107,"context_line":"                          activate_event_type,"},{"line_number":108,"context_line":"                          deactivate_event_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_2a44dab6","line":105,"range":{"start_line":105,"start_character":3,"end_line":105,"end_character":74},"updated":"2018-01-04 03:42:53.000000000","message":"What does it mean?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    if not is_vertex:"},{"line_number":103,"context_line":"        return None"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # TODO(danoffek) add Handling Before / After state change notification"},{"line_number":106,"context_line":"    def notification_type(is_active,"},{"line_number":107,"context_line":"                          activate_event_type,"},{"line_number":108,"context_line":"                          deactivate_event_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_12234807","line":105,"range":{"start_line":105,"start_character":3,"end_line":105,"end_character":74},"in_reply_to":"9f91af0f_2a44dab6","updated":"2018-01-07 11:46:08.000000000","message":"not relevant. deleted","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"}],"vitrage/notifier/plugins/webhook/__init__.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Nokia"},{"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":1,"id":"9f91af0f_936c7509","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2017-12-31 16:17:48.000000000","message":"2018","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 - Nokia"},{"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":1,"id":"9f91af0f_4f65c2b4","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"9f91af0f_936c7509","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage/notifier/plugins/webhook/utils.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"def db_row_to_dict(row):"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"    return {"},{"line_number":4,"context_line":"        \u0027created_at\u0027: row.created_at,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_7373f1e8","line":1,"range":{"start_line":1,"start_character":4,"end_line":1,"end_character":18},"updated":"2017-12-31 16:17:48.000000000","message":"1. Missing header to this file\n\n2. Didn\u0027t you write this exact code in another file?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"def db_row_to_dict(row):"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"    return {"},{"line_number":4,"context_line":"        \u0027created_at\u0027: row.created_at,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ef5936fe","line":1,"range":{"start_line":1,"start_character":4,"end_line":1,"end_character":18},"in_reply_to":"9f91af0f_7373f1e8","updated":"2018-01-07 11:46:08.000000000","message":"1. Done.\n2. Nope, don\u0027t think so","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                        \u0027resource project id\u0027: 15"},{"line_number":36,"context_line":"                        }"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"ALARM_FIELDS_INTERPRETED \u003d {"},{"line_number":39,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.VITRAGE_ID: \u0027id\u0027,"},{"line_number":40,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.STATE: \u0027state\u0027,"},{"line_number":41,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.UPDATE_TIMESTAMP: \u0027update timestamp\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_e1fdabb1","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":24},"updated":"2018-01-04 17:30:35.000000000","message":"I didn\u0027t understand what you are doing in this file ...","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                        \u0027resource project id\u0027: 15"},{"line_number":36,"context_line":"                        }"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"ALARM_FIELDS_INTERPRETED \u003d {"},{"line_number":39,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.VITRAGE_ID: \u0027id\u0027,"},{"line_number":40,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.STATE: \u0027state\u0027,"},{"line_number":41,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.UPDATE_TIMESTAMP: \u0027update timestamp\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_e485905b","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":24},"in_reply_to":"9f91af0f_e1fdabb1","updated":"2018-01-07 11:46:08.000000000","message":"Removing the underscore from the field names and ordering them so they are sent in a nice format","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0d7714dad142fde0831eba519a556ea4129aab85","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                        \u0027resource project id\u0027: 15"},{"line_number":36,"context_line":"                        }"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"ALARM_FIELDS_INTERPRETED \u003d {"},{"line_number":39,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.VITRAGE_ID: \u0027id\u0027,"},{"line_number":40,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.STATE: \u0027state\u0027,"},{"line_number":41,"context_line":"    ECategory.ALARM + \u0027_\u0027 + VProps.UPDATE_TIMESTAMP: \u0027update timestamp\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_383398f8","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":24},"in_reply_to":"9f91af0f_e485905b","updated":"2018-01-07 12:39:12.000000000","message":"Maybe the existing structure is good enough to be sent to the webhook","commit_id":"1b816579afd09b020d6496a06cd7e375137f3af1"}],"vitrage/notifier/plugins/webhook/webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class NotifierWebhook(NotifierBase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # TODO(danoffek) Both ALARM_FIELDS_ORDERED and"},{"line_number":39,"context_line":"    # ALARM_FIELDS_INTERPRETED will be in one table"},{"line_number":40,"context_line":"    # in the DB. It\u0027s temporarily hard coded"},{"line_number":41,"context_line":"    ALARM_FIELDS_ORDERED \u003d {\u0027id\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_1380658b","line":38,"range":{"start_line":38,"start_character":4,"end_line":38,"end_character":20},"updated":"2017-12-31 16:17:48.000000000","message":"TODO(nivo)\n\nWhat does it mean? note that once we release a Vitrage version, changing the database schema will be very complicated and will require upgrade.","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class NotifierWebhook(NotifierBase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # TODO(danoffek) Both ALARM_FIELDS_ORDERED and"},{"line_number":39,"context_line":"    # ALARM_FIELDS_INTERPRETED will be in one table"},{"line_number":40,"context_line":"    # in the DB. It\u0027s temporarily hard coded"},{"line_number":41,"context_line":"    ALARM_FIELDS_ORDERED \u003d {\u0027id\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_fd679550","line":38,"range":{"start_line":38,"start_character":4,"end_line":38,"end_character":20},"in_reply_to":"9f91af0f_1380658b","updated":"2018-01-04 10:30:56.000000000","message":"?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def process_event(self, data, event_type):"},{"line_number":114,"context_line":"        LOG.info(\u0027Notifier Webhook API starting to process %s\u0027, str(data))"},{"line_number":115,"context_line":"        # TODO(Danoffek) check if it\u0027s alarm or resource."},{"line_number":116,"context_line":"        # No need to handle \"Evacutaion\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        webhooks \u003d self._load_webhooks()"},{"line_number":119,"context_line":"        if webhooks:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_d34bdd84","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":40},"updated":"2017-12-31 16:17:48.000000000","message":"What does it mean? evacuation is not supported in Vitrage","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    def process_event(self, data, event_type):"},{"line_number":114,"context_line":"        LOG.info(\u0027Notifier Webhook API starting to process %s\u0027, str(data))"},{"line_number":115,"context_line":"        # TODO(Danoffek) check if it\u0027s alarm or resource."},{"line_number":116,"context_line":"        # No need to handle \"Evacutaion\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        webhooks \u003d self._load_webhooks()"},{"line_number":119,"context_line":"        if webhooks:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_7d65c544","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":40},"in_reply_to":"9f91af0f_d34bdd84","updated":"2018-01-04 10:30:56.000000000","message":"?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        self.default_headers \u003d {\u0027content-type\u0027: \u0027application/json\u0027}"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def process_event(self, data, event_type):"},{"line_number":114,"context_line":"        LOG.info(\u0027Notifier Webhook API starting to process %s\u0027, str(data))"},{"line_number":115,"context_line":"        # TODO(Danoffek) check if it\u0027s alarm or resource."},{"line_number":116,"context_line":"        # No need to handle \"Evacutaion\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        webhooks \u003d self._load_webhooks()"},{"line_number":119,"context_line":"        if webhooks:"},{"line_number":120,"context_line":"            post_output \u003d defaultdict(str)"},{"line_number":121,"context_line":"            for key, val in data.items():"},{"line_number":122,"context_line":"                if key \u003d\u003d VProps.RESOURCE:"},{"line_number":123,"context_line":"                    for k, v in val.items():"},{"line_number":124,"context_line":"                        resource_key_value \u003d \\"},{"line_number":125,"context_line":"                            self.alarm_pretty_names[ECategory.RESOURCE + \u0027_\u0027 +"},{"line_number":126,"context_line":"                                                    str(k)]"},{"line_number":127,"context_line":"                        if resource_key_value:"},{"line_number":128,"context_line":"                            post_output[resource_key_value] \u003d v"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"                else:"},{"line_number":131,"context_line":"                    alarm_key_value \u003d \\"},{"line_number":132,"context_line":"                        self.alarm_pretty_names[ECategory.ALARM + \u0027_\u0027 + key]"},{"line_number":133,"context_line":"                    if alarm_key_value:"},{"line_number":134,"context_line":"                        post_output[alarm_key_value] \u003d str(val)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            final_post_output \u003d OrderedDict()"},{"line_number":137,"context_line":"            for field_name in self.alarm_fields_ordered.keys():"},{"line_number":138,"context_line":"                final_post_output[field_name] \u003d \\"},{"line_number":139,"context_line":"                    post_output.get(field_name, \u0027\u0027)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            for webhook in webhooks:"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"                webhook_headers \u003d self._get_webhook_headers(webhook)"},{"line_number":144,"context_line":"                webhook_filters \u003d self._get_webhook_filters(webhook)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"                if self._check_against_filter(webhook_filters, data):"},{"line_number":147,"context_line":"                    session \u003d requests.Session()"},{"line_number":148,"context_line":"                    session.mount(str(webhook[URL]),"},{"line_number":149,"context_line":"                                  requests.adapters.HTTPAdapter("},{"line_number":150,"context_line":"                                      max_retries\u003dself.max_retries))"},{"line_number":151,"context_line":"                    resp \u003d session.post(str(webhook[URL]),"},{"line_number":152,"context_line":"                                        data\u003djsonutils.dumps("},{"line_number":153,"context_line":"                                            final_post_output),"},{"line_number":154,"context_line":"                                        headers\u003dwebhook_headers)"},{"line_number":155,"context_line":"                    LOG.info(\u0027posted %s to %s. Response status %s, reason %s\u0027,"},{"line_number":156,"context_line":"                             str(final_post_output), str(webhook[URL]),"},{"line_number":157,"context_line":"                             resp.status_code, resp.reason)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        LOG.info(\u0027Rest api finished processing %s\u0027, str(data))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _load_webhooks(self):"},{"line_number":162,"context_line":"        webhooks \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_d32afde5","line":159,"range":{"start_line":113,"start_character":3,"end_line":159,"end_character":62},"updated":"2017-12-31 14:32:27.000000000","message":"please refactor this to a smaller function","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        self.default_headers \u003d {\u0027content-type\u0027: \u0027application/json\u0027}"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def process_event(self, data, event_type):"},{"line_number":114,"context_line":"        LOG.info(\u0027Notifier Webhook API starting to process %s\u0027, str(data))"},{"line_number":115,"context_line":"        # TODO(Danoffek) check if it\u0027s alarm or resource."},{"line_number":116,"context_line":"        # No need to handle \"Evacutaion\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        webhooks \u003d self._load_webhooks()"},{"line_number":119,"context_line":"        if webhooks:"},{"line_number":120,"context_line":"            post_output \u003d defaultdict(str)"},{"line_number":121,"context_line":"            for key, val in data.items():"},{"line_number":122,"context_line":"                if key \u003d\u003d VProps.RESOURCE:"},{"line_number":123,"context_line":"                    for k, v in val.items():"},{"line_number":124,"context_line":"                        resource_key_value \u003d \\"},{"line_number":125,"context_line":"                            self.alarm_pretty_names[ECategory.RESOURCE + \u0027_\u0027 +"},{"line_number":126,"context_line":"                                                    str(k)]"},{"line_number":127,"context_line":"                        if resource_key_value:"},{"line_number":128,"context_line":"                            post_output[resource_key_value] \u003d v"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"                else:"},{"line_number":131,"context_line":"                    alarm_key_value \u003d \\"},{"line_number":132,"context_line":"                        self.alarm_pretty_names[ECategory.ALARM + \u0027_\u0027 + key]"},{"line_number":133,"context_line":"                    if alarm_key_value:"},{"line_number":134,"context_line":"                        post_output[alarm_key_value] \u003d str(val)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            final_post_output \u003d OrderedDict()"},{"line_number":137,"context_line":"            for field_name in self.alarm_fields_ordered.keys():"},{"line_number":138,"context_line":"                final_post_output[field_name] \u003d \\"},{"line_number":139,"context_line":"                    post_output.get(field_name, \u0027\u0027)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            for webhook in webhooks:"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"                webhook_headers \u003d self._get_webhook_headers(webhook)"},{"line_number":144,"context_line":"                webhook_filters \u003d self._get_webhook_filters(webhook)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"                if self._check_against_filter(webhook_filters, data):"},{"line_number":147,"context_line":"                    session \u003d requests.Session()"},{"line_number":148,"context_line":"                    session.mount(str(webhook[URL]),"},{"line_number":149,"context_line":"                                  requests.adapters.HTTPAdapter("},{"line_number":150,"context_line":"                                      max_retries\u003dself.max_retries))"},{"line_number":151,"context_line":"                    resp \u003d session.post(str(webhook[URL]),"},{"line_number":152,"context_line":"                                        data\u003djsonutils.dumps("},{"line_number":153,"context_line":"                                            final_post_output),"},{"line_number":154,"context_line":"                                        headers\u003dwebhook_headers)"},{"line_number":155,"context_line":"                    LOG.info(\u0027posted %s to %s. Response status %s, reason %s\u0027,"},{"line_number":156,"context_line":"                             str(final_post_output), str(webhook[URL]),"},{"line_number":157,"context_line":"                             resp.status_code, resp.reason)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        LOG.info(\u0027Rest api finished processing %s\u0027, str(data))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _load_webhooks(self):"},{"line_number":162,"context_line":"        webhooks \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_0e359cda","line":159,"range":{"start_line":113,"start_character":3,"end_line":159,"end_character":62},"in_reply_to":"9f91af0f_d32afde5","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        LOG.info(\u0027Rest api finished processing %s\u0027, str(data))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _load_webhooks(self):"},{"line_number":162,"context_line":"        webhooks \u003d []"},{"line_number":163,"context_line":"        db_webhooks \u003d self._db.notifier_webhooks.query()"},{"line_number":164,"context_line":"        for webhook in db_webhooks:"},{"line_number":165,"context_line":"            webhook \u003d webhook_utils.db_row_to_dict(webhook)"},{"line_number":166,"context_line":"            webhooks.append(webhook)"},{"line_number":167,"context_line":"        return webhooks"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_webhook_headers(self, webhook):"},{"line_number":170,"context_line":"        headers \u003d self.default_headers.copy()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_f32f01f4","line":167,"range":{"start_line":162,"start_character":7,"end_line":167,"end_character":23},"updated":"2017-12-31 14:32:27.000000000","message":"use comprehension lists","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        LOG.info(\u0027Rest api finished processing %s\u0027, str(data))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def _load_webhooks(self):"},{"line_number":162,"context_line":"        webhooks \u003d []"},{"line_number":163,"context_line":"        db_webhooks \u003d self._db.notifier_webhooks.query()"},{"line_number":164,"context_line":"        for webhook in db_webhooks:"},{"line_number":165,"context_line":"            webhook \u003d webhook_utils.db_row_to_dict(webhook)"},{"line_number":166,"context_line":"            webhooks.append(webhook)"},{"line_number":167,"context_line":"        return webhooks"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_webhook_headers(self, webhook):"},{"line_number":170,"context_line":"        headers \u003d self.default_headers.copy()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_2e32e0f2","line":167,"range":{"start_line":162,"start_character":7,"end_line":167,"end_character":23},"in_reply_to":"9f91af0f_f32f01f4","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        headers[\u0027x-openstack-request-id\u0027] \u003d b\u0027req-\u0027 + \\"},{"line_number":172,"context_line":"                                            uuidutils.generate_uuid().encode("},{"line_number":173,"context_line":"                                                \u0027ascii\u0027)"},{"line_number":174,"context_line":"        if webhook.get(\u0027headers\u0027) is not None:"},{"line_number":175,"context_line":"            headers.update(ast.literal_eval(webhook[\u0027headers\u0027]))"},{"line_number":176,"context_line":"        return headers"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_9334754c","line":174,"range":{"start_line":174,"start_character":34,"end_line":174,"end_character":45},"updated":"2017-12-31 14:32:27.000000000","message":"can remove the None","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        headers[\u0027x-openstack-request-id\u0027] \u003d b\u0027req-\u0027 + \\"},{"line_number":172,"context_line":"                                            uuidutils.generate_uuid().encode("},{"line_number":173,"context_line":"                                                \u0027ascii\u0027)"},{"line_number":174,"context_line":"        if webhook.get(\u0027headers\u0027) is not None:"},{"line_number":175,"context_line":"            headers.update(ast.literal_eval(webhook[\u0027headers\u0027]))"},{"line_number":176,"context_line":"        return headers"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ce4c9478","line":174,"range":{"start_line":174,"start_character":34,"end_line":174,"end_character":45},"in_reply_to":"9f91af0f_9334754c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _get_webhook_filters(self, webhook):"},{"line_number":179,"context_line":"        filters \u003d webhook.get(\u0027regex_filter\u0027)"},{"line_number":180,"context_line":"        if filters is not \u0027None\u0027:"},{"line_number":181,"context_line":"            filters \u003d ast.literal_eval(filters)"},{"line_number":182,"context_line":"            for k, v in filters.items():"},{"line_number":183,"context_line":"                filters[k] \u003d re.compile(v)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_533eed29","line":180,"range":{"start_line":180,"start_character":22,"end_line":180,"end_character":32},"updated":"2017-12-31 14:32:27.000000000","message":"you can remove the None","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _get_webhook_filters(self, webhook):"},{"line_number":179,"context_line":"        filters \u003d webhook.get(\u0027regex_filter\u0027)"},{"line_number":180,"context_line":"        if filters is not \u0027None\u0027:"},{"line_number":181,"context_line":"            filters \u003d ast.literal_eval(filters)"},{"line_number":182,"context_line":"            for k, v in filters.items():"},{"line_number":183,"context_line":"                filters[k] \u003d re.compile(v)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ee515810","line":180,"range":{"start_line":180,"start_character":22,"end_line":180,"end_character":32},"in_reply_to":"9f91af0f_533eed29","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"787579acb3b7659275b50324a64cdaa8e0e78216","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if webhook_filters is not None:"},{"line_number":190,"context_line":"            for field, filter in webhook_filters.items():"},{"line_number":191,"context_line":"                value \u003d event.get(field)"},{"line_number":192,"context_line":"                if value is None:"},{"line_number":193,"context_line":"                    return False"},{"line_number":194,"context_line":"                else:"},{"line_number":195,"context_line":"                    if filter.match(value) is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_134865ca","line":192,"range":{"start_line":192,"start_character":24,"end_line":192,"end_character":32},"updated":"2017-12-31 14:32:27.000000000","message":"you can remove the None","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if webhook_filters is not None:"},{"line_number":190,"context_line":"            for field, filter in webhook_filters.items():"},{"line_number":191,"context_line":"                value \u003d event.get(field)"},{"line_number":192,"context_line":"                if value is None:"},{"line_number":193,"context_line":"                    return False"},{"line_number":194,"context_line":"                else:"},{"line_number":195,"context_line":"                    if filter.match(value) is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_b34ad97d","line":192,"range":{"start_line":192,"start_character":24,"end_line":192,"end_character":32},"in_reply_to":"9f91af0f_134865ca","updated":"2017-12-31 16:17:48.000000000","message":"Are you sure? What is value is False?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if webhook_filters is not None:"},{"line_number":190,"context_line":"            for field, filter in webhook_filters.items():"},{"line_number":191,"context_line":"                value \u003d event.get(field)"},{"line_number":192,"context_line":"                if value is None:"},{"line_number":193,"context_line":"                    return False"},{"line_number":194,"context_line":"                else:"},{"line_number":195,"context_line":"                    if filter.match(value) is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_8e568c06","line":192,"range":{"start_line":192,"start_character":24,"end_line":192,"end_character":32},"in_reply_to":"9f91af0f_134865ca","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if webhook_filters is not None:"},{"line_number":190,"context_line":"            for field, filter in webhook_filters.items():"},{"line_number":191,"context_line":"                value \u003d event.get(field)"},{"line_number":192,"context_line":"                if value is None:"},{"line_number":193,"context_line":"                    return False"},{"line_number":194,"context_line":"                else:"},{"line_number":195,"context_line":"                    if filter.match(value) is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ef0e16e4","line":192,"range":{"start_line":192,"start_character":24,"end_line":192,"end_character":32},"in_reply_to":"9f91af0f_b34ad97d","updated":"2018-01-07 11:46:08.000000000","message":"If the value is not None, then i need to check it against the filter. If it is None, then it doesn\u0027t answer the filter and I return false","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"7800a003341038d11b9018613a2e01ffdb82ef0c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def get_notifier_name():"},{"line_number":96,"context_line":"        return \u0027webhook\u0027"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def __init__(self, conf\u003dNone):"},{"line_number":99,"context_line":"        super(Webhook, self).__init__(conf)"},{"line_number":100,"context_line":"        self.conf \u003d conf"},{"line_number":101,"context_line":"        self._db \u003d storage.get_connection_from_config(self.conf)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_6a23c206","line":98,"range":{"start_line":98,"start_character":23,"end_line":98,"end_character":33},"updated":"2018-01-04 03:42:53.000000000","message":"\u0027conf\u0027 should be the mandtory.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def get_notifier_name():"},{"line_number":96,"context_line":"        return \u0027webhook\u0027"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def __init__(self, conf\u003dNone):"},{"line_number":99,"context_line":"        super(Webhook, self).__init__(conf)"},{"line_number":100,"context_line":"        self.conf \u003d conf"},{"line_number":101,"context_line":"        self._db \u003d storage.get_connection_from_config(self.conf)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_9df0c9cb","line":98,"range":{"start_line":98,"start_character":23,"end_line":98,"end_character":33},"in_reply_to":"9f91af0f_6a23c206","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"                if self._check_against_filter(webhook_filters, data):"},{"line_number":128,"context_line":"                    session \u003d requests.Session()"},{"line_number":129,"context_line":"                    session.mount(str(webhook[URL]),"},{"line_number":130,"context_line":"                                  requests.adapters.HTTPAdapter("},{"line_number":131,"context_line":"                                      max_retries\u003dself.max_retries))"},{"line_number":132,"context_line":"                    resp \u003d session.post(str(webhook[URL]),"},{"line_number":133,"context_line":"                                        data\u003djsonutils.dumps("},{"line_number":134,"context_line":"                                            final_post_output),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_7dcaa51a","line":131,"range":{"start_line":129,"start_character":20,"end_line":131,"end_character":68},"updated":"2018-01-04 10:30:56.000000000","message":"Can it be done only once?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"7bf7218135de9b128157c3ce346edb58b83e1b57","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"                if self._check_against_filter(webhook_filters, data):"},{"line_number":128,"context_line":"                    session \u003d requests.Session()"},{"line_number":129,"context_line":"                    session.mount(str(webhook[URL]),"},{"line_number":130,"context_line":"                                  requests.adapters.HTTPAdapter("},{"line_number":131,"context_line":"                                      max_retries\u003dself.max_retries))"},{"line_number":132,"context_line":"                    resp \u003d session.post(str(webhook[URL]),"},{"line_number":133,"context_line":"                                        data\u003djsonutils.dumps("},{"line_number":134,"context_line":"                                            final_post_output),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_81d37f38","line":131,"range":{"start_line":129,"start_character":20,"end_line":131,"end_character":68},"in_reply_to":"9f91af0f_7dcaa51a","updated":"2018-01-04 17:30:35.000000000","message":"?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"                if self._check_against_filter(webhook_filters, data):"},{"line_number":128,"context_line":"                    session \u003d requests.Session()"},{"line_number":129,"context_line":"                    session.mount(str(webhook[URL]),"},{"line_number":130,"context_line":"                                  requests.adapters.HTTPAdapter("},{"line_number":131,"context_line":"                                      max_retries\u003dself.max_retries))"},{"line_number":132,"context_line":"                    resp \u003d session.post(str(webhook[URL]),"},{"line_number":133,"context_line":"                                        data\u003djsonutils.dumps("},{"line_number":134,"context_line":"                                            final_post_output),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_84960493","line":131,"range":{"start_line":129,"start_character":20,"end_line":131,"end_character":68},"in_reply_to":"9f91af0f_81d37f38","updated":"2018-01-07 11:46:08.000000000","message":"It is done every time an event happens because they loading of webhooks happens with every event, this is so adding/deleting webhooks doesn\u0027t require restarting the service.","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"6e374036f207a9d87dd3a074bf7e93d207bd24ad","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                        and self._check_correct_tenant(webhook, data):"},{"line_number":59,"context_line":"                    self._post_data(webhook, data)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.info(\u0027Rest api finished processing %s\u0027, str(data))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _post_data(self, webhook, data):"},{"line_number":64,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_3b1ea50c","line":61,"range":{"start_line":61,"start_character":18,"end_line":61,"end_character":22},"updated":"2018-01-11 08:46:02.000000000","message":"Webhook","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"8f4ce7de974f057cfa7709c16ebc52c6ed2ef7c6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                        and self._check_correct_tenant(webhook, data):"},{"line_number":59,"context_line":"                    self._post_data(webhook, data)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.info(\u0027Rest api finished processing %s\u0027, str(data))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _post_data(self, webhook, data):"},{"line_number":64,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_9e80c78d","line":61,"range":{"start_line":61,"start_character":18,"end_line":61,"end_character":22},"in_reply_to":"7f96bb07_3b1ea50c","updated":"2018-01-14 10:20:59.000000000","message":"Done","commit_id":"d645f764243bad93604ef088a93a24f4eb6fdd0d"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b55fdc1f25df0574088db7713544cf7196c7ea9d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        if webhook_filters:"},{"line_number":106,"context_line":"            for field, filter in webhook_filters.items():"},{"line_number":107,"context_line":"                value \u003d event.get(field)"},{"line_number":108,"context_line":"                if value is None:"},{"line_number":109,"context_line":"                    return False"},{"line_number":110,"context_line":"                elif filter.match(value) is None:"},{"line_number":111,"context_line":"                        return False"},{"line_number":112,"context_line":"        return True"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def _filter_fields(self, data):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f96bb07_4ab424f2","line":111,"range":{"start_line":108,"start_character":0,"end_line":111,"end_character":36},"updated":"2018-01-18 16:29:13.000000000","message":"if value is None or filter.match(value) is None:\n    return False","commit_id":"42d931a9ac29d00fb3ef23547d989ec56bd93a84"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b55fdc1f25df0574088db7713544cf7196c7ea9d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # Check that the resource project ID matches the project ID under"},{"line_number":123,"context_line":"        # which the webhook was added."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if webhook.get(IS_ADMIN_WEBHOOK):"},{"line_number":126,"context_line":"            return True"},{"line_number":127,"context_line":"        if data.get(VProps.RESOURCE):"},{"line_number":128,"context_line":"            if data[VProps.RESOURCE].get(VProps.PROJECT_ID):"},{"line_number":129,"context_line":"                return data[VProps.RESOURCE][VProps.PROJECT_ID] \u003d\u003d \\"},{"line_number":130,"context_line":"                    webhook.get(VProps.PROJECT_ID)"},{"line_number":131,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f96bb07_8a078cca","line":131,"range":{"start_line":125,"start_character":0,"end_line":131,"end_character":19},"updated":"2018-01-18 16:29:13.000000000","message":"Seems buggy.\nAlarms should have \u0027resource\u0027 with \u0027project_id\u0027.\nResource dont have \u0027resource\u0027 but do have \u0027project_id\u0027\nThe resource \u0027project_id\u0027 is not checked and it will always be returned","commit_id":"42d931a9ac29d00fb3ef23547d989ec56bd93a84"}],"vitrage/storage/base.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        return None"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @property"},{"line_number":35,"context_line":"    def httppost_registrations(self):"},{"line_number":36,"context_line":"        return None"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_535fcd40","line":35,"range":{"start_line":35,"start_character":8,"end_line":35,"end_character":30},"updated":"2017-12-31 16:17:48.000000000","message":"Please rename it to \u0027webhook\u0027 or whatever other name that is chosen","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        return None"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @property"},{"line_number":35,"context_line":"    def httppost_registrations(self):"},{"line_number":36,"context_line":"        return None"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_6fc9a676","line":35,"range":{"start_line":35,"start_character":8,"end_line":35,"end_character":30},"in_reply_to":"9f91af0f_535fcd40","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :type httppost_registration:"},{"line_number":107,"context_line":"        vitrage.storage.sqlalchemy.models.NotifierWebhook"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        raise NotImplementedError(\u0027create webhook not implemented\u0027)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @abc.abstractmethod"},{"line_number":112,"context_line":"    def update(self, webhook):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_13594559","line":109,"range":{"start_line":109,"start_character":50,"end_line":109,"end_character":53},"updated":"2017-12-31 16:17:48.000000000","message":"is not (also in the other methods)","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        :type httppost_registration:"},{"line_number":107,"context_line":"        vitrage.storage.sqlalchemy.models.NotifierWebhook"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        raise NotImplementedError(\u0027create webhook not implemented\u0027)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @abc.abstractmethod"},{"line_number":112,"context_line":"    def update(self, webhook):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_afe6ce15","line":109,"range":{"start_line":109,"start_character":50,"end_line":109,"end_character":53},"in_reply_to":"9f91af0f_13594559","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    @abc.abstractmethod"},{"line_number":134,"context_line":"    def delete(self,"},{"line_number":135,"context_line":"               id\u003dNone,"},{"line_number":136,"context_line":"               url\u003dNone,"},{"line_number":137,"context_line":"               headers\u003dNone,"},{"line_number":138,"context_line":"               regex_filter\u003dNone,"},{"line_number":139,"context_line":"               ):"},{"line_number":140,"context_line":"        \"\"\"Delete all webhooks that match the filters.\"\"\""},{"line_number":141,"context_line":"        raise NotImplementedError(\u0027delete webhook not implemented\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_d330bd0a","line":138,"range":{"start_line":136,"start_character":15,"end_line":138,"end_character":32},"updated":"2017-12-31 16:17:48.000000000","message":"delete should be only by id","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    @abc.abstractmethod"},{"line_number":134,"context_line":"    def delete(self,"},{"line_number":135,"context_line":"               id\u003dNone,"},{"line_number":136,"context_line":"               url\u003dNone,"},{"line_number":137,"context_line":"               headers\u003dNone,"},{"line_number":138,"context_line":"               regex_filter\u003dNone,"},{"line_number":139,"context_line":"               ):"},{"line_number":140,"context_line":"        \"\"\"Delete all webhooks that match the filters.\"\"\""},{"line_number":141,"context_line":"        raise NotImplementedError(\u0027delete webhook not implemented\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_cfcc728b","line":138,"range":{"start_line":136,"start_character":15,"end_line":138,"end_character":32},"in_reply_to":"9f91af0f_d330bd0a","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage/storage/impl_sqlalchemy.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        with session.begin():"},{"line_number":159,"context_line":"            session.add(notifier_webhook)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def update(self, notifier_webhook):"},{"line_number":162,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":163,"context_line":"        with session.begin():"},{"line_number":164,"context_line":"            session.merge(notifier_webhook)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_b33f39d5","line":161,"range":{"start_line":161,"start_character":8,"end_line":161,"end_character":14},"updated":"2017-12-31 16:17:48.000000000","message":"Do we support update? does it make sense?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        with session.begin():"},{"line_number":159,"context_line":"            session.add(notifier_webhook)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def update(self, notifier_webhook):"},{"line_number":162,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":163,"context_line":"        with session.begin():"},{"line_number":164,"context_line":"            session.merge(notifier_webhook)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_6f9e8664","line":161,"range":{"start_line":161,"start_character":8,"end_line":161,"end_character":14},"in_reply_to":"9f91af0f_b33f39d5","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def delete(self,"},{"line_number":180,"context_line":"               id\u003dNone,"},{"line_number":181,"context_line":"               url\u003dNone,"},{"line_number":182,"context_line":"               headers\u003dNone,"},{"line_number":183,"context_line":"               regex_filter\u003dNone):"},{"line_number":184,"context_line":"        query \u003d self.query_filter("},{"line_number":185,"context_line":"            models.NotifierWebhooks,"},{"line_number":186,"context_line":"            id\u003did,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_5324adc6","line":183,"range":{"start_line":181,"start_character":15,"end_line":183,"end_character":32},"updated":"2017-12-31 16:17:48.000000000","message":"delete only by id","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def delete(self,"},{"line_number":180,"context_line":"               id\u003dNone,"},{"line_number":181,"context_line":"               url\u003dNone,"},{"line_number":182,"context_line":"               headers\u003dNone,"},{"line_number":183,"context_line":"               regex_filter\u003dNone):"},{"line_number":184,"context_line":"        query \u003d self.query_filter("},{"line_number":185,"context_line":"            models.NotifierWebhooks,"},{"line_number":186,"context_line":"            id\u003did,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_8f9bca70","line":183,"range":{"start_line":181,"start_character":15,"end_line":183,"end_character":32},"in_reply_to":"9f91af0f_5324adc6","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage_tempest_tests/tests/api/notifier_webhook/test_notifier_webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def test_add_webhook(self):"},{"line_number":37,"context_line":"        try:"},{"line_number":38,"context_line":"            webhooks \u003d TempestClients.vitrage().notifier_webhook.list()"},{"line_number":39,"context_line":"            self.assertEqual(0, len(webhooks), \u0027No webhooks should exist \u0027"},{"line_number":40,"context_line":"                                               \u0027before the test\u0027)"},{"line_number":41,"context_line":"            created_webhook \u003d TempestClients.vitrage().notifier_webhook.add("},{"line_number":42,"context_line":"                url\u003d\"https://www.test.com\","},{"line_number":43,"context_line":"                regex_filter\u003dREGEX_PROPS,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_f31e216f","line":40,"range":{"start_line":39,"start_character":12,"end_line":40,"end_character":65},"updated":"2017-12-31 16:17:48.000000000","message":"I\u0027m not sure this assumption is true for a tempest test. It might be more safe to get the current number of webhooks and remember it.\nSame comment for all of the tests.","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def test_add_webhook(self):"},{"line_number":37,"context_line":"        try:"},{"line_number":38,"context_line":"            webhooks \u003d TempestClients.vitrage().notifier_webhook.list()"},{"line_number":39,"context_line":"            self.assertEqual(0, len(webhooks), \u0027No webhooks should exist \u0027"},{"line_number":40,"context_line":"                                               \u0027before the test\u0027)"},{"line_number":41,"context_line":"            created_webhook \u003d TempestClients.vitrage().notifier_webhook.add("},{"line_number":42,"context_line":"                url\u003d\"https://www.test.com\","},{"line_number":43,"context_line":"                regex_filter\u003dREGEX_PROPS,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_656307de","line":40,"range":{"start_line":39,"start_character":12,"end_line":40,"end_character":65},"in_reply_to":"9f91af0f_f31e216f","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                                            \u0027created\u0027)"},{"line_number":49,"context_line":"            self.assertEqual(created_webhook[HEADERS],"},{"line_number":50,"context_line":"                             HEADERS_PROPS,"},{"line_number":51,"context_line":"                             \u0027headers malformed\u0027)"},{"line_number":52,"context_line":"            self.assertEqual(created_webhook[REGEX_FILTER],"},{"line_number":53,"context_line":"                             REGEX_PROPS,"},{"line_number":54,"context_line":"                             \u0027regex malformed\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_33048917","line":51,"range":{"start_line":51,"start_character":30,"end_line":51,"end_character":47},"updated":"2017-12-31 16:17:48.000000000","message":"I think the message should be \"headers not created correctly\". The original headers are OK. By \"malformed\" I understand that the problem is with the original headers that are malformed.","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                                            \u0027created\u0027)"},{"line_number":49,"context_line":"            self.assertEqual(created_webhook[HEADERS],"},{"line_number":50,"context_line":"                             HEADERS_PROPS,"},{"line_number":51,"context_line":"                             \u0027headers malformed\u0027)"},{"line_number":52,"context_line":"            self.assertEqual(created_webhook[REGEX_FILTER],"},{"line_number":53,"context_line":"                             REGEX_PROPS,"},{"line_number":54,"context_line":"                             \u0027regex malformed\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_45528315","line":51,"range":{"start_line":51,"start_character":30,"end_line":51,"end_character":47},"in_reply_to":"9f91af0f_33048917","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                             \u0027headers malformed\u0027)"},{"line_number":52,"context_line":"            self.assertEqual(created_webhook[REGEX_FILTER],"},{"line_number":53,"context_line":"                             REGEX_PROPS,"},{"line_number":54,"context_line":"                             \u0027regex malformed\u0027)"},{"line_number":55,"context_line":"            self.assertEqual(created_webhook[URL],"},{"line_number":56,"context_line":"                             \"https://www.test.com\","},{"line_number":57,"context_line":"                             \u0027URL malformed\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ee03980c","line":54,"range":{"start_line":54,"start_character":30,"end_line":54,"end_character":45},"updated":"2017-12-31 16:17:48.000000000","message":"Same here","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                             \u0027headers malformed\u0027)"},{"line_number":52,"context_line":"            self.assertEqual(created_webhook[REGEX_FILTER],"},{"line_number":53,"context_line":"                             REGEX_PROPS,"},{"line_number":54,"context_line":"                             \u0027regex malformed\u0027)"},{"line_number":55,"context_line":"            self.assertEqual(created_webhook[URL],"},{"line_number":56,"context_line":"                             \"https://www.test.com\","},{"line_number":57,"context_line":"                             \u0027URL malformed\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_254dff71","line":54,"range":{"start_line":54,"start_character":30,"end_line":54,"end_character":45},"in_reply_to":"9f91af0f_ee03980c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                             \u0027regex malformed\u0027)"},{"line_number":55,"context_line":"            self.assertEqual(created_webhook[URL],"},{"line_number":56,"context_line":"                             \"https://www.test.com\","},{"line_number":57,"context_line":"                             \u0027URL malformed\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"            webhooks \u003d TempestClients.vitrage().notifier_webhook.list()"},{"line_number":60,"context_line":"            self.assertEqual(1, len(webhooks))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_8e08cc28","line":57,"range":{"start_line":57,"start_character":30,"end_line":57,"end_character":43},"updated":"2017-12-31 16:17:48.000000000","message":"And here","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                             \u0027regex malformed\u0027)"},{"line_number":55,"context_line":"            self.assertEqual(created_webhook[URL],"},{"line_number":56,"context_line":"                             \"https://www.test.com\","},{"line_number":57,"context_line":"                             \u0027URL malformed\u0027)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"            webhooks \u003d TempestClients.vitrage().notifier_webhook.list()"},{"line_number":60,"context_line":"            self.assertEqual(1, len(webhooks))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_8532cbf0","line":57,"range":{"start_line":57,"start_character":30,"end_line":57,"end_character":43},"in_reply_to":"9f91af0f_8e08cc28","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}],"vitrage_tempest_tests/tests/api/webhook/base.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class BaseWebhookTest(BaseVitrageTempest):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @classmethod"},{"line_number":25,"context_line":"    def setUpClass(cls):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_5d4c819d","line":22,"range":{"start_line":22,"start_character":6,"end_line":22,"end_character":21},"updated":"2018-01-04 10:30:56.000000000","message":"Why do you need a base class?","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class BaseWebhookTest(BaseVitrageTempest):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @classmethod"},{"line_number":25,"context_line":"    def setUpClass(cls):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_3293e7a5","line":22,"range":{"start_line":22,"start_character":6,"end_line":22,"end_character":21},"in_reply_to":"9f91af0f_5d4c819d","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"}],"vitrage_tempest_tests/tests/e2e/test_webhook.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        cls.mock_server_thread.start()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @utils.tempest_logger"},{"line_number":53,"context_line":"    def test_webhook_basic_event(self):"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        URL_PROPS \u003d \u0027http://localhost:%s/\u0027 % self.mock_server_port"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ae5b502c","line":53,"range":{"start_line":53,"start_character":8,"end_line":53,"end_character":32},"updated":"2017-12-31 16:17:48.000000000","message":"Please add more tests:\n- with no filter\n- with specific filters: by alarm type, by resource type, by resource id\n- negative tests: make sure the webhook is *not* called when it is not needed\n- two webhooks with the same filter\n- two webhooks with similar but not identical filters\n- call the webhook twice with the same alarm\n- call the webhook with alarm up and then down","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        cls.mock_server_thread.start()"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @utils.tempest_logger"},{"line_number":53,"context_line":"    def test_webhook_basic_event(self):"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        URL_PROPS \u003d \u0027http://localhost:%s/\u0027 % self.mock_server_port"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_c069a125","line":53,"range":{"start_line":53,"start_character":8,"end_line":53,"end_character":32},"in_reply_to":"9f91af0f_ae5b502c","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self._trigger_do_action(TRIGGER_ALARM_1)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            # Chceck event received"},{"line_number":70,"context_line":"            self.assertEqual(self.mock_server.post_count, 1, \u0027one post \u0027"},{"line_number":71,"context_line":"                                                             \u0027was made\u0027)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            # Undo"},{"line_number":74,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ce27b4b6","line":71,"range":{"start_line":70,"start_character":61,"end_line":71,"end_character":71},"updated":"2017-12-31 16:17:48.000000000","message":"Is it a message for correct execution or for an error?","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self._trigger_do_action(TRIGGER_ALARM_1)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            # Chceck event received"},{"line_number":70,"context_line":"            self.assertEqual(self.mock_server.post_count, 1, \u0027one post \u0027"},{"line_number":71,"context_line":"                                                             \u0027was made\u0027)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            # Undo"},{"line_number":74,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_00e22904","line":71,"range":{"start_line":70,"start_character":61,"end_line":71,"end_character":71},"in_reply_to":"9f91af0f_ce27b4b6","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        finally:"},{"line_number":77,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":78,"context_line":"            TempestClients.vitrage().notifier_webhook.delete(webhook[\u0027id\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_ee2cf89a","line":77,"range":{"start_line":77,"start_character":12,"end_line":77,"end_character":54},"updated":"2017-12-31 16:17:48.000000000","message":"Is it a problem if it is done twice? (called also in the undo phase)","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        finally:"},{"line_number":77,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":78,"context_line":"            TempestClients.vitrage().notifier_webhook.delete(webhook[\u0027id\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_a0e6dd15","line":77,"range":{"start_line":77,"start_character":12,"end_line":77,"end_character":54},"in_reply_to":"9f91af0f_ee2cf89a","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"c880f14420eca472693f44138b3132161b3e454d"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"8c0b9df3387ece278e9cc21e74cb4cc7dfa25c0e","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            self.mock_server.reset_post_counter()"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_webhook_with_no_filter(self):"},{"line_number":89,"context_line":"        # Test to see that a webhook with no filter receives all notifications"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_3d3e5dda","line":89,"range":{"start_line":89,"start_character":8,"end_line":89,"end_character":9},"updated":"2018-01-04 10:30:56.000000000","message":"Change the style to function header comment (also in the other tests)\n\"\"\"","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"},{"author":{"_account_id":26464,"name":"Niv Oppenhaim","email":"niv.oppenhaim@nokia.com","username":"nivolas"},"change_message_id":"e572f6f04ef428ac2c1f5ae39d9aec3d1cad795a","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            self.mock_server.reset_post_counter()"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_webhook_with_no_filter(self):"},{"line_number":89,"context_line":"        # Test to see that a webhook with no filter receives all notifications"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_72cf2fb0","line":89,"range":{"start_line":89,"start_character":8,"end_line":89,"end_character":9},"in_reply_to":"9f91af0f_3d3e5dda","updated":"2018-01-07 11:46:08.000000000","message":"Done","commit_id":"ca89977423b9e686d17ef0d056bcc7526a81fe07"}],"vitrage_tempest_tests/tests/resources/templates/api/e2e_test_webhook.yaml":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"e0a5f39e59b4a195d24b49079b840876978483d0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"metadata:"},{"line_number":2,"context_line":" name: e2e_test_webhook"},{"line_number":3,"context_line":" description: template for vitrage webhook tempest tests"},{"line_number":4,"context_line":"definitions:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f91af0f_6e38e8d2","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":9},"updated":"2017-12-31 16:17:48.000000000","message":"I don\u0027t think you need a template for this test. You are not checking the deduced states.\n\nOn the other hand... maybe you should add a test for deduced alarms. Make sure the webhook is called for them as well.","commit_id":"c880f14420eca472693f44138b3132161b3e454d"}]}
