)]}'
{"nova/api/metadata/base.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6d2c12d6da62bf10201585f056f5180ba9288d69","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            network_info \u003d instance.info_cache.network_info"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        # expose network metadata"},{"line_number":169,"context_line":"        # self.network_metadata \u003d netutils.get_network_metadata(network_info)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        self.ip_info \u003d \\"},{"line_number":172,"context_line":"                ec2utils.get_ip_info_for_instance_from_nw_info(network_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_3867b426","line":169,"updated":"2014-06-26 20:02:36.000000000","message":"Did you mean to leave the above commented-out?","commit_id":"8e4534b48d5514dfd0f31bcb6d2171fd26774257"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"ef9550f9c80557177fec7baeaf18b6844ea73b86","unresolved":false,"context_lines":[{"line_number":81,"context_line":"CONTENT_DIR \u003d \"content\""},{"line_number":82,"context_line":"MD_JSON_NAME \u003d \"meta_data.json\""},{"line_number":83,"context_line":"VD_JSON_NAME \u003d \"vendor_data.json\""},{"line_number":84,"context_line":"NW_JSON_NAME \u003d \"network_data.json\""},{"line_number":85,"context_line":"UD_NAME \u003d \"user_data\""},{"line_number":86,"context_line":"PASS_NAME \u003d \"password\""},{"line_number":87,"context_line":"MIME_TYPE_TEXT_PLAIN \u003d \"text/plain\""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_5669f9bc","line":84,"updated":"2015-02-03 13:49:26.000000000","message":"Why not put this in meta_data.json? Not saying you\u0027re wrong, just curious.","commit_id":"361959d4277108749c028a34f5687a13a463a31d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ff6d8d39780d80baeea8e4814b76f8cce2bf08de","unresolved":false,"context_lines":[{"line_number":81,"context_line":"CONTENT_DIR \u003d \"content\""},{"line_number":82,"context_line":"MD_JSON_NAME \u003d \"meta_data.json\""},{"line_number":83,"context_line":"VD_JSON_NAME \u003d \"vendor_data.json\""},{"line_number":84,"context_line":"NW_JSON_NAME \u003d \"network_data.json\""},{"line_number":85,"context_line":"UD_NAME \u003d \"user_data\""},{"line_number":86,"context_line":"PASS_NAME \u003d \"password\""},{"line_number":87,"context_line":"MIME_TYPE_TEXT_PLAIN \u003d \"text/plain\""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_39a47656","line":84,"in_reply_to":"da86d52c_5669f9bc","updated":"2015-02-03 14:25:05.000000000","message":"This is what we agreed with cloud-init, keep it separate.\n\nAlso, once neutron becomes the source of this data, it makes it easier if its separate.","commit_id":"361959d4277108749c028a34f5687a13a463a31d"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"17b3e988b67792e3a71022c29a61869c6fa81878","unresolved":false,"context_lines":[{"line_number":69,"context_line":"GRIZZLY \u003d \u00272013-04-04\u0027"},{"line_number":70,"context_line":"HAVANA \u003d \u00272013-10-17\u0027"},{"line_number":71,"context_line":"KILO \u003d \u00272015-04-30\u0027"},{"line_number":72,"context_line":"OPENSTACK_VERSIONS \u003d ["},{"line_number":73,"context_line":"    FOLSOM,"},{"line_number":74,"context_line":"    GRIZZLY,"},{"line_number":75,"context_line":"    HAVANA,"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_6dc28d35","line":72,"updated":"2015-02-03 23:31:38.000000000","message":"nit: did you mean to remove the blank line above?","commit_id":"42d0cd601c19b9a95034f618d5dd2894e90f7957"}],"nova/tests/network/test_network_info.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6d2c12d6da62bf10201585f056f5180ba9288d69","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        raise Exception(\u0027a\u0027)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def _test_get_network_metadata_json_no_ipv6(self):"},{"line_number":616,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_384ed496","line":616,"updated":"2014-06-26 20:02:36.000000000","message":"I have a feeling these tests aren\u0027t complete :)","commit_id":"8e4534b48d5514dfd0f31bcb6d2171fd26774257"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d02bb7bd1ae41f4a464da5a351df34c4eba6769e","unresolved":false,"context_lines":[{"line_number":628,"context_line":"            version\u003d6,"},{"line_number":629,"context_line":"            routes\u003d[ipv6_route])"},{"line_number":630,"context_line":"        netinfo[0][\u0027network\u0027].add_subnet(fake_network_cache_model.new_subnet("},{"line_number":631,"context_line":"            ipv6_subnet_dict))"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"        net_metadata \u003d netutils.get_network_metadata(netinfo, use_ipv6\u003dTrue)"},{"line_number":634,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_a47267e3","line":631,"updated":"2014-06-30 21:44:41.000000000","message":"You should move this to something like model.NetworkInfo([fake_network_cache_model.new_vif(ipv6\u003dTrue)]) so the rest of Nova can benefit from ipv6 testing.","commit_id":"7639fa3b6f66d6a9019ba8ce7e0f807bf7572423"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"d66a3e01434194bc61f9522426339d4ff6333678","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova import exception"},{"line_number":18,"context_line":"from nova.network import model"},{"line_number":19,"context_line":"from nova import test"},{"line_number":20,"context_line":"from nova.tests import fake_network_cache_model"},{"line_number":21,"context_line":"from nova.virt import netutils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_123f3e26","line":20,"updated":"2015-01-07 00:25:30.000000000","message":"H302  import only modules.\u0027from nova.tests import fake_network_cache_model\u0027 does not import a module","commit_id":"e388cf08d5e0f10e7533e7792f6aac19ce2d1af2"}],"nova/virt/netutils.py":[{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"466c9cb16fe47a2a8b78d20d35c22e9611036b6d","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        ifc_num +\u003d 1"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        #if not network.get_meta(\u0027injected\u0027):"},{"line_number":184,"context_line":"        #    continue"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        #return -1"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_c4b082ff","line":183,"updated":"2014-06-27 22:03:40.000000000","message":"I think these 3 lines can go","commit_id":"bfff83af109d79eac235725388ebac68c97768ea"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"466c9cb16fe47a2a8b78d20d35c22e9611036b6d","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    link \u003d {"},{"line_number":211,"context_line":"        \u0027id\u0027: link_id,"},{"line_number":212,"context_line":"        \u0027type\u0027: vif.get(\u0027type\u0027),"},{"line_number":213,"context_line":"        \u0027ethernet_mac_address\u0027: vif.get(\u0027address\u0027)"},{"line_number":214,"context_line":"    }"},{"line_number":215,"context_line":"    return link"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_04e7ca12","line":213,"updated":"2014-06-27 22:03:40.000000000","message":"You should add the vif_id to link.","commit_id":"bfff83af109d79eac235725388ebac68c97768ea"},{"author":{"_account_id":10326,"name":"Xiang BZ Zhou","email":"zhouxbj@cn.ibm.com","username":"zhoux"},"change_message_id":"f8880c2314a25f7205799e621821aa9fb1f52eb4","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    if not nets:"},{"line_number":198,"context_line":"        return"},{"line_number":199,"context_line":"    return {"},{"line_number":200,"context_line":"        \"links\": links,"},{"line_number":201,"context_line":"        \"networks\": nets"},{"line_number":202,"context_line":"    }"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_64192e23","line":200,"updated":"2015-01-21 01:42:57.000000000","message":"it\u0027s hard to use mac and ip address at the same time:\nex, we want bind ip 1.2.3.4 with 1a:2b:3c:4d:5e:6f we will use the dict like\nself.network_metadata[\u0027links\u0027][i][\u0027ethernet_mac_address\u0027] \n\u0026\nself.network_metadata[\u0027networks\u0027][i][\u0027ip _address\u0027]","commit_id":"103ea35042973c308ffb7c3928c66a88cb7a1dda"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"88d2fa353a83fda81cba66cb67b58fde74ddb2a9","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    if not nets:"},{"line_number":198,"context_line":"        return"},{"line_number":199,"context_line":"    return {"},{"line_number":200,"context_line":"        \"links\": links,"},{"line_number":201,"context_line":"        \"networks\": nets"},{"line_number":202,"context_line":"    }"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_399c0f5d","line":200,"in_reply_to":"3a961159_64192e23","updated":"2015-01-27 02:15:35.000000000","message":"You would find the network with the IP you want, then use the links list to find the link with the matching MAC.","commit_id":"103ea35042973c308ffb7c3928c66a88cb7a1dda"},{"author":{"_account_id":10326,"name":"Xiang BZ Zhou","email":"zhouxbj@cn.ibm.com","username":"zhoux"},"change_message_id":"f8880c2314a25f7205799e621821aa9fb1f52eb4","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    elif version \u003d\u003d 6:"},{"line_number":234,"context_line":"        netmask \u003d str(subnet.as_netaddr().netmask)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    net_info \u003d {"},{"line_number":237,"context_line":"        \u0027id\u0027: \u0027network%d\u0027 % ifc_num,"},{"line_number":238,"context_line":"        \u0027type\u0027: \u0027ipv%d\u0027 % version,"},{"line_number":239,"context_line":"        \u0027link\u0027: link_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_b9289f37","line":236,"updated":"2015-01-21 01:42:57.000000000","message":"i hope we can add dns nameserver and mac addree into net_info dict","commit_id":"103ea35042973c308ffb7c3928c66a88cb7a1dda"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"88d2fa353a83fda81cba66cb67b58fde74ddb2a9","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    elif version \u003d\u003d 6:"},{"line_number":234,"context_line":"        netmask \u003d str(subnet.as_netaddr().netmask)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    net_info \u003d {"},{"line_number":237,"context_line":"        \u0027id\u0027: \u0027network%d\u0027 % ifc_num,"},{"line_number":238,"context_line":"        \u0027type\u0027: \u0027ipv%d\u0027 % version,"},{"line_number":239,"context_line":"        \u0027link\u0027: link_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a930d6b_66536239","line":236,"in_reply_to":"3a961159_b9289f37","updated":"2015-01-27 02:15:35.000000000","message":"Mac address is added above as a link. This patch specifically separates link layer devices (MACs) from networks I\u0027ll add DNS, it was called out in the spec.","commit_id":"103ea35042973c308ffb7c3928c66a88cb7a1dda"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"d4cb32e4f240d7eaa584d165d8db0f074c3264cf","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                            \u0027libvirt_virt_type\u0027: libvirt_virt_type})"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"def get_network_metadata(network_info, use_ipv6\u003dCONF.use_ipv6):"},{"line_number":172,"context_line":"    \"\"\"Gets a more complete representation of the instance network information."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    This data is exposed as network_data.json in the metadata service and"}],"source_content_type":"text/x-python","patch_set":20,"id":"5ad0253b_6aa03b91","line":171,"updated":"2015-04-28 18:35:34.000000000","message":"The default value shouldn\u0027t be set here as per comment in a previous similar change [1]:\n\n    Parameter defaults were moved from the signature into the method since in the\n    original code, you wouldn\u0027t be able to override them due to their value being\n    populated at import-time, not run-time.\n\n[1] https://github.com/openstack/nova/commit/ffd71a6c120aa1700f263c26f030445ed2579052","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                            \u0027libvirt_virt_type\u0027: libvirt_virt_type})"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"def get_network_metadata(network_info, use_ipv6\u003dCONF.use_ipv6):"},{"line_number":172,"context_line":"    \"\"\"Gets a more complete representation of the instance network information."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    This data is exposed as network_data.json in the metadata service and"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a016987_d7961c4b","line":171,"in_reply_to":"5ad0253b_6aa03b91","updated":"2015-05-29 23:39:04.000000000","message":"Ahh that makes sense. Thanks!","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9e32935a6a4100a0a93d190cb5353d6f5c35daa4","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # Add IPv4 and IPv6 networks if they exist"},{"line_number":212,"context_line":"        if subnet_v4.get(\u0027ips\u0027):"},{"line_number":213,"context_line":"            nets.append(_get_nets(vif, subnet_v4, 4, ifc_num, link[\u0027id\u0027]))"},{"line_number":214,"context_line":"            for dns in _get_dns_services(subnet_v4):"},{"line_number":215,"context_line":"                if dns not in services:"},{"line_number":216,"context_line":"                    services.append(dns)"},{"line_number":217,"context_line":"        if (use_ipv6 and subnet_v6) and subnet_v6.get(\u0027ips\u0027):"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_3d0e5e33","line":214,"updated":"2015-02-14 18:12:56.000000000","message":"can you use a list comprehension here?","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # Add IPv4 and IPv6 networks if they exist"},{"line_number":212,"context_line":"        if subnet_v4.get(\u0027ips\u0027):"},{"line_number":213,"context_line":"            nets.append(_get_nets(vif, subnet_v4, 4, ifc_num, link[\u0027id\u0027]))"},{"line_number":214,"context_line":"            for dns in _get_dns_services(subnet_v4):"},{"line_number":215,"context_line":"                if dns not in services:"},{"line_number":216,"context_line":"                    services.append(dns)"},{"line_number":217,"context_line":"        if (use_ipv6 and subnet_v6) and subnet_v6.get(\u0027ips\u0027):"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_b43320f6","line":214,"in_reply_to":"da86d52c_3d0e5e33","updated":"2015-05-29 23:39:04.000000000","message":"Done","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9e32935a6a4100a0a93d190cb5353d6f5c35daa4","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                    services.append(dns)"},{"line_number":217,"context_line":"        if (use_ipv6 and subnet_v6) and subnet_v6.get(\u0027ips\u0027):"},{"line_number":218,"context_line":"            nets.append(_get_nets(vif, subnet_v6, 6, ifc_num, link[\u0027id\u0027]))"},{"line_number":219,"context_line":"            for dns in _get_dns_services(subnet_v6):"},{"line_number":220,"context_line":"                if dns not in services:"},{"line_number":221,"context_line":"                    services.append(dns)"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_5d1b1273","line":219,"updated":"2015-02-14 18:12:56.000000000","message":"ditto","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                    services.append(dns)"},{"line_number":217,"context_line":"        if (use_ipv6 and subnet_v6) and subnet_v6.get(\u0027ips\u0027):"},{"line_number":218,"context_line":"            nets.append(_get_nets(vif, subnet_v6, 6, ifc_num, link[\u0027id\u0027]))"},{"line_number":219,"context_line":"            for dns in _get_dns_services(subnet_v6):"},{"line_number":220,"context_line":"                if dns not in services:"},{"line_number":221,"context_line":"                    services.append(dns)"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_742288a4","line":219,"in_reply_to":"da86d52c_5d1b1273","updated":"2015-05-29 23:39:04.000000000","message":"Done","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9e32935a6a4100a0a93d190cb5353d6f5c35daa4","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                if dns not in services:"},{"line_number":221,"context_line":"                    services.append(dns)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    if not nets:"},{"line_number":224,"context_line":"        return"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    return {"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_1d119a53","line":223,"updated":"2015-02-14 18:12:56.000000000","message":"why do we have this here? why not return if the nets are []?","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f163741c3a600212a3dcb27e0a01ebc2ce841b18","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                if dns not in services:"},{"line_number":221,"context_line":"                    services.append(dns)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    if not nets:"},{"line_number":224,"context_line":"        return"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    return {"}],"source_content_type":"text/x-python","patch_set":20,"id":"3acd31a7_000ac3d2","line":223,"in_reply_to":"da86d52c_1d119a53","updated":"2015-04-29 19:55:08.000000000","message":"I think the code was partially copied from netutils. I suggest we return an empty list as mentioned by garyk.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                if dns not in services:"},{"line_number":221,"context_line":"                    services.append(dns)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    if not nets:"},{"line_number":224,"context_line":"        return"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    return {"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_f4167848","line":223,"in_reply_to":"da86d52c_1d119a53","updated":"2015-05-29 23:39:04.000000000","message":"I think this statement is unnecessary. Letting it return {... \u0027networks\u0027: [ ] ... } is ok. Removing.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f163741c3a600212a3dcb27e0a01ebc2ce841b18","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    \"\"\""},{"line_number":241,"context_line":"    link_id \u003d vif.get(\u0027devname\u0027)"},{"line_number":242,"context_line":"    if not link_id:"},{"line_number":243,"context_line":"        link_id \u003d \u0027nic%d\u0027 % ifc_num"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    # Use \u0027phy\u0027 for physical links. Ethernet can be confusing"},{"line_number":246,"context_line":"    if vif.get(\u0027type\u0027) \u003d\u003d \u0027ethernet\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3acd31a7_86e70c40","line":243,"updated":"2015-04-29 19:55:08.000000000","message":"I know it\u0027s a generic id but there is no \"nic\" prefix used in the spec. The \"interface\" prefix is used instead.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    \"\"\""},{"line_number":241,"context_line":"    link_id \u003d vif.get(\u0027devname\u0027)"},{"line_number":242,"context_line":"    if not link_id:"},{"line_number":243,"context_line":"        link_id \u003d \u0027nic%d\u0027 % ifc_num"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    # Use \u0027phy\u0027 for physical links. Ethernet can be confusing"},{"line_number":246,"context_line":"    if vif.get(\u0027type\u0027) \u003d\u003d \u0027ethernet\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a016987_42bca8ba","line":243,"in_reply_to":"3acd31a7_86e70c40","updated":"2015-05-29 23:39:04.000000000","message":"Done","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f163741c3a600212a3dcb27e0a01ebc2ce841b18","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    link \u003d {"},{"line_number":252,"context_line":"        \u0027id\u0027: link_id,"},{"line_number":253,"context_line":"        \u0027vif_id\u0027: vif[\u0027id\u0027],"},{"line_number":254,"context_line":"        \u0027type\u0027: nic_type,"},{"line_number":255,"context_line":"        \u0027mtu\u0027: vif[\u0027network\u0027].get(\u0027mtu\u0027),"},{"line_number":256,"context_line":"        \u0027ethernet_mac_address\u0027: vif.get(\u0027address\u0027),"}],"source_content_type":"text/x-python","patch_set":20,"id":"3acd31a7_e686c012","line":253,"updated":"2015-04-29 19:55:08.000000000","message":"I don\u0027t know if it\u0027s an oversight in the spec but there is no vif_id for physical interface.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    link \u003d {"},{"line_number":252,"context_line":"        \u0027id\u0027: link_id,"},{"line_number":253,"context_line":"        \u0027vif_id\u0027: vif[\u0027id\u0027],"},{"line_number":254,"context_line":"        \u0027type\u0027: nic_type,"},{"line_number":255,"context_line":"        \u0027mtu\u0027: vif[\u0027network\u0027].get(\u0027mtu\u0027),"},{"line_number":256,"context_line":"        \u0027ethernet_mac_address\u0027: vif.get(\u0027address\u0027),"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a016987_9248af5d","line":253,"in_reply_to":"3acd31a7_e686c012","updated":"2015-05-29 23:39:04.000000000","message":"So this is kind of a weird area with physical interfaces that\u0027s being actively worked on. Right now, you\u0027d have a one to one mapping of neutron ports to physical ports. But with bonding and/or vlans over bonds (which is being actively developed between Nova, Neutron, and Ironic for this cycle), you could wind up with single vif representing a bond of \u003e1 physical interfaces. So I\u0027ll update the spec to make it clear any link may or may not have an associated vif_id. For now, I\u0027m going to leave this implicit 1:1 mapping and update as more support gets added.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f163741c3a600212a3dcb27e0a01ebc2ce841b18","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            \u0027id\u0027: \u0027network%d\u0027 % ifc_num,"},{"line_number":275,"context_line":"            \u0027type\u0027: \u0027ipv%d_dhcp\u0027 % version,"},{"line_number":276,"context_line":"            \u0027link\u0027: link_id,"},{"line_number":277,"context_line":"            \u0027network_id\u0027: vif[\u0027network\u0027][\u0027id\u0027]"},{"line_number":278,"context_line":"        }"},{"line_number":279,"context_line":"        return net_info"},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3acd31a7_c045eb17","line":277,"updated":"2015-04-29 19:55:08.000000000","message":"The nova-spec mentions neutron_network_id. Should the code or spec be updated?","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            \u0027id\u0027: \u0027network%d\u0027 % ifc_num,"},{"line_number":275,"context_line":"            \u0027type\u0027: \u0027ipv%d_dhcp\u0027 % version,"},{"line_number":276,"context_line":"            \u0027link\u0027: link_id,"},{"line_number":277,"context_line":"            \u0027network_id\u0027: vif[\u0027network\u0027][\u0027id\u0027]"},{"line_number":278,"context_line":"        }"},{"line_number":279,"context_line":"        return net_info"},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a016987_b2660beb","line":277,"in_reply_to":"3acd31a7_c045eb17","updated":"2015-05-29 23:39:04.000000000","message":"Network ID is probably a better, more generic way. I\u0027ll update the spec.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"66cbfe9343cc602432de534db8e5658bf35d051d","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \u0027link\u0027: link_id,"},{"line_number":292,"context_line":"        \u0027ip_address\u0027: address,"},{"line_number":293,"context_line":"        \u0027netmask\u0027: netmask,"},{"line_number":294,"context_line":"        \u0027routes\u0027: _get_default_route(version, subnet),"},{"line_number":295,"context_line":"        \u0027network_id\u0027: vif[\u0027network\u0027][\u0027id\u0027]"},{"line_number":296,"context_line":"    }"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"bab921fb_71b1ece0","line":294,"updated":"2015-04-24 15:03:20.000000000","message":"This is setting the default route for the network, yes?\nShould the JSON also have a system level properties for IPv4 and IPv6 default routes that denote the default route for v4 and v6 stack?  This would then be written to something like the GATEWAY and IPV6_DEFAULTGW properties in RHEL\u0027s /etc/sysconfig/network.\n\nWithout this explicit specification of which route is the default route, the client (cloud-init) does not know which of the network default routes to set as the system default route when you have different static network configs on multiple NICs.\n\nAt some point some code needs to make the determination.  I think it would be best if it was explicitly set in the JSON, which means that OpenStack would have to make the designation of system default route.  This could also open up the possibility of having the VIF model or other user input during create server denote which of the networks should be used as the default route.\n\nUntil that happens OpenStack could possibly use this logic:\nIf eth0 is static, set the its default route as the system default route\nelse if eth0 is DHCP, don\u0027t set any system default route as the DHCP client should set the route.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \u0027link\u0027: link_id,"},{"line_number":292,"context_line":"        \u0027ip_address\u0027: address,"},{"line_number":293,"context_line":"        \u0027netmask\u0027: netmask,"},{"line_number":294,"context_line":"        \u0027routes\u0027: _get_default_route(version, subnet),"},{"line_number":295,"context_line":"        \u0027network_id\u0027: vif[\u0027network\u0027][\u0027id\u0027]"},{"line_number":296,"context_line":"    }"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a016987_b2528b65","line":294,"in_reply_to":"bab921fb_71b1ece0","updated":"2015-05-29 23:39:04.000000000","message":"I think until the Neutron has support for default route (which as far as I can tell, I don\u0027t see anything, except for the default route on routers, IMBW), leaving it up to cloud-init is sensible. They\u0027re already setting default routes today; they\u0027ll just have more info to make the decision now.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f163741c3a600212a3dcb27e0a01ebc2ce841b18","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        \u0027ip_address\u0027: address,"},{"line_number":293,"context_line":"        \u0027netmask\u0027: netmask,"},{"line_number":294,"context_line":"        \u0027routes\u0027: _get_default_route(version, subnet),"},{"line_number":295,"context_line":"        \u0027network_id\u0027: vif[\u0027network\u0027][\u0027id\u0027]"},{"line_number":296,"context_line":"    }"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    # Add any additional routes beyond the default route"}],"source_content_type":"text/x-python","patch_set":20,"id":"3acd31a7_606cd79c","line":295,"updated":"2015-04-29 19:55:08.000000000","message":"Same here regarding neutron_network_id vs network_id","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        \u0027ip_address\u0027: address,"},{"line_number":293,"context_line":"        \u0027netmask\u0027: netmask,"},{"line_number":294,"context_line":"        \u0027routes\u0027: _get_default_route(version, subnet),"},{"line_number":295,"context_line":"        \u0027network_id\u0027: vif[\u0027network\u0027][\u0027id\u0027]"},{"line_number":296,"context_line":"    }"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    # Add any additional routes beyond the default route"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a016987_d2e867e4","line":295,"in_reply_to":"3acd31a7_606cd79c","updated":"2015-05-29 23:39:04.000000000","message":"Done","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9e32935a6a4100a0a93d190cb5353d6f5c35daa4","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    if version \u003d\u003d 4:"},{"line_number":323,"context_line":"        return [{"},{"line_number":324,"context_line":"            \u0027network\u0027: \u00270.0.0.0\u0027,"},{"line_number":325,"context_line":"            \u0027netmask\u0027: \u00270.0.0.0\u0027,"},{"line_number":326,"context_line":"            \u0027gateway\u0027: gateway"},{"line_number":327,"context_line":"        }]"},{"line_number":328,"context_line":"    elif version \u003d\u003d 6:"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_7d18d675","line":325,"updated":"2015-02-14 18:12:56.000000000","message":"why not return the actual network mask of the subnet?","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"f0c9ed6738055f2a6bf3f6bdfc0bba39037d2083","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    if version \u003d\u003d 4:"},{"line_number":323,"context_line":"        return [{"},{"line_number":324,"context_line":"            \u0027network\u0027: \u00270.0.0.0\u0027,"},{"line_number":325,"context_line":"            \u0027netmask\u0027: \u00270.0.0.0\u0027,"},{"line_number":326,"context_line":"            \u0027gateway\u0027: gateway"},{"line_number":327,"context_line":"        }]"},{"line_number":328,"context_line":"    elif version \u003d\u003d 6:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3acd31a7_8ae4b40d","line":325,"in_reply_to":"da86d52c_7d18d675","updated":"2015-04-29 18:33:02.000000000","message":"This is what the nova-spec, Linux and Windows use to describe the default route. I don\u0027t see a reason to diverge from that.","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9e32935a6a4100a0a93d190cb5353d6f5c35daa4","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    services \u003d []"},{"line_number":339,"context_line":"    if not subnet.get(\u0027dns\u0027):"},{"line_number":340,"context_line":"        return services"},{"line_number":341,"context_line":"    for ip in subnet[\u0027dns\u0027]:"},{"line_number":342,"context_line":"        services.append({\u0027type\u0027: \u0027dns\u0027, \u0027address\u0027: ip.get(\u0027address\u0027)})"},{"line_number":343,"context_line":"    return services"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_bd296e8b","line":341,"updated":"2015-02-14 18:12:56.000000000","message":"can you use a list comprehension?","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"08aedf4ddc4ed45d8d106872e465574cad246794","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    services \u003d []"},{"line_number":339,"context_line":"    if not subnet.get(\u0027dns\u0027):"},{"line_number":340,"context_line":"        return services"},{"line_number":341,"context_line":"    for ip in subnet[\u0027dns\u0027]:"},{"line_number":342,"context_line":"        services.append({\u0027type\u0027: \u0027dns\u0027, \u0027address\u0027: ip.get(\u0027address\u0027)})"},{"line_number":343,"context_line":"    return services"}],"source_content_type":"text/x-python","patch_set":20,"id":"da86d52c_9411bc55","line":341,"in_reply_to":"da86d52c_bd296e8b","updated":"2015-05-29 23:39:04.000000000","message":"Done","commit_id":"bc237bdd0ad14ebb9f8bfde299c5d6cf4e7e8710"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9f5bc1f02695abede6cb8de20d9b0acfe4a88648","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    This data is exposed as network_data.json in the metadata service and"},{"line_number":186,"context_line":"    the config drive."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    :py:meth:`~nova.network.manager.NetworkManager.get_instance_nw_info`"},{"line_number":189,"context_line":"    :param use_ipv6: If False, do not return IPv6 template information"},{"line_number":190,"context_line":"        even if an IPv6 subnet is present in network_info. Defaults to"},{"line_number":191,"context_line":"        nova.netconf.use_ipv6."}],"source_content_type":"text/x-python","patch_set":22,"id":"ba3cc151_f4bf19a8","line":188,"updated":"2015-07-07 15:50:02.000000000","message":"The above line seems out of place? :)","commit_id":"5fb3d6cf460b92d8f8038706ed21227f2643d584"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fb07f342b15d37114500b115e2adb6506b43e253","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    This data is exposed as network_data.json in the metadata service and"},{"line_number":186,"context_line":"    the config drive."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    :py:meth:`~nova.network.manager.NetworkManager.get_instance_nw_info`"},{"line_number":189,"context_line":"    :param use_ipv6: If False, do not return IPv6 template information"},{"line_number":190,"context_line":"        even if an IPv6 subnet is present in network_info. Defaults to"},{"line_number":191,"context_line":"        nova.netconf.use_ipv6."}],"source_content_type":"text/x-python","patch_set":22,"id":"ba3cc151_1c99746e","line":188,"in_reply_to":"ba3cc151_f4bf19a8","updated":"2015-07-07 23:47:29.000000000","message":"Ahh took me a sec to figure out..it\u0027s missing a :param network_info: above it and an indent.","commit_id":"5fb3d6cf460b92d8f8038706ed21227f2643d584"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"50453797bb586964e3081ec107fb90af96a9de4a","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    the config drive."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    :param network_info:"},{"line_number":189,"context_line":"        :py:meth:`~nova.network.manager.NetworkManager.get_instance_nw_info`"},{"line_number":190,"context_line":"    :param use_ipv6: If False, do not return IPv6 template information"},{"line_number":191,"context_line":"        even if an IPv6 subnet is present in network_info. Defaults to"},{"line_number":192,"context_line":"        nova.netconf.use_ipv6."}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_132f0189","line":189,"updated":"2015-07-08 13:32:37.000000000","message":"no, I meant that you should indicate what the parameter\u0027s type is, not the method that produces the parameter :)\n\nSo, above should just be:\n\n :param network_info: `nova.network.models.NetworkInfo` object describing the\n        network metadata.","commit_id":"d933990cf6745d9dcb350ef16c8afd39760a7151"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"6f37e94899140d2f810dbe86f5282296a4338c54","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    the config drive."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    :param network_info:"},{"line_number":189,"context_line":"        :py:meth:`~nova.network.manager.NetworkManager.get_instance_nw_info`"},{"line_number":190,"context_line":"    :param use_ipv6: If False, do not return IPv6 template information"},{"line_number":191,"context_line":"        even if an IPv6 subnet is present in network_info. Defaults to"},{"line_number":192,"context_line":"        nova.netconf.use_ipv6."}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_8d667bb9","line":189,"in_reply_to":"ba3cc151_132f0189","updated":"2015-07-09 18:05:37.000000000","message":"Oh, gotcha. I was going off of \"get_injected_network_template\" above. This makes more sense.","commit_id":"d933990cf6745d9dcb350ef16c8afd39760a7151"}]}
