)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"aad6215fa091820ed13ef70115c03e2613c5cdba","unresolved":false,"context_lines":[{"line_number":955,"context_line":"                                                    net_ids)"},{"line_number":956,"context_line":"        # an interface was added/removed from instance."},{"line_number":957,"context_line":"        else:"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"            # Validate that the network doesn\u0027t exist before adding it"},{"line_number":960,"context_line":"            for iface in ifaces:"},{"line_number":961,"context_line":"                found \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_3bc1cb2f","line":958,"updated":"2015-12-02 19:26:38.000000000","message":"I\u0027m sure that there\u0027s a shorter python way of writing this code. Will be happy to rewrite it given the instructions. Bare in mind that networks from iface should be added only if they don\u0027t exist in networks (or else I\u0027d add a if to the original for clause but it requires a else clause in which I have nothing to do)","commit_id":"129a914111144cdaae590493c55405180450c904"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"d1f1be34de902177b4b4f0e1105897d2c10a242b","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    # item is not part of the items list so if it is part of it"},{"line_number":261,"context_line":"    # we should at least log it as a warning"},{"line_number":262,"context_line":"    if not is_absent:"},{"line_number":263,"context_line":"        msg \u003d (\"%(item)s already exist in %(items)s \""},{"line_number":264,"context_line":"               \"ignoring it\")"},{"line_number":265,"context_line":"        LOG.warning(msg, {\u0027item\u0027: item,"},{"line_number":266,"context_line":"                          \u0027items\u0027: items}, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_e025265c","line":263,"updated":"2015-12-10 13:09:41.000000000","message":"nit: s/exist/exists/","commit_id":"08e9b95ab7e1666804f13d41911f407341ecdf1c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"d1f1be34de902177b4b4f0e1105897d2c10a242b","unresolved":false,"context_lines":[{"line_number":970,"context_line":"                                                    net_ids)"},{"line_number":971,"context_line":"        # an interface was added/removed from instance."},{"line_number":972,"context_line":"        else:"},{"line_number":973,"context_line":""},{"line_number":974,"context_line":"            # Prepare the network ids list for validation purposes"},{"line_number":975,"context_line":"            networks_ids \u003d [network[\u0027id\u0027] for network in networks]"},{"line_number":976,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_e0e686e7","line":973,"updated":"2015-12-10 13:09:41.000000000","message":"Could you add a note here to explain that duplicate items should not appear in the list, but reference Launchpad bugs in which this has been observed.","commit_id":"08e9b95ab7e1666804f13d41911f407341ecdf1c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"fcc4e9749f366bfbe312659aed08d309c791a597","unresolved":false,"context_lines":[{"line_number":982,"context_line":"            # Though this issue can and should be solved in methods"},{"line_number":983,"context_line":"            # that prepare the networks list, this method should have this"},{"line_number":984,"context_line":"            # ignore duplicate networks mechanism to reduce the probability"},{"line_number":985,"context_line":"            # of this reaching the XML file (which will fail to boot the VM)"},{"line_number":986,"context_line":"            networks \u003d networks + ["},{"line_number":987,"context_line":"                {\u0027id\u0027: iface[\u0027network\u0027][\u0027id\u0027],"},{"line_number":988,"context_line":"                 \u0027name\u0027: iface[\u0027network\u0027][\u0027label\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_130f043a","line":985,"updated":"2015-12-12 13:18:31.000000000","message":"The XML file is specific to libvirt - let\u0027s make this comment more generic.","commit_id":"ab0c6f523b68ba2a5c6408ad700e3980fffae0dd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8a7854ff2cffc04c299245a4626eacf0631a6c0f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"},{"line_number":178,"context_line":"    # we should at least log it as a warning"},{"line_number":179,"context_line":"    if not is_absent:"},{"line_number":180,"context_line":"        msg \u003d (\"%(item)s already exists in %(items)s \""},{"line_number":181,"context_line":"               \"ignoring it\")"},{"line_number":182,"context_line":"        LOG.warning(msg, {\u0027item\u0027: item,"},{"line_number":183,"context_line":"                          \u0027items\u0027: items}, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_beebb377","line":180,"updated":"2015-12-24 12:37:51.000000000","message":"this is missing the _LW log hint","commit_id":"9be81b63feb13e59441426140bf40cebd180ffd3"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"bc7ec17e2a1039fe309ac69353258060e4f282b0","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"},{"line_number":178,"context_line":"    # we should at least log it as a warning"},{"line_number":179,"context_line":"    if not is_absent:"},{"line_number":180,"context_line":"        msg \u003d (\"%(item)s already exists in %(items)s \""},{"line_number":181,"context_line":"               \"ignoring it\")"},{"line_number":182,"context_line":"        LOG.warning(msg, {\u0027item\u0027: item,"},{"line_number":183,"context_line":"                          \u0027items\u0027: items}, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_c995abe4","line":180,"in_reply_to":"1a7b0d38_beebb377","updated":"2015-12-24 13:08:15.000000000","message":"Done","commit_id":"9be81b63feb13e59441426140bf40cebd180ffd3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4e4f15ca84d07adf1fc846d3119b5343a0b4ea8","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _logged_is_not_in(item, items, instance):"},{"line_number":174,"context_line":"    is_absent \u003d item not in items"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # The expectation from this function\u0027s perspective is that the"},{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_4962af3f","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":33},"updated":"2016-01-14 15:49:12.000000000","message":"nit: the negative logic here and in the if check below is a tad confusing, I\u0027d probably write this as:\n\n  present \u003d item in items\n  if present:\n    LOG.warning(...)\n  return not present\n\nidk, the whole \u0027_logged_is_not_in\u0027 name is weird and confusing to me, I\u0027d rather just see a filter function used on the iterations below and that filter function would also do the logging.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"f265578bdda947e6e6ec49ea80472bff521f6007","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _logged_is_not_in(item, items, instance):"},{"line_number":174,"context_line":"    is_absent \u003d item not in items"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # The expectation from this function\u0027s perspective is that the"},{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_4d29449d","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":33},"in_reply_to":"da6ed579_4962af3f","updated":"2016-01-14 23:08:59.000000000","message":"Done","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"456926af52bf7bd064992494a27c3eff11b4456d","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _logged_is_not_in(item, items, instance):"},{"line_number":174,"context_line":"    is_absent \u003d item not in items"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # The expectation from this function\u0027s perspective is that the"},{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_72a8bc20","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":33},"in_reply_to":"da6ed579_4962af3f","updated":"2016-01-14 16:30:20.000000000","message":"I guess implementing a filter function would be messy, since there are 2 cases:\n\n1. filtering the network_ids\n2. filtering the port_ids\n\nSo if you have a single generic filter function then you don\u0027t know if you\u0027re getting port_ids or network_ids. Unless you wrote two filter functions, or had kwargs on the filter function telling it which key to filter on, i.e. network_id or port_id.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2770ad7a6ced5fb2a7bfb5459a012b7a8e94d672","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _logged_is_not_in(item, items, instance):"},{"line_number":174,"context_line":"    is_absent \u003d item not in items"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # The expectation from this function\u0027s perspective is that the"},{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_8cc67566","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":33},"in_reply_to":"da6ed579_4962af3f","updated":"2016-01-14 16:00:01.000000000","message":"have to agree about the name, feels like _check_not_present would be a better name for it, but unsure.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"f265578bdda947e6e6ec49ea80472bff521f6007","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"def _logged_is_not_in(item, items, instance):"},{"line_number":174,"context_line":"    is_absent \u003d item not in items"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # The expectation from this function\u0027s perspective is that the"},{"line_number":177,"context_line":"    # item is not part of the items list so if it is part of it"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_6d0be82a","line":174,"range":{"start_line":174,"start_character":4,"end_line":174,"end_character":33},"in_reply_to":"da6ed579_72a8bc20","updated":"2016-01-14 23:08:59.000000000","message":"For the sake of log \u0026 debugging clarity, I\u0027ve added the name of the list in which the duplicate item exists to the log message","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4e4f15ca84d07adf1fc846d3119b5343a0b4ea8","unresolved":false,"context_lines":[{"line_number":891,"context_line":"            networks_ids \u003d [network[\u0027id\u0027] for network in networks]"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"            # Validate that interface networks doesn\u0027t exist in networks."},{"line_number":894,"context_line":"            # Duplicate networks were observed at:"},{"line_number":895,"context_line":"            #  1. https://bugs.launchpad.net/nova/+bug/1501735"},{"line_number":896,"context_line":"            #  2. https://bugs.launchpad.net/nova/+bug/1522112"},{"line_number":897,"context_line":"            #  3. https://bugs.launchpad.net/nova/+bug/1467581"},{"line_number":898,"context_line":"            #"},{"line_number":899,"context_line":"            # Though this issue can and should be solved in methods"},{"line_number":900,"context_line":"            # that prepare the networks list, this method should have this"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_c97e9f18","line":897,"range":{"start_line":894,"start_character":12,"end_line":897,"end_character":62},"updated":"2016-01-14 15:49:12.000000000","message":"We don\u0027t really need these in the code, right? They should just be referenced in the commit message.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"f265578bdda947e6e6ec49ea80472bff521f6007","unresolved":false,"context_lines":[{"line_number":891,"context_line":"            networks_ids \u003d [network[\u0027id\u0027] for network in networks]"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"            # Validate that interface networks doesn\u0027t exist in networks."},{"line_number":894,"context_line":"            # Duplicate networks were observed at:"},{"line_number":895,"context_line":"            #  1. https://bugs.launchpad.net/nova/+bug/1501735"},{"line_number":896,"context_line":"            #  2. https://bugs.launchpad.net/nova/+bug/1522112"},{"line_number":897,"context_line":"            #  3. https://bugs.launchpad.net/nova/+bug/1467581"},{"line_number":898,"context_line":"            #"},{"line_number":899,"context_line":"            # Though this issue can and should be solved in methods"},{"line_number":900,"context_line":"            # that prepare the networks list, this method should have this"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_0d06ec1f","line":897,"range":{"start_line":894,"start_character":12,"end_line":897,"end_character":62},"in_reply_to":"da6ed579_6c8f812a","updated":"2016-01-14 23:08:59.000000000","message":"Done","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2770ad7a6ced5fb2a7bfb5459a012b7a8e94d672","unresolved":false,"context_lines":[{"line_number":891,"context_line":"            networks_ids \u003d [network[\u0027id\u0027] for network in networks]"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"            # Validate that interface networks doesn\u0027t exist in networks."},{"line_number":894,"context_line":"            # Duplicate networks were observed at:"},{"line_number":895,"context_line":"            #  1. https://bugs.launchpad.net/nova/+bug/1501735"},{"line_number":896,"context_line":"            #  2. https://bugs.launchpad.net/nova/+bug/1522112"},{"line_number":897,"context_line":"            #  3. https://bugs.launchpad.net/nova/+bug/1467581"},{"line_number":898,"context_line":"            #"},{"line_number":899,"context_line":"            # Though this issue can and should be solved in methods"},{"line_number":900,"context_line":"            # that prepare the networks list, this method should have this"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_6c8f812a","line":897,"range":{"start_line":894,"start_character":12,"end_line":897,"end_character":62},"in_reply_to":"da6ed579_c97e9f18","updated":"2016-01-14 16:00:01.000000000","message":"+1 lets keep this whole comment in the commit message.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"28395300ceea5a0e83d279dff62a8c2de7ad374f","unresolved":false,"context_lines":[{"line_number":905,"context_line":"                 \u0027name\u0027: iface[\u0027network\u0027][\u0027label\u0027],"},{"line_number":906,"context_line":"                 \u0027tenant_id\u0027: iface[\u0027network\u0027][\u0027meta\u0027][\u0027tenant_id\u0027]}"},{"line_number":907,"context_line":"                for iface in ifaces"},{"line_number":908,"context_line":"                if _logged_is_not_in(iface[\u0027network\u0027][\u0027id\u0027], networks_ids,"},{"line_number":909,"context_line":"                                     instance)]"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"            # Include existing interfaces so they are not removed from the db."}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_446aa482","line":908,"range":{"start_line":908,"start_character":37,"end_line":908,"end_character":59},"updated":"2016-01-14 12:29:40.000000000","message":"So I am wondering if this is enough - we could have several ports on the same network no?","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"f598df3f3817756aa8c8b4b8025c8399703cb5a5","unresolved":false,"context_lines":[{"line_number":905,"context_line":"                 \u0027name\u0027: iface[\u0027network\u0027][\u0027label\u0027],"},{"line_number":906,"context_line":"                 \u0027tenant_id\u0027: iface[\u0027network\u0027][\u0027meta\u0027][\u0027tenant_id\u0027]}"},{"line_number":907,"context_line":"                for iface in ifaces"},{"line_number":908,"context_line":"                if _logged_is_not_in(iface[\u0027network\u0027][\u0027id\u0027], networks_ids,"},{"line_number":909,"context_line":"                                     instance)]"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"            # Include existing interfaces so they are not removed from the db."}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_8f3c35c9","line":908,"range":{"start_line":908,"start_character":37,"end_line":908,"end_character":59},"in_reply_to":"da6ed579_446aa482","updated":"2016-01-14 12:40:24.000000000","message":"Yes. Isn\u0027t it covered by port_ids? (which is merged in the same way). The calling method (_build_network_info_model) gets the networks \u0026 port_ids from _gather_port_ids_and_networks, iterates over the ports and builds the nw_info according to the neutron port, network and subnet.\nThe fix is handling both duplications in the networks and in the port_ids of which the port_ids is the one that generates the duplicate XML entry.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7aa20eb9b2a9ff72f34606f2c9e5c4721c9ad300","unresolved":false,"context_lines":[{"line_number":905,"context_line":"                 \u0027name\u0027: iface[\u0027network\u0027][\u0027label\u0027],"},{"line_number":906,"context_line":"                 \u0027tenant_id\u0027: iface[\u0027network\u0027][\u0027meta\u0027][\u0027tenant_id\u0027]}"},{"line_number":907,"context_line":"                for iface in ifaces"},{"line_number":908,"context_line":"                if _logged_is_not_in(iface[\u0027network\u0027][\u0027id\u0027], networks_ids,"},{"line_number":909,"context_line":"                                     instance)]"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"            # Include existing interfaces so they are not removed from the db."}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_54fb31c1","line":908,"range":{"start_line":908,"start_character":37,"end_line":908,"end_character":59},"in_reply_to":"da6ed579_8f3c35c9","updated":"2016-01-14 14:08:58.000000000","message":"Hmm right so ports are what NWinfo is indexed with, networks are just additional info that is needed, so we might even say that this is not necessary really for the bugfix. Makes it cleaner though.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"9ae5be3c79bfb2c3991f538977eac0b6214c4bce","unresolved":false,"context_lines":[{"line_number":905,"context_line":"                 \u0027name\u0027: iface[\u0027network\u0027][\u0027label\u0027],"},{"line_number":906,"context_line":"                 \u0027tenant_id\u0027: iface[\u0027network\u0027][\u0027meta\u0027][\u0027tenant_id\u0027]}"},{"line_number":907,"context_line":"                for iface in ifaces"},{"line_number":908,"context_line":"                if _logged_is_not_in(iface[\u0027network\u0027][\u0027id\u0027], networks_ids,"},{"line_number":909,"context_line":"                                     instance)]"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"            # Include existing interfaces so they are not removed from the db."}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_cada1b4b","line":908,"range":{"start_line":908,"start_character":37,"end_line":908,"end_character":59},"in_reply_to":"da6ed579_8f3c35c9","updated":"2016-01-14 13:01:21.000000000","message":"The failure (described in details in the original bug) is (in short):\nUnable to create tap device tap0739f4dd-d0: Device or resource busy\n\nThe key point for the failure is the tap-id (e.g. 0739f4dd-d0) which is set in _build_network_info_model while looping over the port_ids gotten from _gather_port_ids_and_networks. The name of the tap device is set by: \ndevname \u003d \"tap\" + current_neutron_port[\u0027id\u0027]\n\ncurrent_neutron_port is based on the port_id.\nSo as far as I understand the source for duplication is the port_ids list generated by _gather_port_ids_and_networks.\n\nAm I missing something?","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2770ad7a6ced5fb2a7bfb5459a012b7a8e94d672","unresolved":false,"context_lines":[{"line_number":906,"context_line":"                 \u0027tenant_id\u0027: iface[\u0027network\u0027][\u0027meta\u0027][\u0027tenant_id\u0027]}"},{"line_number":907,"context_line":"                for iface in ifaces"},{"line_number":908,"context_line":"                if _logged_is_not_in(iface[\u0027network\u0027][\u0027id\u0027], networks_ids,"},{"line_number":909,"context_line":"                                     instance)]"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"            # Include existing interfaces so they are not removed from the db."},{"line_number":912,"context_line":"            # Validate that the interface id is not in the port_ids"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_acd6d9ee","line":909,"updated":"2016-01-14 16:00:01.000000000","message":"maybe split into new_networks and networks, so its easier to read? not sure.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"456926af52bf7bd064992494a27c3eff11b4456d","unresolved":false,"context_lines":[{"line_number":906,"context_line":"                 \u0027tenant_id\u0027: iface[\u0027network\u0027][\u0027meta\u0027][\u0027tenant_id\u0027]}"},{"line_number":907,"context_line":"                for iface in ifaces"},{"line_number":908,"context_line":"                if _logged_is_not_in(iface[\u0027network\u0027][\u0027id\u0027], networks_ids,"},{"line_number":909,"context_line":"                                     instance)]"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"            # Include existing interfaces so they are not removed from the db."},{"line_number":912,"context_line":"            # Validate that the interface id is not in the port_ids"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_f2e4ace0","line":909,"in_reply_to":"da6ed579_acd6d9ee","updated":"2016-01-14 16:30:20.000000000","message":"I think re-using the networks variable is fine.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7fac487bcac77e81f5f74c51bbbddd27d280c589","unresolved":false,"context_lines":[{"line_number":261,"context_line":"    # we should at least log it as a warning"},{"line_number":262,"context_line":"    if present:"},{"line_number":263,"context_line":"        LOG.warning(_LW(\"%(item)s already exists in list: %(list_name)s\""},{"line_number":264,"context_line":"                        \"containing: %(items)s. ignoring it\"),"},{"line_number":265,"context_line":"                    {\u0027item\u0027: item,"},{"line_number":266,"context_line":"                     \u0027list_name\u0027: items_list_name,"},{"line_number":267,"context_line":"                     \u0027items\u0027: items},"}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_ae70d172","line":264,"range":{"start_line":264,"start_character":24,"end_line":264,"end_character":35},"updated":"2016-01-15 15:17:52.000000000","message":"You need a space before this, right now you have something like:\n\n\u0027x already exists in list: ycontaining: z. ignoring it\u0027","commit_id":"29db5c8c67e16940f58c82bf5943c161d620dd4e"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"dc85919769b7e02c913200f9bf8019acf1bf90e6","unresolved":false,"context_lines":[{"line_number":261,"context_line":"    # we should at least log it as a warning"},{"line_number":262,"context_line":"    if present:"},{"line_number":263,"context_line":"        LOG.warning(_LW(\"%(item)s already exists in list: %(list_name)s\""},{"line_number":264,"context_line":"                        \"containing: %(items)s. ignoring it\"),"},{"line_number":265,"context_line":"                    {\u0027item\u0027: item,"},{"line_number":266,"context_line":"                     \u0027list_name\u0027: items_list_name,"},{"line_number":267,"context_line":"                     \u0027items\u0027: items},"}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_ce3985f3","line":264,"range":{"start_line":264,"start_character":24,"end_line":264,"end_character":35},"in_reply_to":"da6ed579_ae70d172","updated":"2016-01-15 15:25:55.000000000","message":"Done","commit_id":"29db5c8c67e16940f58c82bf5943c161d620dd4e"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"d1f1be34de902177b4b4f0e1105897d2c10a242b","unresolved":false,"context_lines":[{"line_number":803,"context_line":"                for iface in ifaces"},{"line_number":804,"context_line":"                if iface[\u0027network\u0027][\u0027id\u0027] not in networks_ids]"},{"line_number":805,"context_line":"            port_ids \u003d [iface[\u0027id\u0027] for iface in ifaces"},{"line_number":806,"context_line":"                        if iface[\u0027id\u0027] not in port_ids] + port_ids"},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"        index \u003d 0"},{"line_number":809,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_dbdc9f48","line":806,"updated":"2015-12-10 13:09:41.000000000","message":"A good way to validate that your test is correctly checking this scenario would be to temporarily revert the above few changes, and ensure that the new test fails.","commit_id":"08e9b95ab7e1666804f13d41911f407341ecdf1c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4e4f15ca84d07adf1fc846d3119b5343a0b4ea8","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                                               self.nets2,"},{"line_number":680,"context_line":"                                               [self.port_data2[1][\u0027id\u0027]])"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def test_get_instance_nw_info_verify_duplicates_ignored(self):"},{"line_number":683,"context_line":"        # This test adds an already existing interface to an instance"},{"line_number":684,"context_line":"        # The expected behavior is that the already existing interface will"},{"line_number":685,"context_line":"        # not be added"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_6c7b018d","line":682,"range":{"start_line":682,"start_character":8,"end_line":682,"end_character":59},"updated":"2016-01-14 15:49:12.000000000","message":"Shouldn\u0027t you also assert that the warning is logged?","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"f265578bdda947e6e6ec49ea80472bff521f6007","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                                               self.nets2,"},{"line_number":680,"context_line":"                                               [self.port_data2[1][\u0027id\u0027]])"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def test_get_instance_nw_info_verify_duplicates_ignored(self):"},{"line_number":683,"context_line":"        # This test adds an already existing interface to an instance"},{"line_number":684,"context_line":"        # The expected behavior is that the already existing interface will"},{"line_number":685,"context_line":"        # not be added"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_e0059f10","line":682,"range":{"start_line":682,"start_character":8,"end_line":682,"end_character":59},"in_reply_to":"da6ed579_21df46da","updated":"2016-01-14 23:08:59.000000000","message":"Done","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a851eb94a8bbd8b2d14235fa7d1e9ea41db5e575","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                                               self.nets2,"},{"line_number":680,"context_line":"                                               [self.port_data2[1][\u0027id\u0027]])"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def test_get_instance_nw_info_verify_duplicates_ignored(self):"},{"line_number":683,"context_line":"        # This test adds an already existing interface to an instance"},{"line_number":684,"context_line":"        # The expected behavior is that the already existing interface will"},{"line_number":685,"context_line":"        # not be added"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_21df46da","line":682,"range":{"start_line":682,"start_character":8,"end_line":682,"end_character":59},"in_reply_to":"da6ed579_6c7b018d","updated":"2016-01-14 19:38:36.000000000","message":"Also, move this into TestNeutronv2WithMock so you don\u0027t have to rely on all of the crazy moxed setup stuff going on in the base test class, that makes doing anything else not fun.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":15427,"name":"David Edery","email":"david.edery@gmail.com","username":"dedery"},"change_message_id":"f265578bdda947e6e6ec49ea80472bff521f6007","unresolved":false,"context_lines":[{"line_number":679,"context_line":"                                               self.nets2,"},{"line_number":680,"context_line":"                                               [self.port_data2[1][\u0027id\u0027]])"},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"    def test_get_instance_nw_info_verify_duplicates_ignored(self):"},{"line_number":683,"context_line":"        # This test adds an already existing interface to an instance"},{"line_number":684,"context_line":"        # The expected behavior is that the already existing interface will"},{"line_number":685,"context_line":"        # not be added"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_c002db09","line":682,"range":{"start_line":682,"start_character":8,"end_line":682,"end_character":59},"in_reply_to":"da6ed579_6c7b018d","updated":"2016-01-14 23:08:59.000000000","message":"Done","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2770ad7a6ced5fb2a7bfb5459a012b7a8e94d672","unresolved":false,"context_lines":[{"line_number":806,"context_line":"                for iface in ifaces"},{"line_number":807,"context_line":"                if iface[\u0027network\u0027][\u0027id\u0027] not in networks_ids]"},{"line_number":808,"context_line":"            port_ids \u003d [iface[\u0027id\u0027] for iface in ifaces"},{"line_number":809,"context_line":"                        if iface[\u0027id\u0027] not in port_ids] + port_ids"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        index \u003d 0"},{"line_number":812,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da6ed579_0c07e518","line":809,"updated":"2016-01-14 16:00:01.000000000","message":"Oh my, this is just a cut an paste of the real logic. That feels like a bad test, but thats not the fault of this patch.","commit_id":"76e5a01b8ad8928c5a6a5774f347daf544098ed1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b18221ee14c48003affe835b7cbdf5be7f0deaec","unresolved":false,"context_lines":[{"line_number":2848,"context_line":""},{"line_number":2849,"context_line":"    @mock.patch(\u0027nova.network.neutronv2.api.LOG\u0027)"},{"line_number":2850,"context_line":"    def test_get_instance_nw_info_verify_duplicates_ignored(self, mock_log):"},{"line_number":2851,"context_line":"        \"\"\"test that the returned networks \u0026 port_ids from"},{"line_number":2852,"context_line":"        _gather_port_ids_and_networks doesn\u0027t contain any duplicates"},{"line_number":2853,"context_line":""},{"line_number":2854,"context_line":"        The test fakes an instance with two ports connected to two networks."}],"source_content_type":"text/x-python","patch_set":10,"id":"da6ed579_1177c2a0","line":2851,"updated":"2016-01-15 15:28:16.000000000","message":"nit: you\u0027re not supposed to use doc strings in tests because it apparently messes up testr output formatting if/when the test fails, but I won\u0027t hold this up on it since we have a lot of it in nova already.","commit_id":"3031adb857993d8196b4c9febca51ac82cf35fd6"}]}
