)]}'
{"keystone/notifications.py":[{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"be28502a0ea6f5278f675a012304b4963dbbe45b","unresolved":false,"context_lines":[{"line_number":682,"context_line":"    if _check_notification_opt_out(event_type, outcome):"},{"line_number":683,"context_line":"        return"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    from keystone import catalog"},{"line_number":686,"context_line":"    service \u003d catalog.controllers.ServiceV3()"},{"line_number":687,"context_line":"    service_list \u003d service.catalog_api.list_services()"},{"line_number":688,"context_line":"    service_id \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a1b2928_e4d81f20","line":685,"updated":"2016-04-11 15:50:21.000000000","message":"Import should be at the top of the file.","commit_id":"8517d9b9fe5aaea62348cef3449e930d394d2dc2"},{"author":{"_account_id":19985,"name":"Ryosuke Mizuno","email":"r-mizuno@rs.jp.nec.com","username":"r-mizuno"},"change_message_id":"ab7229b640df33fc1a379a19c74c6b4b6c760d98","unresolved":false,"context_lines":[{"line_number":682,"context_line":"    if _check_notification_opt_out(event_type, outcome):"},{"line_number":683,"context_line":"        return"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    from keystone import catalog"},{"line_number":686,"context_line":"    service \u003d catalog.controllers.ServiceV3()"},{"line_number":687,"context_line":"    service_list \u003d service.catalog_api.list_services()"},{"line_number":688,"context_line":"    service_id \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_8a819792","line":685,"in_reply_to":"7a1b2928_e4d81f20","updated":"2016-04-12 04:18:43.000000000","message":"When adding import in the top of a file, a circulation import error occurs.\nExcept for adding import to 685 lines, Is there solution to avoid this error?","commit_id":"8517d9b9fe5aaea62348cef3449e930d394d2dc2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"41a4d18911ab7444205c4507f957fe4cc7c108af","unresolved":false,"context_lines":[{"line_number":682,"context_line":"    if _check_notification_opt_out(event_type, outcome):"},{"line_number":683,"context_line":"        return"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    from keystone import catalog"},{"line_number":686,"context_line":"    service \u003d catalog.controllers.ServiceV3()"},{"line_number":687,"context_line":"    service_list \u003d service.catalog_api.list_services()"},{"line_number":688,"context_line":"    service_id \u003d None"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    for i in service_list:"},{"line_number":691,"context_line":"        if i[\u0027type\u0027] \u003d\u003d SERVICE:"},{"line_number":692,"context_line":"            service_id \u003d i[\u0027id\u0027]"},{"line_number":693,"context_line":"            break"},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    event \u003d eventfactory.EventFactory().new_event("},{"line_number":696,"context_line":"        eventType\u003dcadftype.EVENTTYPE_ACTIVITY,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_5223b505","line":693,"range":{"start_line":685,"start_character":4,"end_line":693,"end_character":17},"updated":"2016-04-12 07:19:35.000000000","message":"This can typically be done with the @requires decorator on a class. However this requires looking up the service from a class or similar, which likely means we need to rework how the data is passed down into this method. \n\nThe import should not be embedded down here, we should avoid importing at runtime like this where at all possible. It is likely a helper object will be needed here that can be instantiated with the catalog_api.  I would do something like this:\n\n\nAt the top of the file, in the appropriate locations:\n\n\n  from keystone.common import dependency\n\n  _CATALOG_HELPER_OBJ \u003d None\n\n\nClass definition for the helper obj, as a note, an __init__ might need to be defined that does nothing but calls super(_CatalogHelperObj, self).__init__() for the injection to work:\n\n\n  @depencency.required(\u0027catalog_api\u0027)\n  class _CatalogHelperObj(object):\n      \"\"\"A helper object to allow lookups of identity service id.\"\"\"\n\n\nIn this method instead of the import, etc:\n\n\n    global _CATALOG_HELPER_OBJ\n\n    if _CATALOG_HELPER_OBJ is None:\n        _CATALOG_HELPER_OBJ \u003d _CatalogHelperObj()\n\n    service_list \u003d _CATALOG_HELPER_OBJ.catalog_api.list_services()\n    service_id \u003d None\n\n    for i in service_list:\n        if i[\u0027type\u0027] \u003d\u003d SERVICE:\n            service_id \u003d i[\u0027id\u0027]\n            break","commit_id":"8517d9b9fe5aaea62348cef3449e930d394d2dc2"},{"author":{"_account_id":19985,"name":"Ryosuke Mizuno","email":"r-mizuno@rs.jp.nec.com","username":"r-mizuno"},"change_message_id":"56d0f3c0ecb7ccda2ec98223a0c57f8c6b8d4d65","unresolved":false,"context_lines":[{"line_number":682,"context_line":"    if _check_notification_opt_out(event_type, outcome):"},{"line_number":683,"context_line":"        return"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    from keystone import catalog"},{"line_number":686,"context_line":"    service \u003d catalog.controllers.ServiceV3()"},{"line_number":687,"context_line":"    service_list \u003d service.catalog_api.list_services()"},{"line_number":688,"context_line":"    service_id \u003d None"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    for i in service_list:"},{"line_number":691,"context_line":"        if i[\u0027type\u0027] \u003d\u003d SERVICE:"},{"line_number":692,"context_line":"            service_id \u003d i[\u0027id\u0027]"},{"line_number":693,"context_line":"            break"},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    event \u003d eventfactory.EventFactory().new_event("},{"line_number":696,"context_line":"        eventType\u003dcadftype.EVENTTYPE_ACTIVITY,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_23bb4874","line":693,"range":{"start_line":685,"start_character":4,"end_line":693,"end_character":17},"in_reply_to":"5a18252c_5223b505","updated":"2016-04-12 08:55:09.000000000","message":"Done","commit_id":"8517d9b9fe5aaea62348cef3449e930d394d2dc2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"1be7c2763f0059f2246ce8aab1ea0b4137f52dc1","unresolved":false,"context_lines":[{"line_number":689,"context_line":"    if _check_notification_opt_out(event_type, outcome):"},{"line_number":690,"context_line":"        return"},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"    global _CATALOG_HELPER_OBJ"},{"line_number":693,"context_line":"    if _CATALOG_HELPER_OBJ is None:"},{"line_number":694,"context_line":"        _CATALOG_HELPER_OBJ \u003d _CatalogHelperObj()"},{"line_number":695,"context_line":"    service_list \u003d _CATALOG_HELPER_OBJ.catalog_api.list_services()"},{"line_number":696,"context_line":"    service_id \u003d None"},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"    for i in service_list:"},{"line_number":699,"context_line":"        if i[\u0027type\u0027] \u003d\u003d SERVICE:"},{"line_number":700,"context_line":"            service_id \u003d i[\u0027id\u0027]"},{"line_number":701,"context_line":"            break"},{"line_number":702,"context_line":""},{"line_number":703,"context_line":"    event \u003d eventfactory.EventFactory().new_event("},{"line_number":704,"context_line":"        eventType\u003dcadftype.EVENTTYPE_ACTIVITY,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_c277d7d2","line":701,"range":{"start_line":692,"start_character":4,"end_line":701,"end_character":17},"updated":"2016-04-12 15:28:10.000000000","message":"This is a lot better IMHO than the previous iteration. :)","commit_id":"b1e6c830b48f6ab08cbb9564e9a8bacd69f81f27"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"1be7c2763f0059f2246ce8aab1ea0b4137f52dc1","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        target\u003dtarget,"},{"line_number":709,"context_line":"        observer\u003dresource.Resource(typeURI\u003dtaxonomy.SERVICE_SECURITY))"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    setattr(event.observer, \u0027identity_id\u0027, service_id)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    for key, value in kwargs.items():"},{"line_number":714,"context_line":"        setattr(event, key, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_a2229bb7","line":711,"updated":"2016-04-12 15:28:10.000000000","message":"Is it possible to do:\n\n  event.observer.identity_id \u003d service_id\n\nor to build this directly in line 709?","commit_id":"b1e6c830b48f6ab08cbb9564e9a8bacd69f81f27"},{"author":{"_account_id":19985,"name":"Ryosuke Mizuno","email":"r-mizuno@rs.jp.nec.com","username":"r-mizuno"},"change_message_id":"c8bcc46edd9cbe5dbc623d88701bc4ccb0209f11","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        target\u003dtarget,"},{"line_number":709,"context_line":"        observer\u003dresource.Resource(typeURI\u003dtaxonomy.SERVICE_SECURITY))"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    setattr(event.observer, \u0027identity_id\u0027, service_id)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    for key, value in kwargs.items():"},{"line_number":714,"context_line":"        setattr(event, key, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_b5cac19f","line":711,"in_reply_to":"5a18252c_a2229bb7","updated":"2016-04-13 01:01:30.000000000","message":"Done","commit_id":"b1e6c830b48f6ab08cbb9564e9a8bacd69f81f27"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"03d55743a2166d446898ecd55eb61eb0aa553671","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        target\u003dtarget,"},{"line_number":709,"context_line":"        observer\u003dresource.Resource(typeURI\u003dtaxonomy.SERVICE_SECURITY))"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    event.observer.identity_id \u003d service_id"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    for key, value in kwargs.items():"},{"line_number":714,"context_line":"        setattr(event, key, value)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a18252c_ac7d53b3","line":711,"range":{"start_line":711,"start_character":4,"end_line":711,"end_character":43},"updated":"2016-04-13 05:46:55.000000000","message":"close, but i think we just want to set the ID, not the identity_id:\n\n  if service_id:\n    event.observer.id \u003d service_id\n\nif service_id is not set, we can continue to use the generated value that pycadf provides","commit_id":"779465ba78de000ed554c445234900bb7d4a223f"}]}
