)]}'
{"nova_powervm/virt/powervm/vif.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5d93c10c638fad338d7bb40534a8f9d44a7fcb6b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    :param extra_detail: Additional key\u003dvalue pairs to be included in the"},{"line_number":101,"context_line":"                         event payload."},{"line_number":102,"context_line":"    \"\"\""},{"line_number":103,"context_line":"    data \u003d \u0027PVM_VIF_ACTION\u0027"},{"line_number":104,"context_line":"    detail \u003d jsonutils.dumps(dict(action\u003daction, mac\u003dmac, **extra_detail))"},{"line_number":105,"context_line":"    try:"},{"line_number":106,"context_line":"        event \u003d pvm_evt.Event.bld(adapter, data, detail).create()"},{"line_number":107,"context_line":"        LOG.info(str(event))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_e207297f","line":104,"range":{"start_line":103,"start_character":0,"end_line":104,"end_character":74},"updated":"2016-09-23 13:07:31.000000000","message":"I don\u0027t like this.  Make the \u0027data\u0027 field the URI of the VIF (CNA/VNIC) to be consistent with other REST object-related Events, and put the \"provider identification\" in a detail field.\n\nIt\u0027s a little bit of chicken-and-egg - the event consumer will have to JSON-parse, bail if that fails, check for the provider field, bail if that fails, then check the field\u0027s value.","commit_id":"d7a629220ef2aa2b589532e5824d0905379ef9cd"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5aa352e562e73bf6a3279ba929b1ac3507b8ccfa","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    :param extra_detail: Additional key\u003dvalue pairs to be included in the"},{"line_number":101,"context_line":"                         event payload."},{"line_number":102,"context_line":"    \"\"\""},{"line_number":103,"context_line":"    data \u003d \u0027PVM_VIF_ACTION\u0027"},{"line_number":104,"context_line":"    detail \u003d jsonutils.dumps(dict(action\u003daction, mac\u003dmac, **extra_detail))"},{"line_number":105,"context_line":"    try:"},{"line_number":106,"context_line":"        event \u003d pvm_evt.Event.bld(adapter, data, detail).create()"},{"line_number":107,"context_line":"        LOG.info(str(event))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_85074f1b","line":104,"range":{"start_line":103,"start_character":0,"end_line":104,"end_character":74},"in_reply_to":"5a8bc5a2_e207297f","updated":"2016-09-23 13:49:09.000000000","message":"Done","commit_id":"d7a629220ef2aa2b589532e5824d0905379ef9cd"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"79ac36abebf9de16fca4431566f2a401fb4a650b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    try:"},{"line_number":110,"context_line":"        event \u003d pvm_evt.Event.bld(adapter, data, detail).create()"},{"line_number":111,"context_line":"        LOG.info(str(event))"},{"line_number":112,"context_line":"    except Exception as e:"},{"line_number":113,"context_line":"        # Best effort"},{"line_number":114,"context_line":"        LOG.exception(e)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def plug(adapter, host_uuid, instance, vif, slot_mgr, new_vif\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_3b277c13","line":114,"range":{"start_line":112,"start_character":0,"end_line":114,"end_character":24},"updated":"2016-09-23 13:55:57.000000000","message":"No, this needs to be fatal, unfortunately.  The consumer code needs to be able to rely on either getting this event, or getting one of the standard \"you need to refetch everything\" indicators from REST.","commit_id":"aea05afb6fb3f7d78b928d21d476c16a25cad798"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"63affc43916f7f36068b4b24e66e96999cb2a8c5","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    try:"},{"line_number":110,"context_line":"        event \u003d pvm_evt.Event.bld(adapter, data, detail).create()"},{"line_number":111,"context_line":"        LOG.info(str(event))"},{"line_number":112,"context_line":"    except Exception as e:"},{"line_number":113,"context_line":"        # Best effort"},{"line_number":114,"context_line":"        LOG.exception(e)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def plug(adapter, host_uuid, instance, vif, slot_mgr, new_vif\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_76f2fbd3","line":114,"range":{"start_line":112,"start_character":0,"end_line":114,"end_character":24},"in_reply_to":"5a8bc5a2_3b277c13","updated":"2016-09-23 14:06:31.000000000","message":"Done","commit_id":"aea05afb6fb3f7d78b928d21d476c16a25cad798"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"acd2aa5e2a866991bdb0369751db0781d736160c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                         event payload."},{"line_number":99,"context_line":"    \"\"\""},{"line_number":100,"context_line":"    data \u003d vif_w.href"},{"line_number":101,"context_line":"    detail \u003d jsonutils.dumps(dict(provider\u003dEVENT_PROVIDER_ID, action\u003daction,"},{"line_number":102,"context_line":"                                  mac\u003dvif_w.mac, **extra_detail))"},{"line_number":103,"context_line":"    event \u003d pvm_evt.Event.bld(adapter, data, detail)"},{"line_number":104,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a8bc5a2_c92cc09b","line":101,"range":{"start_line":101,"start_character":34,"end_line":101,"end_character":60},"updated":"2016-09-26 14:22:36.000000000","message":"We discussed a bit otp.  I like this.  Even if the consumer side doesn\u0027t look at it, I think its important.  That makes it human readable.","commit_id":"01729c1473a6de2dc7cdf0ad99032b206b349397"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"acd2aa5e2a866991bdb0369751db0781d736160c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        LOG.info(_LI(\u0027Custom event push: %s\u0027), str(event))"},{"line_number":107,"context_line":"    except Exception as e:"},{"line_number":108,"context_line":"        LOG.error(_LE(\u0027Custom VIF event push failed.  %s\u0027), str(event))"},{"line_number":109,"context_line":"        LOG.exception(e)"},{"line_number":110,"context_line":"        raise"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a8bc5a2_4e0b562a","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":24},"updated":"2016-09-26 14:22:36.000000000","message":"Generally I wouldn\u0027t log the exception here.  Cause theoretically whatever catches this exception will in fact log it.  Getting double exceptions in the log.\n\nNow if you were changing the exception type, I\u0027d agree.","commit_id":"01729c1473a6de2dc7cdf0ad99032b206b349397"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"85ee4a6b07ffea8ddace6d95bd4815a6dcfc9666","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        LOG.info(_LI(\u0027Custom event push: %s\u0027), str(event))"},{"line_number":107,"context_line":"    except Exception as e:"},{"line_number":108,"context_line":"        LOG.error(_LE(\u0027Custom VIF event push failed.  %s\u0027), str(event))"},{"line_number":109,"context_line":"        LOG.exception(e)"},{"line_number":110,"context_line":"        raise"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a8bc5a2_a4bddb69","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":24},"in_reply_to":"5a8bc5a2_4e0b562a","updated":"2016-09-26 14:31:14.000000000","message":"Done","commit_id":"01729c1473a6de2dc7cdf0ad99032b206b349397"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"acd2aa5e2a866991bdb0369751db0781d736160c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    try:"},{"line_number":171,"context_line":"        vnet_w \u003d vif_drv.unplug(vif, cna_w_list\u003dcna_w_list)"},{"line_number":172,"context_line":"        # Push a custom event, but only if the vif existed in the first place"},{"line_number":173,"context_line":"        if vnet_w is not None:"},{"line_number":174,"context_line":"            _push_vif_event(adapter, \u0027unplug\u0027, vnet_w)"},{"line_number":175,"context_line":"    except pvm_ex.HttpError as he:"},{"line_number":176,"context_line":"        # Log the message constructed by HttpError"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a8bc5a2_84b9bf17","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":29},"updated":"2016-09-26 14:22:36.000000000","message":"Could be simplified to \u0027if vnet_w\u0027?","commit_id":"01729c1473a6de2dc7cdf0ad99032b206b349397"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"85ee4a6b07ffea8ddace6d95bd4815a6dcfc9666","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    try:"},{"line_number":171,"context_line":"        vnet_w \u003d vif_drv.unplug(vif, cna_w_list\u003dcna_w_list)"},{"line_number":172,"context_line":"        # Push a custom event, but only if the vif existed in the first place"},{"line_number":173,"context_line":"        if vnet_w is not None:"},{"line_number":174,"context_line":"            _push_vif_event(adapter, \u0027unplug\u0027, vnet_w)"},{"line_number":175,"context_line":"    except pvm_ex.HttpError as he:"},{"line_number":176,"context_line":"        # Log the message constructed by HttpError"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a8bc5a2_24046b48","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":29},"in_reply_to":"5a8bc5a2_84b9bf17","updated":"2016-09-26 14:31:14.000000000","message":"Could be.  I was going with Zen of Python aphorism #2 (explicit is better than implicit).  In this case there\u0027s little chance of other False values that could be confused (False, [], {}, (), 0, \u0027\u0027).  To match L180, done.","commit_id":"01729c1473a6de2dc7cdf0ad99032b206b349397"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"8c38e36eaa05aaf134cf13e7ae44d0ddc53365c8","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        try:"},{"line_number":312,"context_line":"            cna_w.delete()"},{"line_number":313,"context_line":"        except Exception as e:"},{"line_number":314,"context_line":"            LOG.error(_LE(\u0027Unable to unplug VIF with mac %(mac)s for instance \u0027"},{"line_number":315,"context_line":"                          \u0027%(inst)s.\u0027), {\u0027mac\u0027: vif[\u0027address\u0027],"},{"line_number":316,"context_line":"                                         \u0027inst\u0027: self.instance.name})"},{"line_number":317,"context_line":"            raise exception.VirtualInterfaceUnplugException(reason\u003de.args[0])"},{"line_number":318,"context_line":"        return cna_w"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _find_cna_for_vif(self, cna_w_list, vif):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_bf2c0f03","line":317,"range":{"start_line":314,"start_character":0,"end_line":317,"end_character":77},"updated":"2016-09-30 21:32:00.000000000","message":"Will e.args[0] give us the stack trace of the original exception?","commit_id":"a21665860b7e53565e5693d361523353ee3bbdf0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"130443ac0920aae85fdcc9609052d6330839a4e8","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        try:"},{"line_number":312,"context_line":"            cna_w.delete()"},{"line_number":313,"context_line":"        except Exception as e:"},{"line_number":314,"context_line":"            LOG.error(_LE(\u0027Unable to unplug VIF with mac %(mac)s for instance \u0027"},{"line_number":315,"context_line":"                          \u0027%(inst)s.\u0027), {\u0027mac\u0027: vif[\u0027address\u0027],"},{"line_number":316,"context_line":"                                         \u0027inst\u0027: self.instance.name})"},{"line_number":317,"context_line":"            raise exception.VirtualInterfaceUnplugException(reason\u003de.args[0])"},{"line_number":318,"context_line":"        return cna_w"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _find_cna_for_vif(self, cna_w_list, vif):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_8241b0ab","line":317,"range":{"start_line":314,"start_character":0,"end_line":317,"end_character":77},"in_reply_to":"3a98d1f4_bf2c0f03","updated":"2016-10-01 13:32:51.000000000","message":"Noooo, but LOG.exception does.  Swhy I was doing LOG.exception before.  Should I maybe change the LOG.error to LOG.exception instead?","commit_id":"a21665860b7e53565e5693d361523353ee3bbdf0"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"cbe094576fb158988c76734ef8d579b2c68abb12","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        try:"},{"line_number":312,"context_line":"            cna_w.delete()"},{"line_number":313,"context_line":"        except Exception as e:"},{"line_number":314,"context_line":"            LOG.exception(e)"},{"line_number":315,"context_line":"            raise exception.VirtualInterfaceUnplugException("},{"line_number":316,"context_line":"                _LE(\u0027Unable to unplug VIF with mac %(mac)s for instance \u0027"},{"line_number":317,"context_line":"                    \u0027%(inst)s.\u0027) % {\u0027mac\u0027: vif[\u0027address\u0027],"},{"line_number":318,"context_line":"                                    \u0027inst\u0027: self.instance.name})"},{"line_number":319,"context_line":"        return cna_w"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _find_cna_for_vif(self, cna_w_list, vif):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a95cdbc_412584a9","line":318,"range":{"start_line":314,"start_character":0,"end_line":318,"end_character":64},"updated":"2016-10-04 19:45:27.000000000","message":"Like this format.","commit_id":"4fcf6cfb1edb241692d2b4ab1b47dae7feac5886"}]}
