)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"64455ac1e3ea538a95619813228e21895eb68821","unresolved":false,"context_lines":[{"line_number":9,"context_line":"\u0027getattr\u0027 is really powerful and we make extensive use of it in nova."},{"line_number":10,"context_line":"However, the way we\u0027ve used it for VIF lookup, where we use it to"},{"line_number":11,"context_line":"retrieve functions by a key, seems to be a bit of an anti-pattern. Not"},{"line_number":12,"context_line":"only does it completely breaks static code coverage analysers that we"},{"line_number":13,"context_line":"can use to help us root out code that\u0027s not tested or is tested but is"},{"line_number":14,"context_line":"never used in production but, more importantly, it make it so much more"},{"line_number":15,"context_line":"difficult to figure out what on earth is going on in an already complex"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_2338d2d1","line":12,"range":{"start_line":12,"start_character":24,"end_line":12,"end_character":30},"updated":"2019-07-10 15:16:27.000000000","message":"break","commit_id":"bb82b16baa70cb764edffd064dc9abe4d2731139"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"64455ac1e3ea538a95619813228e21895eb68821","unresolved":false,"context_lines":[{"line_number":11,"context_line":"retrieve functions by a key, seems to be a bit of an anti-pattern. Not"},{"line_number":12,"context_line":"only does it completely breaks static code coverage analysers that we"},{"line_number":13,"context_line":"can use to help us root out code that\u0027s not tested or is tested but is"},{"line_number":14,"context_line":"never used in production but, more importantly, it make it so much more"},{"line_number":15,"context_line":"difficult to figure out what on earth is going on in an already complex"},{"line_number":16,"context_line":"part of the codebase."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_c3345ee1","line":14,"range":{"start_line":14,"start_character":51,"end_line":14,"end_character":55},"updated":"2019-07-10 15:16:27.000000000","message":"makes","commit_id":"bb82b16baa70cb764edffd064dc9abe4d2731139"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"615f5ff4ce6502831ea4aa5b3d2f6c11eaba97bd","unresolved":false,"context_lines":[{"line_number":11,"context_line":"retrieve functions by a key, seems to be a bit of an anti-pattern. Not"},{"line_number":12,"context_line":"only does it completely break static code coverage analysers that we can"},{"line_number":13,"context_line":"use to help us root out code that\u0027s not tested (or is tested but is"},{"line_number":14,"context_line":"never used in production) but, more importantly, it make it so much more"},{"line_number":15,"context_line":"difficult to figure out what on earth is going on in an already complex"},{"line_number":16,"context_line":"part of the codebase."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7faddb67_53176b46","line":14,"range":{"start_line":14,"start_character":52,"end_line":14,"end_character":56},"updated":"2019-07-12 11:51:53.000000000","message":"nit: makes","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"}],"nova/network/os_vif_util.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d14cf0d4f7bd97ff3f37097c48bee4e75475ff64","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                    model.VIF_TYPE_802_QBG, model.VIF_TYPE_802_QBH,"},{"line_number":515,"context_line":"                    model.VIF_TYPE_HW_VEB, model.VIF_TYPE_HOSTDEV,"},{"line_number":516,"context_line":"                    model.VIF_TYPE_IB_HOSTDEV, model.VIF_TYPE_MIDONET,"},{"line_number":517,"context_line":"                    model.VIF_TYPE_TAP, model.VIF_TYPE_MACVTAP):"},{"line_number":518,"context_line":"        # We want to explicitly fall back to the legacy path for these VIF"},{"line_number":519,"context_line":"        # types"},{"line_number":520,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_0eb9efe7","line":517,"updated":"2019-06-21 10:50:38.000000000","message":"I dragged this out to a global as requested on IRC","commit_id":"d77b0a4cdd6a459c123978821b557ac95f49baf8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d14cf0d4f7bd97ff3f37097c48bee4e75475ff64","unresolved":false,"context_lines":[{"line_number":520,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":521,"context_line":"        return None"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    if vif_type in (model.VIF_TYPE_BINDING_FAILED, model.VIF_TYPE_UNBOUND):"},{"line_number":524,"context_line":"        # These aren\u0027t real VIF types. VIF_TYPE_BINDING_FAILED indicates port"},{"line_number":525,"context_line":"        # binding to a host failed and we are trying to plug the VIFs again,"},{"line_number":526,"context_line":"        # which will fail because we do not know the actual real vif type, like"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_cecaf76c","line":523,"updated":"2019-06-21 10:50:38.000000000","message":"And converted this into a set","commit_id":"d77b0a4cdd6a459c123978821b557ac95f49baf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28c74d11d0f9a42b635754480b959a3e4609579f","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":532,"context_line":"        return None"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    if vif_type \u003d\u003d model.VIF_TYPE_OVS:"},{"line_number":535,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_ovs(vif)"},{"line_number":536,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_IVS:"},{"line_number":537,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_ivs(vif)"},{"line_number":538,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_BRIDGE:"},{"line_number":539,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_bridge(vif)"},{"line_number":540,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_AGILIO_OVS:"},{"line_number":541,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_agilio_ovs(vif)"},{"line_number":542,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_VHOSTUSER:"},{"line_number":543,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_vhostuser(vif)"},{"line_number":544,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_VROUTER:"},{"line_number":545,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_vrouter(vif)"},{"line_number":546,"context_line":"    else:"},{"line_number":547,"context_line":"        raise exception.NovaException(\u0027Unsupported VIF type %s\u0027 % vif_type)"},{"line_number":548,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_0b17a153","line":545,"range":{"start_line":534,"start_character":4,"end_line":545,"end_character":49},"updated":"2019-06-21 10:15:55.000000000","message":"i would convert all of these into a table/dict drive\napproch of vif_type to function to do an O(1) lookup instead\nof multiple liniary comparisons.","commit_id":"d77b0a4cdd6a459c123978821b557ac95f49baf8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d14cf0d4f7bd97ff3f37097c48bee4e75475ff64","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":532,"context_line":"        return None"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    if vif_type \u003d\u003d model.VIF_TYPE_OVS:"},{"line_number":535,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_ovs(vif)"},{"line_number":536,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_IVS:"},{"line_number":537,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_ivs(vif)"},{"line_number":538,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_BRIDGE:"},{"line_number":539,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_bridge(vif)"},{"line_number":540,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_AGILIO_OVS:"},{"line_number":541,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_agilio_ovs(vif)"},{"line_number":542,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_VHOSTUSER:"},{"line_number":543,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_vhostuser(vif)"},{"line_number":544,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_VROUTER:"},{"line_number":545,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_vrouter(vif)"},{"line_number":546,"context_line":"    else:"},{"line_number":547,"context_line":"        raise exception.NovaException(\u0027Unsupported VIF type %s\u0027 % vif_type)"},{"line_number":548,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_4ebfe7cf","line":545,"range":{"start_line":534,"start_character":4,"end_line":545,"end_character":49},"in_reply_to":"9fb8cfa7_0b17a153","updated":"2019-06-21 10:50:38.000000000","message":"I looked into this but it felt out-of-place compared to the rest of this file (which is essentially all conditionals)","commit_id":"d77b0a4cdd6a459c123978821b557ac95f49baf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6105867b35a96f635fd1f4e1d4e2a64cd7bf5d55","unresolved":false,"context_lines":[{"line_number":527,"context_line":"        # These aren\u0027t real VIF types. VIF_TYPE_BINDING_FAILED indicates port"},{"line_number":528,"context_line":"        # binding to a host failed and we are trying to plug the VIFs again,"},{"line_number":529,"context_line":"        # which will fail because we do not know the actual real vif type, like"},{"line_number":530,"context_line":"        # VIF_TYPE_OVS, VIF_TYPE_BRIDGE, etc. VIF_TYPE_UNBOUND, by comparison,"},{"line_number":531,"context_line":"        # indicates a port has not been hooked up to the backend network driver"},{"line_number":532,"context_line":"        # (OVS, linux bridge, ...)"},{"line_number":533,"context_line":"        # TODO(stephenfin): We probably want a more meaningful log here"},{"line_number":534,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":535,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_ce78b72c","line":532,"range":{"start_line":530,"start_character":46,"end_line":532,"end_character":34},"updated":"2019-06-21 10:55:04.000000000","message":"that is incorrect.\n\nunbound is the default vif type of a driver when it is not bound to any host. e.g. we have not set the host id in the binding driver.\n\nthis should only happen in error cases but it has nothing to do with if the port is hooked up to a network backend. \n\nit means we have not bound the port or somthing cleared the port binding but we should not have to deal with it in this code unless something went wrong.","commit_id":"07e2d1f2ba1d6107112d205c26d9f46413ef932b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e897dc0ec81eca564d2147765cd6d65272493fbc","unresolved":false,"context_lines":[{"line_number":527,"context_line":"        # These aren\u0027t real VIF types. VIF_TYPE_BINDING_FAILED indicates port"},{"line_number":528,"context_line":"        # binding to a host failed and we are trying to plug the VIFs again,"},{"line_number":529,"context_line":"        # which will fail because we do not know the actual real vif type, like"},{"line_number":530,"context_line":"        # VIF_TYPE_OVS, VIF_TYPE_BRIDGE, etc. VIF_TYPE_UNBOUND, by comparison,"},{"line_number":531,"context_line":"        # indicates a port has not been hooked up to the backend network driver"},{"line_number":532,"context_line":"        # (OVS, linux bridge, ...)"},{"line_number":533,"context_line":"        # TODO(stephenfin): We probably want a more meaningful log here"},{"line_number":534,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":535,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_6ef3cb9f","line":532,"range":{"start_line":530,"start_character":46,"end_line":532,"end_character":34},"in_reply_to":"9fb8cfa7_ce78b72c","updated":"2019-06-21 11:04:55.000000000","message":"Done","commit_id":"07e2d1f2ba1d6107112d205c26d9f46413ef932b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"975373e24a22eb88b1fb64c912b34ee407aebcb8","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        # indicates a port has not been hooked up to the backend network driver"},{"line_number":532,"context_line":"        # (OVS, linux bridge, ...)"},{"line_number":533,"context_line":"        # TODO(stephenfin): We probably want a more meaningful log here"},{"line_number":534,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":535,"context_line":"        return None"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    if vif_type \u003d\u003d model.VIF_TYPE_OVS:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_0eaecf97","line":534,"updated":"2019-06-21 10:51:56.000000000","message":"mriedem will surely have something to say about this","commit_id":"07e2d1f2ba1d6107112d205c26d9f46413ef932b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9a6c8d63d4befc14936e608080fc09cc6ed6a997","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        # is the default VIF type of a driver when it is not bound to any host,"},{"line_number":532,"context_line":"        # i.e. we have not set the host ID in the binding driver. This should"},{"line_number":533,"context_line":"        # also only happen in error cases."},{"line_number":534,"context_line":"        # TODO(stephenfin): We probably want a more meaningful log here"},{"line_number":535,"context_line":"        LOG.debug(\u0027No conversion for VIF type %s yet\u0027, vif_type)"},{"line_number":536,"context_line":"        return None"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_916e3b2d","line":534,"range":{"start_line":534,"start_character":8,"end_line":534,"end_character":71},"updated":"2019-07-12 15:16:58.000000000","message":"agree, but as a pure refactor patch, keeping it the same is good","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6dab1780d2cb860f74670a2ba170b709542bc84","unresolved":false,"context_lines":[{"line_number":546,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_VHOSTUSER:"},{"line_number":547,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_vhostuser(vif)"},{"line_number":548,"context_line":"    elif vif_type \u003d\u003d model.VIF_TYPE_VROUTER:"},{"line_number":549,"context_line":"        vif_obj \u003d _nova_to_osvif_vif_vrouter(vif)"},{"line_number":550,"context_line":"    else:"},{"line_number":551,"context_line":"        raise exception.NovaException(\u0027Unsupported VIF type %s\u0027 % vif_type)"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_50f0abfe","line":549,"updated":"2019-07-15 07:52:11.000000000","message":"these feels llike constructors / factory calls to produce  objects implementing the same interface (plug, unplug, set_config, get_config).","commit_id":"b4f3b2b09f8c836c470065be09be9281c336dec3"}],"nova/virt/libvirt/vif.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"975373e24a22eb88b1fb64c912b34ee407aebcb8","unresolved":false,"context_lines":[{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    def get_config_ib_hostdev(self, instance, vif, image_meta,"},{"line_number":475,"context_line":"                              inst_type, virt_type, host):"},{"line_number":476,"context_line":"        return self.get_base_hostdev_pci_config(vif)"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"    def _set_config_VIFGeneric(self, instance, vif, conf, host):"},{"line_number":479,"context_line":"        dev \u003d vif.vif_name"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_ce8f572c","side":"PARENT","line":476,"updated":"2019-06-21 10:51:56.000000000","message":"I moved this since I missed it the first time because it wasn\u0027t grouped with the rest of the \u0027get_config_foo\u0027 functions","commit_id":"bdb1230c87b2fee32d9f5886060e2a5d6ae52c7e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9a6c8d63d4befc14936e608080fc09cc6ed6a997","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        return conf"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def get_config_ib_hostdev(self, instance, vif, image_meta,"},{"line_number":434,"context_line":"                              inst_type, virt_type, host):"},{"line_number":435,"context_line":"        return self.get_base_hostdev_pci_config(vif)"},{"line_number":436,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_f148cf87","line":433,"updated":"2019-07-12 15:16:58.000000000","message":"why did this move?","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f1697af2f3b1de9e5027a40c9f5cbbf78ea24da5","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        return conf"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"    def get_config_ib_hostdev(self, instance, vif, image_meta,"},{"line_number":434,"context_line":"                              inst_type, virt_type, host):"},{"line_number":435,"context_line":"        return self.get_base_hostdev_pci_config(vif)"},{"line_number":436,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_874cb942","line":433,"in_reply_to":"7faddb67_f148cf87","updated":"2019-07-12 15:39:51.000000000","message":"Refactoring. This is where all the other \u0027get_config_foo\u0027 functions are, and I missed this the first go around because it wasn\u0027t grouped here","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9a6c8d63d4befc14936e608080fc09cc6ed6a997","unresolved":false,"context_lines":[{"line_number":521,"context_line":"    def _set_config_VIFPortProfile(self, instance, vif, conf):"},{"line_number":522,"context_line":"        # Set any port profile that may be required"},{"line_number":523,"context_line":"        profile_name \u003d vif.port_profile.obj_name()"},{"line_number":524,"context_line":"        if profile_name \u003d\u003d \u0027VIFPortProfileOpenVSwitch\u0027:"},{"line_number":525,"context_line":"            self._set_config_VIFPortProfileOpenVSwitch(vif.port_profile, conf)"},{"line_number":526,"context_line":"        else:"},{"line_number":527,"context_line":"            raise exception.InternalError("}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_0c0790cc","line":524,"updated":"2019-07-12 15:16:58.000000000","message":"It is not at all clear to me why this reduction was possible. I went back up the call stack to see if I could find where vif.port_profile.obj_name() should always be VIFPortProfileOpenVSwitch, but couldn\u0027t.\n\nLike (and I\u0027m probably going to show my network-y ignorance here) why couldn\u0027t it be a VIFPortProfileFPOpenVSwitch or a VIFPortProfileOVSRepresentor?\n\n[Later] Okay, we only have the one _set_config_VIFPortProfile.+ method, so as long as a given vif.port_profile.obj_name() is always called VIFPortProfile.+ this makes sense. Is it?","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f1697af2f3b1de9e5027a40c9f5cbbf78ea24da5","unresolved":false,"context_lines":[{"line_number":521,"context_line":"    def _set_config_VIFPortProfile(self, instance, vif, conf):"},{"line_number":522,"context_line":"        # Set any port profile that may be required"},{"line_number":523,"context_line":"        profile_name \u003d vif.port_profile.obj_name()"},{"line_number":524,"context_line":"        if profile_name \u003d\u003d \u0027VIFPortProfileOpenVSwitch\u0027:"},{"line_number":525,"context_line":"            self._set_config_VIFPortProfileOpenVSwitch(vif.port_profile, conf)"},{"line_number":526,"context_line":"        else:"},{"line_number":527,"context_line":"            raise exception.InternalError("}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_276705c0","line":524,"in_reply_to":"7faddb67_0c0790cc","updated":"2019-07-12 15:39:51.000000000","message":"Correct. This is the same behavior we had previously so if it was broken before, it continues to be broken","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9a6c8d63d4befc14936e608080fc09cc6ed6a997","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        elif isinstance(vif, osv_vifs.VIFVHostUser):"},{"line_number":558,"context_line":"            self._set_config_VIFVHostUser(instance, vif, conf, host)"},{"line_number":559,"context_line":"        elif isinstance(vif, osv_vifs.VIFHostDevice):"},{"line_number":560,"context_line":"            self._set_config_VIFHostDevice(instance, vif, conf, host)"},{"line_number":561,"context_line":"        else:"},{"line_number":562,"context_line":"            raise exception.InternalError("},{"line_number":563,"context_line":"                _(\"Unsupported VIF type %s\") % vif.obj_name())"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_acb0bc8b","line":560,"updated":"2019-07-12 15:16:58.000000000","message":"I think I\u0027m getting the hang of this. Based on the subclasses of VIFBase, of which there are seven, only these five have corresponding _set_config_* methods.\n\nThis whole setup smells like it should have been done more OO. Like, why can\u0027t VIFBase declare a set_config() with a default impl of `raise NotImplemented` and then the above referenced impls are just in overrides in their respective objects?","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f1697af2f3b1de9e5027a40c9f5cbbf78ea24da5","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        elif isinstance(vif, osv_vifs.VIFVHostUser):"},{"line_number":558,"context_line":"            self._set_config_VIFVHostUser(instance, vif, conf, host)"},{"line_number":559,"context_line":"        elif isinstance(vif, osv_vifs.VIFHostDevice):"},{"line_number":560,"context_line":"            self._set_config_VIFHostDevice(instance, vif, conf, host)"},{"line_number":561,"context_line":"        else:"},{"line_number":562,"context_line":"            raise exception.InternalError("},{"line_number":563,"context_line":"                _(\"Unsupported VIF type %s\") % vif.obj_name())"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_e711ed05","line":560,"in_reply_to":"7faddb67_acb0bc8b","updated":"2019-07-12 15:39:51.000000000","message":"These objects are defined in os-vif which can\u0027t have any virt-specific information defined in it, thus we\u0027d need to subclass each class separately or just do this. This seems easier.","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9a6c8d63d4befc14936e608080fc09cc6ed6a997","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":619,"context_line":"            return self.get_config_tap(*args)"},{"line_number":620,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_IB_HOSTDEV:"},{"line_number":621,"context_line":"            return self.get_config_ib_hostdev(*args)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        raise exception.InternalError(_(\u0027Unexpected vif_type\u003d%s\u0027) % vif_type)"},{"line_number":624,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_8714b945","line":621,"updated":"2019-07-12 15:16:58.000000000","message":"similarly here, of the 20-ish VIF_TYPE_* consts, we only have corresponding get_config_* methods for the ones above.","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f1697af2f3b1de9e5027a40c9f5cbbf78ea24da5","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":619,"context_line":"            return self.get_config_tap(*args)"},{"line_number":620,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_IB_HOSTDEV:"},{"line_number":621,"context_line":"            return self.get_config_ib_hostdev(*args)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        raise exception.InternalError(_(\u0027Unexpected vif_type\u003d%s\u0027) % vif_type)"},{"line_number":624,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_c725d15d","line":621,"in_reply_to":"7faddb67_8714b945","updated":"2019-07-12 15:39:51.000000000","message":"This one we could change but, tbh, this whole section should already be gone, replaced by os-vif plugins. I\u0027d rather just do the same thing for both VIF types","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":25733,"name":"Jan Gutter","email":"github@jangutter.com","username":"jangutter"},"change_message_id":"34a93f947bb927bbb24f5e54fd6c9692797ae274","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self.plug_iovisor(instance, vif)"},{"line_number":748,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":749,"context_line":"            self.plug_tap(instance, vif)"},{"line_number":750,"context_line":"        elif vif_type in {network_model.VIF_TYPE_802_QBG,"},{"line_number":751,"context_line":"                          network_model.VIF_TYPE_802_QBH,"},{"line_number":752,"context_line":"                          network_model.VIF_TYPE_HOSTDEV,"},{"line_number":753,"context_line":"                          network_model.VIF_TYPE_VHOSTUSER}:"},{"line_number":754,"context_line":"            # These are no-ops"},{"line_number":755,"context_line":"            pass"},{"line_number":756,"context_line":"        else:"},{"line_number":757,"context_line":"            raise exception.VirtualInterfacePlugException("},{"line_number":758,"context_line":"                _(\"Plug VIF failed because of unexpected \""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_9375e3cd","line":755,"range":{"start_line":750,"start_character":8,"end_line":755,"end_character":16},"updated":"2019-07-12 12:47:07.000000000","message":"this is specifically awesome since there is a no-op os-vif plugin that could be used for these.","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"252b0196a2c65b1ef8cdd72e7c9748102e30772d","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self.plug_iovisor(instance, vif)"},{"line_number":748,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":749,"context_line":"            self.plug_tap(instance, vif)"},{"line_number":750,"context_line":"        elif vif_type in {network_model.VIF_TYPE_802_QBG,"},{"line_number":751,"context_line":"                          network_model.VIF_TYPE_802_QBH,"},{"line_number":752,"context_line":"                          network_model.VIF_TYPE_HOSTDEV,"},{"line_number":753,"context_line":"                          network_model.VIF_TYPE_VHOSTUSER}:"},{"line_number":754,"context_line":"            # These are no-ops"},{"line_number":755,"context_line":"            pass"},{"line_number":756,"context_line":"        else:"},{"line_number":757,"context_line":"            raise exception.VirtualInterfacePlugException("},{"line_number":758,"context_line":"                _(\"Plug VIF failed because of unexpected \""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_d62a692a","line":755,"range":{"start_line":750,"start_character":8,"end_line":755,"end_character":16},"in_reply_to":"7faddb67_9375e3cd","updated":"2019-07-12 13:11:50.000000000","message":"actully the vhost-user one is ment to already be using the noop plugin. \nhttps://review.opendev.org/#/c/565471/\n\nso that is not needed here as it will be handeled by\n_plug_os_vif","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f1697af2f3b1de9e5027a40c9f5cbbf78ea24da5","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self.plug_iovisor(instance, vif)"},{"line_number":748,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":749,"context_line":"            self.plug_tap(instance, vif)"},{"line_number":750,"context_line":"        elif vif_type in {network_model.VIF_TYPE_802_QBG,"},{"line_number":751,"context_line":"                          network_model.VIF_TYPE_802_QBH,"},{"line_number":752,"context_line":"                          network_model.VIF_TYPE_HOSTDEV,"},{"line_number":753,"context_line":"                          network_model.VIF_TYPE_VHOSTUSER}:"},{"line_number":754,"context_line":"            # These are no-ops"},{"line_number":755,"context_line":"            pass"},{"line_number":756,"context_line":"        else:"},{"line_number":757,"context_line":"            raise exception.VirtualInterfacePlugException("},{"line_number":758,"context_line":"                _(\"Plug VIF failed because of unexpected \""}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_e7e9edb6","line":755,"range":{"start_line":750,"start_character":8,"end_line":755,"end_character":16},"in_reply_to":"7faddb67_d62a692a","updated":"2019-07-12 15:39:51.000000000","message":"Done","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9a6c8d63d4befc14936e608080fc09cc6ed6a997","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_HW_VEB:"},{"line_number":860,"context_line":"            self.unplug_hw_veb(instance, vif)"},{"line_number":861,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_MACVTAP:"},{"line_number":862,"context_line":"            self.unplug_macvtap(instance, vif)"},{"line_number":863,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_MIDONET:"},{"line_number":864,"context_line":"            self.unplug_midonet(instance, vif)"},{"line_number":865,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_IOVISOR:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_873d99c5","line":862,"range":{"start_line":862,"start_character":12,"end_line":862,"end_character":46},"updated":"2019-07-12 15:16:58.000000000","message":"this method doesn\u0027t exist, should be in the `pass` section (cf. @a779)","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f1697af2f3b1de9e5027a40c9f5cbbf78ea24da5","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_HW_VEB:"},{"line_number":860,"context_line":"            self.unplug_hw_veb(instance, vif)"},{"line_number":861,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_MACVTAP:"},{"line_number":862,"context_line":"            self.unplug_macvtap(instance, vif)"},{"line_number":863,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_MIDONET:"},{"line_number":864,"context_line":"            self.unplug_midonet(instance, vif)"},{"line_number":865,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_IOVISOR:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7faddb67_c7e4f1e2","line":862,"range":{"start_line":862,"start_character":12,"end_line":862,"end_character":46},"in_reply_to":"7faddb67_873d99c5","updated":"2019-07-12 15:39:51.000000000","message":"Done","commit_id":"821df7c27f76d9ca2f9631ead7e35d3cc8a1019e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6dab1780d2cb860f74670a2ba170b709542bc84","unresolved":false,"context_lines":[{"line_number":558,"context_line":"            self._set_config_VIFVHostUser(instance, vif, conf, host)"},{"line_number":559,"context_line":"        elif isinstance(vif, osv_vifs.VIFHostDevice):"},{"line_number":560,"context_line":"            self._set_config_VIFHostDevice(instance, vif, conf, host)"},{"line_number":561,"context_line":"        else:"},{"line_number":562,"context_line":"            raise exception.InternalError("},{"line_number":563,"context_line":"                _(\"Unsupported VIF type %s\") % vif.obj_name())"},{"line_number":564,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_70b60741","line":561,"updated":"2019-07-15 07:52:11.000000000","message":"these set_config_* functions really feels like different implementations of the same interface.","commit_id":"b4f3b2b09f8c836c470065be09be9281c336dec3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6dab1780d2cb860f74670a2ba170b709542bc84","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":619,"context_line":"            return self.get_config_tap(*args)"},{"line_number":620,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_IB_HOSTDEV:"},{"line_number":621,"context_line":"            return self.get_config_ib_hostdev(*args)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        raise exception.InternalError(_(\u0027Unexpected vif_type\u003d%s\u0027) % vif_type)"},{"line_number":624,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_30864f68","line":621,"updated":"2019-07-15 07:52:11.000000000","message":"ditto with the get_config_*","commit_id":"b4f3b2b09f8c836c470065be09be9281c336dec3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6dab1780d2cb860f74670a2ba170b709542bc84","unresolved":false,"context_lines":[{"line_number":746,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_IOVISOR:"},{"line_number":747,"context_line":"            self.plug_iovisor(instance, vif)"},{"line_number":748,"context_line":"        elif vif_type \u003d\u003d network_model.VIF_TYPE_TAP:"},{"line_number":749,"context_line":"            self.plug_tap(instance, vif)"},{"line_number":750,"context_line":"        elif vif_type in {network_model.VIF_TYPE_802_QBG,"},{"line_number":751,"context_line":"                          network_model.VIF_TYPE_802_QBH,"},{"line_number":752,"context_line":"                          network_model.VIF_TYPE_HOSTDEV}:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_508bcb6c","line":749,"updated":"2019-07-15 07:52:11.000000000","message":"ditto whit the plug_*","commit_id":"b4f3b2b09f8c836c470065be09be9281c336dec3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c6dab1780d2cb860f74670a2ba170b709542bc84","unresolved":false,"context_lines":[{"line_number":866,"context_line":"        elif vif_type in {network_model.VIF_TYPE_802_QBG,"},{"line_number":867,"context_line":"                          network_model.VIF_TYPE_802_QBH,"},{"line_number":868,"context_line":"                          network_model.VIF_TYPE_HOSTDEV,"},{"line_number":869,"context_line":"                          network_model.VIF_TYPE_MACVTAP}:"},{"line_number":870,"context_line":"            # These are no-ops"},{"line_number":871,"context_line":"            pass"},{"line_number":872,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_1081d34a","line":869,"updated":"2019-07-15 07:52:11.000000000","message":"and unplug_*","commit_id":"b4f3b2b09f8c836c470065be09be9281c336dec3"}]}
