)]}'
{"quantum/agent/linux/interface.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    root_dev.link.set_mtu(self.conf.network_device_mtu)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"            # Add an interface created by ovs to the namespace."},{"line_number":189,"context_line":"            add_to_namespace \u003d (not self.conf.ovs_use_veth and namespace)"},{"line_number":190,"context_line":"            if add_to_namespace:"},{"line_number":191,"context_line":"                namespace_obj \u003d ip.ensure_namespace(namespace)"},{"line_number":192,"context_line":"                namespace_obj.add_device_to_namespace(ns_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fwks%3D","line":189,"updated":"2013-04-24 15:15:53.000000000","message":"Not sure I understand the need to assign the value here","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":"                    root_dev.link.set_mtu(self.conf.network_device_mtu)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"            # Add an interface created by ovs to the namespace."},{"line_number":189,"context_line":"            add_to_namespace \u003d (not self.conf.ovs_use_veth and namespace)"},{"line_number":190,"context_line":"            if add_to_namespace:"},{"line_number":191,"context_line":"                namespace_obj \u003d ip.ensure_namespace(namespace)"},{"line_number":192,"context_line":"                namespace_obj.add_device_to_namespace(ns_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fv7o%3D","line":189,"in_reply_to":"AAAAOn%2F%2Fwks%3D","updated":"2013-04-25 04:43:47.000000000","message":"I like using self-documenting names for conditional statements, but the fact that I thought a comment was necessary indicates I\u0027m doing it wrong.  I\u0027ll try again.","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"}],"quantum/agent/linux/ip_lib.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self._as_root(\u0027\u0027, \u0027tuntap\u0027, (\u0027add\u0027, name, \u0027mode\u0027, mode))"},{"line_number":91,"context_line":"        return IPDevice(name, self.root_helper, self.namespace)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def add_veth(self, name1, name2, namespace1\u003dNone, namespace2\u003dNone):"},{"line_number":94,"context_line":"        device1_args \u003d [name1]"},{"line_number":95,"context_line":"        if namespace1:"},{"line_number":96,"context_line":"            self.ensure_namespace(namespace1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fwj4%3D","line":93,"updated":"2013-04-24 15:15:53.000000000","message":"Hmmm.. this is a bit of departure for how namespacing works with the rest of the library.  All of the other actions occur relative to self.namespace, so passing namespace1 seems redundant.  Namespace2 for the other half of the pair does make sense.  Thoughts?","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self._as_root(\u0027\u0027, \u0027tuntap\u0027, (\u0027add\u0027, name, \u0027mode\u0027, mode))"},{"line_number":91,"context_line":"        return IPDevice(name, self.root_helper, self.namespace)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def add_veth(self, name1, name2, namespace1\u003dNone, namespace2\u003dNone):"},{"line_number":94,"context_line":"        device1_args \u003d [name1]"},{"line_number":95,"context_line":"        if namespace1:"},{"line_number":96,"context_line":"            self.ensure_namespace(namespace1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fv7g%3D","line":93,"in_reply_to":"AAAAOn%2F%2Fwj4%3D","updated":"2013-04-25 04:43:47.000000000","message":"I provided the ability to provide the namespace for either device mainly because it was supported by the underlying command, and also because a colleague suggested that it might be necessary to supply a namespace for the first device for backwards compatibility purposes.  I\u0027m happy to submit a simpler patch, though.","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4b02a04d0e5a3e261f492a26f6d26f6e4ca3de20","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self._as_root(\u0027\u0027, \u0027link\u0027, args)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if namespace1 is None:"},{"line_number":108,"context_line":"            namespace1 \u003d self.namespace"},{"line_number":109,"context_line":"        if namespace2 is None:"},{"line_number":110,"context_line":"            namespace2 \u003d self.namespace"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FxBk%3D","line":107,"updated":"2013-04-24 05:37:13.000000000","message":"(just IMHO, feel free to ignore): namespace1 \u003d namespace1 or self.namespace looks more pythonic","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4b02a04d0e5a3e261f492a26f6d26f6e4ca3de20","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self._as_root(\u0027\u0027, \u0027link\u0027, args)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if namespace1 is None:"},{"line_number":108,"context_line":"            namespace1 \u003d self.namespace"},{"line_number":109,"context_line":"        if namespace2 is None:"},{"line_number":110,"context_line":"            namespace2 \u003d self.namespace"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fw80%3D","line":107,"in_reply_to":"AAAAOn%2F%2FxAE%3D","updated":"2013-04-24 06:46:01.000000000","message":"I just meant we had \"or\" operator returning it\u0027s first operand for which bool(operand) is True, so we could use that fact to avoid explicit \"if\" statements bringing more folds to code.\n\nBut your argument made it clear to me you wanted to be explicit here. I think it\u0027s always good (explicit is better than implicit, isn\u0027t it? :) ) and definitely more important than keeping code \"flat\". So you should ignore my previous comment.","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self._as_root(\u0027\u0027, \u0027link\u0027, args)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if namespace1 is None:"},{"line_number":108,"context_line":"            namespace1 \u003d self.namespace"},{"line_number":109,"context_line":"        if namespace2 is None:"},{"line_number":110,"context_line":"            namespace2 \u003d self.namespace"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FxAE%3D","line":107,"in_reply_to":"AAAAOn%2F%2FxBk%3D","updated":"2013-04-24 05:50:49.000000000","message":"Why do you consider your example to be more \u0027pythonic\u0027?  I have no evidence of this, but references would be welcome.\n\nIn any, I\u0027m explicitly looking for None - the \u0027sentinel\u0027 for the parameters - to document my intent to use a default if a value has not been provided by the caller.  The example you\u0027ve provided would use the default for any value such that bool(value) \u003d\u003d False, which is not equivalent.","commit_id":"eaf982aadb23b1e53a39994346638a133af24634"}],"quantum/tests/unit/test_linux_ip_lib.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.addCleanup(self.ensure_namespace_p.stop)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def test_add_veth(self):"},{"line_number":208,"context_line":"        self._patch_ensure_namespace()"},{"line_number":209,"context_line":"        ip_lib.IPWrapper(\u0027sudo\u0027).add_veth(\u0027tap0\u0027, \u0027tap1\u0027)"},{"line_number":210,"context_line":"        self.execute.assert_called_once_with(\u0027\u0027, \u0027link\u0027,"},{"line_number":211,"context_line":"                                             (\u0027add\u0027, \u0027tap0\u0027, \u0027type\u0027, \u0027veth\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FvmU%3D","line":208,"updated":"2013-04-25 07:27:20.000000000","message":"I think patch for ensure_namespace is unnecessary in this case?","commit_id":"0d0f6cbb3212eaacf5456199334a534552cc4555"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.addCleanup(self.ensure_namespace_p.stop)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def test_add_veth(self):"},{"line_number":208,"context_line":"        self._patch_ensure_namespace()"},{"line_number":209,"context_line":"        ip_lib.IPWrapper(\u0027sudo\u0027).add_veth(\u0027tap0\u0027, \u0027tap1\u0027)"},{"line_number":210,"context_line":"        self.execute.assert_called_once_with(\u0027\u0027, \u0027link\u0027,"},{"line_number":211,"context_line":"                                             (\u0027add\u0027, \u0027tap0\u0027, \u0027type\u0027, \u0027veth\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FvIo%3D","line":208,"in_reply_to":"AAAAOn%2F%2FvmU%3D","updated":"2013-04-25 16:17:00.000000000","message":"Done.","commit_id":"0d0f6cbb3212eaacf5456199334a534552cc4555"}]}
