)]}'
{"devstack/post_test_hook.sh":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":34,"context_line":"sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/server.yaml /etc/vitrage/"},{"line_number":35,"context_line":"sudo cp $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"${PYTHON:-python} $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/add_legacy_dir_templates.py"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# restart due to configuration files changes"},{"line_number":40,"context_line":"sudo systemctl restart devstack@vitrage-graph.service"}],"source_content_type":"text/x-sh","patch_set":6,"id":"9f91af0f_086d5431","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":90},"updated":"2018-01-04 16:40:50.000000000","message":"The devstack executes a tempest code?... this code will soon reside in another repo","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"42917c857ee2de6a106ca8e1a66e9b617e78db6f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/server.yaml /etc/vitrage/"},{"line_number":35,"context_line":"sudo cp $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"${PYTHON:-python} $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/add_legacy_dir_templates.py"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# restart due to configuration files changes"},{"line_number":40,"context_line":"sudo systemctl restart devstack@vitrage-graph.service"}],"source_content_type":"text/x-sh","patch_set":6,"id":"9f91af0f_015dfce7","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":90},"in_reply_to":"9f91af0f_086d5431","updated":"2018-01-08 09:25:38.000000000","message":"yes,we need to reload templates in order to support other tests. \n\u0027add_legacy_dir_template.py\u0027 reloads vitrage_tempest_tests/tests/resources/templates/api to DB","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/api/controllers/v1/template.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":69,"context_line":"    def delete(self, **kwargs):"},{"line_number":70,"context_line":"        LOG.info(\"delete template\")"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        enforce(\"template delete\","},{"line_number":73,"context_line":"                pecan.request.headers,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_a8654847","line":70,"range":{"start_line":70,"start_character":17,"end_line":70,"end_character":34},"updated":"2018-01-04 16:40:50.000000000","message":"I think you should add the uuid here","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"42917c857ee2de6a106ca8e1a66e9b617e78db6f","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":69,"context_line":"    def delete(self, **kwargs):"},{"line_number":70,"context_line":"        LOG.info(\"delete template\")"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        enforce(\"template delete\","},{"line_number":73,"context_line":"                pecan.request.headers,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_61ee48ee","line":70,"range":{"start_line":70,"start_character":17,"end_line":70,"end_character":34},"in_reply_to":"9f91af0f_a8654847","updated":"2018-01-08 09:25:38.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":84,"context_line":"    def put(self, **kwargs):"},{"line_number":85,"context_line":"        LOG.info(\"add template\")"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        enforce(\"template add\","},{"line_number":88,"context_line":"                pecan.request.headers,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_28513863","line":85,"range":{"start_line":85,"start_character":18,"end_line":85,"end_character":30},"updated":"2018-01-04 16:40:50.000000000","message":"Add the parameters","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"42917c857ee2de6a106ca8e1a66e9b617e78db6f","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":84,"context_line":"    def put(self, **kwargs):"},{"line_number":85,"context_line":"        LOG.info(\"add template\")"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        enforce(\"template add\","},{"line_number":88,"context_line":"                pecan.request.headers,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_21be00d5","line":85,"range":{"start_line":85,"start_character":18,"end_line":85,"end_character":30},"in_reply_to":"9f91af0f_28513863","updated":"2018-01-08 09:25:38.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            template_db_rows \u003d pecan.request.storage.templates.query("},{"line_number":123,"context_line":"                is_deleted\u003dFalse)"},{"line_number":124,"context_line":"            template_db_rows.sort(key\u003dlambda template: template.created_at)"},{"line_number":125,"context_line":"            template_list \u003d list()"},{"line_number":126,"context_line":"            for db_row in template_db_rows:"},{"line_number":127,"context_line":"                template_list.append(TemplateController._db_template_to_cli("},{"line_number":128,"context_line":"                    db_row))"},{"line_number":129,"context_line":"            return template_list"},{"line_number":130,"context_line":"        except Exception as e:"},{"line_number":131,"context_line":"            to_unicode \u003d encodeutils.exception_to_unicode(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_88f08469","line":128,"range":{"start_line":125,"start_character":12,"end_line":128,"end_character":28},"updated":"2018-01-04 16:40:50.000000000","message":"template_list \u003d [TemplateController._db_template_to_cli(db_row) for db_row in template_db_rows]","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            template_db_rows \u003d pecan.request.storage.templates.query("},{"line_number":123,"context_line":"                is_deleted\u003dFalse)"},{"line_number":124,"context_line":"            template_db_rows.sort(key\u003dlambda template: template.created_at)"},{"line_number":125,"context_line":"            template_list \u003d list()"},{"line_number":126,"context_line":"            for db_row in template_db_rows:"},{"line_number":127,"context_line":"                template_list.append(TemplateController._db_template_to_cli("},{"line_number":128,"context_line":"                    db_row))"},{"line_number":129,"context_line":"            return template_list"},{"line_number":130,"context_line":"        except Exception as e:"},{"line_number":131,"context_line":"            to_unicode \u003d encodeutils.exception_to_unicode(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_8716fcf0","line":128,"range":{"start_line":125,"start_character":12,"end_line":128,"end_character":28},"in_reply_to":"9f91af0f_88f08469","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            template_db_rows \u003d pecan.request.storage.templates.query("},{"line_number":139,"context_line":"                uuid\u003dtemplate_uuid)"},{"line_number":140,"context_line":"            if not template_db_rows:"},{"line_number":141,"context_line":"                raise Exception(\"Template %s not found\", template_uuid)"},{"line_number":142,"context_line":"            if len(template_db_rows) \u003e 1:"},{"line_number":143,"context_line":"                raise Exception(\"Template uuid is not unique %s\","},{"line_number":144,"context_line":"                                template_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_8895e4e6","line":141,"range":{"start_line":141,"start_character":16,"end_line":141,"end_character":71},"updated":"2018-01-04 16:40:50.000000000","message":"Is it an exception? or just an error?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            template_db_rows \u003d pecan.request.storage.templates.query("},{"line_number":139,"context_line":"                uuid\u003dtemplate_uuid)"},{"line_number":140,"context_line":"            if not template_db_rows:"},{"line_number":141,"context_line":"                raise Exception(\"Template %s not found\", template_uuid)"},{"line_number":142,"context_line":"            if len(template_db_rows) \u003e 1:"},{"line_number":143,"context_line":"                raise Exception(\"Template uuid is not unique %s\","},{"line_number":144,"context_line":"                                template_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_c7e5e40a","line":141,"range":{"start_line":141,"start_character":16,"end_line":141,"end_character":71},"in_reply_to":"9f91af0f_8895e4e6","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                pecan.request.client.call(pecan.request.context,"},{"line_number":172,"context_line":"                                          \u0027add_template\u0027,"},{"line_number":173,"context_line":"                                          templates\u003dtemplates)"},{"line_number":174,"context_line":"                for db_row in templates:"},{"line_number":175,"context_line":"                    template_list.append("},{"line_number":176,"context_line":"                        TemplateController._db_template_to_cli(db_row))"},{"line_number":177,"context_line":"                return template_list"},{"line_number":178,"context_line":"            except Exception as e:"},{"line_number":179,"context_line":"                LOG.exception(\u0027failed to add template file %s \u0027, e)"},{"line_number":180,"context_line":"                abort(404, str(e))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_28adb830","line":177,"range":{"start_line":174,"start_character":16,"end_line":177,"end_character":36},"updated":"2018-01-04 16:40:50.000000000","message":"Why do you return the template list?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                pecan.request.client.call(pecan.request.context,"},{"line_number":172,"context_line":"                                          \u0027add_template\u0027,"},{"line_number":173,"context_line":"                                          templates\u003dtemplates)"},{"line_number":174,"context_line":"                for db_row in templates:"},{"line_number":175,"context_line":"                    template_list.append("},{"line_number":176,"context_line":"                        TemplateController._db_template_to_cli(db_row))"},{"line_number":177,"context_line":"                return template_list"},{"line_number":178,"context_line":"            except Exception as e:"},{"line_number":179,"context_line":"                LOG.exception(\u0027failed to add template file %s \u0027, e)"},{"line_number":180,"context_line":"                abort(404, str(e))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_e78108fd","line":177,"range":{"start_line":174,"start_character":16,"end_line":177,"end_character":36},"in_reply_to":"9f91af0f_28adb830","updated":"2018-01-10 14:13:49.000000000","message":"Print to user which templates were added and details.","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    @staticmethod"},{"line_number":165,"context_line":"    def _add(path, template_type):"},{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                template_list \u003d list()"},{"line_number":168,"context_line":"                templates \u003d add_template_to_db(pecan.request.storage, path,"},{"line_number":169,"context_line":"                                               template_type)"},{"line_number":170,"context_line":"                # In order to reload workers"},{"line_number":171,"context_line":"                pecan.request.client.call(pecan.request.context,"},{"line_number":172,"context_line":"                                          \u0027add_template\u0027,"},{"line_number":173,"context_line":"                                          templates\u003dtemplates)"},{"line_number":174,"context_line":"                for db_row in templates:"},{"line_number":175,"context_line":"                    template_list.append("},{"line_number":176,"context_line":"                        TemplateController._db_template_to_cli(db_row))"},{"line_number":177,"context_line":"                return template_list"},{"line_number":178,"context_line":"            except Exception as e:"},{"line_number":179,"context_line":"                LOG.exception(\u0027failed to add template file %s \u0027, e)"},{"line_number":180,"context_line":"                abort(404, str(e))"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"},{"line_number":183,"context_line":"    def _db_template_to_cli(template_db_row):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_0889d4c8","line":180,"range":{"start_line":166,"start_character":12,"end_line":180,"end_character":34},"updated":"2018-01-04 16:40:50.000000000","message":"Extra spaces","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    @staticmethod"},{"line_number":165,"context_line":"    def _add(path, template_type):"},{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                template_list \u003d list()"},{"line_number":168,"context_line":"                templates \u003d add_template_to_db(pecan.request.storage, path,"},{"line_number":169,"context_line":"                                               template_type)"},{"line_number":170,"context_line":"                # In order to reload workers"},{"line_number":171,"context_line":"                pecan.request.client.call(pecan.request.context,"},{"line_number":172,"context_line":"                                          \u0027add_template\u0027,"},{"line_number":173,"context_line":"                                          templates\u003dtemplates)"},{"line_number":174,"context_line":"                for db_row in templates:"},{"line_number":175,"context_line":"                    template_list.append("},{"line_number":176,"context_line":"                        TemplateController._db_template_to_cli(db_row))"},{"line_number":177,"context_line":"                return template_list"},{"line_number":178,"context_line":"            except Exception as e:"},{"line_number":179,"context_line":"                LOG.exception(\u0027failed to add template file %s \u0027, e)"},{"line_number":180,"context_line":"                abort(404, str(e))"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"},{"line_number":183,"context_line":"    def _db_template_to_cli(template_db_row):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_a796a04b","line":180,"range":{"start_line":166,"start_character":12,"end_line":180,"end_character":34},"in_reply_to":"9f91af0f_0889d4c8","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                abort(404, str(e))"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"},{"line_number":183,"context_line":"    def _db_template_to_cli(template_db_row):"},{"line_number":184,"context_line":"        return {"},{"line_number":185,"context_line":"            \"uuid\": template_db_row.uuid,"},{"line_number":186,"context_line":"            \"name\": template_db_row.name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_c880cc8e","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":27},"updated":"2018-01-04 16:40:50.000000000","message":"Is it displayed as a table eventually? if so, please use capital letters (Name, Status,...). Also, I would name it _db_template_to_dict. The backend does not care about the cli.","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                abort(404, str(e))"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"},{"line_number":183,"context_line":"    def _db_template_to_cli(template_db_row):"},{"line_number":184,"context_line":"        return {"},{"line_number":185,"context_line":"            \"uuid\": template_db_row.uuid,"},{"line_number":186,"context_line":"            \"name\": template_db_row.name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_e796e83e","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":27},"in_reply_to":"9f91af0f_c880cc8e","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            templates \u003d pecan.request.storage.templates.query(uuid\u003duuid)"},{"line_number":198,"context_line":"            if not templates:"},{"line_number":199,"context_line":"                raise Exception(\u0027template file does not exists in database\u0027)"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                pecan.request.client.call(pecan.request.context,"},{"line_number":202,"context_line":"                                          \u0027delete_template\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_a84f8890","line":199,"range":{"start_line":199,"start_character":16,"end_line":199,"end_character":76},"updated":"2018-01-04 16:40:50.000000000","message":"Should it be an exception?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            templates \u003d pecan.request.storage.templates.query(uuid\u003duuid)"},{"line_number":198,"context_line":"            if not templates:"},{"line_number":199,"context_line":"                raise Exception(\u0027template file does not exists in database\u0027)"},{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                pecan.request.client.call(pecan.request.context,"},{"line_number":202,"context_line":"                                          \u0027delete_template\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_a7a460a7","line":199,"range":{"start_line":199,"start_character":16,"end_line":199,"end_character":76},"in_reply_to":"9f91af0f_a84f8890","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            if not templates:"},{"line_number":201,"context_line":"                raise VitrageError(\u0027template file does not exists in database\u0027)"},{"line_number":202,"context_line":"            else:"},{"line_number":203,"context_line":"                if templates[0][\u0027status\u0027] \u003d\u003d TemplateStatus.ERROR:"},{"line_number":204,"context_line":"                    pecan.request.storage.\\"},{"line_number":205,"context_line":"                        templates.update(uuid,"},{"line_number":206,"context_line":"                                         \"status_details\","}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_9271dee3","line":203,"range":{"start_line":203,"start_character":32,"end_line":203,"end_character":40},"updated":"2018-01-11 08:17:22.000000000","message":"Please use constants for status, status_details, delete_complete etc.\n (maybe there is one already)","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"be725e8210307f850d959710a071487cdfd53a33","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            abort(404, to_unicode)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @classmethod"},{"line_number":122,"context_line":"    def _get_templates(cls):"},{"line_number":123,"context_line":"        try:"},{"line_number":124,"context_line":"            templates \u003d pecan.request.storage.templates.query()"},{"line_number":125,"context_line":"            templates \u003d [t for t in templates if t.status !\u003d TStatus.DELETED]"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_513fff85","line":122,"range":{"start_line":122,"start_character":8,"end_line":122,"end_character":22},"updated":"2018-01-18 15:18:04.000000000","message":"see my comment on @staticmethod","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"be725e8210307f850d959710a071487cdfd53a33","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            abort(404, str(e))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    @classmethod"},{"line_number":170,"context_line":"    def _db_template_to_dict(cls, template):"},{"line_number":171,"context_line":"        return {"},{"line_number":172,"context_line":"            \"uuid\": template.uuid,"},{"line_number":173,"context_line":"            \"name\": template.name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_d1e46f3e","line":170,"range":{"start_line":170,"start_character":8,"end_line":170,"end_character":28},"updated":"2018-01-18 15:18:04.000000000","message":"should be @staticmethod\nno need for cls parameter","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            storage \u003d pecan.request.storage"},{"line_number":184,"context_line":"            templates \u003d storage.templates.query(uuid\u003duuid)"},{"line_number":185,"context_line":"            if not templates:"},{"line_number":186,"context_line":"                raise VitrageError(\u0027template does not exists\u0027)"},{"line_number":187,"context_line":"            elif templates[0].status \u003d\u003d TStatus.DELETED:"},{"line_number":188,"context_line":"                raise VitrageError(\u0027template is deleted\u0027)"},{"line_number":189,"context_line":"            elif templates[0].status \u003d\u003d TStatus.ERROR:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_9fd273d0","line":186,"range":{"start_line":186,"start_character":16,"end_line":186,"end_character":62},"updated":"2018-01-18 15:06:18.000000000","message":"Please add the uuid","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            if not templates:"},{"line_number":186,"context_line":"                raise VitrageError(\u0027template does not exists\u0027)"},{"line_number":187,"context_line":"            elif templates[0].status \u003d\u003d TStatus.DELETED:"},{"line_number":188,"context_line":"                raise VitrageError(\u0027template is deleted\u0027)"},{"line_number":189,"context_line":"            elif templates[0].status \u003d\u003d TStatus.ERROR:"},{"line_number":190,"context_line":"                storage.templates.update(uuid, \"status\", TStatus.DELETED)"},{"line_number":191,"context_line":"            elif templates[0].status \u003d\u003d TStatus.ACTIVE:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_bff2cf6e","line":188,"range":{"start_line":188,"start_character":22,"end_line":188,"end_character":57},"updated":"2018-01-18 15:06:18.000000000","message":"Same here","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            elif templates[0].status \u003d\u003d TStatus.DELETED:"},{"line_number":188,"context_line":"                raise VitrageError(\u0027template is deleted\u0027)"},{"line_number":189,"context_line":"            elif templates[0].status \u003d\u003d TStatus.ERROR:"},{"line_number":190,"context_line":"                storage.templates.update(uuid, \"status\", TStatus.DELETED)"},{"line_number":191,"context_line":"            elif templates[0].status \u003d\u003d TStatus.ACTIVE:"},{"line_number":192,"context_line":"                storage.templates.update(uuid, \"status\", TStatus.DELETING)"},{"line_number":193,"context_line":"                pecan.request.client.call(pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_5f014b37","line":190,"range":{"start_line":190,"start_character":47,"end_line":190,"end_character":55},"updated":"2018-01-18 15:06:18.000000000","message":"Please use a constant (here and below)","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage/api_handler/apis/template.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    FAILED_MSG \u003d \u0027validation failed\u0027"},{"line_number":34,"context_line":"    OK_MSG \u003d \u0027validation OK\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __init__(self, notifier\u003dNone):"},{"line_number":37,"context_line":"        self.notifier \u003d notifier"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def validate_template(self, ctx, templates):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_a83468fc","line":36,"range":{"start_line":36,"start_character":23,"end_line":36,"end_character":31},"updated":"2018-01-04 16:40:50.000000000","message":"\u0027notifier\u0027 is used in too many places... can you find another name for it?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def add_template(self, ctx, templates):"},{"line_number":81,"context_line":"        if templates:"},{"line_number":82,"context_line":"            LOG.info(\"Reloading evaluator workers!\")"},{"line_number":83,"context_line":"            templates[0][\u0027template_action\u0027] \u003d \u0027add\u0027"},{"line_number":84,"context_line":"            self.notifier.notify(\"add template\", templates[0])"},{"line_number":85,"context_line":"            LOG.info(\"Reloading evaluator workers - done!\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_082554c2","line":82,"range":{"start_line":82,"start_character":22,"end_line":82,"end_character":50},"updated":"2018-01-04 16:40:50.000000000","message":"Wrong message? (also below)","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def add_template(self, ctx, templates):"},{"line_number":81,"context_line":"        if templates:"},{"line_number":82,"context_line":"            LOG.info(\"Reloading evaluator workers!\")"},{"line_number":83,"context_line":"            templates[0][\u0027template_action\u0027] \u003d \u0027add\u0027"},{"line_number":84,"context_line":"            self.notifier.notify(\"add template\", templates[0])"},{"line_number":85,"context_line":"            LOG.info(\"Reloading evaluator workers - done!\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_674df8c2","line":82,"range":{"start_line":82,"start_character":22,"end_line":82,"end_character":50},"in_reply_to":"9f91af0f_082554c2","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def add_template(self, ctx, templates):"},{"line_number":81,"context_line":"        if templates:"},{"line_number":82,"context_line":"            LOG.info(\"Reloading evaluator workers!\")"},{"line_number":83,"context_line":"            templates[0][\u0027template_action\u0027] \u003d \u0027add\u0027"},{"line_number":84,"context_line":"            self.notifier.notify(\"add template\", templates[0])"},{"line_number":85,"context_line":"            LOG.info(\"Reloading evaluator workers - done!\")"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_a81d4874","line":83,"range":{"start_line":83,"start_character":12,"end_line":83,"end_character":51},"updated":"2018-01-04 16:40:50.000000000","message":"Is \u0027templates\u0027 always of len 1?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def add_template(self, ctx):"},{"line_number":81,"context_line":"        LOG.info(\"Add Template Running\")"},{"line_number":82,"context_line":"        self.notifier.notify(\"add template\", {\u0027template_action\u0027: \u0027add\u0027})"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete_template(self, ctx):"},{"line_number":85,"context_line":"        LOG.info(\"Delete Template Running\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_f2586257","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":72},"updated":"2018-01-11 08:17:22.000000000","message":"Please explain in a comment why the template is not passed","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def add_template(self, ctx):"},{"line_number":81,"context_line":"        LOG.info(\"Add Template Running\")"},{"line_number":82,"context_line":"        self.notifier.notify(\"add template\", {\u0027template_action\u0027: \u0027add\u0027})"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete_template(self, ctx):"},{"line_number":85,"context_line":"        LOG.info(\"Delete Template Running\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_a99d885a","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":72},"in_reply_to":"7f96bb07_f2586257","updated":"2018-01-16 16:24:19.000000000","message":"In order not to reload workers on every template if a folder is passed as path, The templates will be loaded from the DB directly.","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"}],"vitrage/cli/graph.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    launcher.wait()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def clear_tables(conf):"},{"line_number":57,"context_line":"    \"\"\"Delete all data from active_actions table"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    The following deletes the entire vitrage database"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_6b25faaa","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":16},"updated":"2018-01-04 16:40:50.000000000","message":"It should be called _clear_active_actions_table. There are other tables that should not be cleared","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    launcher.wait()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def clear_tables(conf):"},{"line_number":57,"context_line":"    \"\"\"Delete all data from active_actions table"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    The following deletes the entire vitrage database"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_70c33e58","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":16},"in_reply_to":"9f91af0f_6b25faaa","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/common/constants.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class TemplateStatus(object):"},{"line_number":164,"context_line":"    ACTIVE \u003d \u0027ACTIVE\u0027"},{"line_number":165,"context_line":"    ERROR \u003d \u0027ERROR\u0027"},{"line_number":166,"context_line":"    DELETING \u003d \u0027DELETING\u0027"},{"line_number":167,"context_line":"    DELETED \u003d \u0027DELETED\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_b2309a09","line":164,"range":{"start_line":164,"start_character":14,"end_line":164,"end_character":20},"updated":"2018-01-11 08:17:22.000000000","message":"Do we want to use capital letters?","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"class TemplateStatus(object):"},{"line_number":164,"context_line":"    ACTIVE \u003d \u0027ACTIVE\u0027"},{"line_number":165,"context_line":"    ERROR \u003d \u0027ERROR\u0027"},{"line_number":166,"context_line":"    DELETING \u003d \u0027DELETING\u0027"},{"line_number":167,"context_line":"    DELETED \u003d \u0027DELETED\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_a224ba0e","line":164,"range":{"start_line":164,"start_character":14,"end_line":164,"end_character":20},"in_reply_to":"7f96bb07_b2309a09","updated":"2018-01-16 16:24:19.000000000","message":"Nova uses capital letters. I thought that this is the standard :)","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"}],"vitrage/common/policies/template.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":21,"context_line":"        name\u003dTEMPLATE % \u0027delete\u0027,"},{"line_number":22,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":23,"context_line":"        description\u003d\u0027delete a template\u0027,"},{"line_number":24,"context_line":"        operations\u003d["},{"line_number":25,"context_line":"            {"},{"line_number":26,"context_line":"                \u0027path\u0027: \u0027/template\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_eb302aeb","line":23,"range":{"start_line":23,"start_character":21,"end_line":23,"end_character":27},"updated":"2018-01-04 16:40:50.000000000","message":"Delete","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":21,"context_line":"        name\u003dTEMPLATE % \u0027delete\u0027,"},{"line_number":22,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":23,"context_line":"        description\u003d\u0027delete a template\u0027,"},{"line_number":24,"context_line":"        operations\u003d["},{"line_number":25,"context_line":"            {"},{"line_number":26,"context_line":"                \u0027path\u0027: \u0027/template\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_ffbdcdb6","line":23,"range":{"start_line":23,"start_character":21,"end_line":23,"end_character":27},"in_reply_to":"9f91af0f_eb302aeb","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":32,"context_line":"        name\u003dTEMPLATE % \u0027add\u0027,"},{"line_number":33,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":34,"context_line":"        description\u003d\u0027add a template\u0027,"},{"line_number":35,"context_line":"        operations\u003d["},{"line_number":36,"context_line":"            {"},{"line_number":37,"context_line":"                \u0027path\u0027: \u0027/template\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_8b4dde73","line":34,"range":{"start_line":34,"start_character":21,"end_line":34,"end_character":24},"updated":"2018-01-04 16:40:50.000000000","message":"Add","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":32,"context_line":"        name\u003dTEMPLATE % \u0027add\u0027,"},{"line_number":33,"context_line":"        check_str\u003dbase.UNPROTECTED,"},{"line_number":34,"context_line":"        description\u003d\u0027add a template\u0027,"},{"line_number":35,"context_line":"        operations\u003d["},{"line_number":36,"context_line":"            {"},{"line_number":37,"context_line":"                \u0027path\u0027: \u0027/template\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_dfba49bf","line":34,"range":{"start_line":34,"start_character":21,"end_line":34,"end_character":24},"in_reply_to":"9f91af0f_8b4dde73","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/entity_graph/service.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            collector_topic,"},{"line_number":50,"context_line":"            evaluator_topic)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def process_event(self, event):"},{"line_number":53,"context_line":"        if event.get(\u0027template_action\u0027):"},{"line_number":54,"context_line":"            self.evaluator.handle_template_event(event)"},{"line_number":55,"context_line":"        else:"},{"line_number":56,"context_line":"            self.processor.process_event(event)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def start(self):"},{"line_number":59,"context_line":"        LOG.info(\"Vitrage Graph Service - Starting...\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_6b73bab2","line":56,"range":{"start_line":52,"start_character":0,"end_line":56,"end_character":47},"updated":"2018-01-04 16:40:50.000000000","message":"Is it the best way to support it? maybe use a different topic?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/evaluator/db_templates.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 - 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":6,"id":"9f91af0f_ab9ea2b5","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2018-01-04 16:40:50.000000000","message":"2018 :-)","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 - 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":6,"id":"9f91af0f_6b873a11","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":24},"updated":"2018-01-04 16:40:50.000000000","message":"I think that this file should be placed elsewhere. Currently we have folders for template_loading, template_validation and actions. Maybe create a new folder for template_db and put the file there. And you can call it template_repository.py like other repositories that we have.","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 - 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":6,"id":"9f91af0f_f0a0ae44","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":24},"in_reply_to":"9f91af0f_6b873a11","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    for f in files:"},{"line_number":63,"context_line":"        template \u003d load_template_file(f)"},{"line_number":64,"context_line":"        if _get_templates_by_name(db, template[METADATA][NAME]):"},{"line_number":65,"context_line":"            LOG.info(\"Duplicate templates found %s\", template[METADATA][NAME])"},{"line_number":66,"context_line":"            continue"},{"line_number":67,"context_line":"        added_rows.append(_add_template(db, template, template_type))"},{"line_number":68,"context_line":"    return added_rows"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_2bd8527d","line":65,"range":{"start_line":65,"start_character":16,"end_line":65,"end_character":20},"updated":"2018-01-04 16:40:50.000000000","message":"Should be reported as an error (or warning)","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    for f in files:"},{"line_number":63,"context_line":"        template \u003d load_template_file(f)"},{"line_number":64,"context_line":"        if _get_templates_by_name(db, template[METADATA][NAME]):"},{"line_number":65,"context_line":"            LOG.info(\"Duplicate templates found %s\", template[METADATA][NAME])"},{"line_number":66,"context_line":"            continue"},{"line_number":67,"context_line":"        added_rows.append(_add_template(db, template, template_type))"},{"line_number":68,"context_line":"    return added_rows"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_df4fa968","line":65,"range":{"start_line":65,"start_character":16,"end_line":65,"end_character":20},"in_reply_to":"9f91af0f_2bd8527d","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                EXCEPTION: str(e)}"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def _get_template_validation_result(template):"},{"line_number":97,"context_line":"    result \u003d syntax_validation(template)"},{"line_number":98,"context_line":"    if not result.is_valid_config:"},{"line_number":99,"context_line":"        LOG.info(\u0027Unable to load template, syntax err: %s\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_6b5dfae7","line":96,"range":{"start_line":96,"start_character":4,"end_line":96,"end_character":35},"updated":"2018-01-04 16:40:50.000000000","message":"1. I think you should rename it to validate_template (same comment to the other similar functions)\n\n2. I think you should move these functions to a common file, and use the same code also in template.py and scenario_repository.py","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":96,"context_line":"def _get_template_validation_result(template):"},{"line_number":97,"context_line":"    result \u003d syntax_validation(template)"},{"line_number":98,"context_line":"    if not result.is_valid_config:"},{"line_number":99,"context_line":"        LOG.info(\u0027Unable to load template, syntax err: %s\u0027"},{"line_number":100,"context_line":"                 % result.comment)"},{"line_number":101,"context_line":"    else:"},{"line_number":102,"context_line":"        result \u003d content_validation(template, ScenarioRepository.def_templates)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_4bccb6bb","line":99,"range":{"start_line":99,"start_character":12,"end_line":99,"end_character":16},"updated":"2018-01-04 16:40:50.000000000","message":"error/warning","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":96,"context_line":"def _get_template_validation_result(template):"},{"line_number":97,"context_line":"    result \u003d syntax_validation(template)"},{"line_number":98,"context_line":"    if not result.is_valid_config:"},{"line_number":99,"context_line":"        LOG.info(\u0027Unable to load template, syntax err: %s\u0027"},{"line_number":100,"context_line":"                 % result.comment)"},{"line_number":101,"context_line":"    else:"},{"line_number":102,"context_line":"        result \u003d content_validation(template, ScenarioRepository.def_templates)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5f6cf9cc","line":99,"range":{"start_line":99,"start_character":12,"end_line":99,"end_character":16},"in_reply_to":"9f91af0f_4bccb6bb","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    else:"},{"line_number":102,"context_line":"        result \u003d content_validation(template, ScenarioRepository.def_templates)"},{"line_number":103,"context_line":"    if not result.is_valid_config:"},{"line_number":104,"context_line":"        LOG.info(\u0027Unable to load template, content err: %s\u0027"},{"line_number":105,"context_line":"                 % result.comment)"},{"line_number":106,"context_line":"    return result"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_cbbf66f9","line":104,"range":{"start_line":104,"start_character":12,"end_line":104,"end_character":16},"updated":"2018-01-04 16:40:50.000000000","message":"error/warning","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    else:"},{"line_number":102,"context_line":"        result \u003d content_validation(template, ScenarioRepository.def_templates)"},{"line_number":103,"context_line":"    if not result.is_valid_config:"},{"line_number":104,"context_line":"        LOG.info(\u0027Unable to load template, content err: %s\u0027"},{"line_number":105,"context_line":"                 % result.comment)"},{"line_number":106,"context_line":"    return result"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_1f62f1d8","line":104,"range":{"start_line":104,"start_character":12,"end_line":104,"end_character":16},"in_reply_to":"9f91af0f_cbbf66f9","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    if result.is_valid_config:"},{"line_number":112,"context_line":"        result \u003d def_template_syntax_validation(template_def)"},{"line_number":113,"context_line":"        if not result.is_valid_config:"},{"line_number":114,"context_line":"            LOG.info(\u0027Unable to load definition template, syntax err: %s\u0027"},{"line_number":115,"context_line":"                     % result.comment)"},{"line_number":116,"context_line":"        else:"},{"line_number":117,"context_line":"            def_validator \u003d \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_cb0206b5","line":114,"range":{"start_line":114,"start_character":16,"end_line":114,"end_character":20},"updated":"2018-01-04 16:40:50.000000000","message":"error/warning","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    if result.is_valid_config:"},{"line_number":112,"context_line":"        result \u003d def_template_syntax_validation(template_def)"},{"line_number":113,"context_line":"        if not result.is_valid_config:"},{"line_number":114,"context_line":"            LOG.info(\u0027Unable to load definition template, syntax err: %s\u0027"},{"line_number":115,"context_line":"                     % result.comment)"},{"line_number":116,"context_line":"        else:"},{"line_number":117,"context_line":"            def_validator \u003d \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_bf7f4564","line":114,"range":{"start_line":114,"start_character":16,"end_line":114,"end_character":20},"in_reply_to":"9f91af0f_cb0206b5","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _template_to_db_row(result, template, template_type):"},{"line_number":128,"context_line":"    json_data \u003d template"},{"line_number":129,"context_line":"    uuid \u003d uuidutils.generate_uuid()"},{"line_number":130,"context_line":"    status \u003d \u0027pass\u0027 if result.is_valid_config else \u0027failed\u0027"},{"line_number":131,"context_line":"    status_details \u003d result.comment"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_cbc9a678","line":128,"range":{"start_line":128,"start_character":4,"end_line":128,"end_character":24},"updated":"2018-01-04 16:40:50.000000000","message":"Why is it needed?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _template_to_db_row(result, template, template_type):"},{"line_number":128,"context_line":"    json_data \u003d template"},{"line_number":129,"context_line":"    uuid \u003d uuidutils.generate_uuid()"},{"line_number":130,"context_line":"    status \u003d \u0027pass\u0027 if result.is_valid_config else \u0027failed\u0027"},{"line_number":131,"context_line":"    status_details \u003d result.comment"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5f9ab9b8","line":128,"range":{"start_line":128,"start_character":4,"end_line":128,"end_character":24},"in_reply_to":"9f91af0f_cbc9a678","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/evaluator/equivalence_repository.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    def load_eq_templates_from_db(self):"},{"line_number":31,"context_line":"        items \u003d self._db.templates.query("},{"line_number":32,"context_line":"            template_type\u003dTemplateTypes.EQUIVALENCE)"},{"line_number":33,"context_line":"        equivalence_defs \u003d [x for x in items if x.status"},{"line_number":34,"context_line":"                            in [TemplateStatus.ACTIVE,"},{"line_number":35,"context_line":"                                TemplateStatus.DELETING,"},{"line_number":36,"context_line":"                                TemplateStatus.LOADING]]"},{"line_number":37,"context_line":"        for equivalence_def in equivalence_defs:"},{"line_number":38,"context_line":"            equivalences \u003d EquivalenceLoader(equivalence_def.file_content)\\"},{"line_number":39,"context_line":"                .equivalences"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_520a7626","line":36,"range":{"start_line":33,"start_character":48,"end_line":36,"end_character":55},"updated":"2018-01-11 08:17:22.000000000","message":"Consider adding a function for that condition, it might be useful in other places as well","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"}],"vitrage/evaluator/evaluator_service.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self._p_launcher.launch_service(w)"},{"line_number":77,"context_line":"        self._worker_queues.append(tasks_queue)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _add_template_worker(self, templates_names):"},{"line_number":80,"context_line":"        \"\"\"Add temporary new worker to reload new template"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param template_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_7508bc27","line":79,"range":{"start_line":79,"start_character":35,"end_line":79,"end_character":50},"updated":"2018-01-11 08:17:22.000000000","message":"I think template_names is better (with no \u0027s\u0027 in the templates)","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self._p_launcher.launch_service(w)"},{"line_number":77,"context_line":"        self._worker_queues.append(tasks_queue)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _add_template_worker(self, templates_names):"},{"line_number":80,"context_line":"        \"\"\"Add temporary new worker to reload new template"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param template_name:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_5d911e52","line":79,"range":{"start_line":79,"start_character":35,"end_line":79,"end_character":50},"in_reply_to":"7f96bb07_7508bc27","updated":"2018-01-16 16:24:19.000000000","message":"Done","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        for q in self._worker_queues:"},{"line_number":120,"context_line":"            q.close()"},{"line_number":121,"context_line":"        self._worker_queues \u003d list()"},{"line_number":122,"context_line":"        # self._p_launcher.stop()"},{"line_number":123,"context_line":"        # self._p_launcher \u003d os_service.ProcessLauncher(self.conf)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _reload_all_workers(self, enabled\u003dTrue):"},{"line_number":126,"context_line":"        LOG.info(\"Reloading evaluator workers!\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_b52724b7","line":123,"range":{"start_line":122,"start_character":8,"end_line":123,"end_character":66},"updated":"2018-01-11 08:17:22.000000000","message":"Is it  needed?","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        LOG.info(\"Reloading evaluator workers - done!\")"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def handle_template_event(self, event):"},{"line_number":133,"context_line":"        if event.get(\u0027template_action\u0027) \u003d\u003d \u0027add\u0027:"},{"line_number":134,"context_line":"            templates \u003d self._db.templates.query(status\u003dTemplateStatus.LOADING)"},{"line_number":135,"context_line":"            new_status \u003d TemplateStatus.ACTIVE"},{"line_number":136,"context_line":"            evaluator_action \u003d START_EVALUATION"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_d52c309b","line":133,"range":{"start_line":133,"start_character":21,"end_line":133,"end_character":48},"updated":"2018-01-11 08:17:22.000000000","message":"Please use constants (here and below)","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            evaluator_action \u003d START_UNDO_EVALUATION"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        if templates:"},{"line_number":144,"context_line":"            if templates[0].template_type \u003d\u003d TemplateTypes.DEFINITION:"},{"line_number":145,"context_line":"                self._evaluate_definition_template_change(templates,"},{"line_number":146,"context_line":"                                                          new_status)"},{"line_number":147,"context_line":"            elif templates[0].template_type \u003d\u003d TemplateTypes.EQUIVALENCE:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_3540f435","line":144,"range":{"start_line":144,"start_character":12,"end_line":144,"end_character":70},"updated":"2018-01-11 08:17:22.000000000","message":"Are all templates of the same type?","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                self._evaluate_standard_template_change(evaluator_action,"},{"line_number":152,"context_line":"                                                        templates, new_status)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _evaluate_definition_template_change(self, templates, new_status):"},{"line_number":155,"context_line":"        for t in templates:"},{"line_number":156,"context_line":"            self._db.templates.update(t.uuid, \u0027status\u0027, new_status)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_d59f50b2","line":154,"range":{"start_line":154,"start_character":8,"end_line":154,"end_character":44},"updated":"2018-01-11 08:17:22.000000000","message":"1. Please add a comment to each evaluate function explaining its specific behavior\n\n2. If a definition template is changed, shouldn\u0027t we re-evaluate all templates that are using it? same for equivalence.","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                self._evaluate_standard_template_change(evaluator_action,"},{"line_number":152,"context_line":"                                                        templates, new_status)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _evaluate_definition_template_change(self, templates, new_status):"},{"line_number":155,"context_line":"        for t in templates:"},{"line_number":156,"context_line":"            self._db.templates.update(t.uuid, \u0027status\u0027, new_status)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_c2b1c6e3","line":154,"range":{"start_line":154,"start_character":8,"end_line":154,"end_character":44},"in_reply_to":"7f96bb07_d59f50b2","updated":"2018-01-16 16:24:19.000000000","message":"1. Done.\n2. For equivalence a restart is required.","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            self._task_queue.task_done()"},{"line_number":217,"context_line":"            # Evaluator queue may have been updated, thus the sleep:"},{"line_number":218,"context_line":"            time.sleep(0)"},{"line_number":219,"context_line":"        # LOG.info(\"Booo killing\")"},{"line_number":220,"context_line":"        # os._exit(1)"},{"line_number":221,"context_line":"        # LOG.info(\"Booo killed\")"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def _do_task(self, task):"},{"line_number":224,"context_line":"            (before, current, is_vertex, action) \u003d task"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_f5b7ec39","line":221,"range":{"start_line":219,"start_character":8,"end_line":221,"end_character":33},"updated":"2018-01-11 08:17:22.000000000","message":"Is it needed?","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"}],"vitrage/evaluator/scenario_evaluator.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        start_time \u003d time.time()"},{"line_number":94,"context_line":"        for vertex in vertices:"},{"line_number":95,"context_line":"            self.process_event(vertex, None, True)"},{"line_number":96,"context_line":"        LOG.info(\u0027Run UNDO Evaluator on %s items - took %s\u0027,"},{"line_number":97,"context_line":"                 str(len(vertices)),"},{"line_number":98,"context_line":"                 str(time.time() - start_time))"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def process_event(self, before, current, is_vertex, *args, **kwargs):"},{"line_number":101,"context_line":"        \"\"\"Notification of a change in the entity graph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_cbc5263e","line":98,"range":{"start_line":96,"start_character":8,"end_line":98,"end_character":47},"updated":"2018-01-04 16:40:50.000000000","message":"Are we sure we want this in INFO? ;-)","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        start_time \u003d time.time()"},{"line_number":94,"context_line":"        for vertex in vertices:"},{"line_number":95,"context_line":"            self.process_event(vertex, None, True)"},{"line_number":96,"context_line":"        LOG.info(\u0027Run UNDO Evaluator on %s items - took %s\u0027,"},{"line_number":97,"context_line":"                 str(len(vertices)),"},{"line_number":98,"context_line":"                 str(time.time() - start_time))"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def process_event(self, before, current, is_vertex, *args, **kwargs):"},{"line_number":101,"context_line":"        \"\"\"Notification of a change in the entity graph."}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5b1bbb71","line":98,"range":{"start_line":96,"start_character":8,"end_line":98,"end_character":47},"in_reply_to":"9f91af0f_cbc5263e","updated":"2018-01-10 14:13:49.000000000","message":"should I delete it? It was added because this method is very similar to run_evaluator","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/evaluator/scenario_repository.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _load_def_templates_from_db(self):"},{"line_number":154,"context_line":"        items \u003d self._db.templates.query(template_type\u003dTType.DEFINITION)"},{"line_number":155,"context_line":"        def_templates \u003d [x for x in items if x.status in ["},{"line_number":156,"context_line":"            TemplateStatus.ACTIVE,"},{"line_number":157,"context_line":"            TemplateStatus.LOADING]]"},{"line_number":158,"context_line":"        for df in def_templates:"},{"line_number":159,"context_line":"            self._add_def_template(df)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_b583a456","line":157,"range":{"start_line":155,"start_character":45,"end_line":157,"end_character":35},"updated":"2018-01-11 08:17:22.000000000","message":"Should be a function, you can place it in the statuses class","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        templates \u003d [x for x in items if x.status in [TemplateStatus.ACTIVE,"},{"line_number":164,"context_line":"                                                      TemplateStatus.LOADING,"},{"line_number":165,"context_line":"                                                      TemplateStatus.DELETING]"},{"line_number":166,"context_line":"                     and x.status_details !\u003d"},{"line_number":167,"context_line":"                     TemplateDetails.DELETE_STATUS_ERROR]"},{"line_number":168,"context_line":"        for t in templates:"},{"line_number":169,"context_line":"            self._add_template(t)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_5594a08b","line":167,"range":{"start_line":166,"start_character":25,"end_line":167,"end_character":56},"updated":"2018-01-11 08:17:22.000000000","message":"Should also be a function","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"}],"vitrage/evaluator/template_db/template_repository.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    for f in files:"},{"line_number":64,"context_line":"        template \u003d load_template_file(f)"},{"line_number":65,"context_line":"        if get_templates_by_status(db,"},{"line_number":66,"context_line":"                                   template[METADATA][NAME],"},{"line_number":67,"context_line":"                                   TemplateStatus.LOADING,"},{"line_number":68,"context_line":"                                   TemplateStatus.ACTIVE,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_f5e5ac39","line":65,"range":{"start_line":65,"start_character":11,"end_line":65,"end_character":34},"updated":"2018-01-11 08:17:22.000000000","message":"Why do you need the _by_status query? why not query just by name?","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                   TemplateStatus.ACTIVE,"},{"line_number":69,"context_line":"                                   TemplateStatus.ERROR,"},{"line_number":70,"context_line":"                                   TemplateStatus.DELETING):"},{"line_number":71,"context_line":"            LOG.warning(\"Duplicate templates found %s\","},{"line_number":72,"context_line":"                        template[METADATA][NAME])"},{"line_number":73,"context_line":"            continue"},{"line_number":74,"context_line":"        added_rows.append(_store_template(db, template, template_type))"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_55c26087","line":71,"range":{"start_line":71,"start_character":25,"end_line":71,"end_character":50},"updated":"2018-01-11 08:17:22.000000000","message":"Please add \u0027new template will not be added\u0027 or \u0027old template will be overwritten\u0027","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                   TemplateStatus.ACTIVE,"},{"line_number":69,"context_line":"                                   TemplateStatus.ERROR,"},{"line_number":70,"context_line":"                                   TemplateStatus.DELETING):"},{"line_number":71,"context_line":"            LOG.warning(\"Duplicate templates found %s\","},{"line_number":72,"context_line":"                        template[METADATA][NAME])"},{"line_number":73,"context_line":"            continue"},{"line_number":74,"context_line":"        added_rows.append(_store_template(db, template, template_type))"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_c730fb0a","line":71,"range":{"start_line":71,"start_character":25,"end_line":71,"end_character":50},"in_reply_to":"7f96bb07_55c26087","updated":"2018-01-16 16:24:19.000000000","message":"Done","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":103,"context_line":"def _get_template_validation_result(template):"},{"line_number":104,"context_line":"    result \u003d syntax_validation(template)"},{"line_number":105,"context_line":"    if not result.is_valid_config:"},{"line_number":106,"context_line":"        LOG.error(\u0027Unable to load template, syntax err: %s\u0027"},{"line_number":107,"context_line":"                  % result.comment)"},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        result \u003d content_validation(template, ScenarioRepository.def_templates)"},{"line_number":110,"context_line":"    if not result.is_valid_config:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_156a987f","line":107,"range":{"start_line":106,"start_character":8,"end_line":107,"end_character":35},"updated":"2018-01-11 08:17:22.000000000","message":"I think the syntax validation already reports an error. Not sure.","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":103,"context_line":"def _get_template_validation_result(template):"},{"line_number":104,"context_line":"    result \u003d syntax_validation(template)"},{"line_number":105,"context_line":"    if not result.is_valid_config:"},{"line_number":106,"context_line":"        LOG.error(\u0027Unable to load template, syntax err: %s\u0027"},{"line_number":107,"context_line":"                  % result.comment)"},{"line_number":108,"context_line":"    else:"},{"line_number":109,"context_line":"        result \u003d content_validation(template, ScenarioRepository.def_templates)"},{"line_number":110,"context_line":"    if not result.is_valid_config:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_c2b78686","line":107,"range":{"start_line":106,"start_character":8,"end_line":107,"end_character":35},"in_reply_to":"7f96bb07_156a987f","updated":"2018-01-16 16:24:19.000000000","message":"Yes it reports an error, more specific error such as :\u0027metadata section must contain id field.\u0027 I thought it will be clearer with both messages. what do you think?","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def add_template_to_db(db, path, template_type):"},{"line_number":38,"context_line":"    \"\"\"Add templates to db"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    Loads template files, for every template, check it is valid and does"},{"line_number":41,"context_line":"     not exist, if so adds it to the database."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    :param db:"},{"line_number":44,"context_line":"    :param path: path to a file or directory"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_d11a2f6d","line":41,"range":{"start_line":40,"start_character":68,"end_line":41,"end_character":14},"updated":"2018-01-18 15:06:18.000000000","message":"exists","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"98749a4160c30a9f9b102eecece690a30726b57a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def add_template_to_db(db, path, template_type):"},{"line_number":38,"context_line":"    \"\"\"Add templates to db"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    Loads template files, for every template, check it is valid and does"},{"line_number":41,"context_line":"     not exist, if so adds it to the database."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    :param db:"},{"line_number":44,"context_line":"    :param path: path to a file or directory"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_949d75bd","line":41,"range":{"start_line":40,"start_character":68,"end_line":41,"end_character":14},"in_reply_to":"7f96bb07_d11a2f6d","updated":"2018-01-18 16:00:18.000000000","message":"actually it should not exist.. as if it already exists we\u0027ll have a duplicate template error","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def _list_files(path):"},{"line_number":69,"context_line":"    if os.path.isdir(path):"},{"line_number":70,"context_line":"        LOG.info(\"Adding all templates from %s\", path)"},{"line_number":71,"context_line":"        return file.list_files(path, \u0027.yaml\u0027, with_pathname\u003dTrue)"},{"line_number":72,"context_line":"    elif os.path.isfile(path):"},{"line_number":73,"context_line":"        LOG.info(\"Adding template %s\", path)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_b1a0c3f5","line":70,"range":{"start_line":70,"start_character":18,"end_line":70,"end_character":24},"updated":"2018-01-18 15:06:18.000000000","message":"Loading (here and below)","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        LOG.info(\"Adding template %s\", path)"},{"line_number":74,"context_line":"        return [path]  # only one file"},{"line_number":75,"context_line":"    else:"},{"line_number":76,"context_line":"        raise VitrageError(\"No such file or directory %s\" % path)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"def _validate_template(db, template, template_type):"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_d1b6af3e","line":76,"range":{"start_line":76,"start_character":8,"end_line":76,"end_character":65},"updated":"2018-01-18 15:06:18.000000000","message":"There should be a negative test that verifies that this exception does not crash the entire vitrage-graph","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage/evaluator/template_loader_service.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        return tasks_queue"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def handle_template_event(self, event):"},{"line_number":50,"context_line":"        template_action \u003d event.get(\u0027template_action\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if template_action \u003d\u003d \u0027add\u0027:"},{"line_number":53,"context_line":"            templates \u003d self._db.templates.query(status\u003dTStatus.LOADING)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_91eb4711","line":50,"range":{"start_line":50,"start_character":36,"end_line":50,"end_character":53},"updated":"2018-01-18 15:06:18.000000000","message":"Should be defined as constant","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def handle_template_event(self, event):"},{"line_number":50,"context_line":"        template_action \u003d event.get(\u0027template_action\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if template_action \u003d\u003d \u0027add\u0027:"},{"line_number":53,"context_line":"            templates \u003d self._db.templates.query(status\u003dTStatus.LOADING)"},{"line_number":54,"context_line":"            new_status \u003d TStatus.ACTIVE"},{"line_number":55,"context_line":"            action_mode \u003d ActionMode.DO"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_31da7377","line":52,"range":{"start_line":52,"start_character":30,"end_line":52,"end_character":35},"updated":"2018-01-18 15:06:18.000000000","message":"Same here","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            new_status \u003d TStatus.DELETED"},{"line_number":59,"context_line":"            action_mode \u003d ActionMode.UNDO"},{"line_number":60,"context_line":"        else:"},{"line_number":61,"context_line":"            raise VitrageError(\u0027Invalid template_action %s\u0027 % template_action)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        self._template_worker_task("},{"line_number":64,"context_line":"            [t.name for t in templates if t.template_type \u003d\u003d TType.STANDARD],"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_91d4a749","line":61,"range":{"start_line":61,"start_character":12,"end_line":61,"end_character":78},"updated":"2018-01-18 15:06:18.000000000","message":"Make sure it doesn\u0027t crash the entire vitrage-graph","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage/evaluator/template_validation/__init__.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from vitrage.evaluator.template_validation.template_syntax_validator import \\"},{"line_number":24,"context_line":"    syntax_validation"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"__author__ \u003d \u0027stack\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_3148332b","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":20},"updated":"2018-01-18 15:06:18.000000000","message":"Should be deleted","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":31,"context_line":"def validate_template(template, def_templates):"},{"line_number":32,"context_line":"    result \u003d syntax_validation(template)"},{"line_number":33,"context_line":"    if not result.is_valid_config:"},{"line_number":34,"context_line":"        LOG.error(\u0027Unable to load template, syntax err: %s\u0027 % result.comment)"},{"line_number":35,"context_line":"        return result"},{"line_number":36,"context_line":"    result \u003d content_validation(template, def_templates)"},{"line_number":37,"context_line":"    if not result.is_valid_config:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_715b1bf5","line":34,"range":{"start_line":34,"start_character":51,"end_line":34,"end_character":54},"updated":"2018-01-18 15:06:18.000000000","message":"error (here and below)","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage/tests/functional/test_configuration.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        templates \u003d add_template_to_db(cls._db, templates_dir, templates_type)"},{"line_number":42,"context_line":"        for t in templates:"},{"line_number":43,"context_line":"            if t.status \u003d\u003d TemplateStatus.LOADING:"},{"line_number":44,"context_line":"                cls._db.templates.update(t.uuid, \u0027status\u0027,"},{"line_number":45,"context_line":"                                         TemplateStatus.ACTIVE)"},{"line_number":46,"context_line":"            if t.status \u003d\u003d TemplateStatus.DELETING:"},{"line_number":47,"context_line":"                cls._db.templates.update(t.uuid, \u0027status\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_7110fb00","line":44,"range":{"start_line":44,"start_character":49,"end_line":44,"end_character":57},"updated":"2018-01-18 15:06:18.000000000","message":"Should be a constant","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage/tests/unit/evaluator/test_equivalence_repository.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def test_duplicate_entities_in_equivalence(self):"},{"line_number":37,"context_line":"        base_dir \u003d utils.get_resources_dir() + \u0027/templates/equivalences_dup\u0027"},{"line_number":38,"context_line":"        for directory in os.listdir(base_dir):"},{"line_number":39,"context_line":"            self.add_templates(os.path.join(base_dir, directory),"},{"line_number":40,"context_line":"                               TemplateTypes.EQUIVALENCE)"},{"line_number":41,"context_line":"            self.assertRaises("},{"line_number":42,"context_line":"                VitrageError,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_4b003668","line":39,"range":{"start_line":39,"start_character":17,"end_line":39,"end_character":30},"updated":"2018-01-04 16:40:50.000000000","message":"Do we want to write to the database when running unit tests? it might corrupt our devstacks... maybe there is a way to use a mock?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def test_duplicate_entities_in_equivalence(self):"},{"line_number":37,"context_line":"        base_dir \u003d utils.get_resources_dir() + \u0027/templates/equivalences_dup\u0027"},{"line_number":38,"context_line":"        for directory in os.listdir(base_dir):"},{"line_number":39,"context_line":"            self.add_templates(os.path.join(base_dir, directory),"},{"line_number":40,"context_line":"                               TemplateTypes.EQUIVALENCE)"},{"line_number":41,"context_line":"            self.assertRaises("},{"line_number":42,"context_line":"                VitrageError,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_7b5d5f13","line":39,"range":{"start_line":39,"start_character":17,"end_line":39,"end_character":30},"in_reply_to":"9f91af0f_4b003668","updated":"2018-01-10 14:13:49.000000000","message":"We are using sqlite in unit test. Each test creates a new file called test_\u003ctest_name\u003e.db and uses it \"as\" DB.","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage/tests/unit/evaluator/test_scenario_repository.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                          TType.EQUIVALENCE)"},{"line_number":201,"context_line":"        cls.add_templates(cls.conf.evaluator.def_templates_dir,"},{"line_number":202,"context_line":"                          TType.DEFINITION)"},{"line_number":203,"context_line":"        # templates_dir_path \u003d cls.conf.evaluator.templates_dir"},{"line_number":204,"context_line":"        # cls.template_defs \u003d file_utils.load_yaml_files(templates_dir_path)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        cls.scenario_repository \u003d ScenarioRepository(cls.conf)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_0bfa2e74","line":204,"range":{"start_line":203,"start_character":8,"end_line":204,"end_character":76},"updated":"2018-01-04 16:40:50.000000000","message":"If it\u0027s not relevant then please delete it","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                          TType.EQUIVALENCE)"},{"line_number":201,"context_line":"        cls.add_templates(cls.conf.evaluator.def_templates_dir,"},{"line_number":202,"context_line":"                          TType.DEFINITION)"},{"line_number":203,"context_line":"        # templates_dir_path \u003d cls.conf.evaluator.templates_dir"},{"line_number":204,"context_line":"        # cls.template_defs \u003d file_utils.load_yaml_files(templates_dir_path)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        cls.scenario_repository \u003d ScenarioRepository(cls.conf)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5f4dd93b","line":204,"range":{"start_line":203,"start_character":8,"end_line":204,"end_character":76},"in_reply_to":"9f91af0f_0bfa2e74","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"}],"vitrage_tempest_tests/add_legacy_dir_templates.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from vitrage import storage"},{"line_number":20,"context_line":"from vitrage_tempest_tests.tests.common import general_utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# \u0027basic_def_template.yaml\u0027,"},{"line_number":23,"context_line":"# \u0027basic_equivalence_templates.yaml\u0027,"},{"line_number":24,"context_line":"# \u0027e2e_test_template_actions.yaml\u0027,"},{"line_number":25,"context_line":"# \u0027equivalence_template.yaml\u0027,"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"files \u003d [\u0027corrupted_template.yaml\u0027, \u0027e2e_test_basic_actions.yaml\u0027,"},{"line_number":28,"context_line":"         \u0027e2e_test_overlapping_actions.yaml\u0027, \u0027execute_mistral.yaml\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_ebeeeab2","line":25,"range":{"start_line":22,"start_character":0,"end_line":25,"end_character":30},"updated":"2018-01-04 16:40:50.000000000","message":"Can be deleted?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from vitrage import storage"},{"line_number":20,"context_line":"from vitrage_tempest_tests.tests.common import general_utils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# \u0027basic_def_template.yaml\u0027,"},{"line_number":23,"context_line":"# \u0027basic_equivalence_templates.yaml\u0027,"},{"line_number":24,"context_line":"# \u0027e2e_test_template_actions.yaml\u0027,"},{"line_number":25,"context_line":"# \u0027equivalence_template.yaml\u0027,"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"files \u003d [\u0027corrupted_template.yaml\u0027, \u0027e2e_test_basic_actions.yaml\u0027,"},{"line_number":28,"context_line":"         \u0027e2e_test_overlapping_actions.yaml\u0027, \u0027execute_mistral.yaml\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_dbf10b03","line":25,"range":{"start_line":22,"start_character":0,"end_line":25,"end_character":30},"in_reply_to":"9f91af0f_ebeeeab2","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"0730d01989d1007830258aba3c939902823aca01","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    db \u003d storage.get_connection_from_config(conf)"},{"line_number":35,"context_line":"    for f in files:"},{"line_number":36,"context_line":"        full_path \u003d resources_path + f"},{"line_number":37,"context_line":"        template \u003d add_template_to_db(db, full_path, TType.STANDARD)"},{"line_number":38,"context_line":"        if template[0][\u0027name\u0027] !\u003d \u0027corrupted_template\u0027:"},{"line_number":39,"context_line":"            db.templates.update(template[0][\u0027uuid\u0027],"},{"line_number":40,"context_line":"                                \u0027status\u0027, TemplateStatus.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_b5bba4e3","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":16},"updated":"2018-01-11 08:17:22.000000000","message":"Should be templates","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"dd6db9f737c5d874159aec90daf04dc12bc429ba","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    db \u003d storage.get_connection_from_config(conf)"},{"line_number":35,"context_line":"    for f in files:"},{"line_number":36,"context_line":"        full_path \u003d resources_path + f"},{"line_number":37,"context_line":"        template \u003d add_template_to_db(db, full_path, TType.STANDARD)"},{"line_number":38,"context_line":"        if template[0][\u0027name\u0027] !\u003d \u0027corrupted_template\u0027:"},{"line_number":39,"context_line":"            db.templates.update(template[0][\u0027uuid\u0027],"},{"line_number":40,"context_line":"                                \u0027status\u0027, TemplateStatus.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_05281884","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":16},"in_reply_to":"7f96bb07_b5bba4e3","updated":"2018-01-16 16:24:19.000000000","message":"Done","commit_id":"d19b7ee34f640bb9d3b0e46b3b3a5124c7f52535"}],"vitrage_tempest_tests/tests/api/templates/test_template.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"            # assert equivalence template"},{"line_number":173,"context_line":"            db_row \u003d vitrage_utils.get_first_template("},{"line_number":174,"context_line":"                name\u003d\u0027entity equivalence example\u0027,"},{"line_number":175,"context_line":"                type\u003dTTypes.EQUIVALENCE)"},{"line_number":176,"context_line":"            self.assertEqual(db_row[\u0027name\u0027],"},{"line_number":177,"context_line":"                             \u0027entity equivalence example\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_4b8356cd","line":174,"range":{"start_line":174,"start_character":22,"end_line":174,"end_character":48},"updated":"2018-01-04 16:40:50.000000000","message":"Shouldn\u0027t it contain underscores?","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"            # assert equivalence template"},{"line_number":173,"context_line":"            db_row \u003d vitrage_utils.get_first_template("},{"line_number":174,"context_line":"                name\u003d\u0027entity equivalence example\u0027,"},{"line_number":175,"context_line":"                type\u003dTTypes.EQUIVALENCE)"},{"line_number":176,"context_line":"            self.assertEqual(db_row[\u0027name\u0027],"},{"line_number":177,"context_line":"                             \u0027entity equivalence example\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_fb42cf0e","line":174,"range":{"start_line":174,"start_character":22,"end_line":174,"end_character":48},"in_reply_to":"9f91af0f_4b8356cd","updated":"2018-01-10 14:13:49.000000000","message":"No. it\u0027s the name defined in the template file.","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            self.client.template.delete(db_row[\u0027uuid\u0027])"},{"line_number":213,"context_line":"            db_row \u003d vitrage_utils.get_first_template(name\u003d\u0027host_aodh_alarm\u0027,"},{"line_number":214,"context_line":"                                                      type\u003dTTypes.STANDARD)"},{"line_number":215,"context_line":"            self.assertIsNone(db_row, \u0027Template should not appear in list\u0027)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        except Exception as e:"},{"line_number":218,"context_line":"            self._handle_exception(e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_8b62be3d","line":215,"range":{"start_line":215,"start_character":12,"end_line":215,"end_character":29},"updated":"2018-01-04 16:40:50.000000000","message":"Other things to test:\n- try to delete the same template again, make sure nothing happens\n- try to delete a non-existing template","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            self._handle_exception(e)"},{"line_number":219,"context_line":"            raise"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def test_template_list(self):"},{"line_number":222,"context_line":"        \"\"\"Compare between api template list"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        to cli template list"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_abf30273","line":221,"range":{"start_line":221,"start_character":8,"end_line":221,"end_character":26},"updated":"2018-01-04 16:40:50.000000000","message":"I expect test_template_list to query all templates and compare it to the expected list. \nThe test below is a different test, and it should be called test_compare_api_to_cli or something similar.","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            self._handle_exception(e)"},{"line_number":219,"context_line":"            raise"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def test_template_list(self):"},{"line_number":222,"context_line":"        \"\"\"Compare between api template list"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        to cli template list"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_ffc14d55","line":221,"range":{"start_line":221,"start_character":8,"end_line":221,"end_character":26},"in_reply_to":"9f91af0f_abf30273","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def test_templates_list(self):"},{"line_number":48,"context_line":"        \"\"\"template_list test"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        There test validate correctness of template list,"},{"line_number":51,"context_line":"        equals templates files existence with default folder"},{"line_number":52,"context_line":"        and between cli via api ..."},{"line_number":53,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_1124175d","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":13},"updated":"2018-01-18 15:06:18.000000000","message":"This test validates (here and below)","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\"template_list test"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        There test validate correctness of template list,"},{"line_number":51,"context_line":"        equals templates files existence with default folder"},{"line_number":52,"context_line":"        and between cli via api ..."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        api_template_list \u003d self.vitrage_client.template.list()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_b1d8c352","line":51,"range":{"start_line":51,"start_character":8,"end_line":51,"end_character":14},"updated":"2018-01-18 15:06:18.000000000","message":"compares","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        super(TemplatesDBTest, cls).setUpClass()"},{"line_number":158,"context_line":"        cls.client \u003d TempestClients.vitrage()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def test_template_add(self):"},{"line_number":161,"context_line":"        \"\"\"template add test"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        test standard , definition and equivalence templates"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_f1c2cb52","line":160,"range":{"start_line":160,"start_character":8,"end_line":160,"end_character":25},"updated":"2018-01-18 15:06:18.000000000","message":"Try also to add: \n\n1. an empty folder \n2. a non-existing path\n3. an already loaded template\n4. a new template with an already existing name","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage_tempest_tests/tests/e2e/test_basic_template_actions.py":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        1. raise trigger alarm"},{"line_number":98,"context_line":"        2. add the relevant template"},{"line_number":99,"context_line":"        3. delete the template."},{"line_number":100,"context_line":"        4. check action - should be not active."},{"line_number":101,"context_line":"        This checks that the evaluators are reloaded and run on all existing"},{"line_number":102,"context_line":"         vertices."},{"line_number":103,"context_line":"         Checks temporary worker that was added to delete template."}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_4b3b56ea","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":47},"updated":"2018-01-04 16:40:50.000000000","message":"Add: \n\n5. add the same template again\n6. check that the action is executed again","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"ac46543a845187e1fceb20cb9712979bd81bbb48","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    def test_evaluator_reload_with_existing_template_v2(self):"},{"line_number":123,"context_line":"        \"\"\"Test reload new template e2e v2"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        1.add the relevant template"},{"line_number":126,"context_line":"        2.raise trigger alarm."},{"line_number":127,"context_line":"        3. check action is executed"},{"line_number":128,"context_line":"        This checks that new workers execute new template"},{"line_number":129,"context_line":"        :return:"},{"line_number":130,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_eb7b4abb","line":127,"range":{"start_line":125,"start_character":8,"end_line":127,"end_character":35},"updated":"2018-01-04 16:40:50.000000000","message":"The description doesn\u0027t match the test","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":26095,"name":"Idan Kinory","email":"idan.kinory@nokia.com","username":"idankin"},"change_message_id":"93228370c82ae2afcac54c6318bf8b3d66264791","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    def test_evaluator_reload_with_existing_template_v2(self):"},{"line_number":123,"context_line":"        \"\"\"Test reload new template e2e v2"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        1.add the relevant template"},{"line_number":126,"context_line":"        2.raise trigger alarm."},{"line_number":127,"context_line":"        3. check action is executed"},{"line_number":128,"context_line":"        This checks that new workers execute new template"},{"line_number":129,"context_line":"        :return:"},{"line_number":130,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_df91e948","line":127,"range":{"start_line":125,"start_character":8,"end_line":127,"end_character":35},"in_reply_to":"9f91af0f_eb7b4abb","updated":"2018-01-10 14:13:49.000000000","message":"Done","commit_id":"052c75766e438348a254c8d22df872ec2c731c3a"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"98c439b404e984b7d228163f093dccf2838346dd","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class TestTemplateActions(TestActionsBase):"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def __init__(self, *args, **kwds):"},{"line_number":57,"context_line":"        super(TestTemplateActions, self).__init__(*args, **kwds)"},{"line_number":58,"context_line":"        self.added_template \u003d None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def setUp(self):"},{"line_number":61,"context_line":"        super(TestTemplateActions, self).setUp()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_3f623f0b","line":58,"range":{"start_line":56,"start_character":4,"end_line":58,"end_character":34},"updated":"2018-01-18 14:50:58.000000000","message":"kwds should be kwargs","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}],"vitrage_tempest_tests/tests/e2e/test_template_actions.py":[{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        This checks that the evaluators are reloaded and run on all existing"},{"line_number":48,"context_line":"         vertices."},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        added_template \u003d \"\""},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            host_id \u003d self.orig_host.get(VProps.VITRAGE_ID)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_dfd75c23","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":27},"updated":"2018-01-01 13:54:55.000000000","message":"should be defined as None\nand do it in setup method","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        except Exception as e:"},{"line_number":60,"context_line":"            self._handle_exception(e)"},{"line_number":61,"context_line":"            raise"},{"line_number":62,"context_line":"        finally:"},{"line_number":63,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":64,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @utils.tempest_logger"},{"line_number":67,"context_line":"    def test_evaluator_reload_with_existing_template(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_7fdc1046","line":64,"range":{"start_line":62,"start_character":8,"end_line":64,"end_character":62},"updated":"2018-01-01 13:54:55.000000000","message":"do this in tear down method\nand check that added_template is not None","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8718757304c756b473be9b2e3958cbc1c2cbe145","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            raise"},{"line_number":62,"context_line":"        finally:"},{"line_number":63,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":64,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @utils.tempest_logger"},{"line_number":67,"context_line":"    def test_evaluator_reload_with_existing_template(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_df0afc88","line":64,"range":{"start_line":64,"start_character":42,"end_line":64,"end_character":56},"updated":"2018-01-01 14:46:19.000000000","message":"is a list has no uuid","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        3. check action is executed"},{"line_number":73,"context_line":"        This checks that new workers execute new template"},{"line_number":74,"context_line":"        \"\"\""},{"line_number":75,"context_line":"        added_template \u003d \"\""},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            host_id \u003d self.orig_host.get(VProps.VITRAGE_ID)"},{"line_number":78,"context_line":"            added_template \u003d vitrage_utils.add_template("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_9fe1d401","line":75,"range":{"start_line":75,"start_character":8,"end_line":75,"end_character":27},"updated":"2018-01-01 13:54:55.000000000","message":"as above","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        except Exception as e:"},{"line_number":84,"context_line":"            self._handle_exception(e)"},{"line_number":85,"context_line":"            raise"},{"line_number":86,"context_line":"        finally:"},{"line_number":87,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":88,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @utils.tempest_logger"},{"line_number":91,"context_line":"    def test_evaluator_reload_with_new_template_v2(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_ffefc0e6","line":88,"range":{"start_line":86,"start_character":8,"end_line":88,"end_character":62},"updated":"2018-01-01 13:54:55.000000000","message":"as above","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8718757304c756b473be9b2e3958cbc1c2cbe145","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            raise"},{"line_number":86,"context_line":"        finally:"},{"line_number":87,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":88,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @utils.tempest_logger"},{"line_number":91,"context_line":"    def test_evaluator_reload_with_new_template_v2(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_7fff3067","line":88,"range":{"start_line":88,"start_character":42,"end_line":88,"end_character":56},"updated":"2018-01-01 14:46:19.000000000","message":"is a list has no uuid","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":99,"context_line":"         vertices."},{"line_number":100,"context_line":"         Checks temporary worker that was added to delete template."},{"line_number":101,"context_line":"        \"\"\""},{"line_number":102,"context_line":"        added_template \u003d \"\""},{"line_number":103,"context_line":"        try:"},{"line_number":104,"context_line":"            host_id \u003d self.orig_host.get(VProps.VITRAGE_ID)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_1fedc4ee","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":27},"updated":"2018-01-01 13:54:55.000000000","message":"as above","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        except Exception as e:"},{"line_number":114,"context_line":"            self._handle_exception(e)"},{"line_number":115,"context_line":"            raise"},{"line_number":116,"context_line":"        finally:"},{"line_number":117,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":118,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @utils.tempest_logger"},{"line_number":121,"context_line":"    def test_evaluator_reload_with_existing_template_v2(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_bfbb78e3","line":118,"range":{"start_line":116,"start_character":7,"end_line":118,"end_character":62},"updated":"2018-01-01 13:54:55.000000000","message":"as above","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8718757304c756b473be9b2e3958cbc1c2cbe145","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            raise"},{"line_number":116,"context_line":"        finally:"},{"line_number":117,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":118,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @utils.tempest_logger"},{"line_number":121,"context_line":"    def test_evaluator_reload_with_existing_template_v2(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_9f04747d","line":118,"range":{"start_line":118,"start_character":42,"end_line":118,"end_character":56},"updated":"2018-01-01 14:46:19.000000000","message":"is a list has no uuid","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        This checks that new workers execute new template"},{"line_number":128,"context_line":"        :return:"},{"line_number":129,"context_line":"        \"\"\""},{"line_number":130,"context_line":"        added_template \u003d \"\""},{"line_number":131,"context_line":"        try:"},{"line_number":132,"context_line":"            host_id \u003d self.orig_host.get(VProps.VITRAGE_ID)"},{"line_number":133,"context_line":"            added_template \u003d vitrage_utils.add_template("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_dfc0bc53","line":130,"range":{"start_line":130,"start_character":8,"end_line":130,"end_character":27},"updated":"2018-01-01 13:54:55.000000000","message":"as above","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"3b5f84878289fb3a1ea9a4abdad5d2ca0aa79737","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        except Exception as e:"},{"line_number":141,"context_line":"            self._handle_exception(e)"},{"line_number":142,"context_line":"            raise"},{"line_number":143,"context_line":"        finally:"},{"line_number":144,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":145,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_7fb5f0ed","line":145,"range":{"start_line":143,"start_character":8,"end_line":145,"end_character":62},"updated":"2018-01-01 13:54:55.000000000","message":"as above","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8718757304c756b473be9b2e3958cbc1c2cbe145","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            raise"},{"line_number":143,"context_line":"        finally:"},{"line_number":144,"context_line":"            self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":145,"context_line":"            vitrage_utils.delete_template(added_template.uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_3ff9a87f","line":145,"range":{"start_line":145,"start_character":42,"end_line":145,"end_character":56},"updated":"2018-01-01 14:46:19.000000000","message":"is a list has no uuid","commit_id":"7607e2ceaa907cbfcc6be4b3afa7bbcff575cf43"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"ad0d0046576dc5156536d10709afdf950d9987b0","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def tearDown(self):"},{"line_number":44,"context_line":"        super(TestTemplateActions, self).tearDown()"},{"line_number":45,"context_line":"        self._trigger_undo_action(TRIGGER_ALARM_1)"},{"line_number":46,"context_line":"        vitrage_utils.delete_template(self.added_template[\u0027uuid\u0027])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @utils.tempest_logger"},{"line_number":49,"context_line":"    def test_evaluator_reload_with_new_template(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f91af0f_c3df54d4","line":46,"range":{"start_line":46,"start_character":43,"end_line":46,"end_character":57},"updated":"2018-01-04 12:10:55.000000000","message":"do it only if added_template is not None","commit_id":"1722eae3f41d5810789cb00aeeb6f152295d8868"}],"vitrage_tempest_tests/tests/resources/templates/api/host_high_memory_usage_scenarios.yaml":[{"author":{"_account_id":19159,"name":"Ifat Afek","email":"ifat.afek@nokia.com","username":"ifat_afek"},"change_message_id":"f57382bb06e8ff6a282edf443c18c4ba1e196953","unresolved":false,"context_lines":[{"line_number":64,"context_line":"         state: SUBOPTIMAL"},{"line_number":65,"context_line":" - scenario:"},{"line_number":66,"context_line":"    condition: lack_of_available_memory_alarm_on_host"},{"line_number":67,"context_line":"    actions: "},{"line_number":68,"context_line":"     - action: "},{"line_number":69,"context_line":"        action_type: set_state"},{"line_number":70,"context_line":"        action_target:"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"7f96bb07_91ba67be","line":67,"range":{"start_line":67,"start_character":12,"end_line":67,"end_character":13},"updated":"2018-01-18 15:06:18.000000000","message":"red mark here and below, probably an extra space","commit_id":"c0c0800859e744fd69cf27af69d9e7e3bb642a7c"}]}
