)]}'
{"nova/network/linux_net.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":605,"context_line":"    conffile \u003d _dhcp_file(dev, \u0027conf\u0027)"},{"line_number":606,"context_line":"    with open(conffile, \u0027w\u0027) as f:"},{"line_number":607,"context_line":"        f.write(hosts_text)"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"def kill_dhcp(dev):"},{"line_number":610,"context_line":"    pid \u003d _dnsmasq_pid_for(dev)"},{"line_number":611,"context_line":"    _execute(\u0027kill\u0027, \u0027-9\u0027, pid, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7qQ%3D","line":608,"updated":"2011-10-20 01:42:11.000000000","message":"Just recently I saw another recent change that also introduced some ability to kill dnsmasq.  we probably want to make sure there isn\u0027t a duplicate function.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":605,"context_line":"    conffile \u003d _dhcp_file(dev, \u0027conf\u0027)"},{"line_number":606,"context_line":"    with open(conffile, \u0027w\u0027) as f:"},{"line_number":607,"context_line":"        f.write(hosts_text)"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"def kill_dhcp(dev):"},{"line_number":610,"context_line":"    pid \u003d _dnsmasq_pid_for(dev)"},{"line_number":611,"context_line":"    _execute(\u0027kill\u0027, \u0027-9\u0027, pid, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pA%3D","line":608,"in_reply_to":"AAAACX%2F%2F7qQ%3D","updated":"2011-10-20 05:19:40.000000000","message":"Good catched.. removed and we\u0027ll just use stop_dnsmasq","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":858,"context_line":""},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"def plug(network, mac_address, gateway\u003dTrue):"},{"line_number":861,"context_line":"    return interface_driver.plug(network, mac_address, gateway)"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"def unplug(network):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7qM%3D","line":861,"updated":"2011-10-20 01:42:11.000000000","message":"maybe name this in a way that clearly indicates that this is a boolean.  Elsewhere this same variable name is used for a string that is the gateway IP.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":858,"context_line":""},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"def plug(network, mac_address, gateway\u003dTrue):"},{"line_number":861,"context_line":"    return interface_driver.plug(network, mac_address, gateway)"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"def unplug(network):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7o8%3D","line":861,"in_reply_to":"AAAACX%2F%2F7qM%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"class LinuxOVSInterfaceDriver(LinuxNetInterfaceDriver):"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":"    def plug(self, network, mac_address, gateway\u003dTrue):"},{"line_number":1025,"context_line":"        dev \u003d \"gw-\" + str(network[\u0027uuid\u0027][0:11])"},{"line_number":1026,"context_line":"        if not _device_exists(dev):"},{"line_number":1027,"context_line":"            bridge \u003d FLAGS.linuxnet_ovs_integration_bridge"},{"line_number":1028,"context_line":"            _execute(\u0027ovs-vsctl\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7qE%3D","line":1025,"updated":"2011-10-20 01:42:11.000000000","message":"can this use the get_dev() method defined below?","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"class LinuxOVSInterfaceDriver(LinuxNetInterfaceDriver):"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":"    def plug(self, network, mac_address, gateway\u003dTrue):"},{"line_number":1025,"context_line":"        dev \u003d \"gw-\" + str(network[\u0027uuid\u0027][0:11])"},{"line_number":1026,"context_line":"        if not _device_exists(dev):"},{"line_number":1027,"context_line":"            bridge \u003d FLAGS.linuxnet_ovs_integration_bridge"},{"line_number":1028,"context_line":"            _execute(\u0027ovs-vsctl\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7o4%3D","line":1025,"in_reply_to":"AAAACX%2F%2F7qE%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":1045,"context_line":"                    \u0027add-flow\u0027, bridge, \"priority\u003d1,actions\u003ddrop\")"},{"line_number":1046,"context_line":"                _execute(\u0027ovs-ofctl\u0027, \u0027add-flow\u0027, bridge,"},{"line_number":1047,"context_line":"                    \"udp,tp_dst\u003d67,dl_dst\u003d%s,priority\u003d2,actions\u003dnormal\" %"},{"line_number":1048,"context_line":"                    mac_address)"},{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"        return dev"},{"line_number":1051,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7qI%3D","line":1048,"updated":"2011-10-20 01:42:11.000000000","message":"We may have to broaden the scope of this later when we support the metadata server.  \n\nAlso, I think you need to scope the destination of this flow, otherwise, any traffic sent by the VM to any destination on udp port 67 could be forwarded, which breaks the model.  For DHCP, matching on destination MAC of broadcast should work.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":1045,"context_line":"                    \u0027add-flow\u0027, bridge, \"priority\u003d1,actions\u003ddrop\")"},{"line_number":1046,"context_line":"                _execute(\u0027ovs-ofctl\u0027, \u0027add-flow\u0027, bridge,"},{"line_number":1047,"context_line":"                    \"udp,tp_dst\u003d67,dl_dst\u003d%s,priority\u003d2,actions\u003dnormal\" %"},{"line_number":1048,"context_line":"                    mac_address)"},{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"        return dev"},{"line_number":1051,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7ow%3D","line":1048,"in_reply_to":"AAAACX%2F%2F7qI%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"        return self.get_dev(network)"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"    def get_dev(self, network):"},{"line_number":1056,"context_line":"        dev \u003d \"gw-\" + str(network[\u0027uuid\u0027][0:11])"},{"line_number":1057,"context_line":"        return dev"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"iptables_manager \u003d IptablesManager()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7qA%3D","line":1056,"updated":"2011-10-20 01:42:11.000000000","message":"A comment here might be helpful, as magic numbers are always somewhat confusing.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"        return self.get_dev(network)"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"    def get_dev(self, network):"},{"line_number":1056,"context_line":"        dev \u003d \"gw-\" + str(network[\u0027uuid\u0027][0:11])"},{"line_number":1057,"context_line":"        return dev"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"iptables_manager \u003d IptablesManager()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7o0%3D","line":1056,"in_reply_to":"AAAACX%2F%2F7qA%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":385,"name":"Jason Kölker","email":"jason@koelker.net","username":"jason-koelker"},"change_message_id":"1eabe55902f5ad19e19fdd104d2c956c9fda3d37","unresolved":false,"context_lines":[{"line_number":606,"context_line":"    conffile \u003d _dhcp_file(dev, \u0027conf\u0027)"},{"line_number":607,"context_line":"    with open(conffile, \u0027w\u0027) as f:"},{"line_number":608,"context_line":"        f.write(hosts_text)"},{"line_number":609,"context_line":""},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"def kill_dhcp(dev):"},{"line_number":612,"context_line":"    pid \u003d _dnsmasq_pid_for(dev)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3w0%3D","line":609,"updated":"2011-11-08 00:18:43.000000000","message":"I think these funcitons are leaving around new files in networks/*.conf when running the unit_tests. They should be stubbed out for the tests.","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"514b7e6d62b096a02dc87f1983eaa9d50cf623fe","unresolved":false,"context_lines":[{"line_number":992,"context_line":"                     \"can\u0027t enslave it to bridge %s.\\n\" % (interface, bridge)):"},{"line_number":993,"context_line":"                raise exception.Error(\u0027Failed to add interface: %s\u0027 % err)"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"        # Don\u0027t forward traffic unless we were told to be a gateway"},{"line_number":996,"context_line":"        if gateway:"},{"line_number":997,"context_line":"            iptables_manager.ipv4[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027,"},{"line_number":998,"context_line":"                                             \u0027--in-interface %s -j ACCEPT\u0027 % \\"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAACX%2F%2F3kQ%3D","line":995,"updated":"2011-11-08 17:48:53.000000000","message":"I would rather see the actions within the conditional more focused on the decision of the conditional. \n\ni.e.\nguard \u003d \"DROP\"\nif gateway\n  guard \u003d \"ACCEPT\"\n  \nfor direction in [\u0027in\u0027, \u0027out\u0027]  \n    iptables_manager.ipv4[\u0027filter\u0027].add_rule(\u0027FORWARD\u0027,\n                                     \u0027--$(direction)-interface %(guard)s -j %(bridge)s\u0027 % \\\n                                     locals())\n\nThis will make it much easier to fix errors in the generation of those commands.","commit_id":"e1e8b3877687af7657f5b7a32313cc7184fb25b0"}],"nova/network/manager.py":[{"author":{"_account_id":191,"name":"Trey Morris","email":"trey.morris@rackspace.com","username":"tr3buchet"},"change_message_id":"2f76c196eb9ca0bb93b64dce41c9b9161fd58d5c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"flags.DEFINE_string(\u0027fixed_range\u0027, \u002710.0.0.0/8\u0027, \u0027Fixed IP address block\u0027)"},{"line_number":96,"context_line":"flags.DEFINE_string(\u0027fixed_range_v6\u0027, \u0027fd00::/48\u0027, \u0027Fixed IPv6 address block\u0027)"},{"line_number":97,"context_line":"flags.DEFINE_string(\u0027gateway\u0027, None, \u0027Default IPv4 gateway\u0027)"},{"line_number":98,"context_line":"flags.DEFINE_string(\u0027gateway_v6\u0027, None, \u0027Default IPv6 gateway\u0027)"},{"line_number":99,"context_line":"flags.DEFINE_integer(\u0027cnt_vpn_clients\u0027, 0,"},{"line_number":100,"context_line":"                     \u0027Number of addresses reserved for vpn clients\u0027)"},{"line_number":101,"context_line":"flags.DEFINE_bool(\u0027update_dhcp_on_disassociate\u0027, False,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3yc%3D","line":98,"updated":"2011-11-07 23:59:52.000000000","message":"Really wish we didn\u0027t have to have flags for gateway. They should be required arguments to network create.","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"}],"nova/network/quantum/manager.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"       Currently, the QuantumManager does NOT support any of the \u0027gateway\u0027"},{"line_number":44,"context_line":"       functionality implemented by the Nova VlanManager, including:"},{"line_number":45,"context_line":"            * floating IPs"},{"line_number":46,"context_line":"            * DHCP"},{"line_number":47,"context_line":"            * NAT gateway"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"       Support for these capabilities are targted for future releases."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7p8%3D","side":"PARENT","line":46,"updated":"2011-10-20 01:42:11.000000000","message":"Yay!","commit_id":"3d0f0b0b93387c53b6cd8b4e583e49319eec531d"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"       Currently, the QuantumManager does NOT support any of the \u0027gateway\u0027"},{"line_number":44,"context_line":"       functionality implemented by the Nova VlanManager, including:"},{"line_number":45,"context_line":"            * floating IPs"},{"line_number":46,"context_line":"            * DHCP"},{"line_number":47,"context_line":"            * NAT gateway"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"       Support for these capabilities are targted for future releases."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7os%3D","side":"PARENT","line":46,"in_reply_to":"AAAACX%2F%2F7p8%3D","updated":"2011-10-20 05:19:40.000000000","message":"One down .. almost :)","commit_id":"3d0f0b0b93387c53b6cd8b4e583e49319eec531d"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        return self.get_instance_nw_info(context, instance_id,"},{"line_number":228,"context_line":"                                         instance_type_id, host)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def enable_dhcp(self, context, quantum_net_id, network_ref, vif_rec,"},{"line_number":231,"context_line":"            project_id):"},{"line_number":232,"context_line":"        LOG.info(\"Using DHCP for network: %s\" % network_ref[\u0027label\u0027])"},{"line_number":233,"context_line":"        # Figure out the ipam tenant id for this subnet:  We need to"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7p4%3D","line":230,"updated":"2011-10-20 01:42:11.000000000","message":"Needs docstring","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        return self.get_instance_nw_info(context, instance_id,"},{"line_number":228,"context_line":"                                         instance_type_id, host)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def enable_dhcp(self, context, quantum_net_id, network_ref, vif_rec,"},{"line_number":231,"context_line":"            project_id):"},{"line_number":232,"context_line":"        LOG.info(\"Using DHCP for network: %s\" % network_ref[\u0027label\u0027])"},{"line_number":233,"context_line":"        # Figure out the ipam tenant id for this subnet:  We need to"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oo%3D","line":230,"in_reply_to":"AAAACX%2F%2F7p4%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            network_ref[\u0027broadcast\u0027] \u003d IPAddress(n.broadcast)"},{"line_number":257,"context_line":"            network_ref[\u0027gateway\u0027] \u003d subnet[\u0027gateway\u0027]"},{"line_number":258,"context_line":"            # Construct the interface id that we\u0027ll use for the bridge"},{"line_number":259,"context_line":"            interface_id \u003d \"gw-\" + str(network_ref[\u0027uuid\u0027][0:11])"},{"line_number":260,"context_line":"            network_ref[\u0027bridge\u0027] \u003d interface_id"},{"line_number":261,"context_line":"            # Query quantum to see if we\u0027ve already created a port for"},{"line_number":262,"context_line":"            # the gateway device and attached the device to the port."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7p0%3D","line":259,"updated":"2011-10-20 01:42:11.000000000","message":"should use get_dev()","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            network_ref[\u0027broadcast\u0027] \u003d IPAddress(n.broadcast)"},{"line_number":257,"context_line":"            network_ref[\u0027gateway\u0027] \u003d subnet[\u0027gateway\u0027]"},{"line_number":258,"context_line":"            # Construct the interface id that we\u0027ll use for the bridge"},{"line_number":259,"context_line":"            interface_id \u003d \"gw-\" + str(network_ref[\u0027uuid\u0027][0:11])"},{"line_number":260,"context_line":"            network_ref[\u0027bridge\u0027] \u003d interface_id"},{"line_number":261,"context_line":"            # Query quantum to see if we\u0027ve already created a port for"},{"line_number":262,"context_line":"            # the gateway device and attached the device to the port."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7ok%3D","line":259,"in_reply_to":"AAAACX%2F%2F7p0%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            q_tenant_id \u003d project_id or FLAGS.quantum_default_tenant_id"},{"line_number":267,"context_line":"            port \u003d self.q_conn.get_port_by_attachment(q_tenant_id,"},{"line_number":268,"context_line":"                    quantum_net_id, interface_id)"},{"line_number":269,"context_line":"            if not port:  # No dhcp server has been started"},{"line_number":270,"context_line":"                mac_address \u003d self.generate_mac_address()"},{"line_number":271,"context_line":"                dev \u003d self.driver.plug(network_ref, mac_address,"},{"line_number":272,"context_line":"                    gateway\u003d(network_ref[\u0027gateway\u0027] !\u003d None))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pw%3D","line":269,"updated":"2011-10-20 01:42:11.000000000","message":"what in this logic makes sure a DHCP interface is created if the network node is restarted?  It seems that in that case, the logical port with an attachment would exist, but the physical device would not exist.  I think linux_net has a \"device_exists\" primitive.  Probably better to check that directly.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            q_tenant_id \u003d project_id or FLAGS.quantum_default_tenant_id"},{"line_number":267,"context_line":"            port \u003d self.q_conn.get_port_by_attachment(q_tenant_id,"},{"line_number":268,"context_line":"                    quantum_net_id, interface_id)"},{"line_number":269,"context_line":"            if not port:  # No dhcp server has been started"},{"line_number":270,"context_line":"                mac_address \u003d self.generate_mac_address()"},{"line_number":271,"context_line":"                dev \u003d self.driver.plug(network_ref, mac_address,"},{"line_number":272,"context_line":"                    gateway\u003d(network_ref[\u0027gateway\u0027] !\u003d None))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oU%3D","line":269,"in_reply_to":"AAAACX%2F%2F7pw%3D","updated":"2011-10-20 05:19:40.000000000","message":"Yeah, that\u0027s a good point.  I didn\u0027t know about device_exists .. I\u0027ll change it.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":424,"context_line":"                        (instance_id)))"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    # TODO(bgh): At some point we should consider merging enable_dhcp() and"},{"line_number":427,"context_line":"    # update_dhcp()"},{"line_number":428,"context_line":"    def update_dhcp(self, context, ipam_tenant_id, network_ref, vif_ref,"},{"line_number":429,"context_line":"            project_id):"},{"line_number":430,"context_line":"        # Figure out what subnet corresponds to this network/vif"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pk%3D","line":427,"updated":"2011-10-20 01:42:11.000000000","message":"Yes, in fact, it seems like some basic refactoring could already be done.  For example, how you create the network ref based on a cidr.  It would be particularly good to separate that code out into a shared function because it contains hardcoded rules like dhcp_start being the 3rd IP.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":424,"context_line":"                        (instance_id)))"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    # TODO(bgh): At some point we should consider merging enable_dhcp() and"},{"line_number":427,"context_line":"    # update_dhcp()"},{"line_number":428,"context_line":"    def update_dhcp(self, context, ipam_tenant_id, network_ref, vif_ref,"},{"line_number":429,"context_line":"            project_id):"},{"line_number":430,"context_line":"        # Figure out what subnet corresponds to this network/vif"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oY%3D","line":427,"in_reply_to":"AAAACX%2F%2F7pk%3D","updated":"2011-10-20 05:19:40.000000000","message":"OK, moved that out :)","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            network_ref[\u0027dhcp_start\u0027] \u003d IPAddress(n.first + 2)"},{"line_number":443,"context_line":"            network_ref[\u0027broadcast\u0027] \u003d IPAddress(n.broadcast)"},{"line_number":444,"context_line":"            network_ref[\u0027gateway\u0027] \u003d IPAddress(n.first + 1)"},{"line_number":445,"context_line":"            dev \u003d \"gw-\" + str(network_ref[\u0027uuid\u0027][0:11])"},{"line_number":446,"context_line":"            # And remove the dhcp mappings for the subnet"},{"line_number":447,"context_line":"            hosts \u003d self.get_dhcp_hosts_text(context,"},{"line_number":448,"context_line":"                subnet[\u0027network_id\u0027], project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7po%3D","line":445,"updated":"2011-10-20 01:42:11.000000000","message":"use get_dev()","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            network_ref[\u0027dhcp_start\u0027] \u003d IPAddress(n.first + 2)"},{"line_number":443,"context_line":"            network_ref[\u0027broadcast\u0027] \u003d IPAddress(n.broadcast)"},{"line_number":444,"context_line":"            network_ref[\u0027gateway\u0027] \u003d IPAddress(n.first + 1)"},{"line_number":445,"context_line":"            dev \u003d \"gw-\" + str(network_ref[\u0027uuid\u0027][0:11])"},{"line_number":446,"context_line":"            # And remove the dhcp mappings for the subnet"},{"line_number":447,"context_line":"            hosts \u003d self.get_dhcp_hosts_text(context,"},{"line_number":448,"context_line":"                subnet[\u0027network_id\u0027], project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7og%3D","line":445,"in_reply_to":"AAAACX%2F%2F7po%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                subnet[\u0027network_id\u0027], project_id)"},{"line_number":449,"context_line":"            self.driver.update_dhcp_hostfile_with_text(dev, hosts)"},{"line_number":450,"context_line":"            # Restart dnsmasq"},{"line_number":451,"context_line":"            self.driver.kill_dhcp(dev)"},{"line_number":452,"context_line":"            self.driver.restart_dhcp(dev, network_ref)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"            # TODO(bgh): if this is the last instance for the network"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pg%3D","line":451,"updated":"2011-10-20 01:42:11.000000000","message":"seems odd that you have to kill, then restart.  shouldn\u0027t restart be kill + start?","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                subnet[\u0027network_id\u0027], project_id)"},{"line_number":449,"context_line":"            self.driver.update_dhcp_hostfile_with_text(dev, hosts)"},{"line_number":450,"context_line":"            # Restart dnsmasq"},{"line_number":451,"context_line":"            self.driver.kill_dhcp(dev)"},{"line_number":452,"context_line":"            self.driver.restart_dhcp(dev, network_ref)"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"            # TODO(bgh): if this is the last instance for the network"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oc%3D","line":451,"in_reply_to":"AAAACX%2F%2F7pg%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"514b7e6d62b096a02dc87f1983eaa9d50cf623fe","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                    # code here to reflect that."},{"line_number":211,"context_line":"                    \"priority\": 0,"},{"line_number":212,"context_line":"                    \"id\": \u0027NULL\u0027,"},{"line_number":213,"context_line":"                    \"label\": \"quantum-net-%s\" % quantum_net_id}"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"            vif_rec \u003d manager.FlatManager.add_virtual_interface(self,"},{"line_number":216,"context_line":"                                  context, instance_id, network_ref[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAACX%2F%2F3m0%3D","line":213,"updated":"2011-11-08 17:48:53.000000000","message":"I don\u0027t think this get network ref logic is a part of allocating for an instance. It would be better stored in it\u0027s own method.","commit_id":"e1e8b3877687af7657f5b7a32313cc7184fb25b0"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"514b7e6d62b096a02dc87f1983eaa9d50cf623fe","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def enable_dhcp(self, context, quantum_net_id, network_ref, vif_rec,"},{"line_number":233,"context_line":"            project_id):"},{"line_number":234,"context_line":"        LOG.info(\"Using DHCP for network: %s\" % network_ref[\u0027label\u0027])"},{"line_number":235,"context_line":"        # Figure out the ipam tenant id for this subnet:  We need to"},{"line_number":236,"context_line":"        # query for the tenant_id since the network could be created"},{"line_number":237,"context_line":"        # with the project_id as the tenant or the default tenant."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAACX%2F%2F3kg%3D","line":234,"updated":"2011-11-08 17:48:53.000000000","message":"This would be much easier to maintain and test in small units if each step was a method, and enable_dhcp just called each individual method. Refactoring like that would also make more granular error handling easier.","commit_id":"e1e8b3877687af7657f5b7a32313cc7184fb25b0"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"514b7e6d62b096a02dc87f1983eaa9d50cf623fe","unresolved":false,"context_lines":[{"line_number":446,"context_line":"            dev \u003d \"gw-\" + str(network_ref[\u0027uuid\u0027][0:11])"},{"line_number":447,"context_line":"            # And remove the dhcp mappings for the subnet"},{"line_number":448,"context_line":"            hosts \u003d self.get_dhcp_hosts_text(context,"},{"line_number":449,"context_line":"                subnet[\u0027network_id\u0027], project_id)"},{"line_number":450,"context_line":"            self.driver.update_dhcp_hostfile_with_text(dev, hosts)"},{"line_number":451,"context_line":"            # Restart dnsmasq"},{"line_number":452,"context_line":"            self.driver.kill_dhcp(dev)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAACX%2F%2F3ks%3D","line":449,"updated":"2011-11-08 17:48:53.000000000","message":"It appears the real meat of this function is these three calls to the driver, it should be separated from populating the network_ref.\n\nThis data mutating done on this response from get_subnets_by_net_id is very similar to the changes made to this data on both other calls to get_subnets_by_net_id. This is another candidate for refactoring, but may be out of the scope of this commit.","commit_id":"e1e8b3877687af7657f5b7a32313cc7184fb25b0"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"514b7e6d62b096a02dc87f1983eaa9d50cf623fe","unresolved":false,"context_lines":[{"line_number":482,"context_line":"    def release_fixed_ip(self, context, address):"},{"line_number":483,"context_line":"        pass"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def get_dhcp_hosts_text(self, context, subnet_id, project_id\u003dNone):"},{"line_number":486,"context_line":"        ips \u003d self.ipam.get_allocated_ips(context, subnet_id, project_id)"},{"line_number":487,"context_line":"        hosts_text \u003d \"\""},{"line_number":488,"context_line":"        admin_context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAACX%2F%2F3lE%3D","line":485,"updated":"2011-11-08 17:48:53.000000000","message":"These methods share 10 lines, maybe the collection of information and iteration over that list could be abstracted?","commit_id":"e1e8b3877687af7657f5b7a32313cc7184fb25b0"}],"nova/network/quantum/melange_connection.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def get_allocated_ips_for_network(self, network_id, project_id\u003dNone):"},{"line_number":138,"context_line":"        tenant_scope \u003d \"/tenants/%s\" % project_id if project_id else \"\""},{"line_number":139,"context_line":"        url \u003d (\"ipam%(tenant_scope)s/allocated_ip_addresses\" % locals())"},{"line_number":140,"context_line":"        # TODO(bgh): This request fails if you add the \".json\" to the end so"},{"line_number":141,"context_line":"        # it has to call do_request itself.  Melange bug?"},{"line_number":142,"context_line":"        response \u003d self.do_request(\"GET\", url, content_type\u003d\"\")"},{"line_number":143,"context_line":"        return json.loads(response)[\u0027ip_addresses\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pc%3D","line":140,"updated":"2011-10-20 01:42:11.000000000","message":"given that the melange folks are going to fix this, will the fix break this workaround?","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    def get_allocated_ips_for_network(self, network_id, project_id\u003dNone):"},{"line_number":138,"context_line":"        tenant_scope \u003d \"/tenants/%s\" % project_id if project_id else \"\""},{"line_number":139,"context_line":"        url \u003d (\"ipam%(tenant_scope)s/allocated_ip_addresses\" % locals())"},{"line_number":140,"context_line":"        # TODO(bgh): This request fails if you add the \".json\" to the end so"},{"line_number":141,"context_line":"        # it has to call do_request itself.  Melange bug?"},{"line_number":142,"context_line":"        response \u003d self.do_request(\"GET\", url, content_type\u003d\"\")"},{"line_number":143,"context_line":"        return json.loads(response)[\u0027ip_addresses\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oQ%3D","line":140,"in_reply_to":"AAAACX%2F%2F7pc%3D","updated":"2011-10-20 05:19:40.000000000","message":"Yeah, it will.. I\u0027ll have to keep an eye on when they fix it.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"7f4c4857a33ae69da138bfdddb738519a71cdf2f","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        headers \u003d headers or {}"},{"line_number":72,"context_line":"        params \u003d params or {}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        url \u003d \"/%s/%s%s\" % (self.version, path, content_type)"},{"line_number":75,"context_line":"        if params:"},{"line_number":76,"context_line":"            url +\u003d \"?%s\" % urllib.urlencode(params)"},{"line_number":77,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3yg%3D","line":74,"updated":"2011-11-07 23:35:05.000000000","message":"Wouldn\u0027t it be better to include a header to set the Accept: type anyway? Seems the safer route","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"}],"nova/network/quantum/melange_ipam_lib.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        if FLAGS.quantum_use_dhcp:"},{"line_number":74,"context_line":"            if cidr:"},{"line_number":75,"context_line":"                n \u003d IPNetwork(cidr)"},{"line_number":76,"context_line":"                net[\u0027dhcp_start\u0027] \u003d IPAddress(n.first + 2)"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            net[\u0027dhcp_start\u0027] \u003d None"},{"line_number":79,"context_line":"        admin_context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pY%3D","line":76,"updated":"2011-10-20 01:42:11.000000000","message":"another place were we have dhcp_start \u003d n.first + 2 hardcoded... should be able to use the same shared function mentioned in the quantum_manager file.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        if FLAGS.quantum_use_dhcp:"},{"line_number":74,"context_line":"            if cidr:"},{"line_number":75,"context_line":"                n \u003d IPNetwork(cidr)"},{"line_number":76,"context_line":"                net[\u0027dhcp_start\u0027] \u003d IPAddress(n.first + 2)"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            net[\u0027dhcp_start\u0027] \u003d None"},{"line_number":79,"context_line":"        admin_context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oM%3D","line":76,"in_reply_to":"AAAACX%2F%2F7pY%3D","updated":"2011-10-20 05:19:40.000000000","message":"It\u0027s OK for now.. we\u0027ll weed these places out in another patch soon once I figure out how to use melange policies for determining this.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        tenant_id \u003d project_id or FLAGS.quantum_default_tenant_id"},{"line_number":95,"context_line":"        all_blocks \u003d self.m_conn.get_blocks(tenant_id)"},{"line_number":96,"context_line":"        for b in all_blocks[\u0027ip_blocks\u0027]:"},{"line_number":97,"context_line":"            LOG.debug(\"block: %s\" % b)"},{"line_number":98,"context_line":"            if b[\u0027cidr\u0027] \u003d\u003d cidr:"},{"line_number":99,"context_line":"                return b[\u0027network_id\u0027]"},{"line_number":100,"context_line":"        raise exception.NotFound(_(\"No network found for cidr %s\" % cidr))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pU%3D","line":97,"updated":"2011-10-20 01:42:11.000000000","message":"leftover?  if you want to keep this, I would make the debug message more meaningful.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        tenant_id \u003d project_id or FLAGS.quantum_default_tenant_id"},{"line_number":95,"context_line":"        all_blocks \u003d self.m_conn.get_blocks(tenant_id)"},{"line_number":96,"context_line":"        for b in all_blocks[\u0027ip_blocks\u0027]:"},{"line_number":97,"context_line":"            LOG.debug(\"block: %s\" % b)"},{"line_number":98,"context_line":"            if b[\u0027cidr\u0027] \u003d\u003d cidr:"},{"line_number":99,"context_line":"                return b[\u0027network_id\u0027]"},{"line_number":100,"context_line":"        raise exception.NotFound(_(\"No network found for cidr %s\" % cidr))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oI%3D","line":97,"in_reply_to":"AAAACX%2F%2F7pU%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    # call it \"get_subnets\"."},{"line_number":162,"context_line":"    def get_subnets_by_net_id(self, context, tenant_id, net_id, vif_id):"},{"line_number":163,"context_line":"        \"\"\"Returns information about the IPv4 and IPv6 subnets"},{"line_number":164,"context_line":"           associated with a Quantum Network UUID."},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        subnet_v4 \u003d None"},{"line_number":167,"context_line":"        subnet_v6 \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pQ%3D","line":164,"updated":"2011-10-20 01:42:11.000000000","message":"Already, you should probably update the docstring to describe what it does differently.","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    # call it \"get_subnets\"."},{"line_number":162,"context_line":"    def get_subnets_by_net_id(self, context, tenant_id, net_id, vif_id):"},{"line_number":163,"context_line":"        \"\"\"Returns information about the IPv4 and IPv6 subnets"},{"line_number":164,"context_line":"           associated with a Quantum Network UUID."},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        subnet_v4 \u003d None"},{"line_number":167,"context_line":"        subnet_v6 \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oE%3D","line":164,"in_reply_to":"AAAACX%2F%2F7pQ%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        for ip_address in ips:"},{"line_number":171,"context_line":"            block \u003d ip_address[\u0027ip_block\u0027]"},{"line_number":172,"context_line":"            print block"},{"line_number":173,"context_line":"            subnet \u003d {\u0027network_id\u0027: block[\u0027id\u0027],"},{"line_number":174,"context_line":"                      \u0027cidr\u0027: block[\u0027cidr\u0027],"},{"line_number":175,"context_line":"                      \u0027gateway\u0027: block[\u0027gateway\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pM%3D","line":172,"updated":"2011-10-20 01:42:11.000000000","message":"whoops","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        for ip_address in ips:"},{"line_number":171,"context_line":"            block \u003d ip_address[\u0027ip_block\u0027]"},{"line_number":172,"context_line":"            print block"},{"line_number":173,"context_line":"            subnet \u003d {\u0027network_id\u0027: block[\u0027id\u0027],"},{"line_number":174,"context_line":"                      \u0027cidr\u0027: block[\u0027cidr\u0027],"},{"line_number":175,"context_line":"                      \u0027gateway\u0027: block[\u0027gateway\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7oA%3D","line":172,"in_reply_to":"AAAACX%2F%2F7pM%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"7f4c4857a33ae69da138bfdddb738519a71cdf2f","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        if FLAGS.quantum_use_dhcp:"},{"line_number":74,"context_line":"            if cidr:"},{"line_number":75,"context_line":"                n \u003d IPNetwork(cidr)"},{"line_number":76,"context_line":"                net[\u0027dhcp_start\u0027] \u003d IPAddress(n.first + 2)"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            net[\u0027dhcp_start\u0027] \u003d None"},{"line_number":79,"context_line":"        admin_context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3yY%3D","line":76,"updated":"2011-11-07 23:35:05.000000000","message":"This seems important. Wouldn\u0027t we want to log that we didn\u0027t successfully set up the DHCP stuff we need?","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"33bc14f901310f37922622dd04e9136c965e8e77","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        if FLAGS.quantum_use_dhcp:"},{"line_number":74,"context_line":"            if cidr:"},{"line_number":75,"context_line":"                n \u003d IPNetwork(cidr)"},{"line_number":76,"context_line":"                net[\u0027dhcp_start\u0027] \u003d IPAddress(n.first + 2)"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            net[\u0027dhcp_start\u0027] \u003d None"},{"line_number":79,"context_line":"        admin_context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3x0%3D","line":76,"in_reply_to":"AAAACX%2F%2F3yY%3D","updated":"2011-11-07 23:43:28.000000000","message":"I\u0027m not sure I follow .. this is just supposed to be saying that if the quantum_use_dhcp flag is set to false then we won\u0027t have a dhcp_start address (since its disabled).","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"7f4c4857a33ae69da138bfdddb738519a71cdf2f","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # of searching through all the blocks.  Checking for a 404"},{"line_number":216,"context_line":"        # will then determine whether it exists."},{"line_number":217,"context_line":"        tenant_id \u003d project_id or FLAGS.quantum_default_tenant_id"},{"line_number":218,"context_line":"        all_blocks \u003d self.m_conn.get_blocks(tenant_id)"},{"line_number":219,"context_line":"        for b in all_blocks[\u0027ip_blocks\u0027]:"},{"line_number":220,"context_line":"            if b[\u0027network_id\u0027] \u003d\u003d quantum_net_id:"},{"line_number":221,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3yM%3D","line":218,"updated":"2011-11-07 23:35:05.000000000","message":"This sucks. Maybe we can file a melange bug?","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"33bc14f901310f37922622dd04e9136c965e8e77","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # of searching through all the blocks.  Checking for a 404"},{"line_number":216,"context_line":"        # will then determine whether it exists."},{"line_number":217,"context_line":"        tenant_id \u003d project_id or FLAGS.quantum_default_tenant_id"},{"line_number":218,"context_line":"        all_blocks \u003d self.m_conn.get_blocks(tenant_id)"},{"line_number":219,"context_line":"        for b in all_blocks[\u0027ip_blocks\u0027]:"},{"line_number":220,"context_line":"            if b[\u0027network_id\u0027] \u003d\u003d quantum_net_id:"},{"line_number":221,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3xw%3D","line":218,"in_reply_to":"AAAACX%2F%2F3yM%3D","updated":"2011-11-07 23:43:28.000000000","message":"Sure, I can do that.  Are melange bugs just filed with nova at this point or in a separate project tracker?","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"},{"author":{"_account_id":191,"name":"Trey Morris","email":"trey.morris@rackspace.com","username":"tr3buchet"},"change_message_id":"2f76c196eb9ca0bb93b64dce41c9b9161fd58d5c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        all_blocks \u003d self.m_conn.get_blocks(tenant_id)"},{"line_number":219,"context_line":"        for b in all_blocks[\u0027ip_blocks\u0027]:"},{"line_number":220,"context_line":"            if b[\u0027network_id\u0027] \u003d\u003d quantum_net_id:"},{"line_number":221,"context_line":"                return True"},{"line_number":222,"context_line":"        return False"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def deallocate_ips_by_vif(self, context, project_id, net_id, vif_ref):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACX%2F%2F3x8%3D","line":221,"updated":"2011-11-07 23:59:52.000000000","message":"yeah we\u0027ll see if we can\u0027t get this call implemented","commit_id":"b8bbacdc5f36951d00883e7b9fa40a667cefdb9f"}],"nova/tests/test_quantum.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"6b5b621e34bb357ec455a173458993844b39079a","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        for n in networks:"},{"line_number":205,"context_line":"            ctx \u003d context.RequestContext(\u0027user1\u0027, n[\u0027project_id\u0027])"},{"line_number":206,"context_line":"            print \"Deleting net: %s\" % n"},{"line_number":207,"context_line":"            print ctx.to_dict()"},{"line_number":208,"context_line":"            self.net_man.delete_network(ctx, n[\u0027uuid\u0027])"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_allocate_and_deallocate_instance_static(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7pI%3D","line":207,"updated":"2011-10-20 01:42:11.000000000","message":"leftover?","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"change_message_id":"e6799941fc7fb466e4cdedc969adec23c9aceb1c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        for n in networks:"},{"line_number":205,"context_line":"            ctx \u003d context.RequestContext(\u0027user1\u0027, n[\u0027project_id\u0027])"},{"line_number":206,"context_line":"            print \"Deleting net: %s\" % n"},{"line_number":207,"context_line":"            print ctx.to_dict()"},{"line_number":208,"context_line":"            self.net_man.delete_network(ctx, n[\u0027uuid\u0027])"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_allocate_and_deallocate_instance_static(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F7n8%3D","line":207,"in_reply_to":"AAAACX%2F%2F7pI%3D","updated":"2011-10-20 05:19:40.000000000","message":"Done","commit_id":"5e4b63e20093bd04699b13098b4c0ee01f5f7349"}]}
