)]}'
{"vitrage/api/controllers/v1/topology.py":[{"author":{"_account_id":18755,"name":"Julien","email":"zhang.jun3g@zte.com.cn","username":"Julien"},"change_message_id":"ebc37c93402dbb6039946ca88dcaf7b2c53f081f","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from vitrage.api.controllers.rest import RootRestController"},{"line_number":23,"context_line":"from vitrage.api.policy import enforce"},{"line_number":24,"context_line":"from vitrage.common.constants import VertexProperties as VProps"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from vitrage.datasources import OPENSTACK_CLUSTER"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# noinspection PyProtectedMember"},{"line_number":29,"context_line":"from vitrage.i18n import _LI"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_714898cd","line":26,"range":{"start_line":24,"start_character":0,"end_line":26,"end_character":49},"updated":"2016-05-12 07:02:21.000000000","message":"delete the blank line","commit_id":"958a5f9abd1db2ee8aa8cfcb0b5fcd217b53d9d8"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"ff5d8fdeeda5b653ce597914af0ea8da750c3f69","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from vitrage.api.controllers.rest import RootRestController"},{"line_number":23,"context_line":"from vitrage.api.policy import enforce"},{"line_number":24,"context_line":"from vitrage.common.constants import VertexProperties as VProps"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from vitrage.datasources import OPENSTACK_CLUSTER"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# noinspection PyProtectedMember"},{"line_number":29,"context_line":"from vitrage.i18n import _LI"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_11730ce9","line":26,"range":{"start_line":24,"start_character":0,"end_line":26,"end_character":49},"in_reply_to":"dab17558_714898cd","updated":"2016-05-12 07:12:59.000000000","message":"OK,i\u0027ll delete it.","commit_id":"958a5f9abd1db2ee8aa8cfcb0b5fcd217b53d9d8"},{"author":{"_account_id":21414,"name":"Yujun Zhang","email":"zhang.yujunz@zte.com.cn","username":"yujunz"},"change_message_id":"38e70f171c5051f5f419f6f911758bd34f68d2f8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    for index, node in enumerate(graph[\u0027nodes\u0027]):"},{"line_number":72,"context_line":"                        if node[VProps.VITRAGE_ID] \u003d\u003d root:"},{"line_number":73,"context_line":"                            node_id \u003d node[VProps.ID]"},{"line_number":74,"context_line":"                            break"},{"line_number":75,"context_line":"                return RootRestController.as_tree(graph, node_id)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_10c47090","line":74,"updated":"2016-05-13 02:29:06.000000000","message":"You may consider use a one line expression to do it. See http://stackoverflow.com/questions/2361426/what-is-the-best-way-to-get-the-first-item-from-an-iterable-matching-a-condition","commit_id":"787c0df7c595ead7378fa4b4a775ad9fc97390fb"},{"author":{"_account_id":18783,"name":"dongwenjuan","email":"dong.wenjuan@zte.com.cn","username":"dongwenjuan"},"change_message_id":"725d84e392c3b060f9992ccb46d3d746936179e8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    for index, node in enumerate(graph[\u0027nodes\u0027]):"},{"line_number":72,"context_line":"                        if node[VProps.VITRAGE_ID] \u003d\u003d root:"},{"line_number":73,"context_line":"                            node_id \u003d node[VProps.ID]"},{"line_number":74,"context_line":"                            break"},{"line_number":75,"context_line":"                return RootRestController.as_tree(graph, node_id)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_dacde25e","line":74,"in_reply_to":"dab17558_10c47090","updated":"2016-05-13 04:55:11.000000000","message":"OK,i\u0027ll fix it. C language style, haha :)","commit_id":"787c0df7c595ead7378fa4b4a775ad9fc97390fb"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"9241f508366aa55eb502c61300e09a8975b4f952","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            if graph_type \u003d\u003d \u0027tree\u0027:"},{"line_number":69,"context_line":"                node_id \u003d OPENSTACK_CLUSTER"},{"line_number":70,"context_line":"                if root:"},{"line_number":71,"context_line":"                    node_id \u003d next((node[VProps.ID]"},{"line_number":72,"context_line":"                                   for index, node in enumerate(graph[\u0027nodes\u0027])"},{"line_number":73,"context_line":"                                   if node[VProps.VITRAGE_ID] \u003d\u003d root),"},{"line_number":74,"context_line":"                                   OPENSTACK_CLUSTER)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_324df772","line":71,"range":{"start_line":71,"start_character":30,"end_line":71,"end_character":35},"updated":"2016-05-15 07:05:58.000000000","message":"there is only one node with this id so you don\u0027t need to create a comprehension list and use next\njust return the node_id once you find the vitrage id","commit_id":"eb3e573b9f2a6fe20a5a2ff031e001db42cb4f44"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"9241f508366aa55eb502c61300e09a8975b4f952","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                node_id \u003d OPENSTACK_CLUSTER"},{"line_number":70,"context_line":"                if root:"},{"line_number":71,"context_line":"                    node_id \u003d next((node[VProps.ID]"},{"line_number":72,"context_line":"                                   for index, node in enumerate(graph[\u0027nodes\u0027])"},{"line_number":73,"context_line":"                                   if node[VProps.VITRAGE_ID] \u003d\u003d root),"},{"line_number":74,"context_line":"                                   OPENSTACK_CLUSTER)"},{"line_number":75,"context_line":"                return RootRestController.as_tree(graph, node_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_f2340fdf","line":72,"range":{"start_line":72,"start_character":39,"end_line":72,"end_character":44},"updated":"2016-05-15 07:05:58.000000000","message":"index is not used you don\u0027t need enumerate","commit_id":"eb3e573b9f2a6fe20a5a2ff031e001db42cb4f44"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"144a6e8f2b7d7214b3920a73583f71cc3993ddfe","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            if graph_type \u003d\u003d \u0027tree\u0027:"},{"line_number":69,"context_line":"                node_id \u003d OPENSTACK_CLUSTER"},{"line_number":70,"context_line":"                if root:"},{"line_number":71,"context_line":"                    for index in range(0, len(graph[\u0027nodes\u0027])):"},{"line_number":72,"context_line":"                        if graph[\u0027nodes\u0027][index][VProps.VITRAGE_ID] \u003d\u003d root:"},{"line_number":73,"context_line":"                            node_id \u003d graph[\u0027nodes\u0027][index][VProps.ID]"},{"line_number":74,"context_line":"                            break"},{"line_number":75,"context_line":"                return RootRestController.as_tree(graph, node_id)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_0b66ba28","line":73,"range":{"start_line":71,"start_character":19,"end_line":73,"end_character":70},"updated":"2016-05-15 11:44:46.000000000","message":"No need for index for example:\n\nfor node in graph[\u0027nodes\u0027]:\n    if node[VProps.VITRAGE_ID] \u003d\u003d root:\n        node_id \u003d node[VProps.ID]","commit_id":"68218c0fb6ed2c6ac46007b2201640116636e2b3"}]}
