)]}'
{"nova/network/quantumv2/api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"036c9752c0b1469e760dfeee83a140ffbfadf962","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                    ports[network_id] \u003d port"},{"line_number":174,"context_line":"                elif fixed_ip:"},{"line_number":175,"context_line":"                    fixed_ips[network_id] \u003d fixed_ip"},{"line_number":176,"context_line":"                if network_id:"},{"line_number":177,"context_line":"                    net_ids.append(network_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        nets \u003d self._get_available_networks(context, instance[\u0027project_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BmWY%3D","line":176,"updated":"2013-02-26 07:15:26.000000000","message":"if network_id is not defined then line 175 will be problematic.","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"036c9752c0b1469e760dfeee83a140ffbfadf962","unresolved":false,"context_lines":[{"line_number":769,"context_line":"        nw_info \u003d network_model.NetworkInfo()"},{"line_number":770,"context_line":"        for port in ports:"},{"line_number":771,"context_line":"            network_name \u003d None"},{"line_number":772,"context_line":"            net \u003d None"},{"line_number":773,"context_line":"            for net in networks:"},{"line_number":774,"context_line":"                if port[\u0027network_id\u0027] \u003d\u003d net[\u0027id\u0027]:"},{"line_number":775,"context_line":"                    network_name \u003d net[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BmVo%3D","line":772,"updated":"2013-02-26 07:15:26.000000000","message":"not needed","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"db5eff45f302b393adb8990e03edd9257c8a26fb","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                    network_name \u003d net[\u0027name\u0027]"},{"line_number":776,"context_line":"                    break"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"            if net is None:"},{"line_number":779,"context_line":"                raise exception.NotFound(_(\u0027Network %(net)s for \u0027"},{"line_number":780,"context_line":"                                           \u0027port %(port_id)s not found!\u0027) %"},{"line_number":781,"context_line":"                                         {\u0027net\u0027: port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Bnaw%3D","line":778,"updated":"2013-02-25 18:42:32.000000000","message":"This check feels strange to me. Shouldn\u0027t this be \"if network_name is None\"? That would mean you didn\u0027t need to assign None to net here.","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"036c9752c0b1469e760dfeee83a140ffbfadf962","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                    network_name \u003d net[\u0027name\u0027]"},{"line_number":776,"context_line":"                    break"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"            if net is None:"},{"line_number":779,"context_line":"                raise exception.NotFound(_(\u0027Network %(net)s for \u0027"},{"line_number":780,"context_line":"                                           \u0027port %(port_id)s not found!\u0027) %"},{"line_number":781,"context_line":"                                         {\u0027net\u0027: port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BmWI%3D","line":778,"updated":"2013-02-26 07:15:26.000000000","message":"this check is not correct - please see the comment below","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"106f1a1a533e868a1bec120530350e8026c76c37","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                    network_name \u003d net[\u0027name\u0027]"},{"line_number":776,"context_line":"                    break"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"            if net is None:"},{"line_number":779,"context_line":"                raise exception.NotFound(_(\u0027Network %(net)s for \u0027"},{"line_number":780,"context_line":"                                           \u0027port %(port_id)s not found!\u0027) %"},{"line_number":781,"context_line":"                                         {\u0027net\u0027: port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Bl8c%3D","line":778,"in_reply_to":"AAAAM3%2F%2BmWI%3D","updated":"2013-02-26 14:34:20.000000000","message":"Gary, I see your reasoning, but 100% of the time, I fail on net and not network_name. I think it\u0027s entirely equivalent, but I\u0027ll be glad to change it if it matters to you (and Michael)","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"774e49f680fdb075f1a592c87f481810821af366","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                    network_name \u003d net[\u0027name\u0027]"},{"line_number":776,"context_line":"                    break"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":"            if net is None:"},{"line_number":779,"context_line":"                raise exception.NotFound(_(\u0027Network %(net)s for \u0027"},{"line_number":780,"context_line":"                                           \u0027port %(port_id)s not found!\u0027) %"},{"line_number":781,"context_line":"                                         {\u0027net\u0027: port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnaA%3D","line":778,"in_reply_to":"AAAAM3%2F%2Bnaw%3D","updated":"2013-02-25 18:48:30.000000000","message":"Fair enough. The original bug was that net is actually what gets used below, crashing if it didn\u0027t get created here. That felt like a reasonable reason to initialize net here and check it explicitly, but checking network_name will accomplish the same if you think it\u0027s better.","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"036c9752c0b1469e760dfeee83a140ffbfadf962","unresolved":false,"context_lines":[{"line_number":815,"context_line":"                id\u003dport[\u0027network_id\u0027],"},{"line_number":816,"context_line":"                bridge\u003dbridge,"},{"line_number":817,"context_line":"                injected\u003dCONF.flat_injected,"},{"line_number":818,"context_line":"                label\u003dnetwork_name,"},{"line_number":819,"context_line":"                tenant_id\u003dnet[\u0027tenant_id\u0027]"},{"line_number":820,"context_line":"            )"},{"line_number":821,"context_line":"            network[\u0027subnets\u0027] \u003d subnets"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BmVs%3D","line":818,"updated":"2013-02-26 07:15:26.000000000","message":"this is the reason for the exception. why not just use the tenant_id from the port (port[\u0027tenant_id\u0027])","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"106f1a1a533e868a1bec120530350e8026c76c37","unresolved":false,"context_lines":[{"line_number":815,"context_line":"                id\u003dport[\u0027network_id\u0027],"},{"line_number":816,"context_line":"                bridge\u003dbridge,"},{"line_number":817,"context_line":"                injected\u003dCONF.flat_injected,"},{"line_number":818,"context_line":"                label\u003dnetwork_name,"},{"line_number":819,"context_line":"                tenant_id\u003dnet[\u0027tenant_id\u0027]"},{"line_number":820,"context_line":"            )"},{"line_number":821,"context_line":"            network[\u0027subnets\u0027] \u003d subnets"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Bl8U%3D","line":818,"in_reply_to":"AAAAM3%2F%2BmK4%3D","updated":"2013-02-26 14:34:20.000000000","message":"Yes, this is the case where neither port nor network were passed in.","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"87591bbfc85a5b38dcbd7de243a0d449975f7836","unresolved":false,"context_lines":[{"line_number":815,"context_line":"                id\u003dport[\u0027network_id\u0027],"},{"line_number":816,"context_line":"                bridge\u003dbridge,"},{"line_number":817,"context_line":"                injected\u003dCONF.flat_injected,"},{"line_number":818,"context_line":"                label\u003dnetwork_name,"},{"line_number":819,"context_line":"                tenant_id\u003dnet[\u0027tenant_id\u0027]"},{"line_number":820,"context_line":"            )"},{"line_number":821,"context_line":"            network[\u0027subnets\u0027] \u003d subnets"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BmK4%3D","line":818,"in_reply_to":"AAAAM3%2F%2BmVs%3D","updated":"2013-02-26 10:31:52.000000000","message":"sometimes, port[\u0027tenant_id\u0027] is not the same as net[\u0027tenant_id\u0027],\nwhy :local variable \u0027net\u0027 referenced before assignment?\nthe port\u0027s network is not in searched or given networks?","commit_id":"4241bd645b3654b5c600c867b8bcdaa28c2776cf"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"12d1a25dd18561a9cba8bc0e2cf7af41a4bdd002","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                            available_macs.discard(port[\u0027mac_address\u0027])"},{"line_number":173,"context_line":"                    network_id \u003d port[\u0027network_id\u0027]"},{"line_number":174,"context_line":"                    ports[network_id] \u003d port"},{"line_number":175,"context_line":"                elif fixed_ip and network_id:"},{"line_number":176,"context_line":"                    fixed_ips[network_id] \u003d fixed_ip"},{"line_number":177,"context_line":"                if network_id:"},{"line_number":178,"context_line":"                    net_ids.append(network_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bl30%3D","line":175,"updated":"2013-02-26 15:33:18.000000000","message":"in fact, _get_requested_networks() in nova/api/openstack/compute/servers.py\nwill check the network_id is there if there is not port_id, so \u0027and network_id\u0027 is not a must.","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28ed943438cea14bf4c5741b83dceb79053515d3","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                            available_macs.discard(port[\u0027mac_address\u0027])"},{"line_number":173,"context_line":"                    network_id \u003d port[\u0027network_id\u0027]"},{"line_number":174,"context_line":"                    ports[network_id] \u003d port"},{"line_number":175,"context_line":"                elif fixed_ip and network_id:"},{"line_number":176,"context_line":"                    fixed_ips[network_id] \u003d fixed_ip"},{"line_number":177,"context_line":"                if network_id:"},{"line_number":178,"context_line":"                    net_ids.append(network_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bkw0%3D","line":175,"in_reply_to":"AAAAM3%2F%2BkzM%3D","updated":"2013-02-26 23:44:42.000000000","message":"We can and do enforce it in attach interfaces. The reason for adding this is to avoid someone new from calling this interface with only a fixed_ip (and no network) and getting something invalid to happen (fixed_ips[None] \u003d 10.0.0.1 for example).","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"1060fc9ca2db35e2a52b5822f3e15d64f6725344","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                            available_macs.discard(port[\u0027mac_address\u0027])"},{"line_number":173,"context_line":"                    network_id \u003d port[\u0027network_id\u0027]"},{"line_number":174,"context_line":"                    ports[network_id] \u003d port"},{"line_number":175,"context_line":"                elif fixed_ip and network_id:"},{"line_number":176,"context_line":"                    fixed_ips[network_id] \u003d fixed_ip"},{"line_number":177,"context_line":"                if network_id:"},{"line_number":178,"context_line":"                    net_ids.append(network_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BkzM%3D","line":175,"in_reply_to":"AAAAM3%2F%2Bl00%3D","updated":"2013-02-26 23:32:03.000000000","message":"why cannot we change it in attach_interfaces?","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"32c43ad3a222cb1fd1a6a95ef246ac9f4d04e577","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                            available_macs.discard(port[\u0027mac_address\u0027])"},{"line_number":173,"context_line":"                    network_id \u003d port[\u0027network_id\u0027]"},{"line_number":174,"context_line":"                    ports[network_id] \u003d port"},{"line_number":175,"context_line":"                elif fixed_ip and network_id:"},{"line_number":176,"context_line":"                    fixed_ips[network_id] \u003d fixed_ip"},{"line_number":177,"context_line":"                if network_id:"},{"line_number":178,"context_line":"                    net_ids.append(network_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bl00%3D","line":175,"in_reply_to":"AAAAM3%2F%2Bl30%3D","updated":"2013-02-26 15:52:04.000000000","message":"That\u0027s the point, there is another way to reach this now, via the attach_interfaces extension.","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"12d1a25dd18561a9cba8bc0e2cf7af41a4bdd002","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                    ports[network_id] \u003d port"},{"line_number":175,"context_line":"                elif fixed_ip and network_id:"},{"line_number":176,"context_line":"                    fixed_ips[network_id] \u003d fixed_ip"},{"line_number":177,"context_line":"                if network_id:"},{"line_number":178,"context_line":"                    net_ids.append(network_id)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        nets \u003d self._get_available_networks(context, instance[\u0027project_id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bl3s%3D","line":177,"updated":"2013-02-26 15:33:18.000000000","message":"according to above comment, this branch is also not a must.","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"}],"nova/tests/network/test_quantumv2.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"12d1a25dd18561a9cba8bc0e2cf7af41a4bdd002","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        self.assertRaises(BailOutEarly,"},{"line_number":645,"context_line":"                          api.allocate_for_instance,"},{"line_number":646,"context_line":"                              self.context, self.instance,"},{"line_number":647,"context_line":"                              requested_networks\u003d[(None, None, None)])"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    def _deallocate_for_instance(self, number):"},{"line_number":650,"context_line":"        port_data \u003d number \u003d\u003d 1 and self.port_data1 or self.port_data2"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bl3k%3D","line":647,"updated":"2013-02-26 15:33:18.000000000","message":"It is interesting to have this kind of requested_networks. It is breaking through the API check. I mean API should not allow it.\nand this case seems not to test the exception raised in this patch.","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"28ed943438cea14bf4c5741b83dceb79053515d3","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        self.assertRaises(BailOutEarly,"},{"line_number":645,"context_line":"                          api.allocate_for_instance,"},{"line_number":646,"context_line":"                              self.context, self.instance,"},{"line_number":647,"context_line":"                              requested_networks\u003d[(None, None, None)])"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    def _deallocate_for_instance(self, number):"},{"line_number":650,"context_line":"        port_data \u003d number \u003d\u003d 1 and self.port_data1 or self.port_data2"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BkxU%3D","line":647,"in_reply_to":"AAAAM3%2F%2BkzQ%3D","updated":"2013-02-26 23:44:42.000000000","message":"Yes, attach_interfaces will pass in None,None,None if you ask for a default allocation from novaclient like this:\n\nnova interface-attach myserver","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"1060fc9ca2db35e2a52b5822f3e15d64f6725344","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        self.assertRaises(BailOutEarly,"},{"line_number":645,"context_line":"                          api.allocate_for_instance,"},{"line_number":646,"context_line":"                              self.context, self.instance,"},{"line_number":647,"context_line":"                              requested_networks\u003d[(None, None, None)])"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    def _deallocate_for_instance(self, number):"},{"line_number":650,"context_line":"        port_data \u003d number \u003d\u003d 1 and self.port_data1 or self.port_data2"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2BkzQ%3D","line":647,"in_reply_to":"AAAAM3%2F%2Bl0o%3D","updated":"2013-02-26 23:32:03.000000000","message":"what is the novaclient command like to pass in the None, None, None request_networks? or what is the novaclient command to raise the exception before this change?","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"32c43ad3a222cb1fd1a6a95ef246ac9f4d04e577","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        self.assertRaises(BailOutEarly,"},{"line_number":645,"context_line":"                          api.allocate_for_instance,"},{"line_number":646,"context_line":"                              self.context, self.instance,"},{"line_number":647,"context_line":"                              requested_networks\u003d[(None, None, None)])"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    def _deallocate_for_instance(self, number):"},{"line_number":650,"context_line":"        port_data \u003d number \u003d\u003d 1 and self.port_data1 or self.port_data2"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2Bl0o%3D","line":647,"in_reply_to":"AAAAM3%2F%2Bl3k%3D","updated":"2013-02-26 15:52:04.000000000","message":"This _would_ raise the exception before my change, and the exception is raise-able via novaclient now, without this change.","commit_id":"cdf5e432de2cf1c0c5466470a6a0bccf999fcdd4"}]}
