)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"225a42c2826f0dab4fbb48280de055ac04d4d93e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set default event status to completed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change 70c6b57751cf67f5a2be80d7b2d2123c826a8a68 altered the"},{"line_number":10,"context_line":"processing order of the events which broke logic to populate"},{"line_number":11,"context_line":"the event status as \u0027completed\u0027 by default. This broke the"},{"line_number":12,"context_line":"network changed events from Neutron."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_bdcac86c","line":9,"updated":"2015-06-08 08:20:14.000000000","message":"Sorry, I can\u0027t find out any patch by the change-id 70c6b57751cf67f5a2be80d7b2d2123c826a8a68 , so I don\u0027t know which patch broke the logic.","commit_id":"2af2bc4d6621b1bec58a54359f56e14c250d8417"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"aec99c15536d84f9fdad0efaf83fa9322eb8e42f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Set default event status to completed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change 70c6b57751cf67f5a2be80d7b2d2123c826a8a68 altered the"},{"line_number":10,"context_line":"processing order of the events which broke logic to populate"},{"line_number":11,"context_line":"the event status as \u0027completed\u0027 by default. This broke the"},{"line_number":12,"context_line":"network changed events from Neutron."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3afb71cf_fe04b77e","line":9,"in_reply_to":"3afb71cf_bdcac86c","updated":"2015-06-08 09:14:38.000000000","message":"sorry, looks like a merge snuck into my local fork so my commit sha\u0027s are all different. the change-id is I9a22e53ca872235e723798d8ce3cb146d88568ab. I will update the message","commit_id":"2af2bc4d6621b1bec58a54359f56e14c250d8417"}],"nova/api/openstack/compute/contrib/server_external_events.py":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"225a42c2826f0dab4fbb48280de055ac04d4d93e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            client_event \u003d dict(_event)"},{"line_number":56,"context_line":"            event \u003d objects.InstanceExternalEvent(context)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"            status \u003d client_event.get(\u0027status\u0027, \u0027completed\u0027)"},{"line_number":59,"context_line":"            if status not in external_event_obj.EVENT_STATUSES:"},{"line_number":60,"context_line":"                raise webob.exc.HTTPBadRequest("},{"line_number":61,"context_line":"                    _(\u0027Invalid event status `%s\\\u0027\u0027) % status)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_bd69a827","line":58,"updated":"2015-06-08 08:20:14.000000000","message":"looks like this issue should been fixed in neutron side, changing network had been done, so setting status as \u0027completed\u0027 make sense, and a \u0027None\u0027 status event make me confusing.\n\nMaybe others have different point for this. so no -1 at here.","commit_id":"2af2bc4d6621b1bec58a54359f56e14c250d8417"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"aec99c15536d84f9fdad0efaf83fa9322eb8e42f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            client_event \u003d dict(_event)"},{"line_number":56,"context_line":"            event \u003d objects.InstanceExternalEvent(context)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"            status \u003d client_event.get(\u0027status\u0027, \u0027completed\u0027)"},{"line_number":59,"context_line":"            if status not in external_event_obj.EVENT_STATUSES:"},{"line_number":60,"context_line":"                raise webob.exc.HTTPBadRequest("},{"line_number":61,"context_line":"                    _(\u0027Invalid event status `%s\\\u0027\u0027) % status)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afb71cf_3e948fe0","line":58,"in_reply_to":"3afb71cf_bd69a827","updated":"2015-06-08 09:14:38.000000000","message":"Possibly, but it\u0027s nova that broke the API in this case so I think the right thing to do is to fix it here first. See line 66.\n\nAlso, Neutron isn\u0027t sending a \u0027none\u0027 status, it doesn\u0027t populate the status at all because it doesn\u0027t make much sense in this case. The event in question is \u0027network-changed\u0027 and the status is implied in the name.\n\nIf Nova wants Neutron to always put a status, that can definitely be done, but we need this logic for now just to maintain backward compatibility for upgrades.","commit_id":"2af2bc4d6621b1bec58a54359f56e14c250d8417"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f44e6d09ab92895c766180a7cc6125297b6ad1a8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            try:"},{"line_number":64,"context_line":"                event.instance_uuid \u003d client_event.pop(\u0027server_uuid\u0027)"},{"line_number":65,"context_line":"                event.name \u003d client_event.pop(\u0027name\u0027)"},{"line_number":66,"context_line":"                event.status \u003d client_event.pop(\u0027status\u0027, \u0027completed\u0027)"},{"line_number":67,"context_line":"                event.tag \u003d client_event.pop(\u0027tag\u0027, None)"},{"line_number":68,"context_line":"            except KeyError as missing_key:"},{"line_number":69,"context_line":"                msg \u003d _(\u0027event entity requires key %(key)s\u0027) % missing_key"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_90a6c00e","line":66,"updated":"2015-06-08 15:10:45.000000000","message":"status fields already is Enum. Why we not just let object validate it.\n\nFor example:\n\ntry:\n   event.status \u003d client_event.pop(\u0027status\u0027, \u0027completed\u0027)\ncatch ValueError:\n   raise webob.exc.HTTPBadRequest(.....)\n\n\nAnother thought is can we use default value in the status fields.\n\nThen the __init__ of InstanceExternalEvent accept the dict parameter. We can make the obj get the parameter from the request body directly. And the obj will help on the input validation, make the code more simple.","commit_id":"d22e8747e840421713c02c437b907338696c59d3"}]}
