)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a013f29f25374852fbd5e4a1a634489a6096f444","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Andreas Scheuring \u003candreas.scheuring@de.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-07 13:44:33 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add macvtap as new virtual interface (vif) type to Nova\u0027s libvirt"},{"line_number":8,"context_line":"driver."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"This is required in order to attach libvirt managed KVM guests via macvtap"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba3cc151_6ef5fc4e","line":7,"updated":"2015-07-09 15:28:59.000000000","message":"This should be under 80 characters.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"1879ff9f1665fb678f377c68a46b10ced309668a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Andreas Scheuring \u003candreas.scheuring@de.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-07 13:44:33 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add macvtap as new virtual interface (vif) type to Nova\u0027s libvirt"},{"line_number":8,"context_line":"driver."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"This is required in order to attach libvirt managed KVM guests via macvtap"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba3cc151_7fbda4af","line":7,"in_reply_to":"ba3cc151_6ef5fc4e","updated":"2015-07-09 16:09:48.000000000","message":"made it to a single line. is still under 80 (if my vi is couting correctly :)","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Andreas Scheuring \u003candreas.scheuring@de.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-15 12:33:11 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add macvtap as new virtual interface (vif) type to Nova\u0027s libvirt driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is required in order to attach libvirt managed KVM guests via macvtap"},{"line_number":10,"context_line":"to the hosts network. It will be exploited by a new macvtap ml2 plugin and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9a41bdd9_e96b76b7","line":7,"updated":"2015-07-15 11:38:55.000000000","message":"Please add prefix libvirt here","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3314a028a1f9335523b9a81cf42a6e856a69db44","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Andreas Scheuring \u003candreas.scheuring@de.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-16 08:35:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add macvtap as libvirt virtual interface (vif) type to Nova\u0027s libvirt driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is required in order to attach libvirt managed KVM guests via macvtap"},{"line_number":10,"context_line":"to the hosts network. It will be exploited by a new macvtap ml2 plugin and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a41bdd9_93e3ac05","line":7,"updated":"2015-07-16 15:00:54.000000000","message":"libvirt was already in the commit message, but oh well.","commit_id":"8dfff90dce5ca32b605e679e1336313f1714d16d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9d470d7d0498365a1dc1dfb9c1f3a1415ca5c386","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to the hosts network. It will be exploited by a new macvtap ml2 plugin and"},{"line_number":11,"context_line":"agent. The place for this new support is currently discussed [1]."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"[1] https://review.openstack.org/#/c/195907/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implements blueprint libvirt-macvtap-vif"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a50d1a3_97e405e0","line":13,"updated":"2015-07-29 20:25:15.000000000","message":"The latest comments in here make it sound like things are up in the air as to where the neutron side of this code lives - so it seems we should hold off on landing the code in nova until the neutron piece is in place, or am I missing something?","commit_id":"f9913a44bb1bb60816c06eb32455e5b3dc3df5f8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b447fba147a47d2ca109ad96cd547e4ee575f05c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"to the hosts network. It will be exploited by a new macvtap ml2 plugin and"},{"line_number":11,"context_line":"agent. The place for this new support is currently discussed [1]."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"[1] https://review.openstack.org/#/c/195907/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implements blueprint libvirt-macvtap-vif"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a50d1a3_926ba11f","line":13,"in_reply_to":"3a50d1a3_97e405e0","updated":"2015-07-30 07:51:46.000000000","message":"So this is the typical chicken-egg problem, isn\u0027t it?\nI\u0027ll elaborate on the patch mentioned above and in parallel try to clarify things via the ML today. Thanks","commit_id":"f9913a44bb1bb60816c06eb32455e5b3dc3df5f8"}],"nova/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":748,"context_line":""},{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s\")"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"class DatastoreNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_7c42b910","line":751,"updated":"2015-07-09 01:30:10.000000000","message":"Does anyone know how to recover from this or what to check - how does one get into this state?  Is there something we can add to the error message that gives hints on what to check?","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f89e5ee6aaf2e8e83e15b18dc424db5072773add","unresolved":false,"context_lines":[{"line_number":748,"context_line":""},{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s\")"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"class DatastoreNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_4e1ef8bb","line":751,"in_reply_to":"ba3cc151_7c42b910","updated":"2015-07-09 15:27:13.000000000","message":"As discussed in IRC, if there is a configuration that is controlling these parameters, then there is the chance for user error and we should point out something like \u0027check xyz config\u0027 or \u0027Ensure x and y are properly configured in z and then try again.\u0027","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":748,"context_line":""},{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s\")"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"class DatastoreNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_bebeee62","line":751,"in_reply_to":"ba3cc151_7c42b910","updated":"2015-07-09 15:47:50.000000000","message":"Recover by the Openstack User is not possible it requires an administrator or even a programmer! \n\nIf this information is missing, the ml2 plugin did just not add the value (or a None value) which is a code bug. Alternatively the neutron config was not set up correctly, but this also should be handled on the neutron side.\n\nMost of the other vifs do NOT do such a checking and just assume everything is correct (e.g. hw_veb). I\u0027ve seen this exception thing with vif_type vhost_user and thought it would be helpful to have such an additional checking as well. \n\nIf no checking would be done and \n- the \u0027macvtap_mode\u0027 parameter returns None, defining the domain.xml would fail (unsupported configuration: ....).\n- the \u0027macvtap_src\u0027 is None and flat is being used, defining the domain.xml would fail (unsupported configuration: ....).\n- the \u0027macvtap_src\u0027 is None and vlan is being used, the vlan device creation on plug would fail (before defining the xml)","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4748150bf76275d176aee6ce65b4636ae72bd7e","unresolved":false,"context_lines":[{"line_number":748,"context_line":""},{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s\")"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"class DatastoreNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_c5914cf3","line":751,"in_reply_to":"ba3cc151_bebeee62","updated":"2015-07-10 15:38:04.000000000","message":"\"Alternatively the neutron config was not set up correctly\" - couldn\u0027t we point that out in the exception message?  The end user doesn\u0027t see any of this, they just see that the instance went to error state during boot while allocating network - maybe they get an InstanceFault, not sure though.\n\nThe admin could definitely see it in the logs though and the admin is the one that is configuring neutron to use this, so giving them a hint as to what is wrong and go check is useful in my opinion, so that\u0027s what I was asking for here.\n\nI don\u0027t know enough about how this is configured in neutron, but if it\u0027s actually a .conf or .ini file that\u0027s set for this to work, then I\u0027d think we could point that out in the error message (or add the validation to neutron plugin code so that before nova even ever gets the vif_details it blows up on the neutron side and provides the hint/details there for fixing the configs).  That would probably lead to a timeout in the nova side waiting for vif plugging to complete, which would also put the instance into error state and is at least an indication to the admin to go check the neutron logs.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":748,"context_line":""},{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s. Check your Neutron-agent\""},{"line_number":752,"context_line":"                \" configuration if macvtap parameters are provided correctly.\")"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_a9980ec1","line":751,"updated":"2015-07-15 11:38:55.000000000","message":"what if there is no neutron agent running - for example if a SDN controller is being used?","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b1da3595d373b7ef944388a60d7ded51e00c9f3a","unresolved":false,"context_lines":[{"line_number":748,"context_line":""},{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s. Check your Neutron-agent\""},{"line_number":752,"context_line":"                \" configuration if macvtap parameters are provided correctly.\")"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_93ad279d","line":751,"in_reply_to":"9a41bdd9_a9980ec1","updated":"2015-07-15 16:22:48.000000000","message":"Changed it to just Neutron. I\u0027m expecting a potential SDN controller to be integrated in Neutron as well.","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s. Check your Neutron-agent\""},{"line_number":752,"context_line":"                \" configuration if macvtap parameters are provided correctly.\")"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"class DatastoreNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_2984fe5b","line":752,"updated":"2015-07-15 11:38:55.000000000","message":"\"configuration if macvtap parameters are provided correctly\"\ncould we change this to:\nconfiguration to validate that the macvtap parameters are correct","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b1da3595d373b7ef944388a60d7ded51e00c9f3a","unresolved":false,"context_lines":[{"line_number":749,"context_line":"class VifDetailsMissingMacvtapParameters(Invalid):"},{"line_number":750,"context_line":"    msg_fmt \u003d _(\"Parameters %(missing_params)s not present in\""},{"line_number":751,"context_line":"                \" vif_details for vif %(vif_id)s. Check your Neutron-agent\""},{"line_number":752,"context_line":"                \" configuration if macvtap parameters are provided correctly.\")"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"class DatastoreNotFound(NotFound):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_b39e2bb7","line":752,"in_reply_to":"9a41bdd9_2984fe5b","updated":"2015-07-15 16:22:48.000000000","message":"Done","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"}],"nova/network/linux_net.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"584eec871fa43939437665a9a834c4d8d7bb81fe","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"    def ensure_vlan(vlan_num, bridge_interface, mac_address\u003dNone, mtu\u003dNone,"},{"line_number":1553,"context_line":"                    interface\u003dNone):"},{"line_number":1554,"context_line":"        \"\"\"Create a vlan unless it already exists.\"\"\""},{"line_number":1555,"context_line":"        if interface is None:"},{"line_number":1556,"context_line":"            interface \u003d \u0027vlan%s\u0027 % vlan_num"},{"line_number":1557,"context_line":"        if not device_exists(interface):"},{"line_number":1558,"context_line":"            LOG.debug(\u0027Starting VLAN interface %s\u0027, interface)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_70011c6a","line":1555,"updated":"2015-07-10 16:00:41.000000000","message":"Where is this unit tested?  test_vif mocks this method out.\n\nAdd something simple here please:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/network/test_linux_net.py\n\nThe test could be small if you mock out device_exists to return True and mock out _set_device_mtu().","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c02cbcb8bdd5a3c4fa977ba59772680869a57c5b","unresolved":false,"context_lines":[{"line_number":1552,"context_line":"    def ensure_vlan(vlan_num, bridge_interface, mac_address\u003dNone, mtu\u003dNone,"},{"line_number":1553,"context_line":"                    interface\u003dNone):"},{"line_number":1554,"context_line":"        \"\"\"Create a vlan unless it already exists.\"\"\""},{"line_number":1555,"context_line":"        if interface is None:"},{"line_number":1556,"context_line":"            interface \u003d \u0027vlan%s\u0027 % vlan_num"},{"line_number":1557,"context_line":"        if not device_exists(interface):"},{"line_number":1558,"context_line":"            LOG.debug(\u0027Starting VLAN interface %s\u0027, interface)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_2539ed41","line":1555,"in_reply_to":"ba3cc151_70011c6a","updated":"2015-07-14 07:53:24.000000000","message":"Added test method covering maximum set of arguments. \n\nThis method seems to belong to the nova networking code. Do you think I should avoid reusing this code and create my own method in vif.py instead?","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"}],"nova/network/model.py":[{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"d50fd8a635b77527da4e5c226e5bfc9c5615a4cf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# The following two constants define the SR-IOV and macvtap related fields in"},{"line_number":57,"context_line":"# the \u0027vif_details\u0027. \u0027vlan\u0027 for VIF_TYPE_HW_VEB or VIF_TYPE_MACVTAP"},{"line_number":58,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# The following two constants define the macvtap related fields in"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_69395dd8","line":57,"updated":"2015-07-03 18:23:24.000000000","message":"Seems a bit confused here.   There aren\u0027t two following constants, and \"\u0027vlan\u0027 for VIF_TYPE_HW_VEB or VIF_TYPE_MACVTAP\" isn\u0027t a sentence.","commit_id":"89f77b0d05a16b7b1d4330819930a80ebd3e9502"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"2c0cffca982084893dc15f13d2c5c1868e086bbc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# The following two constants define the SR-IOV and macvtap related fields in"},{"line_number":57,"context_line":"# the \u0027vif_details\u0027. \u0027vlan\u0027 for VIF_TYPE_HW_VEB or VIF_TYPE_MACVTAP"},{"line_number":58,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# The following two constants define the macvtap related fields in"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_e4ed408f","line":57,"in_reply_to":"ba3cc151_32e163ff","updated":"2015-07-07 09:27:08.000000000","message":"Thanks, comments here are much clearer now (patch set 7).","commit_id":"89f77b0d05a16b7b1d4330819930a80ebd3e9502"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"548c28889b7f17047d0e09cfbbf79847c9ca255e","unresolved":false,"context_lines":[{"line_number":54,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# The following two constants define the SR-IOV and macvtap related fields in"},{"line_number":57,"context_line":"# the \u0027vif_details\u0027. \u0027vlan\u0027 for VIF_TYPE_HW_VEB or VIF_TYPE_MACVTAP"},{"line_number":58,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# The following two constants define the macvtap related fields in"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_32e163ff","line":57,"in_reply_to":"ba3cc151_69395dd8","updated":"2015-07-06 07:51:09.000000000","message":"makes sense - c\u0026p issue. Done","commit_id":"89f77b0d05a16b7b1d4330819930a80ebd3e9502"}],"nova/tests/unit/network/test_linux_net.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c12c8147b73b2c8c314ba2d5c36330a96ad4888","unresolved":false,"context_lines":[{"line_number":1370,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock__set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock__execute):"},{"line_number":1373,"context_line":"        linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027, \u0027MAC\u0027,"},{"line_number":1374,"context_line":"                                                         \u0027MTU\u0027, \"vlan_name\")"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":"        self.assertTrue(mock_device_exists.called)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_e11bb871","line":1373,"updated":"2015-07-14 18:15:52.000000000","message":"You could assert that \u0027vlan_name\u0027 is returned from this method.","commit_id":"bf372869d90e8aadf5cba14a55ba75a6912b5979"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"6a17bf4443df430b5331ec95a670a0b1930a97ed","unresolved":false,"context_lines":[{"line_number":1370,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock__set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock__execute):"},{"line_number":1373,"context_line":"        linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027, \u0027MAC\u0027,"},{"line_number":1374,"context_line":"                                                         \u0027MTU\u0027, \"vlan_name\")"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":"        self.assertTrue(mock_device_exists.called)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_0cea6dac","line":1373,"in_reply_to":"9a41bdd9_e11bb871","updated":"2015-07-15 10:31:38.000000000","message":"Done","commit_id":"bf372869d90e8aadf5cba14a55ba75a6912b5979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c12c8147b73b2c8c314ba2d5c36330a96ad4888","unresolved":false,"context_lines":[{"line_number":1373,"context_line":"        linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027, \u0027MAC\u0027,"},{"line_number":1374,"context_line":"                                                         \u0027MTU\u0027, \"vlan_name\")"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":"        self.assertTrue(mock_device_exists.called)"},{"line_number":1377,"context_line":"        expected_execute_args \u003d ["},{"line_number":1378,"context_line":"            mock.call(\u0027ip\u0027, \u0027link\u0027, \u0027add\u0027, \u0027link\u0027, \u0027eth0\u0027, \u0027name\u0027, \u0027vlan_name\u0027,"},{"line_number":1379,"context_line":"                      \u0027type\u0027, \u0027vlan\u0027, \u0027id\u0027, 1, check_exit_code\u003d[0, 2, 254],"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_9dc32eed","line":1376,"updated":"2015-07-14 18:15:52.000000000","message":"Since interface is optional but you\u0027re passing \u0027vlan_name\u0027 in here, I\u0027d be more explicit here:\n\nmock_device_exists.assert_called_once_with(\u0027vlan_name\u0027)\n\nOtherwise it\u0027d be vlan1 if you didn\u0027t pass in in the interface.\n\nHonestly, however, this probably doesn\u0027t matter given you have asserted the expected calls to mock__execute which has the vlan_name interface in it.","commit_id":"bf372869d90e8aadf5cba14a55ba75a6912b5979"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"6a17bf4443df430b5331ec95a670a0b1930a97ed","unresolved":false,"context_lines":[{"line_number":1373,"context_line":"        linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027, \u0027MAC\u0027,"},{"line_number":1374,"context_line":"                                                         \u0027MTU\u0027, \"vlan_name\")"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":"        self.assertTrue(mock_device_exists.called)"},{"line_number":1377,"context_line":"        expected_execute_args \u003d ["},{"line_number":1378,"context_line":"            mock.call(\u0027ip\u0027, \u0027link\u0027, \u0027add\u0027, \u0027link\u0027, \u0027eth0\u0027, \u0027name\u0027, \u0027vlan_name\u0027,"},{"line_number":1379,"context_line":"                      \u0027type\u0027, \u0027vlan\u0027, \u0027id\u0027, 1, check_exit_code\u003d[0, 2, 254],"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_acd34103","line":1376,"in_reply_to":"9a41bdd9_9dc32eed","updated":"2015-07-15 10:31:38.000000000","message":"Done","commit_id":"bf372869d90e8aadf5cba14a55ba75a6912b5979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c12c8147b73b2c8c314ba2d5c36330a96ad4888","unresolved":false,"context_lines":[{"line_number":1383,"context_line":"            mock.call(\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027, \u0027vlan_name\u0027, \u0027up\u0027,"},{"line_number":1384,"context_line":"                      check_exit_code\u003d[0, 2, 254], run_as_root\u003dTrue)]"},{"line_number":1385,"context_line":"        self.assertEqual(expected_execute_args, mock__execute.mock_calls)"},{"line_number":1386,"context_line":"        self.assertTrue(mock__set_device_mtu.called)"},{"line_number":1387,"context_line":""},{"line_number":1388,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":1389,"context_line":"    @mock.patch(\u0027nova.utils.execute\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_bd04f217","line":1386,"updated":"2015-07-14 18:15:52.000000000","message":"Change this to:\n\nmock__set_device_mtu.assert_called_once_with(\u0027vlan_name\u0027, \u0027MTU\u0027)","commit_id":"bf372869d90e8aadf5cba14a55ba75a6912b5979"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"6a17bf4443df430b5331ec95a670a0b1930a97ed","unresolved":false,"context_lines":[{"line_number":1383,"context_line":"            mock.call(\u0027ip\u0027, \u0027link\u0027, \u0027set\u0027, \u0027vlan_name\u0027, \u0027up\u0027,"},{"line_number":1384,"context_line":"                      check_exit_code\u003d[0, 2, 254], run_as_root\u003dTrue)]"},{"line_number":1385,"context_line":"        self.assertEqual(expected_execute_args, mock__execute.mock_calls)"},{"line_number":1386,"context_line":"        self.assertTrue(mock__set_device_mtu.called)"},{"line_number":1387,"context_line":""},{"line_number":1388,"context_line":"    @mock.patch(\u0027os.path.exists\u0027, return_value\u003dTrue)"},{"line_number":1389,"context_line":"    @mock.patch(\u0027nova.utils.execute\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_6cd9b921","line":1386,"in_reply_to":"9a41bdd9_bd04f217","updated":"2015-07-15 10:31:38.000000000","message":"Done","commit_id":"bf372869d90e8aadf5cba14a55ba75a6912b5979"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":1368,"context_line":"    @mock.patch.object(linux_net, \u0027_execute\u0027)"},{"line_number":1369,"context_line":"    @mock.patch.object(linux_net, \u0027device_exists\u0027, return_value\u003dFalse)"},{"line_number":1370,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock__set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock__execute):"},{"line_number":1373,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027,"},{"line_number":1374,"context_line":"                                                                   \u0027MAC\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_29d2be5c","line":1371,"updated":"2015-07-15 11:38:55.000000000","message":"why the __ and not _","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b1da3595d373b7ef944388a60d7ded51e00c9f3a","unresolved":false,"context_lines":[{"line_number":1368,"context_line":"    @mock.patch.object(linux_net, \u0027_execute\u0027)"},{"line_number":1369,"context_line":"    @mock.patch.object(linux_net, \u0027device_exists\u0027, return_value\u003dFalse)"},{"line_number":1370,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock__set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock__execute):"},{"line_number":1373,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027,"},{"line_number":1374,"context_line":"                                                                   \u0027MAC\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_1346f74e","line":1371,"in_reply_to":"9a41bdd9_29d2be5c","updated":"2015-07-15 16:22:48.000000000","message":"this is as I\u0027m mocking the _execute method. And the pattern I used was mock_\u003cmethod-to-mock\u003e.\n\nBut I looked a little bit odd to me as well - so changed it.","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    @mock.patch.object(linux_net, \u0027device_exists\u0027, return_value\u003dFalse)"},{"line_number":1370,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock__set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock__execute):"},{"line_number":1373,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027,"},{"line_number":1374,"context_line":"                                                                   \u0027MAC\u0027,"},{"line_number":1375,"context_line":"                                                                   \u0027MTU\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_49d7024b","line":1372,"updated":"2015-07-15 11:38:55.000000000","message":"ditto","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b1da3595d373b7ef944388a60d7ded51e00c9f3a","unresolved":false,"context_lines":[{"line_number":1369,"context_line":"    @mock.patch.object(linux_net, \u0027device_exists\u0027, return_value\u003dFalse)"},{"line_number":1370,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock__set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock__execute):"},{"line_number":1373,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027,"},{"line_number":1374,"context_line":"                                                                   \u0027MAC\u0027,"},{"line_number":1375,"context_line":"                                                                   \u0027MTU\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_463eff28","line":1372,"in_reply_to":"9a41bdd9_49d7024b","updated":"2015-07-15 16:22:48.000000000","message":"Done","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":1391,"context_line":"    @mock.patch.object(linux_net, \u0027_execute\u0027)"},{"line_number":1392,"context_line":"    @mock.patch.object(linux_net, \u0027device_exists\u0027, return_value\u003dTrue)"},{"line_number":1393,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1394,"context_line":"    def test_ensure_vlan_device_exists(self, mock__set_device_mtu,"},{"line_number":1395,"context_line":"                                       mock_device_exists, mock__execute):"},{"line_number":1396,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027)"},{"line_number":1397,"context_line":"        self.assertEqual(\"vlan1\", interface)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_09cd7ab6","line":1394,"updated":"2015-07-15 11:38:55.000000000","message":"same as above","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b1da3595d373b7ef944388a60d7ded51e00c9f3a","unresolved":false,"context_lines":[{"line_number":1391,"context_line":"    @mock.patch.object(linux_net, \u0027_execute\u0027)"},{"line_number":1392,"context_line":"    @mock.patch.object(linux_net, \u0027device_exists\u0027, return_value\u003dTrue)"},{"line_number":1393,"context_line":"    @mock.patch.object(linux_net, \u0027_set_device_mtu\u0027)"},{"line_number":1394,"context_line":"    def test_ensure_vlan_device_exists(self, mock__set_device_mtu,"},{"line_number":1395,"context_line":"                                       mock_device_exists, mock__execute):"},{"line_number":1396,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027)"},{"line_number":1397,"context_line":"        self.assertEqual(\"vlan1\", interface)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_064477b4","line":1394,"in_reply_to":"9a41bdd9_09cd7ab6","updated":"2015-07-15 16:22:48.000000000","message":"Done","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bbb2158a508530e93edd849977156ea4895eaaa","unresolved":false,"context_lines":[{"line_number":1371,"context_line":"    def test_ensure_vlan(self, mock_set_device_mtu, mock_device_exists,"},{"line_number":1372,"context_line":"                         mock_execute):"},{"line_number":1373,"context_line":"        interface \u003d linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(1, \u0027eth0\u0027,"},{"line_number":1374,"context_line":"                                                                   \u0027MAC\u0027,"},{"line_number":1375,"context_line":"                                                                   \u0027MTU\u0027,"},{"line_number":1376,"context_line":"                                                                   \"vlan_name\")"},{"line_number":1377,"context_line":"        self.assertEqual(\"vlan_name\", interface)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a41bdd9_465d9f45","line":1374,"updated":"2015-07-15 16:26:56.000000000","message":"nit: alignment should be fixed here if you respin","commit_id":"f5a99e7f30c1de3e41f57e0b89d1ccf417d880d4"}],"nova/tests/unit/virt/libvirt/test_vif.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":312,"context_line":"          network\u003dnetwork_8021,"},{"line_number":313,"context_line":"          type\u003dnetwork_model.VIF_TYPE_MACVTAP,"},{"line_number":314,"context_line":"          details\u003d{network_model.VIF_DETAILS_VLAN: \u00271\u0027,"},{"line_number":315,"context_line":"          network_model.VIF_DETAILS_MACVTAP_SOURCE: \u0027ethx\u0027,"},{"line_number":316,"context_line":"          network_model.VIF_DETAILS_MACVTAP_MODE: \u0027vepa\u0027})"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    vif_macvtap_flat \u003d network_model.VIF(id\u003d\u0027vif-xxx-yyy-zzz\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_5c8015f7","line":315,"updated":"2015-07-09 01:30:10.000000000","message":"nit: please line this up with network_model above, same for the line below, the entries in the details dict here should be lined up for readability.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":312,"context_line":"          network\u003dnetwork_8021,"},{"line_number":313,"context_line":"          type\u003dnetwork_model.VIF_TYPE_MACVTAP,"},{"line_number":314,"context_line":"          details\u003d{network_model.VIF_DETAILS_VLAN: \u00271\u0027,"},{"line_number":315,"context_line":"          network_model.VIF_DETAILS_MACVTAP_SOURCE: \u0027ethx\u0027,"},{"line_number":316,"context_line":"          network_model.VIF_DETAILS_MACVTAP_MODE: \u0027vepa\u0027})"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    vif_macvtap_flat \u003d network_model.VIF(id\u003d\u0027vif-xxx-yyy-zzz\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_cb28c499","line":315,"in_reply_to":"ba3cc151_5c8015f7","updated":"2015-07-09 15:47:50.000000000","message":"Done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                          self._get_instance_xml,"},{"line_number":1117,"context_line":"                          d,"},{"line_number":1118,"context_line":"                          self.vif_macvtap_exception)"},{"line_number":1119,"context_line":"        self.assertRegexpMatches(str(e), \u0027macvtap_source\u0027)"},{"line_number":1120,"context_line":"        self.assertRegexpMatches(str(e), \u0027macvtap_mode\u0027)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def test_macvtap_plug_vlan(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_5c0d75e6","line":1119,"updated":"2015-07-09 01:30:10.000000000","message":"I\u0027m pretty sure we don\u0027t want str(e) here because we could have unicode issues - probably need to use six.text_type instead of str.  Maybe ask jecarey (oslo.i18n core).","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                          self._get_instance_xml,"},{"line_number":1117,"context_line":"                          d,"},{"line_number":1118,"context_line":"                          self.vif_macvtap_exception)"},{"line_number":1119,"context_line":"        self.assertRegexpMatches(str(e), \u0027macvtap_source\u0027)"},{"line_number":1120,"context_line":"        self.assertRegexpMatches(str(e), \u0027macvtap_mode\u0027)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def test_macvtap_plug_vlan(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_617aedbb","line":1119,"in_reply_to":"ba3cc151_5c0d75e6","updated":"2015-07-09 15:47:50.000000000","message":"Done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"        calls \u003d {"},{"line_number":1124,"context_line":"                \u0027ensure_vlan\u0027: [mock.call(\u00271\u0027, \u0027ethx\u0027, interface\u003d\u0027ethx.1\u0027)]}"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        with mock.patch.object(linux_net.LinuxBridgeInterfaceDriver,"},{"line_number":1127,"context_line":"                               \u0027ensure_vlan\u0027) as create_vlan_device:"},{"line_number":1128,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1129,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_vlan)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_5c24955e","line":1126,"updated":"2015-07-09 01:30:10.000000000","message":"nit: we could avoid the nesting in the method if you deprecated the method above with:\n\n@mock.patch.object(linux_net.LinuxBridgeInterfaceDriver, \u0027ensure_vlan\u0027)","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"        calls \u003d {"},{"line_number":1124,"context_line":"                \u0027ensure_vlan\u0027: [mock.call(\u00271\u0027, \u0027ethx\u0027, interface\u003d\u0027ethx.1\u0027)]}"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        with mock.patch.object(linux_net.LinuxBridgeInterfaceDriver,"},{"line_number":1127,"context_line":"                               \u0027ensure_vlan\u0027) as create_vlan_device:"},{"line_number":1128,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1129,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_vlan)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_c6f51951","line":1126,"in_reply_to":"ba3cc151_5c24955e","updated":"2015-07-09 15:47:50.000000000","message":"Done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4748150bf76275d176aee6ce65b4636ae72bd7e","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"        calls \u003d {"},{"line_number":1124,"context_line":"                \u0027ensure_vlan\u0027: [mock.call(\u00271\u0027, \u0027ethx\u0027, interface\u003d\u0027ethx.1\u0027)]}"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        with mock.patch.object(linux_net.LinuxBridgeInterfaceDriver,"},{"line_number":1127,"context_line":"                               \u0027ensure_vlan\u0027) as create_vlan_device:"},{"line_number":1128,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1129,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_vlan)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_257358e9","line":1126,"in_reply_to":"ba3cc151_c6f51951","updated":"2015-07-10 15:38:04.000000000","message":"Sorry, s/decorated/deprecated/","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":1127,"context_line":"                               \u0027ensure_vlan\u0027) as create_vlan_device:"},{"line_number":1128,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1129,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_vlan)"},{"line_number":1130,"context_line":"            create_vlan_device.assert_has_calls(calls[\u0027ensure_vlan\u0027])"},{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"    def test_macvtap_plug_flat(self):"},{"line_number":1133,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_5ca9f58e","line":1130,"updated":"2015-07-09 01:30:10.000000000","message":"Just use create_vlan_device.assert_called_once_with(\u00271\u0027, \u0027ethx\u0027 interface\u003d\u0027ethx.1\u0027)\n\nThat reduces some of the complexity and LOC here.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":1127,"context_line":"                               \u0027ensure_vlan\u0027) as create_vlan_device:"},{"line_number":1128,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1129,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_vlan)"},{"line_number":1130,"context_line":"            create_vlan_device.assert_has_calls(calls[\u0027ensure_vlan\u0027])"},{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"    def test_macvtap_plug_flat(self):"},{"line_number":1133,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_66976dec","line":1130,"in_reply_to":"ba3cc151_5ca9f58e","updated":"2015-07-09 15:47:50.000000000","message":"Done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":1130,"context_line":"            create_vlan_device.assert_has_calls(calls[\u0027ensure_vlan\u0027])"},{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"    def test_macvtap_plug_flat(self):"},{"line_number":1133,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1134,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_flat)"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"    def test_generic_iovisor_driver(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_1c236d57","line":1133,"updated":"2015-07-09 01:30:10.000000000","message":"Please fix the alignment, there are one too many tabs here.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":1130,"context_line":"            create_vlan_device.assert_has_calls(calls[\u0027ensure_vlan\u0027])"},{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"    def test_macvtap_plug_flat(self):"},{"line_number":1133,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1134,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_flat)"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"    def test_generic_iovisor_driver(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_844e2a36","line":1133,"in_reply_to":"ba3cc151_1c236d57","updated":"2015-07-09 15:47:50.000000000","message":"Done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"    def test_macvtap_plug_flat(self):"},{"line_number":1133,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1134,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_flat)"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"    def test_generic_iovisor_driver(self):"},{"line_number":1137,"context_line":"        d \u003d vif.LibvirtGenericVIFDriver()"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_9cbc5ddd","line":1134,"updated":"2015-07-09 01:30:10.000000000","message":"The point of this test is that things don\u0027t happen if it\u0027s not vlan, so you should mock something out that would be called if this were vlan and then assert that the mock isn\u0027t called.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"    def test_macvtap_plug_flat(self):"},{"line_number":1133,"context_line":"            d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1134,"context_line":"            d.plug_macvtap(self.instance, self.vif_macvtap_flat)"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"    def test_generic_iovisor_driver(self):"},{"line_number":1137,"context_line":"        d \u003d vif.LibvirtGenericVIFDriver()"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_24607ea4","line":1134,"in_reply_to":"ba3cc151_9cbc5ddd","updated":"2015-07-09 15:47:50.000000000","message":"Done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"584eec871fa43939437665a9a834c4d8d7bb81fe","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        exact_fit_name \u003d \u0027eth_identi\u0027"},{"line_number":441,"context_line":"        long_name \u003d \u0027eth_identifi\u0027"},{"line_number":442,"context_line":"        max_name \u003d \u0027eth_identifierx\u0027"},{"line_number":443,"context_line":"        large_vlan_id \u003d \u00271111\u0027"},{"line_number":444,"context_line":"        small_vlan_id \u003d \u00271\u0027"},{"line_number":445,"context_line":"        self.assertEqual(len(max_name), 15)"},{"line_number":446,"context_line":"        self.assertEqual(d.get_vlan_device_name(short_name, large_vlan_id),"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_6bcdb1b6","line":443,"updated":"2015-07-10 16:00:41.000000000","message":"Can a vlan id ever get bigger than 4?","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c02cbcb8bdd5a3c4fa977ba59772680869a57c5b","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        exact_fit_name \u003d \u0027eth_identi\u0027"},{"line_number":441,"context_line":"        long_name \u003d \u0027eth_identifi\u0027"},{"line_number":442,"context_line":"        max_name \u003d \u0027eth_identifierx\u0027"},{"line_number":443,"context_line":"        large_vlan_id \u003d \u00271111\u0027"},{"line_number":444,"context_line":"        small_vlan_id \u003d \u00271\u0027"},{"line_number":445,"context_line":"        self.assertEqual(len(max_name), 15)"},{"line_number":446,"context_line":"        self.assertEqual(d.get_vlan_device_name(short_name, large_vlan_id),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_6fa594b3","line":443,"in_reply_to":"ba3cc151_6bcdb1b6","updated":"2015-07-14 07:53:24.000000000","message":"no, it can\u0027t! Neutron wouldn\u0027t allow this","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"584eec871fa43939437665a9a834c4d8d7bb81fe","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        max_name \u003d \u0027eth_identifierx\u0027"},{"line_number":443,"context_line":"        large_vlan_id \u003d \u00271111\u0027"},{"line_number":444,"context_line":"        small_vlan_id \u003d \u00271\u0027"},{"line_number":445,"context_line":"        self.assertEqual(len(max_name), 15)"},{"line_number":446,"context_line":"        self.assertEqual(d.get_vlan_device_name(short_name, large_vlan_id),"},{"line_number":447,"context_line":"                         \u0027eth.1111\u0027)"},{"line_number":448,"context_line":"        self.assertEqual(d.get_vlan_device_name(exact_fit_name, large_vlan_id),"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_8be7d545","line":445,"updated":"2015-07-10 16:00:41.000000000","message":"The order on the args for assertEquals is (expected, observed), this matters when we get a MismatchError exception and how it dumps the results, so please switch the args for these assertEqual calls.\n\n--\n\nRather than do this check for length 15 on max_name, which you\u0027re controlling here so it\u0027s kind of weird to assert it, I\u0027d suggest that you put your dev_name/vlan test combinations into a list of tuples, something like:\n\ncombos \u003d [(short_name, large_vlan_id, \u0027eth.1111\u0027),\n                  (exact_fit_name, large_vlan_id, \u0027eth_identi.1111\u0027),\n                  ...]\n\nWhere the 3rd element is the expected value that you assert with.\n\nYou could also add an:\n\nself.assertTrue(len(result) \u003c\u003d 15)\n\nin the loop for each result of the call to d.get_vlan_device_name.","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c02cbcb8bdd5a3c4fa977ba59772680869a57c5b","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        max_name \u003d \u0027eth_identifierx\u0027"},{"line_number":443,"context_line":"        large_vlan_id \u003d \u00271111\u0027"},{"line_number":444,"context_line":"        small_vlan_id \u003d \u00271\u0027"},{"line_number":445,"context_line":"        self.assertEqual(len(max_name), 15)"},{"line_number":446,"context_line":"        self.assertEqual(d.get_vlan_device_name(short_name, large_vlan_id),"},{"line_number":447,"context_line":"                         \u0027eth.1111\u0027)"},{"line_number":448,"context_line":"        self.assertEqual(d.get_vlan_device_name(exact_fit_name, large_vlan_id),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_e51c6515","line":445,"in_reply_to":"ba3cc151_8be7d545","updated":"2015-07-14 07:53:24.000000000","message":"Done","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"584eec871fa43939437665a9a834c4d8d7bb81fe","unresolved":false,"context_lines":[{"line_number":1135,"context_line":"                          self._get_instance_xml,"},{"line_number":1136,"context_line":"                          d,"},{"line_number":1137,"context_line":"                          self.vif_macvtap_exception)"},{"line_number":1138,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_source\u0027)"},{"line_number":1139,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_mode\u0027)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"    @mock.patch.object(linux_net.LinuxBridgeInterfaceDriver, \u0027ensure_vlan\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_10e69016","line":1138,"updated":"2015-07-10 16:00:41.000000000","message":"This is a bit odd looking, I\u0027d probably just use six.text_type(e), or:\n\nself.assertIn(\u0027macvtap_source\u0027, six.text_type(e))","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c02cbcb8bdd5a3c4fa977ba59772680869a57c5b","unresolved":false,"context_lines":[{"line_number":1135,"context_line":"                          self._get_instance_xml,"},{"line_number":1136,"context_line":"                          d,"},{"line_number":1137,"context_line":"                          self.vif_macvtap_exception)"},{"line_number":1138,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_source\u0027)"},{"line_number":1139,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_mode\u0027)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"    @mock.patch.object(linux_net.LinuxBridgeInterfaceDriver, \u0027ensure_vlan\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_05b149e1","line":1138,"in_reply_to":"ba3cc151_10e69016","updated":"2015-07-14 07:53:24.000000000","message":"Done","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"584eec871fa43939437665a9a834c4d8d7bb81fe","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"                          d,"},{"line_number":1137,"context_line":"                          self.vif_macvtap_exception)"},{"line_number":1138,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_source\u0027)"},{"line_number":1139,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_mode\u0027)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"    @mock.patch.object(linux_net.LinuxBridgeInterfaceDriver, \u0027ensure_vlan\u0027)"},{"line_number":1142,"context_line":"    def test_macvtap_plug_vlan(self, ensure_vlan_mock):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_709cbc5d","line":1139,"updated":"2015-07-10 16:00:41.000000000","message":"ditto","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c02cbcb8bdd5a3c4fa977ba59772680869a57c5b","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"                          d,"},{"line_number":1137,"context_line":"                          self.vif_macvtap_exception)"},{"line_number":1138,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_source\u0027)"},{"line_number":1139,"context_line":"        self.assertRegexpMatches(\u0027%s\u0027 % e, \u0027macvtap_mode\u0027)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"    @mock.patch.object(linux_net.LinuxBridgeInterfaceDriver, \u0027ensure_vlan\u0027)"},{"line_number":1142,"context_line":"    def test_macvtap_plug_vlan(self, ensure_vlan_mock):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_65ba95c2","line":1139,"in_reply_to":"ba3cc151_709cbc5d","updated":"2015-07-14 07:53:24.000000000","message":"Done","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"584eec871fa43939437665a9a834c4d8d7bb81fe","unresolved":false,"context_lines":[{"line_number":1149,"context_line":"    def test_macvtap_plug_flat(self, ensure_vlan_mock):"},{"line_number":1150,"context_line":"        d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1151,"context_line":"        d.plug_macvtap(self.instance, self.vif_macvtap_flat)"},{"line_number":1152,"context_line":"        assert not ensure_vlan_mock.called"},{"line_number":1153,"context_line":""},{"line_number":1154,"context_line":"    def test_generic_iovisor_driver(self):"},{"line_number":1155,"context_line":"        d \u003d vif.LibvirtGenericVIFDriver()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_909f0065","line":1152,"updated":"2015-07-10 16:00:41.000000000","message":"This should be:\n\nself.assertFalse(ensure_vlan_mock.called)","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c02cbcb8bdd5a3c4fa977ba59772680869a57c5b","unresolved":false,"context_lines":[{"line_number":1149,"context_line":"    def test_macvtap_plug_flat(self, ensure_vlan_mock):"},{"line_number":1150,"context_line":"        d \u003d vif.LibvirtGenericVIFDriver()"},{"line_number":1151,"context_line":"        d.plug_macvtap(self.instance, self.vif_macvtap_flat)"},{"line_number":1152,"context_line":"        assert not ensure_vlan_mock.called"},{"line_number":1153,"context_line":""},{"line_number":1154,"context_line":"    def test_generic_iovisor_driver(self):"},{"line_number":1155,"context_line":"        d \u003d vif.LibvirtGenericVIFDriver()"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a41bdd9_45b751d8","line":1152,"in_reply_to":"ba3cc151_909f0065","updated":"2015-07-14 07:53:24.000000000","message":"Done","commit_id":"d9e001935ef42ee54e4fddf90683396ce6bebf52"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4dd9a4e9ab765d8d57ee3f001a38fc629288c32e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import utils"},{"line_number":29,"context_line":"from nova.virt.libvirt import config as vconfig"},{"line_number":30,"context_line":"from nova.virt.libvirt import vif"},{"line_number":31,"context_line":"import six"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"CONF \u003d cfg.CONF"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_944a9882","line":31,"updated":"2015-07-20 13:29:21.000000000","message":"this should not be in the nova section. this is a third party import\nit should be on line 21","commit_id":"8dfff90dce5ca32b605e679e1336313f1714d16d"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"927952418b7a133bcb4c528ca2cf00ed2b771f52","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import utils"},{"line_number":29,"context_line":"from nova.virt.libvirt import config as vconfig"},{"line_number":30,"context_line":"from nova.virt.libvirt import vif"},{"line_number":31,"context_line":"import six"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"CONF \u003d cfg.CONF"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_cca2ad4b","line":31,"in_reply_to":"3a50d1a3_944a9882","updated":"2015-07-21 09:40:35.000000000","message":"Done","commit_id":"8dfff90dce5ca32b605e679e1336313f1714d16d"}],"nova/virt/libvirt/designer.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    \"\"\"Populate a LibvirtConfigGuestInterface instance"},{"line_number":138,"context_line":"    with direct Interface."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    Passing a target device name does not make sense, due to"},{"line_number":141,"context_line":"    https://www.redhat.com/archives/libvir-list/2010-November/msg00194.html"},{"line_number":142,"context_line":"    \"\"\""},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_7ca63910","line":140,"updated":"2015-07-09 01:30:10.000000000","message":"I\u0027m not entirely sure if this is related to the change or just an FYI, or has something to do with the devname value?  I\u0027m not familiar with the particulars of this code though, so a summary would be nice here of whatever the thread is talking about.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    \"\"\"Populate a LibvirtConfigGuestInterface instance"},{"line_number":138,"context_line":"    with direct Interface."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    Passing a target device name does not make sense, due to"},{"line_number":141,"context_line":"    https://www.redhat.com/archives/libvir-list/2010-November/msg00194.html"},{"line_number":142,"context_line":"    \"\"\""},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_da8bbbc1","line":140,"in_reply_to":"ba3cc151_7ca63910","updated":"2015-07-09 15:47:50.000000000","message":"If you try to set the target device name in your domain.xml for a macvtap attachment, libvirt will remove it again on definition. While other approaches using taps heavily take use of specifying such names along there needs.\n\nI will remove this comment totally!","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b4748150bf76275d176aee6ce65b4636ae72bd7e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    \"\"\"Populate a LibvirtConfigGuestInterface instance"},{"line_number":138,"context_line":"    with direct Interface."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    Passing a target device name does not make sense, due to"},{"line_number":141,"context_line":"    https://www.redhat.com/archives/libvir-list/2010-November/msg00194.html"},{"line_number":142,"context_line":"    \"\"\""},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_2508382d","line":140,"in_reply_to":"ba3cc151_da8bbbc1","updated":"2015-07-10 15:38:04.000000000","message":"Yeah, remove it or at least say that in the case of macvtap it\u0027s ignored since there are other vif types using this method, not just macvtap.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"}],"nova/virt/libvirt/vif.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a600bcbda0663b798bed0a7b38dc9d50dba622e7","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                mac_addr\u003dvif[\u0027address\u0027],"},{"line_number":516,"context_line":"                vlan\u003dvif[\u0027details\u0027][network_model.VIF_DETAILS_VLAN])"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"    def plug_macvtap(self, instance, vif):"},{"line_number":519,"context_line":"        pass"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def plug_midonet(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_67eb5679","line":518,"updated":"2015-06-23 07:44:00.000000000","message":"unplug method is missing!!!!","commit_id":"cc1953a7b2699654d3123ad91e80b1835302518e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return False"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_vlan_device_name(self, src_dev, vlan):"},{"line_number":157,"context_line":"        return src_dev + \".\" + str(vlan)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def get_config_bridge(self, instance, vif, image_meta,"},{"line_number":160,"context_line":"                          inst_type, virt_type):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_9c91bd49","line":157,"updated":"2015-07-09 01:30:10.000000000","message":"Can the vlan value ever be unicode?  If so, use six.text_type.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f89e5ee6aaf2e8e83e15b18dc424db5072773add","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return False"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_vlan_device_name(self, src_dev, vlan):"},{"line_number":157,"context_line":"        return src_dev + \".\" + str(vlan)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def get_config_bridge(self, instance, vif, image_meta,"},{"line_number":160,"context_line":"                          inst_type, virt_type):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_ae6a2418","line":157,"in_reply_to":"ba3cc151_9c91bd49","updated":"2015-07-09 15:27:13.000000000","message":"As discussed in IRC, either be safe and use six.text_type or just do:\n\nreturn \u0027%s.%s\u0027 % (src_dev, vlan)","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return False"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_vlan_device_name(self, src_dev, vlan):"},{"line_number":157,"context_line":"        return src_dev + \".\" + str(vlan)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def get_config_bridge(self, instance, vif, image_meta,"},{"line_number":160,"context_line":"                          inst_type, virt_type):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_2b9db009","line":157,"in_reply_to":"ba3cc151_9c91bd49","updated":"2015-07-09 15:47:50.000000000","message":"Good question. This data comes from a neutron api response. Some code layers above parse that response and convert it to a dict. Worked around using \"%s\" % var","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"399810e11ca1b5c20693e3739485713f7232fe46","unresolved":false,"context_lines":[{"line_number":548,"context_line":"        if vlan:"},{"line_number":549,"context_line":"            src_dev \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_SOURCE)"},{"line_number":550,"context_line":"            interface_name \u003d self.get_vlan_device_name(src_dev, vlan)"},{"line_number":551,"context_line":"            linux_net.LinuxBridgeInterfaceDriver.ensure_vlan("},{"line_number":552,"context_line":"                                                             vlan, src_dev,"},{"line_number":553,"context_line":"                                                             interface\u003d"},{"line_number":554,"context_line":"                                                             interface_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_7c7dd96b","line":551,"updated":"2015-07-09 01:30:10.000000000","message":"nit: bring up the parameters one line, or wrap to the next line - dropping them one line seems kind of weird.","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3adc56ea8998857a7dd36ac43d891bf9d706d901","unresolved":false,"context_lines":[{"line_number":548,"context_line":"        if vlan:"},{"line_number":549,"context_line":"            src_dev \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_SOURCE)"},{"line_number":550,"context_line":"            interface_name \u003d self.get_vlan_device_name(src_dev, vlan)"},{"line_number":551,"context_line":"            linux_net.LinuxBridgeInterfaceDriver.ensure_vlan("},{"line_number":552,"context_line":"                                                             vlan, src_dev,"},{"line_number":553,"context_line":"                                                             interface\u003d"},{"line_number":554,"context_line":"                                                             interface_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_fa747fcf","line":551,"in_reply_to":"ba3cc151_7c7dd96b","updated":"2015-07-09 15:47:50.000000000","message":"done","commit_id":"29ed9e2b4e99613bbaabdbc759165218d0d5bfc7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f05a29976bd8207d9540e56ae39d7e677916527f","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        return conf"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def get_config_macvtap(self, instance, vif, image_meta,"},{"line_number":324,"context_line":"                             inst_type, virt_type):"},{"line_number":325,"context_line":"        conf \u003d self.get_base_config(instance, vif, image_meta,"},{"line_number":326,"context_line":"                                    inst_type, virt_type)"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_e93e168a","line":324,"updated":"2015-07-15 11:38:55.000000000","message":"indentation here is a little dodgy","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b1da3595d373b7ef944388a60d7ded51e00c9f3a","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        return conf"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def get_config_macvtap(self, instance, vif, image_meta,"},{"line_number":324,"context_line":"                             inst_type, virt_type):"},{"line_number":325,"context_line":"        conf \u003d self.get_base_config(instance, vif, image_meta,"},{"line_number":326,"context_line":"                                    inst_type, virt_type)"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a41bdd9_307bf1c2","line":324,"in_reply_to":"9a41bdd9_e93e168a","updated":"2015-07-15 16:22:48.000000000","message":"Done","commit_id":"f7d1e2d16fd6d50474328ecd6a0bc04dc6f5d924"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4dd9a4e9ab765d8d57ee3f001a38fc629288c32e","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        if vlan:"},{"line_number":570,"context_line":"            src_dev \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_SOURCE)"},{"line_number":571,"context_line":"            interface_name \u003d self.get_vlan_device_name(src_dev, vlan)"},{"line_number":572,"context_line":"            linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(vlan, src_dev,"},{"line_number":573,"context_line":"                                                             interface\u003d"},{"line_number":574,"context_line":"                                                             interface_name)"},{"line_number":575,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_af798195","line":572,"updated":"2015-07-20 13:29:21.000000000","message":"Consider writimg:\nlinux_net.LinuxBridgeInterfaceDriver.ensure_vlan(\n    vlan, src_dev, interface\u003dinterface_name)","commit_id":"8dfff90dce5ca32b605e679e1336313f1714d16d"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"927952418b7a133bcb4c528ca2cf00ed2b771f52","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        if vlan:"},{"line_number":570,"context_line":"            src_dev \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_SOURCE)"},{"line_number":571,"context_line":"            interface_name \u003d self.get_vlan_device_name(src_dev, vlan)"},{"line_number":572,"context_line":"            linux_net.LinuxBridgeInterfaceDriver.ensure_vlan(vlan, src_dev,"},{"line_number":573,"context_line":"                                                             interface\u003d"},{"line_number":574,"context_line":"                                                             interface_name)"},{"line_number":575,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a50d1a3_ec63e918","line":572,"in_reply_to":"3a50d1a3_af798195","updated":"2015-07-21 09:40:35.000000000","message":"Done","commit_id":"8dfff90dce5ca32b605e679e1336313f1714d16d"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"f7e49c60f4a250f18f50b51a2a7b9e8eb1dcbca9","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_22fa2376","line":790,"updated":"2015-07-21 14:28:37.000000000","message":"in case of vlan, should the vlan interface created at plug be removed?","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"c6417226c02ef2773364198400de3e7527c17bd3","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_2a285132","line":790,"in_reply_to":"3a50d1a3_1fbcceda","updated":"2015-07-23 07:51:58.000000000","message":"had a look at the dhcp use case as well. On dhcp request, the dhcp-agent executes \"plug\" operation (similar to nova plug stuff), which caused the creation of a veth pair.\n\nIn parallel the neutron agent is looping over some special dir, to figure out if new devices (starting with name tap...) showed up. So he detected the veth pair (as it is named tap...) and contacted the server to ask for more port details. After that he tries to plug it into the right bridge. As this bridge did not yet exist, the neutron agent created it. (this was about 2 seconds after the plug operation was executed)\n\n--\u003e Those actions are highly decoupled to ensure scalability\n\nThe big difference between dhcp \u0026 compute use case:\n\n- dhcp: devices (veth) can hang around for some time until they are plugged anywhere by someone else. So bridge creation can be done by neutron-agent\n- compute: libvirt wants to plug the tap directly into a bridge. It cannot just create a guest with a bridge and leave the tap hanging around (well in fact libvirt can, but not with interface type bridge, which is used in domain.xml). So nova needs to create the bridge (during \"plug\") before starting the guest.\n\nIt\u0027s the same for the compute use case with macvtap. Libvirt directly wants to plug the macvtap onto something, so it has to ensure the source (vlan device) exists. \n\nRobert, I share your point regarding portbinding. But what I got is that this asynchronous behaviour is intended to scale well in large environments. \n\nDaniel, what is your point of view?","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"4cc3300411685d34407f116977758b024adc536d","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_c9084294","line":790,"in_reply_to":"3a50d1a3_22fa2376","updated":"2015-07-21 15:45:11.000000000","message":"I was thinking about this, too. But a vlan is representing a logical network. So many macvtaps will connect to the same vlan device. I implemented it along linuxbridge, where the cleanup is happening in neutron agent on network delete.","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e31756c6691e0d56dcfca997b5415c29e0dfe070","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_eb57c157","line":790,"in_reply_to":"3a50d1a3_2a285132","updated":"2015-07-29 13:06:21.000000000","message":"Ok, I see the difficulty now. Can we at least have Neutron tell Nova what the name of the vlan device would be, so that we don\u0027t have to duplicate get_vlan_device_name() logic in both Nova and Neutron ?","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"49e8bf02f5e1c8054b84f0fce85a65d743c036e0","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_adc05fe1","line":790,"in_reply_to":"3a50d1a3_446f3792","updated":"2015-07-21 16:42:23.000000000","message":"Yep, if Neutron is responsible for deleting the vlan, then I\u0027d expect Neutron to also create the vlan in the first place. In which case I\u0027d just expect the vif port binding to contain the name of the vlan device straight away, instead of passing the ethernet device name + vlan  number. This would avoid the need for Nova to care about the naming scheme of vlan devices.","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"6c55e7a1568ee626e75595105e9451abbb3343cd","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_1fbcceda","line":790,"in_reply_to":"3a50d1a3_8aa513a3","updated":"2015-07-22 19:37:33.000000000","message":"I see your point and thanks for the detailed explanation. I also spent a little time on this. In the case that dhcp service is running, the bridge is actually created by the neutron agent (since the dhcp port is the first one created on this network). Otherwise, the nova code has to kick in to create the bridge.\n\nSo 1) sounds fine to me based on how it works now.\n\nAnother approach would be that the nova port binding (to a host) call to neutron should trigger something more meaningful other than database actions (as of now with some of the plugins like linux, ovs). When nova receives the response, it should be guaranteed that the network (and the port) on that host should be ready for the VM to plugin.","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2c4ce0e55689f5b38856680dbb4c4ef15a1136dd","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_8aa513a3","line":790,"in_reply_to":"3a50d1a3_a14fea69","updated":"2015-07-22 15:42:57.000000000","message":"ok, had a detailed look at the code again and now I remember what led this decission. \n\nwith self.virtapi.wait_for_instance_event(...,events,..):\n\nis waiting for tie vif-plugged event from neutron, which will be sent, as soon as the instance was launched an the macvtap was created. So the first time the agent comes into the play is after the guest has been launched. But the vlan device is required before that!\n\nI kind of stole the approach which you see in this patchset from linuxbridge vif. In linuxbridge a network is represented by a bridge. In order to let nova plug into this bridge, it must exist! So nova creates this bridge. But it lives as long until someone deletes the network. Then it gets cleaned up by the neutron agent. (unplug is being passed). This patchset does the same, but with a vlan device.\n\nSo I see 3 approaches: \n\n1) Go with the linuxbridge approach and let the stuff be removed by neutron agent (which is implemented in this patchset)\n\n2) Add a unplug method, that verifies that no macvtap is attached anymore and then removes the vlan device\n\n3) Extend neutron rpc layer to support sending network_create events to agents. Vlan device creation could be triggerd there. But I assume there still could be a problem with races, as rpc interaction between agent and server is done via asynchronous casts and not synronous calls (which would be required to ensure vlan device exists before sending back api response). It\u0027s similar on port create/update. \n\nMy feeling says, go with 1 (this patchset). This feeling gets strengthened when looking at the linuxbridge vif code!\n\nAny input is welcome!","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"e7a85c871c4b087e57dfe4ff20ae1faea4dedca1","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_a14fea69","line":790,"in_reply_to":"3a50d1a3_adc05fe1","updated":"2015-07-22 06:50:15.000000000","message":"You\u0027re both right. That would be the much cleaner approach. But when thinking about that in the past, folks came up with the argument, that there is no guarantee that neutron agent finished it\u0027s action before nova starts plugging. \nI will have a look at Roberts pointer, maybe this \"waiting for the event\" solves the race problem. Hoping to come up with a better solution soon!\nThanks for your feedback!","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"87e46276403b0a4cd851a5bab1c3f608f89c3b80","unresolved":false,"context_lines":[{"line_number":787,"context_line":"                                            mac_addr\u003dvif[\u0027address\u0027])"},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"    def unplug_macvtap(self, instance, vif):"},{"line_number":790,"context_line":"        pass"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"    def unplug_midonet(self, instance, vif):"},{"line_number":793,"context_line":"        \"\"\"Unplug from MidoNet network port"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_446f3792","line":790,"in_reply_to":"3a50d1a3_c9084294","updated":"2015-07-21 16:02:10.000000000","message":"That\u0027s right that many macvtaps will connect to the same vlan device. \n\nIt doesn\u0027t sound right that the device is created by the VIF driver, but deleted by the neutron agent, though. \n\nAccording to the flow, nova would wait for the port to come up before plugging the VM into the network. https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4437\nTherefore, it seems to make sense for the vlan device to be created by the neutron agent when the first port on the logical network is created on the node. That way, the create and removal of the vlan device is solely managed by the neutron agent.","commit_id":"f07f87b8cae90e49ffcbeb226e86574a517a84f8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e5f86af45d600c8e10baa76d490a94879fe503d","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        vif_details \u003d vif[\u0027details\u0027]"},{"line_number":305,"context_line":"        macvtap_src \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_SOURCE)"},{"line_number":306,"context_line":"        macvtap_mode \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_MODE)"},{"line_number":307,"context_line":"        phys_interface \u003d vif_details.get("},{"line_number":308,"context_line":"                                    network_model.VIF_DETAILS_PHYS_INTERFACE)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        missing_params \u003d []"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_f730e99f","line":307,"updated":"2015-07-29 20:22:51.000000000","message":"This isn\u0027t used in this method besides validation.  Previously in the case of vlan you\u0027d generate the device name and set macvtap_src to that before calling designer.set_vif_host_backend_direct_config - so are you missing that now or do we just not care about the name and vlan case?\n\nI guess plug_macvtap uses the physical_interface in the vlan case, so is this just here so can validate that it\u0027s provided in the vif details?","commit_id":"f9913a44bb1bb60816c06eb32455e5b3dc3df5f8"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b447fba147a47d2ca109ad96cd547e4ee575f05c","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        vif_details \u003d vif[\u0027details\u0027]"},{"line_number":305,"context_line":"        macvtap_src \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_SOURCE)"},{"line_number":306,"context_line":"        macvtap_mode \u003d vif_details.get(network_model.VIF_DETAILS_MACVTAP_MODE)"},{"line_number":307,"context_line":"        phys_interface \u003d vif_details.get("},{"line_number":308,"context_line":"                                    network_model.VIF_DETAILS_PHYS_INTERFACE)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        missing_params \u003d []"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_37a4ffb7","line":307,"in_reply_to":"3a50d1a3_f730e99f","updated":"2015-07-30 07:51:46.000000000","message":"yes, just validation that was my thought. get_config_macvtap is called long before there corresponding plug operation. So my thought was to verify everything as early as possible in a single shot.\n\nThe domain.xml doesn\u0027t care about if it\u0027s vlan or not - this is totally transperent to it! It just plugs the macvtap on any source device. It\u0027s the responsiblity of Neutron to provide the correct name. In the vlan case this would be the name of the vlan device. In the flat case, this would be the the plain physical interface name (which would be the same as the physical interface parameter in this case)!\n\nOnly the plug operation cares about vlan! It has to create the device if it not yet exists. Therefore it requires the physical interface name to know, to which eth device this vlan should belong.\n\nPlease let me know if you\u0027re feeling is to validate the phys_interface it in the plug method! This would be fine for me as well!","commit_id":"f9913a44bb1bb60816c06eb32455e5b3dc3df5f8"}]}
