)]}'
{"vitrage/api_handler/apis.py":[{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"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"},{"line_number":5,"context_line":"# a copy of the License at"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#      http://www.apache.org/licenses/LICENSE-2.0"},{"line_number":8,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_999a4a62","line":5,"range":{"start_line":5,"start_character":0,"end_line":5,"end_character":9},"updated":"2016-10-06 14:47:54.000000000","message":"We need to block all_tenant for non admin users (mabey by policy.json as is in nova)","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"e8c005443f529fd2505d50639fc1d4c208be5e82","unresolved":false,"context_lines":[{"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"},{"line_number":5,"context_line":"# a copy of the License at"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#      http://www.apache.org/licenses/LICENSE-2.0"},{"line_number":8,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_429a2f6f","line":5,"range":{"start_line":5,"start_character":0,"end_line":5,"end_character":9},"in_reply_to":"1a95cdbc_999a4a62","updated":"2016-10-09 03:16:29.000000000","message":"+1","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        self.conf \u003d conf"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def get_alarms(self, ctx, vitrage_id, all_tenants):"},{"line_number":95,"context_line":"        LOG.debug(\"EntityGraphApis get_alarms arg:%s\", str(vitrage_id))"},{"line_number":96,"context_line":"        project_id \u003d ctx.get(self.TENANT_PROPERTY, None)"},{"line_number":97,"context_line":"        is_admin_project \u003d ctx.get(self.IS_ADMIN_PROJECT_PROPERTY, None)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_6b03ed0f","line":95,"range":{"start_line":95,"start_character":69,"end_line":95,"end_character":70},"updated":"2016-10-06 12:48:20.000000000","message":"Also debug the all tenant flag","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def get_alarms(self, ctx, vitrage_id, all_tenants):"},{"line_number":95,"context_line":"        LOG.debug(\"EntityGraphApis get_alarms arg:%s\", str(vitrage_id))"},{"line_number":96,"context_line":"        project_id \u003d ctx.get(self.TENANT_PROPERTY, None)"},{"line_number":97,"context_line":"        is_admin_project \u003d ctx.get(self.IS_ADMIN_PROJECT_PROPERTY, None)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        if all_tenants \u003d\u003d \"1\":"},{"line_number":100,"context_line":"            if not vitrage_id or vitrage_id \u003d\u003d \u0027all\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_c66f98c3","line":97,"range":{"start_line":97,"start_character":67,"end_line":97,"end_character":71},"updated":"2016-10-06 12:48:20.000000000","message":"default should be False?","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    vertex_attr_filter\u003d{VProps.CATEGORY: EntityCategory.ALARM,"},{"line_number":107,"context_line":"                                        VProps.IS_DELETED: False})"},{"line_number":108,"context_line":"        else:"},{"line_number":109,"context_line":"            alarms \u003d self._get_alarms(project_id, is_admin_project)"},{"line_number":110,"context_line":"            alarms \u003d alarms + self._get_alarms_via_resource(project_id,"},{"line_number":111,"context_line":"                                                            is_admin_project)"},{"line_number":112,"context_line":"            alarms \u003d set(alarms)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        self._add_resource_details_to_alarms(alarms)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_46f46885","line":112,"range":{"start_line":109,"start_character":12,"end_line":112,"end_character":32},"updated":"2016-10-06 12:48:20.000000000","message":"handling of vitrage_id?","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                LOG.error(\"Graph-type \u0027tree\u0027 requires a filter.\")"},{"line_number":127,"context_line":"                return {}"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            current_topology \u003d query"},{"line_number":130,"context_line":"            if not all_tenants:"},{"line_number":131,"context_line":"                project_query \u003d \\"},{"line_number":132,"context_line":"                    {\u0027or\u0027: [{\u0027\u003d\u003d\u0027: {VProps.PROJECT_ID: project_id}},"},{"line_number":133,"context_line":"                            {\u0027\u003d\u003d\u0027: {VProps.PROJECT_ID: None}}]}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_6c3bf99c","line":130,"range":{"start_line":129,"start_character":12,"end_line":130,"end_character":31},"updated":"2016-10-06 14:47:54.000000000","message":"The provided query is overridden in case of all-tenant. \nThe only way for the user to use the query, is to also pass all-tenant.","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            query_dict\u003dRCA_QUERY,"},{"line_number":176,"context_line":"            root_id\u003droot,"},{"line_number":177,"context_line":"            direction\u003dDirection.OUT)"},{"line_number":178,"context_line":"        found_graph_in \u003d ga.graph_query_vertices("},{"line_number":179,"context_line":"            query_dict\u003dRCA_QUERY,"},{"line_number":180,"context_line":"            root_id\u003droot,"},{"line_number":181,"context_line":"            direction\u003dDirection.IN)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        if all_tenants \u003d\u003d \u00271\u0027:"},{"line_number":184,"context_line":"            unified_graph \u003d found_graph_in"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_d45e5975","line":181,"range":{"start_line":178,"start_character":0,"end_line":181,"end_character":35},"updated":"2016-10-06 14:47:54.000000000","message":"any change here?","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        tmp_graph \u003d ga.create_graph_from_matching_vertices(query_dict\u003dq)"},{"line_number":231,"context_line":"        graph \u003d NXGraph(\u0027graph\u0027)"},{"line_number":232,"context_line":"        graph._g \u003d self.entity_graph._g.subgraph("},{"line_number":233,"context_line":"            ga.topology_for_unrooted_graph(tmp_graph))"},{"line_number":234,"context_line":"        self._remove_alarms_of_other_projects(graph,"},{"line_number":235,"context_line":"                                              project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_8c45a571","line":232,"range":{"start_line":232,"start_character":14,"end_line":232,"end_character":16},"updated":"2016-10-06 14:47:54.000000000","message":"Use of private member","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        found_alarms_out \u003d [node.vertex_id for node in found_alarms_out]"},{"line_number":255,"context_line":"        found_graph_out \u003d self.entity_graph._g.subgraph(found_alarms_out)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        unified_alarms \u003d found_graph_in.nodes() + found_graph_out.nodes()"},{"line_number":258,"context_line":"        unified_graph \u003d NXGraph(\u0027Temp\u0027)"},{"line_number":259,"context_line":"        unified_graph._g \u003d self.entity_graph._g.subgraph(unified_alarms)"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_05da4d78","line":257,"range":{"start_line":257,"start_character":50,"end_line":257,"end_character":73},"updated":"2016-10-06 14:47:54.000000000","message":"Instead of the above subgraph call use  found_alarms_out","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                                      root,"},{"line_number":244,"context_line":"                                      project_id,"},{"line_number":245,"context_line":"                                      is_admin_project):"},{"line_number":246,"context_line":"        found_graph_in \u003d \\"},{"line_number":247,"context_line":"            self._filter_rca_entities(found_graph_in,"},{"line_number":248,"context_line":"                                      root,"},{"line_number":249,"context_line":"                                      project_id,"},{"line_number":250,"context_line":"                                      is_admin_project)"},{"line_number":251,"context_line":"        found_alarms_out \u003d \\"},{"line_number":252,"context_line":"            self._filter_alarms(found_graph_out.get_vertices("},{"line_number":253,"context_line":"                vertex_attr_filter\u003d{}), project_id)"},{"line_number":254,"context_line":"        found_alarms_out \u003d [node.vertex_id for node in found_alarms_out]"},{"line_number":255,"context_line":"        found_graph_out \u003d self.entity_graph._g.subgraph(found_alarms_out)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        unified_alarms \u003d found_graph_in.nodes() + found_graph_out.nodes()"},{"line_number":258,"context_line":"        unified_graph \u003d NXGraph(\u0027Temp\u0027)"},{"line_number":259,"context_line":"        unified_graph._g \u003d self.entity_graph._g.subgraph(unified_alarms)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        return unified_graph"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_29b6433d","line":259,"range":{"start_line":246,"start_character":8,"end_line":259,"end_character":72},"updated":"2016-10-06 14:47:54.000000000","message":"do this more elegant, by returning the alarms needs to be filtered from the found_graph_*, and then remove the alarms from each graph and then unify the graphs","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                             root_id,"},{"line_number":285,"context_line":"                             project_id,"},{"line_number":286,"context_line":"                             is_admin_project):"},{"line_number":287,"context_line":"        entities \u003d [root_id]"},{"line_number":288,"context_line":"        current_entity_id \u003d root_id"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        while len(rca_graph.neighbors(current_entity_id,"},{"line_number":291,"context_line":"                                      direction\u003dDirection.IN)) \u003e 0:"},{"line_number":292,"context_line":"            current_entity \u003d rca_graph.neighbors(current_entity_id,"},{"line_number":293,"context_line":"                                                 direction\u003dDirection.IN)[0]"},{"line_number":294,"context_line":"            current_entity_id \u003d current_entity.vertex_id"},{"line_number":295,"context_line":"            if not self._is_alarm_of_current_project(current_entity,"},{"line_number":296,"context_line":"                                                     project_id,"},{"line_number":297,"context_line":"                                                     is_admin_project):"},{"line_number":298,"context_line":"                entities.append(current_entity.vertex_id)"},{"line_number":299,"context_line":"                break"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"            entities.append(current_entity.vertex_id)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        return rca_graph._g.subgraph(entities)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def _is_alarm_of_current_project(self,"},{"line_number":306,"context_line":"                                     entity,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_c5eb05af","line":303,"range":{"start_line":287,"start_character":1,"end_line":303,"end_character":46},"updated":"2016-10-06 14:47:54.000000000","message":"Here you can return the rca_graph after removing the filtered vertices","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            \u0027and\u0027: ["},{"line_number":333,"context_line":"                {\u0027\u003d\u003d\u0027: {VProps.CATEGORY: EntityCategory.ALARM}},"},{"line_number":334,"context_line":"                {\u0027\u003d\u003d\u0027: {VProps.IS_DELETED: False}},"},{"line_number":335,"context_line":"                {\u0027or\u0027: project_id_query_list}"},{"line_number":336,"context_line":"            ]"},{"line_number":337,"context_line":"        }"},{"line_number":338,"context_line":"        alarms \u003d self.entity_graph.get_vertices(query_dict\u003dquery)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_e6ec9491","line":335,"updated":"2016-10-06 12:48:20.000000000","message":"add the project_id_query_list ALARMS_ALL_QUERY to this","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        return self._filter_alarms(alarms, project_id)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _filter_alarms(self, alarms, project_id):"},{"line_number":343,"context_line":"        alarms_to_remove \u003d []"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        for alarm in alarms:"},{"line_number":346,"context_line":"            alarm_project_id \u003d alarm.get(VProps.PROJECT_ID, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_2c373be4","line":343,"updated":"2016-10-06 12:48:20.000000000","message":"documentation:\nget alarms without a tenant id\ncheck that their resources are of this tenant","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"7fcf9449f662457dc151bb8a9e2c92b2850629c5","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            query_dict\u003dRCA_QUERY,"},{"line_number":189,"context_line":"            root_id\u003droot,"},{"line_number":190,"context_line":"            direction\u003dDirection.IN)"},{"line_number":191,"context_line":"        found_graph_out \u003d ga.graph_query_vertices("},{"line_number":192,"context_line":"            query_dict\u003dRCA_QUERY,"},{"line_number":193,"context_line":"            root_id\u003droot,"},{"line_number":194,"context_line":"            direction\u003dDirection.OUT)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        if all_tenants \u003d\u003d \u00271\u0027:"},{"line_number":197,"context_line":"            unified_graph \u003d found_graph_in"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_f170630d","line":194,"range":{"start_line":191,"start_character":0,"end_line":194,"end_character":36},"updated":"2016-10-09 15:04:58.000000000","message":"Any change here?","commit_id":"f2f21a59d740a2164445a19b166f9b57012ca0ac"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"7fcf9449f662457dc151bb8a9e2c92b2850629c5","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                      is_admin_project):"},{"line_number":300,"context_line":"        filtered_alarms_out \u003d \\"},{"line_number":301,"context_line":"            self._filter_alarms(found_graph_out.get_vertices("},{"line_number":302,"context_line":"                vertex_attr_filter\u003d{}), project_id)"},{"line_number":303,"context_line":"        filtered_found_graph_out \u003d ga.subgraph("},{"line_number":304,"context_line":"            [node.vertex_id for node in filtered_alarms_out])"},{"line_number":305,"context_line":"        filtered_found_graph_in \u003d \\"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_11da2fe8","line":302,"range":{"start_line":302,"start_character":16,"end_line":302,"end_character":37},"updated":"2016-10-09 15:04:58.000000000","message":"IMO this is unnecessary","commit_id":"f2f21a59d740a2164445a19b166f9b57012ca0ac"}],"vitrage/api_handler/apis/base.py":[{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        return [x for x in alarms if x not in alarms_to_remove]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def _is_alarm_of_current_project(self,"},{"line_number":151,"context_line":"                                     entity,"},{"line_number":152,"context_line":"                                     project_id,"},{"line_number":153,"context_line":"                                     is_admin_project):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_6517df51","line":150,"updated":"2016-10-27 09:13:15.000000000","message":"check where we use this method","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"},{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def _is_alarm_of_current_project(self,"},{"line_number":151,"context_line":"                                     entity,"},{"line_number":152,"context_line":"                                     project_id,"},{"line_number":153,"context_line":"                                     is_admin_project):"},{"line_number":154,"context_line":"        \"\"\"Generate query with tenant data"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        Checks if the alarm is of the current tenant:"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_2536c703","line":153,"updated":"2016-10-27 09:13:15.000000000","message":"change the generate","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"}],"vitrage/api_handler/apis/rca.py":[{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            if not self._is_alarm_of_current_project(current_entity,"},{"line_number":137,"context_line":"                                                     project_id,"},{"line_number":138,"context_line":"                                                     is_admin_project):"},{"line_number":139,"context_line":"                entities.append(current_entity.vertex_id)"},{"line_number":140,"context_line":"                break"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"            entities.append(current_entity.vertex_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_001291b4","line":139,"range":{"start_line":139,"start_character":0,"end_line":139,"end_character":57},"updated":"2016-10-27 09:13:15.000000000","message":"take the append up","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"}],"vitrage/api_handler/apis/topology.py":[{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        alarm_query \u003d self._get_query_with_project(EntityCategory.ALARM,"},{"line_number":102,"context_line":"                                                   project_id,"},{"line_number":103,"context_line":"                                                   True)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        resource_query \u003d self._get_query_with_project(EntityCategory.RESOURCE,"},{"line_number":106,"context_line":"                                                      project_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_6040ad57","line":103,"updated":"2016-10-27 09:13:15.000000000","message":"change to: is_alarm_project\u003dTrue","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"},{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                                                      is_admin_project)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        default_query \u003d {\u0027or\u0027: [resource_query, alarm_query]}"},{"line_number":110,"context_line":"        q \u003d query if query else default_query"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        tmp_graph \u003d ga.create_graph_from_matching_vertices(query_dict\u003dq)"},{"line_number":113,"context_line":"        graph \u003d ga.subgraph(self._topology_for_unrooted_graph(ga,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_7baf7ee3","line":110,"updated":"2016-10-27 09:13:15.000000000","message":"put here if that will calculate the default_query only if there is not query","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"},{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        if not root:"},{"line_number":170,"context_line":"            root \u003d build_key([EntityCategory.RESOURCE, OPENSTACK_CLUSTER])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        cluster_vertex \u003d \\"},{"line_number":173,"context_line":"            self.entity_graph.get_vertex(root)"},{"line_number":174,"context_line":"        local_connected_component_subgraphs \u003d \\"},{"line_number":175,"context_line":"            ga.connected_component_subgraphs(subgraph)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_db8dea7c","line":172,"updated":"2016-10-27 09:13:15.000000000","message":"change to root_vertex","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"},{"author":{"_account_id":20667,"name":"Noam Bloom","email":"noam00bloom@gmail.com","username":"nbloom"},"change_message_id":"5bb1eb983ac16332e6c6e2a96f5edcedbe19a6a6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            if instance_in_component_subgraph:"},{"line_number":182,"context_line":"                paths \u003d ga.all_simple_paths(cluster_vertex.vertex_id,"},{"line_number":183,"context_line":"                                            instance_in_component_subgraph)"},{"line_number":184,"context_line":"                for path in paths:"},{"line_number":185,"context_line":"                    entities +\u003d path"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        return set(entities)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5da102_5b463a24","line":184,"updated":"2016-10-27 09:13:15.000000000","message":"optimize","commit_id":"3336593b3e35f5880dd5c802f05c175e654c3438"}],"vitrage/graph/algo_driver/algorithm.py":[{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @abc.abstractmethod"},{"line_number":68,"context_line":"    def topology_for_unrooted_graph(self, subgraph):"},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_0bd34905","line":69,"updated":"2016-10-06 12:48:20.000000000","message":"Please document","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"}],"vitrage/graph/algo_driver/networkx_algorithm.py":[{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from networkx.algorithms.components import connected_component_subgraphs"},{"line_number":18,"context_line":"from networkx.algorithms.simple_paths import all_simple_paths"},{"line_number":19,"context_line":"from vitrage.common.constants import EntityCategory"},{"line_number":20,"context_line":"from vitrage.common.constants import VertexProperties as VProps"},{"line_number":21,"context_line":"from vitrage.datasources.nova.instance import NOVA_INSTANCE_DATASOURCE"},{"line_number":22,"context_line":"from vitrage.graph.algo_driver.algorithm import GraphAlgorithm"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_0bfa6975","line":19,"updated":"2016-10-06 12:48:20.000000000","message":"Missing space","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def topology_for_unrooted_graph(self, subgraph):"},{"line_number":112,"context_line":"        entities \u003d []"},{"line_number":113,"context_line":"        cluster_vertex \u003d \\"},{"line_number":114,"context_line":"            self.graph.get_vertex(\"RESOURCE:openstack.cluster\")"},{"line_number":115,"context_line":"        local_connected_component_subgraphs \u003d \\"},{"line_number":116,"context_line":"            connected_component_subgraphs(subgraph._g.to_undirected(),"},{"line_number":117,"context_line":"                                          copy\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_2f52c3dd","line":114,"range":{"start_line":114,"start_character":34,"end_line":114,"end_character":62},"updated":"2016-10-06 14:47:54.000000000","message":"should be a parmeter (root)","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"e3a0c9adb92b436f0b1a8b54f77d03b5c758acb1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                for path in paths:"},{"line_number":128,"context_line":"                    entities +\u003d path"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        return list(set(entities))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    @staticmethod"},{"line_number":133,"context_line":"    def _find_instance_in_graph(graph):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_abf2556d","line":130,"range":{"start_line":130,"start_character":15,"end_line":130,"end_character":34},"updated":"2016-10-06 12:48:20.000000000","message":"just return a set here?","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"a045f06e854d82e5c129a9427c7e570d20092b29","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return list(set(entities))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    @staticmethod"},{"line_number":133,"context_line":"    def _find_instance_in_graph(graph):"},{"line_number":134,"context_line":"        for node, node_data in graph.nodes_iter(data\u003dTrue):"},{"line_number":135,"context_line":"            if node_data[VProps.CATEGORY] \u003d\u003d EntityCategory.RESOURCE and \\"},{"line_number":136,"context_line":"                    node_data[VProps.TYPE] \u003d\u003d NOVA_INSTANCE_DATASOURCE:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_6f676b25","line":133,"range":{"start_line":133,"start_character":3,"end_line":133,"end_character":39},"updated":"2016-10-06 14:47:54.000000000","message":"should be in this class?","commit_id":"5ed3d7725997f0f52991951e376a3c22133bf249"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"7fcf9449f662457dc151bb8a9e2c92b2850629c5","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from networkx.algorithms.components import connected_component_subgraphs"},{"line_number":16,"context_line":"from networkx.algorithms.simple_paths import all_simple_paths"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_51ed97b5","line":16,"range":{"start_line":15,"start_character":0,"end_line":16,"end_character":61},"updated":"2016-10-09 15:04:58.000000000","message":"import the modules instead of the specific functions","commit_id":"f2f21a59d740a2164445a19b166f9b57012ca0ac"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"7fcf9449f662457dc151bb8a9e2c92b2850629c5","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        return subgraph"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    @staticmethod"},{"line_number":118,"context_line":"    def connected_component_subgraphs(subgraph):"},{"line_number":119,"context_line":"        return connected_component_subgraphs(subgraph._g.to_undirected(),"},{"line_number":120,"context_line":"                                             copy\u003dFalse)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_51d677f1","line":118,"range":{"start_line":118,"start_character":4,"end_line":118,"end_character":48},"updated":"2016-10-09 15:04:58.000000000","message":"Can do without the static and return value can be wrapped with a NXGraph object","commit_id":"f2f21a59d740a2164445a19b166f9b57012ca0ac"}]}
