)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Cedric Brandily \u003czzelle@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-27 17:41:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add functional test to the metadata proxy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change add a functional test to the metadata proxy to verify:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5a890539_7de0de96","line":7,"updated":"2014-11-27 22:48:30.000000000","message":"Do you plan to test also the case of the metadata proxy spawn by the DHCP agent? If not I\u0027d specify in the commit message that this tests only the case of the L3 agent spawning a MD proxy","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d353b8293b89c141c5af7868a685f534dc257f7c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Cedric Brandily \u003czzelle@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-27 17:41:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add functional test to the metadata proxy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change add a functional test to the metadata proxy to verify:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5a890539_de29baf3","line":7,"in_reply_to":"5a890539_48fd156e","updated":"2014-11-28 17:19:42.000000000","message":"Done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Cedric Brandily \u003czzelle@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-27 17:41:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add functional test to the metadata proxy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change add a functional test to the metadata proxy to verify:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5a890539_48fd156e","line":7,"in_reply_to":"5a890539_7de0de96","updated":"2014-11-28 11:10:58.000000000","message":"i will implement dhcp metadata test in a specific change (based on https://review.openstack.org/13683?)\n\n\u003d\u003d\u003e will clarify the commit message","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"}],"neutron/tests/functional/agent/linux/base.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d4c2639181e932c8cc5fdc912fe9c74803a2528d","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":100,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def create_ovs_port(self, br, ns, ip_cidr\u003dNone, port_prefix\u003dPORT_PREFIX):"},{"line_number":103,"context_line":"        def create_internal_port(name):"},{"line_number":104,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_ed4e3837","line":101,"updated":"2014-11-25 13:05:36.000000000","message":"Isn\u0027t this basically:\n\nneutron.agent.linux.interface:OVSInterfaceDriver.plug + init_l3?","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4019376c28023c4c03c38d68d845951d890cffe3","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":100,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def create_ovs_port(self, br, ns, ip_cidr\u003dNone, port_prefix\u003dPORT_PREFIX):"},{"line_number":103,"context_line":"        def create_internal_port(name):"},{"line_number":104,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_61e22cd6","line":101,"in_reply_to":"5a890539_26b21e94","updated":"2014-11-26 11:05:45.000000000","message":"We\u0027re introducing more and more functional tests now, this isn\u0027t just about this change. I want the tests/functional tree to replicate as little as code as possible from the Neutron code base.","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7fff1af567408cba7acb78e2bb34eec38401e6e6","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":100,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def create_ovs_port(self, br, ns, ip_cidr\u003dNone, port_prefix\u003dPORT_PREFIX):"},{"line_number":103,"context_line":"        def create_internal_port(name):"},{"line_number":104,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_26b21e94","line":101,"in_reply_to":"5a890539_ed4e3837","updated":"2014-11-26 08:16:36.000000000","message":"i tested both ... mainly, the alternative approach allows to delegate the configuration but implies more integration troubles. IMO the alternative is less readable.","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1b5f185ab5381c23e7353cf90e756dc475f691a4","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip_or_ip_cidr):"},{"line_number":89,"context_line":"        \"\"\"Set gateway for the namespace associated to the port."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        port_dev: IPDevice instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_e2ed02b9","line":88,"updated":"2014-11-28 10:12:07.000000000","message":"I would suggest to split gateway_ip_or_ip_cidr to two parameters with None default:\n\n def set_namespace_gateway(self, port_dev, gateway_ip\u003dNone, ip_cidr\u003dNone):\n     if not gateway_ip and not ip_cidr:\n         raise AttributeError(\u0027You should provide either gateway_ip or ip_cidr\u0027)\n     gateway_ip \u003d gateway_ip or ip_cidr.split(\u0027/\u0027, 1)[0]","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip_or_ip_cidr):"},{"line_number":89,"context_line":"        \"\"\"Set gateway for the namespace associated to the port."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        port_dev: IPDevice instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_08114daf","line":88,"in_reply_to":"5a890539_e2ed02b9","updated":"2014-11-28 11:10:58.000000000","message":"done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        gateway_ip_or_ip_cidr: gateway ip or ip_cidr, for example: 1.2.3.4(/24)"},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        if not port_dev.namespace:"},{"line_number":95,"context_line":"            self.fail(\u0027functional tests should not change server gateway\u0027)"},{"line_number":96,"context_line":"        gateway_ip \u003d gateway_ip_or_ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":97,"context_line":"        port_dev.route.add_gateway(gateway_ip)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_41eb2bb0","line":95,"updated":"2014-11-28 16:29:12.000000000","message":"server? maybe \u0027test machine\u0027 is a better name for that?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b3a621d34a494618345cd0e13b4825bf69f13c9e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        gateway_ip_or_ip_cidr: gateway ip or ip_cidr, for example: 1.2.3.4(/24)"},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        if not port_dev.namespace:"},{"line_number":95,"context_line":"            self.fail(\u0027functional tests should not change server gateway\u0027)"},{"line_number":96,"context_line":"        gateway_ip \u003d gateway_ip_or_ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":97,"context_line":"        port_dev.route.add_gateway(gateway_ip)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f7d69926","line":95,"in_reply_to":"5a890539_41eb2bb0","updated":"2014-11-28 17:21:40.000000000","message":"Done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":120,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def create_ovs_port(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":123,"context_line":"        def create_port(name):"},{"line_number":124,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":125,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_90b811ea","line":122,"updated":"2014-11-27 22:48:30.000000000","message":"if you decide to keep this method, please rename since it doesn\u0027t only create a port. create_ovs_port_and_add_to_ns is maybe verbose but describe better the behaviour","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"4f76f99b79705890d9f646eb3b75bd4c6fcc4b1a","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":120,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def create_ovs_port(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":123,"context_line":"        def create_port(name):"},{"line_number":124,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":125,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_5e6b0a1f","line":122,"in_reply_to":"5a890539_530dca36","updated":"2014-11-28 16:01:09.000000000","message":"my comment was only about the name of the method, I don\u0027t understand your answer :)","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d353b8293b89c141c5af7868a685f534dc257f7c","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":120,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def create_ovs_port(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":123,"context_line":"        def create_port(name):"},{"line_number":124,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":125,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f750590c","line":122,"in_reply_to":"5a890539_5e6b0a1f","updated":"2014-11-28 17:19:42.000000000","message":"Done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":120,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def create_ovs_port(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":123,"context_line":"        def create_port(name):"},{"line_number":124,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":125,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_530dca36","line":122,"in_reply_to":"5a890539_90b811ea","updated":"2014-11-28 11:10:58.000000000","message":"not sure functional tests (should) allow to create port in root namespace","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def create_ovs_port(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":123,"context_line":"        def create_port(name):"},{"line_number":124,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":125,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"},{"line_number":126,"context_line":"            utils.execute(cmd, self.root_helper)"},{"line_number":127,"context_line":"            return name"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_e1c5f70a","line":124,"updated":"2014-11-28 16:29:12.000000000","message":"How about using run_vsctl() from neutron/agent/linux/ovs_lib.py?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            utils.execute(cmd, self.root_helper)"},{"line_number":127,"context_line":"            return name"},{"line_number":128,"context_line":"        port_name \u003d self.create_resource(port_prefix, create_port)"},{"line_number":129,"context_line":"        self.addCleanup(br.delete_port, port_name)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        port_dev \u003d self.ip.device(port_name)"},{"line_number":132,"context_line":"        ns.add_device_to_namespace(port_dev)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_21d0dfc8","line":129,"updated":"2014-11-28 16:29:12.000000000","message":"I think it\u0027s better to move cleanup setup into create_port() itself.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        port_dev.link.set_up()"},{"line_number":134,"context_line":"        return port_dev"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_909f3165","line":136,"updated":"2014-11-27 22:48:30.000000000","message":"The name is confusing since there\u0027s no subnet actually. How about connect_namespace_to_bridge ?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        port_dev.link.set_up()"},{"line_number":134,"context_line":"        return port_dev"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_488275c9","line":136,"in_reply_to":"5a890539_909f3165","updated":"2014-11-28 11:10:58.000000000","message":"..._to_bridge is more confusing as it looks like bind on layer 2","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"},{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_50ab0975","line":139,"updated":"2014-11-27 22:48:30.000000000","message":"Here you are describing what the method simulates in your test but not what it actually does. Since this is a base file I think you should describe the actual behavior or move the methos to the test file.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"},{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_685e5178","line":139,"in_reply_to":"5a890539_50ab0975","updated":"2014-11-28 11:10:58.000000000","message":"I don\u0027t understand","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d353b8293b89c141c5af7868a685f534dc257f7c","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"},{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_776389dd","line":139,"in_reply_to":"5a890539_5e006a35","updated":"2014-11-28 17:19:42.000000000","message":"Ok, \n\nbind_namespace_on_layer3  or bind_namespace_to_cidr is clearer?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"4f76f99b79705890d9f646eb3b75bd4c6fcc4b1a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"},{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_5e006a35","line":139,"in_reply_to":"5a890539_685e5178","updated":"2014-11-28 16:01:09.000000000","message":"I mean, the method is not binding a subnet to a namespace. I wonder what that even means. It creates a port, binds it to a ns and assign an IP address to it.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"83cfd56c64564d9cc5f9790203d23dbb6c004f5c","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"},{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_c6054d16","line":139,"in_reply_to":"5a890539_776389dd","updated":"2014-12-01 19:17:43.000000000","message":"Done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"fc6a43e1e64266d071d116fbc50658bd60686adb","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    def bind_namespace_to_subnet(self, namespace, br, ip_cidr):"},{"line_number":137,"context_line":"        \"\"\"Bind namespace to a subnet."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Bind the namespace to a subnet by creating a port in the namespace and"},{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_21819b4d","line":139,"in_reply_to":"5a890539_776389dd","updated":"2014-12-01 17:05:57.000000000","message":"I prefer the second, thanks!","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":143,"context_line":"        port_dev \u003d self.create_ovs_port(br, namespace)"},{"line_number":144,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":145,"context_line":"        return port_dev"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_5018691e","line":143,"updated":"2014-11-27 22:48:30.000000000","message":"I wonder, why instead of writing a new method (create_ovs_port) you didn\u0027t use the method plug from OVSInterfaceDriver and add proper cleanup?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":143,"context_line":"        port_dev \u003d self.create_ovs_port(br, namespace)"},{"line_number":144,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":145,"context_line":"        return port_dev"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f3fdd609","line":143,"in_reply_to":"5a890539_5018691e","updated":"2014-11-28 11:10:58.000000000","message":"i tested both approach and using plug() is not shorter and less readable as plug interface requires many useless information in test context.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        configuring port ip."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":143,"context_line":"        port_dev \u003d self.create_ovs_port(br, namespace)"},{"line_number":144,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":145,"context_line":"        return port_dev"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_210b7f7e","line":143,"in_reply_to":"5a890539_f3fdd609","updated":"2014-11-28 16:29:12.000000000","message":"But in that way, you move testing area into production code, which is beneficial.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":143,"context_line":"        port_dev \u003d self.create_ovs_port(br, namespace)"},{"line_number":144,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":145,"context_line":"        return port_dev"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_f0aeb597","line":144,"updated":"2014-11-27 22:48:30.000000000","message":"TBH I¡d move this line in the test itself and add a comment right before to explain that you are assigning an IP to simulate a VM that belongs to the subnet connected to the router.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1b5f185ab5381c23e7353cf90e756dc475f691a4","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":143,"context_line":"        port_dev \u003d self.create_ovs_port(br, namespace)"},{"line_number":144,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":145,"context_line":"        return port_dev"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_85e5280c","line":144,"in_reply_to":"5a890539_f0aeb597","updated":"2014-11-28 10:12:07.000000000","message":"I\u0027d suggest here to have highlevel method \"create_testing_port()\" that will wrap all the setup for simulation of vm. But I\u0027m ok also with this solution. It just might be handy for coming tests.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":143,"context_line":"        port_dev \u003d self.create_ovs_port(br, namespace)"},{"line_number":144,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":145,"context_line":"        return port_dev"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_c82d85aa","line":144,"in_reply_to":"5a890539_f0aeb597","updated":"2014-11-28 11:10:58.000000000","message":"not really in favor to (over?) split methods.\n\nThe aim of the method is to create a namespace with layer2/3 configured and the test explain we use such namespace to simulate a vm","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"11eb9e6a0d314a2ba5b9023fe4a10fce3d5f1cb0","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self.addCleanup(ip_wrapper.del_veth, name1)"},{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip\u003dNone,"},{"line_number":89,"context_line":"                              gateway_ip_cidr\u003dNone):"},{"line_number":90,"context_line":"        \"\"\"Set gateway for the namespace associated to the port."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_1b82a752","line":87,"updated":"2014-12-07 09:04:44.000000000","message":"Let\u0027s pick one format this method accepts. Personally I vote for gateway_ip.","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"34294d2904190b44a883fa3e9003a6c7d1bf8705","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self.addCleanup(ip_wrapper.del_veth, name1)"},{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip\u003dNone,"},{"line_number":89,"context_line":"                              gateway_ip_cidr\u003dNone):"},{"line_number":90,"context_line":"        \"\"\"Set gateway for the namespace associated to the port."}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_186c5b9c","line":87,"in_reply_to":"3a961159_1b82a752","updated":"2014-12-08 10:56:37.000000000","message":"Done","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"11eb9e6a0d314a2ba5b9023fe4a10fce3d5f1cb0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        \"\"\"Shift ip_cidr offset times."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        example: shift_ip_cidr(\"1.2.3.4/24\", 2) \u003d\u003d\u003e \"1.2.3.6/24\""},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":111,"context_line":"        return \u0027%s/%s\u0027 % (net.ip + offset, net.prefixlen)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_fb307bea","line":109,"updated":"2014-12-07 09:04:44.000000000","message":"I think a better way is:\n\nnet \u003d netaddr.IPNetwork(ip_cidr)\n\nnet.value +\u003d offset\n\nreturn str(net)\n\nFor example:\n\nnet \u003d IPNetwork(\u00271.2.3.255/24\u0027)\n\nnet.value +\u003d 1\n\nprint net\n\n\u003e \u00271.2.4.0/24\u0027","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"34294d2904190b44a883fa3e9003a6c7d1bf8705","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        \"\"\"Shift ip_cidr offset times."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        example: shift_ip_cidr(\"1.2.3.4/24\", 2) \u003d\u003d\u003e \"1.2.3.6/24\""},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":"        net \u003d netaddr.IPNetwork(ip_cidr)"},{"line_number":111,"context_line":"        return \u0027%s/%s\u0027 % (net.ip + offset, net.prefixlen)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_93ed9b8e","line":109,"in_reply_to":"3a961159_fb307bea","updated":"2014-12-08 10:56:37.000000000","message":"Oh, great, i didn\u0027t know IPNetwork allows such update.\n\nDone","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"79a5ee183ae4dc23ab79e4ee57dc2a6de62906dc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        def create_port(name):"},{"line_number":130,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":131,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"},{"line_number":132,"context_line":"            utils.execute(cmd, self.root_helper)"},{"line_number":133,"context_line":"            self.addCleanup(br.delete_port, name)"},{"line_number":134,"context_line":"            return name"},{"line_number":135,"context_line":"        port_name \u003d self.create_resource(port_prefix, create_port)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_4017dea3","line":132,"updated":"2014-12-07 09:23:50.000000000","message":"I think replacing the \u0027execute\u0027 call with \u0027run_vsctl(..)\u0027 would be better as it add\u0027s timeout functionality to \u0027ovs-vsctl\u0027.","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"34294d2904190b44a883fa3e9003a6c7d1bf8705","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        def create_port(name):"},{"line_number":130,"context_line":"            cmd \u003d [\u0027ovs-vsctl\u0027, \u0027add-port\u0027, br.br_name, name,"},{"line_number":131,"context_line":"                   \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, name, \u0027type\u003dinternal\u0027]"},{"line_number":132,"context_line":"            utils.execute(cmd, self.root_helper)"},{"line_number":133,"context_line":"            self.addCleanup(br.delete_port, name)"},{"line_number":134,"context_line":"            return name"},{"line_number":135,"context_line":"        port_name \u003d self.create_resource(port_prefix, create_port)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_38e2f79f","line":132,"in_reply_to":"3a961159_4017dea3","updated":"2014-12-08 10:56:37.000000000","message":"Done through OVSBridge.add_port","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"11eb9e6a0d314a2ba5b9023fe4a10fce3d5f1cb0","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        ns.add_device_to_namespace(port_dev)"},{"line_number":138,"context_line":"        port_dev.link.set_up()"},{"line_number":139,"context_line":"        return port_dev"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def bind_namespace_to_cidr(self, namespace, br, ip_cidr):"},{"line_number":142,"context_line":"        \"\"\"Bind namespace to cidr (on layer2 and 3)."},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_1bd0e752","line":140,"updated":"2014-12-07 09:04:44.000000000","message":"I thought about this methods more and more and I\u0027m really conflicted. I realize I\u0027m probably driving you mad especially because people keep giving you conflicting feedback, but I think it\u0027d be great if we had a single method that configured an OVS port, in a namespace, connected to a bridge, with an IP address and a gateway (IE bind_namespace_to_cidr + set_namespace_gateway). I\u0027d have it as a class, so we could have an abstraction mimicking a VM.\n\nYou\u0027d use it by:\n\nwith VM(bridge) as vm:\n   ...\n\nWhere VM has default values for the IP address and gateway. It\u0027s generated in a random namespace. I know that some people who shall remain unnamed dislike the usage of context managers for automatic resource cleanup (Even though that\u0027s literally what they\u0027re there for!), so we could have it either as a method, or as a class with a \u0027bind\u0027 method that calls addCleanup on the resources it creates. The VM class would have a \u0027ping\u0027 method (It could use the Pinger class we currently have, or fold it in), and a \u0027curl\u0027/\u0027wget\u0027 method, utilizing the SimpleHTTP module you\u0027re adding here.\n\nHaving said that, I don\u0027t see a reason to block this patch. We could easily change what you\u0027ve added here (Thank you!) at any point in the future. I think such an abstraction would be very valuable when we have full-stack testing in the tree.","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"34294d2904190b44a883fa3e9003a6c7d1bf8705","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        ns.add_device_to_namespace(port_dev)"},{"line_number":138,"context_line":"        port_dev.link.set_up()"},{"line_number":139,"context_line":"        return port_dev"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def bind_namespace_to_cidr(self, namespace, br, ip_cidr):"},{"line_number":142,"context_line":"        \"\"\"Bind namespace to cidr (on layer2 and 3)."},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_5826e3bb","line":140,"in_reply_to":"3a961159_1bd0e752","updated":"2014-12-08 10:56:37.000000000","message":"I like it!\n\nBut i prefer to address it in a specific change as i would like to have a VM class supporting both OVS/LB as L2 backend (Rossella comment on PS11) and it implies some refactoring i will address after k1.","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"601ff5e307e09294922f351d92110bc92449f111","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                self.skipTest(skip_msg)"},{"line_number":53,"context_line":"            raise"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _create_namespace(self):"},{"line_number":56,"context_line":"        ip_cmd \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":57,"context_line":"        name \u003d \"func-%s\" % uuidutils.generate_uuid()"},{"line_number":58,"context_line":"        namespace \u003d ip_cmd.ensure_namespace(name)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_a52226b7","line":55,"updated":"2014-12-09 00:08:30.000000000","message":"(No action required) Something makes me think these 3 lines are repeated everywhere in the codebase... :/","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"601ff5e307e09294922f351d92110bc92449f111","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip):"},{"line_number":89,"context_line":"        \"\"\"Set gateway for the namespace associated to the port.\"\"\""},{"line_number":90,"context_line":"        if not port_dev.namespace:"},{"line_number":91,"context_line":"            self.fail(\u0027tests should not change test machine gateway\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_c5065220","line":88,"updated":"2014-12-09 00:08:30.000000000","message":"Consider patching port_dev.route.add_gateway() to do this check so that accidental direct invocation of add_gateway doesn\u0027t cause problems.","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"04053f3919e3672bfa0869b61d39d1d2bea33610","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip):"},{"line_number":89,"context_line":"        \"\"\"Set gateway for the namespace associated to the port.\"\"\""},{"line_number":90,"context_line":"        if not port_dev.namespace:"},{"line_number":91,"context_line":"            self.fail(\u0027tests should not change test machine gateway\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_f3bb09c2","line":88,"in_reply_to":"3a961159_c5065220","updated":"2014-12-09 10:37:19.000000000","message":"I am not sure how l3-agent works with use_namespace\u003dFalse but changing server gateway seems required.","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"601ff5e307e09294922f351d92110bc92449f111","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":116,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def create_ovs_port_in_ns(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":119,"context_line":"        def create_port(name):"},{"line_number":120,"context_line":"            br.add_port(name)"},{"line_number":121,"context_line":"            self.addCleanup(br.delete_port, name)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_45a6e211","line":118,"updated":"2014-12-09 00:08:30.000000000","message":"YAGNI - don\u0027t bother accepting a parameter when the prefix is never provided as a parameter.","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"04053f3919e3672bfa0869b61d39d1d2bea33610","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def get_ovs_bridge(self, br_name):"},{"line_number":116,"context_line":"        return ovs_lib.OVSBridge(br_name, self.root_helper)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def create_ovs_port_in_ns(self, br, ns, port_prefix\u003dPORT_PREFIX):"},{"line_number":119,"context_line":"        def create_port(name):"},{"line_number":120,"context_line":"            br.add_port(name)"},{"line_number":121,"context_line":"            self.addCleanup(br.delete_port, name)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_93c48541","line":118,"in_reply_to":"3a961159_45a6e211","updated":"2014-12-09 10:37:19.000000000","message":"Done","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"7fb421f61caf2574663f007814666de48ff17023","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip):"},{"line_number":89,"context_line":"        \"\"\"Set gateway for the namespace associated to the port.\"\"\""},{"line_number":90,"context_line":"        if not port_dev.namespace:"},{"line_number":91,"context_line":"            self.fail(\u0027tests should not change test machine gateway\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_95df980c","line":88,"updated":"2014-12-12 01:49:15.000000000","message":"Do I read correctly from your reply on PS14 that changing the gateway in the root namespace is actually required for the l3-agent testing?  I\u0027m not sure how that could possibly be desirable. :/","commit_id":"1e08da7d9ddc42077c615fe7f112509bf7b0b45e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"698d55b4fb44402a96d5d50999660917110b01c2","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        veth1, veth2 \u003d ip_wrapper.add_veth(name1, name2)"},{"line_number":86,"context_line":"        return veth1, veth2"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def set_namespace_gateway(self, port_dev, gateway_ip):"},{"line_number":89,"context_line":"        \"\"\"Set gateway for the namespace associated to the port.\"\"\""},{"line_number":90,"context_line":"        if not port_dev.namespace:"},{"line_number":91,"context_line":"            self.fail(\u0027tests should not change test machine gateway\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_d2292b38","line":88,"in_reply_to":"3a961159_95df980c","updated":"2014-12-12 10:09:14.000000000","message":"it seems i was unclear, only neutron-l3-agent changes its gateway but at runtime when use_namespace\u003dFalse (so not during testing).\n\nThat\u0027s why we cannot move the L90-91 check in add_gateway otherwise add_gateway will crash at runtime when use_namespace\u003dFalse.","commit_id":"1e08da7d9ddc42077c615fe7f112509bf7b0b45e"}],"neutron/tests/functional/agent/linux/simple_http.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo.config import cfg"},{"line_number":16,"context_line":"import requests"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.openstack.common.gettextutils import _"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_41d5ebb7","line":18,"updated":"2014-11-28 16:29:12.000000000","message":"you\u0027ll need to update your patch to use neutron.i18n instead. Though I doubt that we should translate functional tests...","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d353b8293b89c141c5af7868a685f534dc257f7c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo.config import cfg"},{"line_number":16,"context_line":"import requests"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.openstack.common.gettextutils import _"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_7cc52e3c","line":18,"in_reply_to":"5a890539_41d5ebb7","updated":"2014-11-28 17:19:42.000000000","message":"don\u0027t ask me why i did it, i don\u0027t remember ... and it\u0027s perhaps better","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d41c8227cd566aa3b4e7aa85c79e1169f29cf09c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo.config import cfg"},{"line_number":16,"context_line":"import requests"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.openstack.common.gettextutils import _"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_28eb3279","line":18,"in_reply_to":"5a890539_7cc52e3c","updated":"2014-12-01 22:49:49.000000000","message":"Done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"}],"neutron/tests/functional/agent/test_l3_agent.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cb1588c154ca456f72e5a1de581b5c8c2caed998","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                              status\u003dself.status)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class MetadataL3Agent(L3AgentTestFramework):"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def setUp(self):"},{"line_number":340,"context_line":"        super(MetadataL3Agent, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_368d1ad4","line":337,"updated":"2014-11-24 14:06:14.000000000","message":"As this is a test case, it should be contained in name of this class. (e.g. MetadataAgentTestCase)","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d08c5956b5d7b5032caf2313440633241871fc13","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                              status\u003dself.status)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class MetadataL3Agent(L3AgentTestFramework):"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def setUp(self):"},{"line_number":340,"context_line":"        super(MetadataL3Agent, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_6080b3bf","line":337,"in_reply_to":"5a890539_368d1ad4","updated":"2014-11-24 14:25:56.000000000","message":"indeed :)","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"65171dc2d18a0075bf68ad172814417a7d86ba99","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                              status\u003dself.status)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"class MetadataL3Agent(L3AgentTestFramework):"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def setUp(self):"},{"line_number":340,"context_line":"        super(MetadataL3Agent, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_034ff934","line":337,"in_reply_to":"5a890539_6080b3bf","updated":"2014-11-24 14:52:51.000000000","message":"Done","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cb1588c154ca456f72e5a1de581b5c8c2caed998","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        self.addCleanup(server.stop)"},{"line_number":345,"context_line":"        server.start(MetadataFakeProxyHandler(status),"},{"line_number":346,"context_line":"                     cfg.CONF.metadata_proxy_socket,"},{"line_number":347,"context_line":"                     workers\u003d1, backlog\u003d4096)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def _check_http_get_command(self, url, code):"},{"line_number":350,"context_line":"        python_code \u003d \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_60a273fd","line":347,"updated":"2014-11-24 14:06:14.000000000","message":"Why do need a worker here?","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"65171dc2d18a0075bf68ad172814417a7d86ba99","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        self.addCleanup(server.stop)"},{"line_number":345,"context_line":"        server.start(MetadataFakeProxyHandler(status),"},{"line_number":346,"context_line":"                     cfg.CONF.metadata_proxy_socket,"},{"line_number":347,"context_line":"                     workers\u003d1, backlog\u003d4096)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def _check_http_get_command(self, url, code):"},{"line_number":350,"context_line":"        python_code \u003d \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_235f95e6","line":347,"in_reply_to":"5a890539_60a273fd","updated":"2014-11-24 14:52:51.000000000","message":"Done","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cb1588c154ca456f72e5a1de581b5c8c2caed998","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                     cfg.CONF.metadata_proxy_socket,"},{"line_number":347,"context_line":"                     workers\u003d1, backlog\u003d4096)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def _check_http_get_command(self, url, code):"},{"line_number":350,"context_line":"        python_code \u003d \u0027\u0027\u0027"},{"line_number":351,"context_line":"import requests"},{"line_number":352,"context_line":"resp \u003d requests.get(\"%(url)s\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_30528235","line":349,"updated":"2014-11-24 14:06:14.000000000","message":"Why is this instance method?","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"65171dc2d18a0075bf68ad172814417a7d86ba99","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                     cfg.CONF.metadata_proxy_socket,"},{"line_number":347,"context_line":"                     workers\u003d1, backlog\u003d4096)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def _check_http_get_command(self, url, code):"},{"line_number":350,"context_line":"        python_code \u003d \u0027\u0027\u0027"},{"line_number":351,"context_line":"import requests"},{"line_number":352,"context_line":"resp \u003d requests.get(\"%(url)s\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_c36fb190","line":349,"in_reply_to":"5a890539_30528235","updated":"2014-11-24 14:52:51.000000000","message":"Done","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cb1588c154ca456f72e5a1de581b5c8c2caed998","unresolved":false,"context_lines":[{"line_number":351,"context_line":"import requests"},{"line_number":352,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":353,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":354,"context_line":"    raise SystemExit"},{"line_number":355,"context_line":"print resp.text"},{"line_number":356,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_36b8ba10","line":354,"updated":"2014-11-24 14:06:14.000000000","message":"SystemExit(1) but given that you always return 200 no matter what the request is, the line is not even needed and neither the status itself (L329, L334, L362, L365).","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d08c5956b5d7b5032caf2313440633241871fc13","unresolved":false,"context_lines":[{"line_number":351,"context_line":"import requests"},{"line_number":352,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":353,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":354,"context_line":"    raise SystemExit"},{"line_number":355,"context_line":"print resp.text"},{"line_number":356,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_401e5771","line":354,"in_reply_to":"5a890539_36b8ba10","updated":"2014-11-24 14:25:56.000000000","message":"Nope, the client queries the neutron-ns-metadata-proxy which forwards to the fake metadata-agent (always returning 200).\n\nThe test ensures the neutron-ns-metadata-proxy does not change the http status returned by the (fake) metadata-agent.\n\n\nstatus is configurable, to allow in a future to add negative tests.","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cb1588c154ca456f72e5a1de581b5c8c2caed998","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":368,"context_line":"        except RuntimeError:"},{"line_number":369,"context_line":"            self.fail(\u0027metadata proxy unreachable on http://169.254.169.254\u0027)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        # check headers added by the metadata proxy"},{"line_number":372,"context_line":"        headers \u003d jsonutils.loads(raw_headers)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_76d6c250","line":369,"updated":"2014-11-24 14:06:14.000000000","message":"If command execution fails for any reason (e.g. no filter for neutron-rootwrap), you\u0027ll get this message which is misleading. I\u0027d prefer to LOG caught exception.","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d08c5956b5d7b5032caf2313440633241871fc13","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":368,"context_line":"        except RuntimeError:"},{"line_number":369,"context_line":"            self.fail(\u0027metadata proxy unreachable on http://169.254.169.254\u0027)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        # check headers added by the metadata proxy"},{"line_number":372,"context_line":"        headers \u003d jsonutils.loads(raw_headers)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_a313855a","line":369,"in_reply_to":"5a890539_76d6c250","updated":"2014-11-24 14:25:56.000000000","message":"ok","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"65171dc2d18a0075bf68ad172814417a7d86ba99","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":368,"context_line":"        except RuntimeError:"},{"line_number":369,"context_line":"            self.fail(\u0027metadata proxy unreachable on http://169.254.169.254\u0027)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        # check headers added by the metadata proxy"},{"line_number":372,"context_line":"        headers \u003d jsonutils.loads(raw_headers)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_23a235ae","line":369,"in_reply_to":"5a890539_a313855a","updated":"2014-11-24 14:52:51.000000000","message":"not fully sure if i should use _LE","commit_id":"73e3710f8c084912a2e0583db01d2d1e7a54b425"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2f279f7389971292e764c88782146b00c9c062e9","unresolved":false,"context_lines":[{"line_number":352,"context_line":"import requests"},{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":354,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":355,"context_line":"    raise SystemExit"},{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_19fdaab1","line":355,"updated":"2014-11-24 15:22:42.000000000","message":"Following comment on previous patchset: I don\u0027t understand this. If you always exit with return code 0 (implicit value), you\u0027ll never get exception on L369. You\u0027ll only get empty output leading to L375 unexpectedly fail.\n\nYou can verify my assumption by changing parameter L363 to 201","commit_id":"cbffdc84e73f9969f64e8a39606fbc007703c05b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d3c8a2c0f71f2a5312bf3e6ca7ff7780d11fb79f","unresolved":false,"context_lines":[{"line_number":352,"context_line":"import requests"},{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":354,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":355,"context_line":"    raise SystemExit"},{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_34134db9","line":355,"in_reply_to":"5a890539_19fdaab1","updated":"2014-11-24 15:48:35.000000000","message":"you should never get the exception (if the ns-proxy forwards correctly)","commit_id":"cbffdc84e73f9969f64e8a39606fbc007703c05b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ea54b23e3e50eb96f7cd08d1cb1a108f0f41bfc3","unresolved":false,"context_lines":[{"line_number":352,"context_line":"import requests"},{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":354,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":355,"context_line":"    raise SystemExit"},{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_cfda7077","line":355,"in_reply_to":"5a890539_34134db9","updated":"2014-11-24 16:01:46.000000000","message":"Done","commit_id":"cbffdc84e73f9969f64e8a39606fbc007703c05b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3243dd19a3002f9b0b7ad50726d5b1b3d261ce9a","unresolved":false,"context_lines":[{"line_number":337,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def setUp(self):"},{"line_number":340,"context_line":"        super(MetadataL3AgentTestCase, self).setUp()"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":343,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_d5576258","line":340,"updated":"2014-11-24 17:47:58.000000000","message":"This setUp() function can be removed","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fea0cbae9b591a66824e24c88940543e7a9c09cc","unresolved":false,"context_lines":[{"line_number":337,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def setUp(self):"},{"line_number":340,"context_line":"        super(MetadataL3AgentTestCase, self).setUp()"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":343,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_aef0bcfd","line":340,"in_reply_to":"5a890539_d5576258","updated":"2014-11-25 09:23:32.000000000","message":"Done","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3243dd19a3002f9b0b7ad50726d5b1b3d261ce9a","unresolved":false,"context_lines":[{"line_number":347,"context_line":"                     workers\u003d0, backlog\u003d4096)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @staticmethod"},{"line_number":350,"context_line":"    def _check_http_get_command(url, code):"},{"line_number":351,"context_line":"        python_code \u003d \u0027\u0027\u0027"},{"line_number":352,"context_line":"import requests"},{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_954b1a86","line":350,"updated":"2014-11-24 17:47:58.000000000","message":"I\u0027m sorry, but I really don\u0027t like how this is written. Specifically I think that this 5-lines script should be written properly (with a main function), in a separate python file, even though it adds some arguments and complicates that script.\n\nI think this trade-off is better made now than later, and giving it its own file will allow for (much easier) maintainability and extensiblity.\n\nSee: https://github.com/openstack/neutron/blob/master/neutron/tests/functional/agent/linux/simple_daemon.py for an example of how it\u0027s already done (though that code is much longer).","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fea0cbae9b591a66824e24c88940543e7a9c09cc","unresolved":false,"context_lines":[{"line_number":347,"context_line":"                     workers\u003d0, backlog\u003d4096)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @staticmethod"},{"line_number":350,"context_line":"    def _check_http_get_command(url, code):"},{"line_number":351,"context_line":"        python_code \u003d \u0027\u0027\u0027"},{"line_number":352,"context_line":"import requests"},{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_2f811dfb","line":350,"in_reply_to":"5a890539_954b1a86","updated":"2014-11-25 09:23:32.000000000","message":"Done","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"04a42c832a97346a64cdf40798bb16fbc38803a0","unresolved":false,"context_lines":[{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":354,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":355,"context_line":"    raise SystemExit(1)"},{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        return \u0027python\u0027, \u0027-c\u0027, python_code"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_7229649a","line":356,"updated":"2014-11-24 17:16:49.000000000","message":"For L352-356 or just L356?\n\nFor L352-356, the string is not indented otherwise python will complain because we run indented code outside of an if/for/while/try/etc., the same appends with:\n\n  python -c \u0027 print 1234\u0027\n\nFor L356, we want (in case of correct status code) to print the headers in order to check them in L375-377","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"21ce31bcf2abf4253bc30a7d51bb977f243eeeec","unresolved":false,"context_lines":[{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":354,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":355,"context_line":"    raise SystemExit(1)"},{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        return \u0027python\u0027, \u0027-c\u0027, python_code"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_92d41021","line":356,"updated":"2014-11-24 17:06:22.000000000","message":"Is it correct indentation?","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":10370,"name":"Romil Gupta","email":"romilgupta19@gmail.com","username":"romilg"},"change_message_id":"3689975d21a936382c161ac5bd37f5cf00a4e28d","unresolved":false,"context_lines":[{"line_number":353,"context_line":"resp \u003d requests.get(\"%(url)s\")"},{"line_number":354,"context_line":"if resp.status_code !\u003d %(code)s:"},{"line_number":355,"context_line":"    raise SystemExit(1)"},{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        return \u0027python\u0027, \u0027-c\u0027, python_code"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_95c87a23","line":356,"in_reply_to":"5a890539_7229649a","updated":"2014-11-24 17:40:16.000000000","message":"Thanks :)","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3243dd19a3002f9b0b7ad50726d5b1b3d261ce9a","unresolved":false,"context_lines":[{"line_number":356,"context_line":"print resp.text"},{"line_number":357,"context_line":"        \u0027\u0027\u0027 % {\u0027url\u0027: url, \u0027code\u0027: code}"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        return \u0027python\u0027, \u0027-c\u0027, python_code"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":362,"context_line":"        router \u003d self.manage_router(False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_f5461e7a","line":359,"updated":"2014-11-24 17:47:58.000000000","message":"Please explicitly return a list here.","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3243dd19a3002f9b0b7ad50726d5b1b3d261ce9a","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        return \u0027python\u0027, \u0027-c\u0027, python_code"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":362,"context_line":"        router \u003d self.manage_router(False)"},{"line_number":363,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":364,"context_line":"        internal_ns, internal_ip \u003d self._create_internal_namespace(router)"},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_b57f36df","line":362,"updated":"2014-11-24 17:47:58.000000000","message":"Can you add a positional argument here (ie. self.manage_router(some_value\u003dFalse)) to make that \u0027False\u0027 make sense?\n\nSame for the next line.","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fea0cbae9b591a66824e24c88940543e7a9c09cc","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        return \u0027python\u0027, \u0027-c\u0027, python_code"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":362,"context_line":"        router \u003d self.manage_router(False)"},{"line_number":363,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":364,"context_line":"        internal_ns, internal_ip \u003d self._create_internal_namespace(router)"},{"line_number":365,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_eedd6471","line":362,"in_reply_to":"5a890539_b57f36df","updated":"2014-11-25 09:23:32.000000000","message":"Done","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3243dd19a3002f9b0b7ad50726d5b1b3d261ce9a","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":364,"context_line":"        internal_ns, internal_ip \u003d self._create_internal_namespace(router)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        cmd \u003d self._check_http_get_command(\u0027http://169.254.169.254\u0027, 200)"},{"line_number":367,"context_line":"        try:"},{"line_number":368,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":369,"context_line":"        except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_b50ad687","line":366,"updated":"2014-11-24 17:47:58.000000000","message":"This IP shouldn\u0027t be static as it can change - use METADATA_DEFAULT_IP (neutron/agent/linux/dhcp.py).","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fea0cbae9b591a66824e24c88940543e7a9c09cc","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":364,"context_line":"        internal_ns, internal_ip \u003d self._create_internal_namespace(router)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        cmd \u003d self._check_http_get_command(\u0027http://169.254.169.254\u0027, 200)"},{"line_number":367,"context_line":"        try:"},{"line_number":368,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":369,"context_line":"        except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_ee264415","line":366,"in_reply_to":"5a890539_b50ad687","updated":"2014-11-25 09:23:32.000000000","message":"Done","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3243dd19a3002f9b0b7ad50726d5b1b3d261ce9a","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":369,"context_line":"        except RuntimeError:"},{"line_number":370,"context_line":"            msg \u003d _(\u0027metadata proxy unreachable on http://169.254.169.254\u0027)"},{"line_number":371,"context_line":"            LOG.exception(msg)"},{"line_number":372,"context_line":"            self.fail(msg)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # check headers added by the metadata proxy"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_554612c1","line":371,"updated":"2014-11-24 17:47:58.000000000","message":"There\u0027s no need to use LOG.exception here - self.fail should log everything as intended.","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fea0cbae9b591a66824e24c88940543e7a9c09cc","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            raw_headers \u003d internal_ns.netns.execute(cmd)"},{"line_number":369,"context_line":"        except RuntimeError:"},{"line_number":370,"context_line":"            msg \u003d _(\u0027metadata proxy unreachable on http://169.254.169.254\u0027)"},{"line_number":371,"context_line":"            LOG.exception(msg)"},{"line_number":372,"context_line":"            self.fail(msg)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # check headers added by the metadata proxy"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_0edb907c","line":371,"in_reply_to":"5a890539_554612c1","updated":"2014-11-25 09:23:32.000000000","message":"Done","commit_id":"26498080819343050a0d682eb52e1ec721787e8e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"41f30ee755432024b3cab38b746e93daba5b4ff2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from oslo.config import cfg"},{"line_number":22,"context_line":"from oslo.serialization import jsonutils"},{"line_number":23,"context_line":"import webob"},{"line_number":24,"context_line":"import webob.dec"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.agent.common import config as agent_config"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_72f5c9eb","line":24,"updated":"2014-11-25 12:18:25.000000000","message":"Extra newline of doom.","commit_id":"13ee815422d9e64bb9dbfdb6734101d0767b7436"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8e2a4e73a8b6b0df535614fb7e482a768041468b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from oslo.config import cfg"},{"line_number":22,"context_line":"from oslo.serialization import jsonutils"},{"line_number":23,"context_line":"import webob"},{"line_number":24,"context_line":"import webob.dec"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from neutron.agent.common import config as agent_config"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_f2fff9ff","line":24,"in_reply_to":"5a890539_72f5c9eb","updated":"2014-11-25 12:21:38.000000000","message":"Done","commit_id":"13ee815422d9e64bb9dbfdb6734101d0767b7436"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d4c2639181e932c8cc5fdc912fe9c74803a2528d","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _delete_router(self, agent, router_id):"},{"line_number":114,"context_line":"        agent._router_removed(router_id)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _get_unallocated_ip(self, cidr):"},{"line_number":117,"context_line":"        for ip in cidr:"},{"line_number":118,"context_line":"            if ip not in self._allocated_ips:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_48b3ba09","line":115,"updated":"2014-11-25 13:05:36.000000000","message":"I think this method and self._allocated_ips can be removed. Just get internal_cidr like you do in line 123 and add 1.","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7fff1af567408cba7acb78e2bb34eec38401e6e6","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _delete_router(self, agent, router_id):"},{"line_number":114,"context_line":"        agent._router_removed(router_id)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _get_unallocated_ip(self, cidr):"},{"line_number":117,"context_line":"        for ip in cidr:"},{"line_number":118,"context_line":"            if ip not in self._allocated_ips:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_eeac57a1","line":115,"in_reply_to":"5a890539_48b3ba09","updated":"2014-11-26 08:16:36.000000000","message":"Done","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d4c2639181e932c8cc5fdc912fe9c74803a2528d","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            if ip not in self._allocated_ips:"},{"line_number":119,"context_line":"                self._allocated_ips.add(ip)"},{"line_number":120,"context_line":"                return str(ip)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _create_internal_namespace(self, router):"},{"line_number":123,"context_line":"        internal_cidr \u003d netaddr.IPNetwork("},{"line_number":124,"context_line":"            router.internal_ports[0][\u0027ip_cidr\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_a8c17e81","line":121,"updated":"2014-11-25 13:05:36.000000000","message":"What does internal mean?\n\nThis method does a whole lot of unrelated things. Reading the method name, there\u0027s no way to guess what it does. I don\u0027t think it should exist at all, just put this code where you\u0027re currently using the method. You can merge lines 122 to 126 with _get_unallocated_ip. Then in line 414 you call _get_unallocated_ip, create a namespace and an OVS port.","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7fff1af567408cba7acb78e2bb34eec38401e6e6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            if ip not in self._allocated_ips:"},{"line_number":119,"context_line":"                self._allocated_ips.add(ip)"},{"line_number":120,"context_line":"                return str(ip)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _create_internal_namespace(self, router):"},{"line_number":123,"context_line":"        internal_cidr \u003d netaddr.IPNetwork("},{"line_number":124,"context_line":"            router.internal_ports[0][\u0027ip_cidr\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_8913e3ff","line":121,"in_reply_to":"5a890539_a8c17e81","updated":"2014-11-26 08:16:36.000000000","message":"internal refers to internal_ports in RouterInfo","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"637f7ac1f2ba5a42799fd60eb18b39962b5a305a","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                     self.agent.conf.metadata_proxy_socket,"},{"line_number":408,"context_line":"                     workers\u003d0, backlog\u003d4096)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":411,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":412,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":413,"context_line":"        self._create_metadata_fake_server(200)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_6346d97c","line":410,"updated":"2014-11-25 13:29:21.000000000","message":"Can I ask you to add a docstring here? Something like: \"Create a router (Which creates a metadata proxy in its namespace), create a fake metadata server in the root namespace, create another namespace with a port on the same bridge the router is connected to, then send an HTTP request to 169.254.169.254, and assert that the request was forwarded from the temporary namespace, into the router\u0027s namespace, into the proxy and to the metadata agent.\"\n\nI\u0027m very close to this code and it took me a while to figure out the complexities involved.","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7fff1af567408cba7acb78e2bb34eec38401e6e6","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                     self.agent.conf.metadata_proxy_socket,"},{"line_number":408,"context_line":"                     workers\u003d0, backlog\u003d4096)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":411,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":412,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":413,"context_line":"        self._create_metadata_fake_server(200)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_e6dbb64c","line":410,"in_reply_to":"5a890539_6346d97c","updated":"2014-11-26 08:16:36.000000000","message":"Done","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d4c2639181e932c8cc5fdc912fe9c74803a2528d","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":414,"context_line":"        internal_ns, internal_ip \u003d self._create_internal_namespace(router)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":417,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":418,"context_line":"        cmd \u003d (\u0027python\u0027, simple_http.__file__, \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d200\u0027)"},{"line_number":419,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_28e3ced9","line":416,"updated":"2014-11-25 13:05:36.000000000","message":"Unrelated to this patch:\n\nWow, metadata_port is the worst named variable ever... I thought it was 9697 or whatnot, but it\u0027s just 80 \u003dD","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7fff1af567408cba7acb78e2bb34eec38401e6e6","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":414,"context_line":"        internal_ns, internal_ip \u003d self._create_internal_namespace(router)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":417,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":418,"context_line":"        cmd \u003d (\u0027python\u0027, simple_http.__file__, \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d200\u0027)"},{"line_number":419,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_461d6a0e","line":416,"in_reply_to":"5a890539_28e3ced9","updated":"2014-11-26 08:16:36.000000000","message":"it\u0027s because the metadata-proxy uses directly the 80 port on the dhcp-agent ... to simplify things","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"74e7c19e3c33c03f7c96ea8d16e3eb3862f08e41","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            \u0027neutron.agent.linux.interface.OVSInterfaceDriver\u0027)"},{"line_number":69,"context_line":"        conf.set_override(\u0027router_delete_namespaces\u0027, True)"},{"line_number":70,"context_line":"        conf.set_override(\u0027root_helper\u0027, self.root_helper, group\u003d\u0027AGENT\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.br_int \u003d self.create_ovs_bridge()"},{"line_number":73,"context_line":"        self.br_ex \u003d self.create_ovs_bridge()"},{"line_number":74,"context_line":"        conf.set_override(\u0027ovs_integration_bridge\u0027, self.br_int.br_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_417b70f4","line":71,"updated":"2014-11-26 11:05:12.000000000","message":"Setting br_int and br_ex is kind of problematic... The HA test case inherits from the framework class. It calls _configure_agent twice and override self.br_int/ex for the second agent. It\u0027s weird...","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2243430543f0452b51ebb6a6ce0e5956365820eb","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            \u0027neutron.agent.linux.interface.OVSInterfaceDriver\u0027)"},{"line_number":69,"context_line":"        conf.set_override(\u0027router_delete_namespaces\u0027, True)"},{"line_number":70,"context_line":"        conf.set_override(\u0027root_helper\u0027, self.root_helper, group\u003d\u0027AGENT\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.br_int \u003d self.create_ovs_bridge()"},{"line_number":73,"context_line":"        self.br_ex \u003d self.create_ovs_bridge()"},{"line_number":74,"context_line":"        conf.set_override(\u0027ovs_integration_bridge\u0027, self.br_int.br_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_13a61dab","line":71,"in_reply_to":"5a890539_417b70f4","updated":"2014-11-26 13:22:08.000000000","message":"Done","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"74e7c19e3c33c03f7c96ea8d16e3eb3862f08e41","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        the namespace, configuring port ip and namespace gateway."},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        port_dev \u003d self.create_ovs_port(self.br_int, namespace)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        router_ip_cidr \u003d netaddr.IPNetwork(router.internal_ports[0][\u0027ip_cidr\u0027])"},{"line_number":120,"context_line":"        ip \u003d router_ip_cidr.ip + 1"},{"line_number":121,"context_line":"        port_dev.addr.add(router_ip_cidr.version,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_218ca4d6","line":118,"updated":"2014-11-26 11:05:12.000000000","message":"This functionality is useful. I gave it more thought last night and I think that in the future we could move this function to another place in the code so that other tests could easily generate traffic to where ever they want. That being said, I don\u0027t think the method should accept a router, it should accept a CIDR and unallocated address instead. Additionally, adding a gateway has nothing to do with this method and can be done outside of it. Let\u0027s try to make the signature make sense and be generic and reusable outside the context of what you\u0027re trying to achieve right now.","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2243430543f0452b51ebb6a6ce0e5956365820eb","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        the namespace, configuring port ip and namespace gateway."},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        port_dev \u003d self.create_ovs_port(self.br_int, namespace)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        router_ip_cidr \u003d netaddr.IPNetwork(router.internal_ports[0][\u0027ip_cidr\u0027])"},{"line_number":120,"context_line":"        ip \u003d router_ip_cidr.ip + 1"},{"line_number":121,"context_line":"        port_dev.addr.add(router_ip_cidr.version,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_064259aa","line":118,"in_reply_to":"5a890539_218ca4d6","updated":"2014-11-26 13:22:08.000000000","message":"Done","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"74e7c19e3c33c03f7c96ea8d16e3eb3862f08e41","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                     self.agent.conf.metadata_proxy_socket,"},{"line_number":403,"context_line":"                     workers\u003d0, backlog\u003d4096)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":406,"context_line":"        \"\"\" Test access to the l3-agent metadata proxy."},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        The test creates:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_c17840c6","line":405,"updated":"2014-11-26 11:05:12.000000000","message":"+1 on the detailed docstring :)\n\nJust some stupid textual stuff: There should no space between the opening \"\"\" and the first word.","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2243430543f0452b51ebb6a6ce0e5956365820eb","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                     self.agent.conf.metadata_proxy_socket,"},{"line_number":403,"context_line":"                     workers\u003d0, backlog\u003d4096)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":406,"context_line":"        \"\"\" Test access to the l3-agent metadata proxy."},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        The test creates:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_d347351b","line":405,"in_reply_to":"5a890539_c17840c6","updated":"2014-11-26 13:22:08.000000000","message":"Done","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"74e7c19e3c33c03f7c96ea8d16e3eb3862f08e41","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":406,"context_line":"        \"\"\" Test access to the l3-agent metadata proxy."},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        The test creates:"},{"line_number":409,"context_line":"         * a l3-agent metadata service:"},{"line_number":410,"context_line":"           * a router (which creates a metadata proxy in the router namespace),"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_414c509e","line":407,"updated":"2014-11-26 11:05:12.000000000","message":"The sentences following the bullet points need capitalization.","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2243430543f0452b51ebb6a6ce0e5956365820eb","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def test_access_to_metadata_proxy(self):"},{"line_number":406,"context_line":"        \"\"\" Test access to the l3-agent metadata proxy."},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        The test creates:"},{"line_number":409,"context_line":"         * a l3-agent metadata service:"},{"line_number":410,"context_line":"           * a router (which creates a metadata proxy in the router namespace),"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_b34c6943","line":407,"in_reply_to":"5a890539_414c509e","updated":"2014-11-26 13:22:08.000000000","message":"Done","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"4f22f3ac168fa1689852d4048908fc29c9451e63","unresolved":false,"context_lines":[{"line_number":431,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":432,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d200\u0027)"},{"line_number":433,"context_line":"        try:"},{"line_number":434,"context_line":"            raw_headers \u003d client_ns.netns.execute(cmd)"},{"line_number":435,"context_line":"        except RuntimeError:"},{"line_number":436,"context_line":"            self.fail(\u0027metadata proxy unreachable on %s\u0027 % url)"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_70875c61","line":434,"updated":"2014-11-26 09:32:48.000000000","message":"I think that in the long shot someone inserts a bug someplace in this logic/client, this should be wrapped with an eventlet Timeout object, to make sure this doesn\u0027t run forever and ever and allow for easier debugging.\n\nThis timeout can also be done in the simple_http file (and it might make more sense there).","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"2243430543f0452b51ebb6a6ce0e5956365820eb","unresolved":false,"context_lines":[{"line_number":431,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":432,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d200\u0027)"},{"line_number":433,"context_line":"        try:"},{"line_number":434,"context_line":"            raw_headers \u003d client_ns.netns.execute(cmd)"},{"line_number":435,"context_line":"        except RuntimeError:"},{"line_number":436,"context_line":"            self.fail(\u0027metadata proxy unreachable on %s\u0027 % url)"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_53bfc5cf","line":434,"in_reply_to":"5a890539_70875c61","updated":"2014-11-26 13:22:08.000000000","message":"Done","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a7f4e5bb642b05c769411f7a4aa26260a174e1b7","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":419,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":420,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # Create and configure client namespace"},{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_64a9558f","line":421,"updated":"2014-11-26 14:08:40.000000000","message":"I\u0027m not 100% with this code block now (Though I think it\u0027s making progress), I\u0027ll let others voice their opinion. Some of this stuff can/should be made in to discrete functions, we just have to figure out what makes sense.","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"701a3793ee919b18f4a02639ec26f1dbdb9adff6","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":419,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":420,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # Create and configure client namespace"},{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_b66529e4","line":421,"in_reply_to":"5a890539_64a9558f","updated":"2014-11-26 18:59:48.000000000","message":"I have to agree with Assaf here. At the least the following code block can be exported into a \u0027setup_metadata_namespace\u0027 function or something, but I also think there\u0027s some worth in splitting that up even more (424-427, 429-430 seems reasonable as \u0027create_default_gateway\u0027 and \u0027bind_gateway\u0027, respectively. Probably \u0027bind_gateway\u0027 is a bad name :))\n\nThe worth of this will be that people wanting to reuse this code (or do something similar, like in the future for metadata-dhcp tests) can easily take the code.","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e2da3df9b38c88b22905add9c86ddb2dcc295341","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":419,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":420,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # Create and configure client namespace"},{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_bd55f4fb","line":421,"in_reply_to":"5a890539_b66529e4","updated":"2014-11-27 11:02:39.000000000","message":"Basically below is _create_internal_namespace() from patchset 8. I think it\u0027s more generic to have it as separate function as it was before.","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d6950b77b5c4bad7c4920d624e7a0fa730ddcd10","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":419,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":420,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # Create and configure client namespace"},{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_ab53e137","line":421,"in_reply_to":"5a890539_bd55f4fb","updated":"2014-11-27 17:44:37.000000000","message":"Done","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"701a3793ee919b18f4a02639ec26f1dbdb9adff6","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        # Create and configure client namespace"},{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":425,"context_line":"        router_ip_cidr_obj \u003d netaddr.IPNetwork(router_ip_cidr)"},{"line_number":426,"context_line":"        ip \u003d str(router_ip_cidr_obj.ip + 1)"},{"line_number":427,"context_line":"        ip_cidr \u003d \u0027%s/%s\u0027 % (ip, router_ip_cidr_obj.prefixlen)"},{"line_number":428,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_76f10101","line":425,"updated":"2014-11-26 18:59:48.000000000","message":"How about removing the \u0027ip\u0027 variable from the next line (you only use it once anyway) and renaming \u0027router_ip_cidr_obj\u0027 to \u0027ip\u0027 (like the rest of the code does anyway?)","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d6950b77b5c4bad7c4920d624e7a0fa730ddcd10","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        # Create and configure client namespace"},{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":425,"context_line":"        router_ip_cidr_obj \u003d netaddr.IPNetwork(router_ip_cidr)"},{"line_number":426,"context_line":"        ip \u003d str(router_ip_cidr_obj.ip + 1)"},{"line_number":427,"context_line":"        ip_cidr \u003d \u0027%s/%s\u0027 % (ip, router_ip_cidr_obj.prefixlen)"},{"line_number":428,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_51f3189f","line":425,"in_reply_to":"5a890539_76f10101","updated":"2014-11-27 17:44:37.000000000","message":"in neutron code:\n\n * \u00271.2.3.4\u0027 \u003c\u003d\u003d\u003e ip\n * \u00271.2.3.4/24\u0027 \u003c\u003d\u003d\u003e ip_cidr\n * netaddr.IPNetwork() \u003c\u003d\u003d\u003e net?","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e2da3df9b38c88b22905add9c86ddb2dcc295341","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":425,"context_line":"        router_ip_cidr_obj \u003d netaddr.IPNetwork(router_ip_cidr)"},{"line_number":426,"context_line":"        ip \u003d str(router_ip_cidr_obj.ip + 1)"},{"line_number":427,"context_line":"        ip_cidr \u003d \u0027%s/%s\u0027 % (ip, router_ip_cidr_obj.prefixlen)"},{"line_number":428,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":429,"context_line":"        port \u003d self._bind_namespace_to_subnet(client_ns, br_int, ip_cidr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_9d9e78b7","line":426,"updated":"2014-11-27 11:02:39.000000000","message":"Abracadabra IP address! As long as it\u0027s part of this test only, I guess it\u0027s safe. I would prefer it to be part of some \"building blocks\" when creating setup for test cases. This way we need more general approach - I was OK with previous solution of remembering what addresses are free to use as long as the Framework class obeys it.","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"701a3793ee919b18f4a02639ec26f1dbdb9adff6","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":425,"context_line":"        router_ip_cidr_obj \u003d netaddr.IPNetwork(router_ip_cidr)"},{"line_number":426,"context_line":"        ip \u003d str(router_ip_cidr_obj.ip + 1)"},{"line_number":427,"context_line":"        ip_cidr \u003d \u0027%s/%s\u0027 % (ip, router_ip_cidr_obj.prefixlen)"},{"line_number":428,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":429,"context_line":"        port \u003d self._bind_namespace_to_subnet(client_ns, br_int, ip_cidr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_76dbc14f","line":426,"updated":"2014-11-26 18:59:48.000000000","message":"The above line needs some clarification. Are you defining a new IPAddress object whose IP is 1 bigger (ie. 10.0.0.5 -\u003e 10.0.0.6)? Why?","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"0c1d4c51642b0b2ed0f473e4f5e816b715b2a226","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":425,"context_line":"        router_ip_cidr_obj \u003d netaddr.IPNetwork(router_ip_cidr)"},{"line_number":426,"context_line":"        ip \u003d str(router_ip_cidr_obj.ip + 1)"},{"line_number":427,"context_line":"        ip_cidr \u003d \u0027%s/%s\u0027 % (ip, router_ip_cidr_obj.prefixlen)"},{"line_number":428,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":429,"context_line":"        port \u003d self._bind_namespace_to_subnet(client_ns, br_int, ip_cidr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_796c92d1","line":426,"in_reply_to":"5a890539_76dbc14f","updated":"2014-11-26 19:24:18.000000000","message":"The intent is to get an IP address in the same address space as that of an internal network of the router.","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d6950b77b5c4bad7c4920d624e7a0fa730ddcd10","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":424,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":425,"context_line":"        router_ip_cidr_obj \u003d netaddr.IPNetwork(router_ip_cidr)"},{"line_number":426,"context_line":"        ip \u003d str(router_ip_cidr_obj.ip + 1)"},{"line_number":427,"context_line":"        ip_cidr \u003d \u0027%s/%s\u0027 % (ip, router_ip_cidr_obj.prefixlen)"},{"line_number":428,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":429,"context_line":"        port \u003d self._bind_namespace_to_subnet(client_ns, br_int, ip_cidr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_0b3a35e7","line":426,"in_reply_to":"5a890539_9d9e78b7","updated":"2014-11-27 17:44:37.000000000","message":"Done","commit_id":"520be84dcbf06d2c0919762cafcdbc4a387c093d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"8129c4f45bd247c246331919a4b583b500fd1dec","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                              status\u003dself.status)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_103d012d","line":380,"updated":"2014-11-27 22:56:37.000000000","message":"I think we should take into consideration that at some point we might want to test linuxbridge too, AFAIK it\u0027s still supported. I\u0027d create a base class for code that can be shared and then MetadataL3AgentOvsTestCase for ovs specific stuff. I know L3AgentTestFramework has the same structure as this class but I don\u0027t think it\u0027s the best approach if we want to extend the test later.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1b5f185ab5381c23e7353cf90e756dc475f691a4","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                              status\u003dself.status)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_22be2ad5","line":380,"in_reply_to":"5a890539_103d012d","updated":"2014-11-28 10:12:07.000000000","message":"I disagree. The goal is to test metadata-proxy redirecting requests. The technology used underneath is not relevant.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"4f76f99b79705890d9f646eb3b75bd4c6fcc4b1a","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                              status\u003dself.status)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_9e7f32ab","line":380,"in_reply_to":"5a890539_22be2ad5","updated":"2014-11-28 16:01:09.000000000","message":"It\u0027s a functional test, it should run and pass on all the technology supported. Here we are implicitly testing only ovs.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"85b82128cac19b00d589a6d18478259fee9361e9","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                              status\u003dself.status)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_d72a7d2e","line":380,"in_reply_to":"5a890539_9e7f32ab","updated":"2014-11-28 17:21:00.000000000","message":"I still disagree. You said we\u0027re implicitly testing only ovs - the aim is not to test OVS here. \n\nWe\u0027re interested in testing behavior of metadata-proxy, whether it re-sends correctly modified http requests to metadata agent. If it goes through wire, ovs, linuxbridge or any other l2 separation is not subject of this test. I\u0027m not sure what new information regarding metadata-proxy would we get in case test would pass on OVS but not on LB. Probably none, we would only need to maintain more code.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d353b8293b89c141c5af7868a685f534dc257f7c","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                              status\u003dself.status)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_d74b5d5d","line":380,"in_reply_to":"5a890539_9e7f32ab","updated":"2014-11-28 17:19:42.000000000","message":"That\u0027s not in the scope of this change ... from my point of view such need should be hidden when possible in base module (i will see if i can address it in an other change) ... \n\nThis class is ovs/linuxbridge agnostic except L413","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"fc6a43e1e64266d071d116fbc50658bd60686adb","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                              status\u003dself.status)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"class MetadataL3AgentTestCase(L3AgentTestFramework):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_a1c2eb83","line":380,"in_reply_to":"5a890539_d72a7d2e","updated":"2014-12-01 17:05:57.000000000","message":"@Cedric OK\n\n@Jakub we disagree :) It\u0027s clear that here we are interested in testing the metadata proxy behavior, we are not directly testing the L2. Anyway functional tests should have a black box approach, they should pass on every L2 technology, they shouldn\u0027t care about it. I think we can use better abstraction and be able then to run the same functional test on different environment. This test, the way it\u0027s written, can\u0027t run on a environment that is not using OVS.\nI\u0027d like to see what other people think. Anyway this discussion is more about the general approach, it\u0027s not specific to this patch, I guess Cedric can just move on.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"},{"line_number":384,"context_line":"        self.addCleanup(server.stop)"},{"line_number":385,"context_line":"        server.start(MetadataFakeProxyHandler(status),"},{"line_number":386,"context_line":"                     self.agent.conf.metadata_proxy_socket,"},{"line_number":387,"context_line":"                     workers\u003d0, backlog\u003d4096)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_e1ec1795","line":384,"updated":"2014-11-28 16:29:12.000000000","message":"Hm. Shouldn\u0027t we set cleanup AFTER start() succeeds?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d353b8293b89c141c5af7868a685f534dc257f7c","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def _create_metadata_fake_server(self, status):"},{"line_number":383,"context_line":"        server \u003d metadata_agent.UnixDomainWSGIServer(\u0027metadata-fake-server\u0027)"},{"line_number":384,"context_line":"        self.addCleanup(server.stop)"},{"line_number":385,"context_line":"        server.start(MetadataFakeProxyHandler(status),"},{"line_number":386,"context_line":"                     self.agent.conf.metadata_proxy_socket,"},{"line_number":387,"context_line":"                     workers\u003d0, backlog\u003d4096)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_773549da","line":384,"in_reply_to":"5a890539_e1ec1795","updated":"2014-11-28 17:19:42.000000000","message":"server.start could fail after server \"system\" start (the systemd notify is done after the server \"system\" start) so it seems safer to try to stop the server even if server.start fails.\n\nAnd unittest support failures in cleanup: other cleanups will be done and the test will finally fail","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        \"\"\""},{"line_number":405,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":406,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":407,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        # Create and configure client namespace"},{"line_number":410,"context_line":"        client_ns \u003d self._create_namespace()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_3d681621","line":407,"updated":"2014-11-27 22:48:30.000000000","message":"please don\u0027t hard-code 200, use a variable with a proper name instead. It will make the code more readable and you use the value 200 again at line 422","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        \"\"\""},{"line_number":405,"context_line":"        router_info \u003d self.generate_router_info(enable_ha\u003dFalse)"},{"line_number":406,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":407,"context_line":"        self._create_metadata_fake_server(200)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        # Create and configure client namespace"},{"line_number":410,"context_line":"        client_ns \u003d self._create_namespace()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_e8ede1b8","line":407,"in_reply_to":"5a890539_3d681621","updated":"2014-11-28 11:10:58.000000000","message":"done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ca17a4c9aec6caafbc14d9536235d3a2f4fae078","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        # Create and configure client namespace"},{"line_number":410,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":411,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":412,"context_line":"        ip_cidr \u003d self.shift_ip_cidr(router_ip_cidr)"},{"line_number":413,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":414,"context_line":"        port \u003d self.bind_namespace_to_subnet(client_ns, br_int, ip_cidr)"},{"line_number":415,"context_line":"        self.set_namespace_gateway(port, router_ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_d0ae1981","line":412,"updated":"2014-11-27 22:48:30.000000000","message":"this is confusing to me, are you just trying to generate the next IP in the subnet?","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8352ecc635cac0b861109cd3013ce99f9daf2134","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        # Create and configure client namespace"},{"line_number":410,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":411,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":412,"context_line":"        ip_cidr \u003d self.shift_ip_cidr(router_ip_cidr)"},{"line_number":413,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":414,"context_line":"        port \u003d self.bind_namespace_to_subnet(client_ns, br_int, ip_cidr)"},{"line_number":415,"context_line":"        self.set_namespace_gateway(port, router_ip_cidr)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_a8f3d99d","line":412,"in_reply_to":"5a890539_d0ae1981","updated":"2014-11-28 11:10:58.000000000","message":"indeed","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8465ec4a0d2070b984edf30f7554068a1d5c9df","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":420,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":421,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":422,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d200\u0027)"},{"line_number":423,"context_line":"        try:"},{"line_number":424,"context_line":"            with eventlet.timeout.Timeout(10):"},{"line_number":425,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_c1e0fb98","line":422,"updated":"2014-11-28 16:29:12.000000000","message":"nit: that \u0027200\u0027 magic number is used twice in the test, so can be reused.","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"83cfd56c64564d9cc5f9790203d23dbb6c004f5c","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":420,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":421,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":422,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d200\u0027)"},{"line_number":423,"context_line":"        try:"},{"line_number":424,"context_line":"            with eventlet.timeout.Timeout(10):"},{"line_number":425,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_46623d3e","line":422,"in_reply_to":"5a890539_c1e0fb98","updated":"2014-12-01 19:17:43.000000000","message":"Done","commit_id":"46bc5cb45a8922ae99eeb68ab3ed252b3cab8cdb"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"11eb9e6a0d314a2ba5b9023fe4a10fce3d5f1cb0","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":422,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":423,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d%s\u0027 % webob.exc.HTTPOk.code)"},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            with eventlet.timeout.Timeout(10):"},{"line_number":426,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"},{"line_number":427,"context_line":"        except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_7b5c8b26","line":424,"updated":"2014-12-07 09:04:44.000000000","message":"We probably want the 10 as a constant.","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"34294d2904190b44a883fa3e9003a6c7d1bf8705","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":422,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":423,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d%s\u0027 % webob.exc.HTTPOk.code)"},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            with eventlet.timeout.Timeout(10):"},{"line_number":426,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"},{"line_number":427,"context_line":"        except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_d6cd515f","line":424,"in_reply_to":"3a961159_7b5c8b26","updated":"2014-12-08 10:56:37.000000000","message":"Done x2","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"d5e737fa49d0df395204c2f3069e77c86b70b1af","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":422,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":423,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d%s\u0027 % webob.exc.HTTPOk.code)"},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            with eventlet.timeout.Timeout(10):"},{"line_number":426,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"},{"line_number":427,"context_line":"        except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_32ef76b2","line":424,"in_reply_to":"3a961159_7b5c8b26","updated":"2014-12-08 09:43:04.000000000","message":"We also probably want to dramatically increase 10 to 60. Running this at the gate before the feature freeze will cause this to produce a lot of non-deterministic errors we can avoid right now.","commit_id":"fb331fe698d4a9aee1d1e02f26455704fb0c1079"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"601ff5e307e09294922f351d92110bc92449f111","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":410,"context_line":"        self._create_metadata_fake_server(webob.exc.HTTPOk.code)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        # Create and configure client namespace"},{"line_number":413,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":414,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":415,"context_line":"        ip_cidr \u003d self.shift_ip_cidr(router_ip_cidr)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_1cca764f","line":412,"updated":"2014-12-09 00:08:30.000000000","message":"Comments like this suggest factoring the subsequent block into a supporting function.  The function name becomes the documentation.","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"04053f3919e3672bfa0869b61d39d1d2bea33610","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":410,"context_line":"        self._create_metadata_fake_server(webob.exc.HTTPOk.code)"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        # Create and configure client namespace"},{"line_number":413,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":414,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":415,"context_line":"        ip_cidr \u003d self.shift_ip_cidr(router_ip_cidr)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_4e20b649","line":412,"in_reply_to":"3a961159_1cca764f","updated":"2014-12-09 10:37:19.000000000","message":"As said in previous PS[1], i will address it in a daughter change\n\n\n[1] https://review.openstack.org/#/c/136511/13/neutron/tests/functional/agent/linux/base.py","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"601ff5e307e09294922f351d92110bc92449f111","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # Query metadata proxy"},{"line_number":421,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":422,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":423,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":424,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":425,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d%s\u0027 % webob.exc.HTTPOk.code)"},{"line_number":426,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_62b674db","line":423,"updated":"2014-12-09 00:08:30.000000000","message":"Running a script to retrieve a url seems like overkill.  Consider adding a rootwrap filter for the explicit command required (i.e. request.get()) instead.","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"04053f3919e3672bfa0869b61d39d1d2bea33610","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # Query metadata proxy"},{"line_number":421,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":422,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":423,"context_line":"        cmd \u003d (\u0027python\u0027, \u0027-m\u0027,"},{"line_number":424,"context_line":"               \u0027neutron.tests.functional.agent.linux.simple_http\u0027,"},{"line_number":425,"context_line":"               \u0027--url\u003d%s\u0027 % url, \u0027--code\u003d%s\u0027 % webob.exc.HTTPOk.code)"},{"line_number":426,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_73239905","line":423,"in_reply_to":"3a961159_62b674db","updated":"2014-12-09 10:37:19.000000000","message":"Without headers check, it can be replaced by curl.\n\nDone","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"601ff5e307e09294922f351d92110bc92449f111","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        except RuntimeError:"},{"line_number":430,"context_line":"            self.fail(\u0027metadata proxy unreachable on %s\u0027 % url)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        # check headers added by the metadata proxy"},{"line_number":433,"context_line":"        headers \u003d jsonutils.loads(raw_headers)"},{"line_number":434,"context_line":"        self.assertEqual(ip_cidr.partition(\u0027/\u0027)[0], headers[\u0027X-Forwarded-For\u0027])"},{"line_number":435,"context_line":"        self.assertEqual(router.router_id, headers[\u0027X-Neutron-Router-Id\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_e23184ed","line":432,"updated":"2014-12-09 00:08:30.000000000","message":"I don\u0027t think header validation is necessary, since it\u0027s already been done in the unit tests: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/test_metadata_namespace_proxy.py#L90\n\nIt still makes sense to check that the result is otherwise valid.","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"04053f3919e3672bfa0869b61d39d1d2bea33610","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        except RuntimeError:"},{"line_number":430,"context_line":"            self.fail(\u0027metadata proxy unreachable on %s\u0027 % url)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        # check headers added by the metadata proxy"},{"line_number":433,"context_line":"        headers \u003d jsonutils.loads(raw_headers)"},{"line_number":434,"context_line":"        self.assertEqual(ip_cidr.partition(\u0027/\u0027)[0], headers[\u0027X-Forwarded-For\u0027])"},{"line_number":435,"context_line":"        self.assertEqual(router.router_id, headers[\u0027X-Neutron-Router-Id\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_932005f9","line":432,"in_reply_to":"3a961159_e23184ed","updated":"2014-12-09 10:37:19.000000000","message":"Done","commit_id":"fb3d16295f921ae39ad3a9a8aa460eca2b500e1b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"4be6893e4acae68f2cb91fac4a120095074560af","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # Query metadata proxy"},{"line_number":419,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":420,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":421,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027-D-\u0027, url"},{"line_number":422,"context_line":"        try:"},{"line_number":423,"context_line":"            with eventlet.timeout.Timeout(METADATA_REQUEST_TIMEOUT):"},{"line_number":424,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_824c0a44","line":421,"updated":"2014-12-10 09:00:49.000000000","message":"I think that using curl here is most definitely a step in the right direction.\n\nLooking at the man pages for curl shows at least 2 arguments which specify various timeouts. Maybe we can use those and not use eventlet.Timeout?\n\nMight not work out/turn out less reliable (i.e. gate jobs run the command, it times out but takes longer to transmit the event back to the process since the CPU is booked), but definitely worth looking in to.","commit_id":"89885c22ce2555fff98400bf5ad2e1131334e28c"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a7e57c37a99e47242f4cd792d65daa739685f69c","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # Query metadata proxy"},{"line_number":419,"context_line":"        url \u003d \u0027http://%(host)s:%(port)s\u0027 % {\u0027host\u0027: dhcp.METADATA_DEFAULT_IP,"},{"line_number":420,"context_line":"                                            \u0027port\u0027: dhcp.METADATA_PORT}"},{"line_number":421,"context_line":"        cmd \u003d \u0027curl\u0027, \u0027-D-\u0027, url"},{"line_number":422,"context_line":"        try:"},{"line_number":423,"context_line":"            with eventlet.timeout.Timeout(METADATA_REQUEST_TIMEOUT):"},{"line_number":424,"context_line":"                raw_headers \u003d client_ns.netns.execute(cmd)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_e8868c64","line":421,"in_reply_to":"3a961159_824c0a44","updated":"2014-12-10 11:50:11.000000000","message":"Done","commit_id":"89885c22ce2555fff98400bf5ad2e1131334e28c"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"7fb421f61caf2574663f007814666de48ff17023","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        router \u003d self.manage_router(self.agent, router_info)"},{"line_number":407,"context_line":"        self._create_metadata_fake_server(webob.exc.HTTPOk.code)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        # Create and configure client namespace"},{"line_number":410,"context_line":"        client_ns \u003d self._create_namespace()"},{"line_number":411,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":412,"context_line":"        ip_cidr \u003d self.shift_ip_cidr(router_ip_cidr)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_7544ecb6","line":409,"updated":"2014-12-12 01:49:15.000000000","message":"(No action required) The practice of allowing sub-par code in a patch series so long as a subsequent patch clears it up seems wrong to me.  Please avoid in the future.","commit_id":"1e08da7d9ddc42077c615fe7f112509bf7b0b45e"}],"neutron/tests/functional/contrib/filters.template":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d4c2639181e932c8cc5fdc912fe9c74803a2528d","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# enable ping from namespace"},{"line_number":15,"context_line":"ping_filter: CommandFilter, ping, root"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# enable python from namespace"},{"line_number":18,"context_line":"python_filter: CommandFilter, python, root"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"5a890539_288e6e2e","line":16,"updated":"2014-11-25 13:05:36.000000000","message":"I\u0027m not 100% on this. Doesn\u0027t this mean that during testing you can run python as root? This is a big departure from non-test code. Can we get around this, and make the filter more specific? For example make simple_http executable itself and add it as a filter here? This would mean adding simple_http as an entry point in setup.cfg - Just a thought.","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7fff1af567408cba7acb78e2bb34eec38401e6e6","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# enable ping from namespace"},{"line_number":15,"context_line":"ping_filter: CommandFilter, ping, root"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# enable python from namespace"},{"line_number":18,"context_line":"python_filter: CommandFilter, python, root"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"5a890539_43ff1c34","line":16,"in_reply_to":"5a890539_288e6e2e","updated":"2014-11-26 08:16:36.000000000","message":"defining entry-points for tests is clearly not acceptable.\n\n\nDone","commit_id":"d82ed50c9463a3922d440bc13203f7aa583f5f26"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"74e7c19e3c33c03f7c96ea8d16e3eb3862f08e41","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# enable ping from namespace"},{"line_number":15,"context_line":"ping_filter: CommandFilter, ping, root"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# enable simple_http from namespace"},{"line_number":18,"context_line":"simple_http_filter: RegExpFilter, python, root, python, -m, neutron\\.tests\\.functional\\.agent\\.linux\\.simple_http, .*, .*"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"5a890539_c12680cd","line":16,"updated":"2014-11-26 11:05:12.000000000","message":"+1","commit_id":"a6de7647c94acbf32f643ca4b242b9666219a0f1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"7fb421f61caf2574663f007814666de48ff17023","unresolved":false,"context_lines":[{"line_number":15,"context_line":"ping_filter: CommandFilter, ping, root"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# enable curl from namespace"},{"line_number":18,"context_line":"simple_http_filter: CommandFilter, curl, root"}],"source_content_type":"application/octet-stream","patch_set":19,"id":"3a961159_b519f4d8","line":18,"updated":"2014-12-12 01:49:15.000000000","message":"(nit) simple_http_filter -\u003e curl_filter","commit_id":"1e08da7d9ddc42077c615fe7f112509bf7b0b45e"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"698d55b4fb44402a96d5d50999660917110b01c2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"ping_filter: CommandFilter, ping, root"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# enable curl from namespace"},{"line_number":18,"context_line":"simple_http_filter: CommandFilter, curl, root"}],"source_content_type":"application/octet-stream","patch_set":19,"id":"3a961159_d2e04bfc","line":18,"in_reply_to":"3a961159_b519f4d8","updated":"2014-12-12 10:09:14.000000000","message":"Done","commit_id":"1e08da7d9ddc42077c615fe7f112509bf7b0b45e"}]}
