)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aeace92fcabc5391e771554bf0eb5f2fe80a2a7e","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The change defines also create_peer_vms method providing an environment"},{"line_number":17,"context_line":"for testing network features through 2 FakeVMs on the same bridge/cidr."},{"line_number":18,"context_line":"It allows to remove BaseIPVethTestCase class."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I4fde1a03badd9adfd14b9124b5602331b69dda9d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_2043e042","line":18,"updated":"2014-12-23 10:07:28.000000000","message":"The commit message is missing the \"why\" (why is this needed in Neutron?)","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"64bede7452786f699eced9485c3d67703d85ab1c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* a server for low level tests of network features (ex: iptables)."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The change also defines PeerMachines fixture/helper to create a bridge"},{"line_number":22,"context_line":"and n FakeMachine bound to it."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I4fde1a03badd9adfd14b9124b5602331b69dda9d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a80dd14_2738e89f","line":22,"updated":"2015-03-05 15:13:04.000000000","message":"n -\u003e a","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d4f2219045da1c41477baef5de7f997a32049a21","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* a server for low level tests of network features (ex: iptables)."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The change also defines PeerMachines fixture/helper to create a bridge"},{"line_number":22,"context_line":"and n FakeMachine bound to it."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I4fde1a03badd9adfd14b9124b5602331b69dda9d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a80dd14_6a45456f","line":22,"in_reply_to":"9a80dd14_2738e89f","updated":"2015-03-05 15:30:46.000000000","message":"will do","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"98940d14b812cd377a62af489a6c2313e1a4402e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* a server for low level tests of network features (ex: iptables)."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The change also defines PeerMachines fixture/helper to create a bridge"},{"line_number":22,"context_line":"and n FakeMachine bound to it."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I4fde1a03badd9adfd14b9124b5602331b69dda9d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a80dd14_d56c129f","line":22,"in_reply_to":"9a80dd14_6a45456f","updated":"2015-03-05 15:31:43.000000000","message":"by n i mean \"some\"","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b276e1f4c5fec913da04a471851d60f5bfad2d06","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* a server for low level tests of network features (ex: iptables)."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The change also defines PeerMachines fixture/helper to create a bridge"},{"line_number":22,"context_line":"and n FakeMachine bound to it."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I4fde1a03badd9adfd14b9124b5602331b69dda9d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a80dd14_b5c95e7b","line":22,"in_reply_to":"9a80dd14_d56c129f","updated":"2015-03-05 16:17:27.000000000","message":"Done","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"}],"neutron/tests/common/helpers.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"13733e6f9751435127a5b7d9b9a23234978184c1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                                                      self.gateway_ip)"},{"line_number":51,"context_line":"                yield self"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __enter__(self):"},{"line_number":54,"context_line":"        context \u003d self._create_context()"},{"line_number":55,"context_line":"        self._exit \u003d context.__exit__"},{"line_number":56,"context_line":"        return context.__enter__()"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_71432313","line":53,"updated":"2015-03-03 14:58:09.000000000","message":"I would much, much rather have this be a fixture. This way it will be easier to enforce the correct use and clean up, and fit better in the whole testing-grand-design IMO. Then, in case someone wants to create only a single FakeMachine (and not a pair, so \u0027create_peers\u0027 won\u0027t be relevant), he\u0027s restricted to an easier and nicer (in the fixtures-kind-of-way) API to work with.","commit_id":"2632bb043304594a2d44f36ad175a562fd53dfea"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"13733e6f9751435127a5b7d9b9a23234978184c1","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        if ip_cidr is None:"},{"line_number":69,"context_line":"            ip_cidr \u003d cls.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":70,"context_line":"        br_ctxt \u003d bridge_context_class()"},{"line_number":71,"context_line":"        with br_ctxt:"},{"line_number":72,"context_line":"            machines \u003d [cls(br_ctxt, net_helpers.shift_ip_cidr(ip_cidr, i + 1))"},{"line_number":73,"context_line":"                        for i in range(number)]"},{"line_number":74,"context_line":"            with contextlib.nested(*machines):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_917c1722","line":71,"updated":"2015-03-03 14:58:09.000000000","message":"If you saw my other review, I thought the possible classes for bridge_context_class should also be changed to fixtures - so this code should change.","commit_id":"2632bb043304594a2d44f36ad175a562fd53dfea"},{"author":{"_account_id":12955,"name":"Aman Kumar","email":"aman.kumar3@hpe.com","username":"amank"},"change_message_id":"8b8dd141e7d52f77e6889c1dd3de078966b7f92d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    \"\"\"Create a bridge and \u0027number\u0027 peered machines."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    :ivar bridge_fixture: bridge fixture on which peered machines are bound"},{"line_number":64,"context_line":"    :type bridge_fixture: BridgeFxiture"},{"line_number":65,"context_line":"    :ivar machines: fake machines"},{"line_number":66,"context_line":"    :type machines: FakeMachine list"},{"line_number":67,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_78b7e8d8","line":64,"updated":"2015-03-05 12:39:40.000000000","message":"Nit: BridgeFixture","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d4f2219045da1c41477baef5de7f997a32049a21","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    \"\"\"Create a bridge and \u0027number\u0027 peered machines."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    :ivar bridge_fixture: bridge fixture on which peered machines are bound"},{"line_number":64,"context_line":"    :type bridge_fixture: BridgeFxiture"},{"line_number":65,"context_line":"    :ivar machines: fake machines"},{"line_number":66,"context_line":"    :type machines: FakeMachine list"},{"line_number":67,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_ea2f759f","line":64,"in_reply_to":"9a80dd14_78b7e8d8","updated":"2015-03-05 15:30:46.000000000","message":"will do","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b276e1f4c5fec913da04a471851d60f5bfad2d06","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    \"\"\"Create a bridge and \u0027number\u0027 peered machines."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    :ivar bridge_fixture: bridge fixture on which peered machines are bound"},{"line_number":64,"context_line":"    :type bridge_fixture: BridgeFxiture"},{"line_number":65,"context_line":"    :ivar machines: fake machines"},{"line_number":66,"context_line":"    :type machines: FakeMachine list"},{"line_number":67,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_f5ecb6f5","line":64,"in_reply_to":"9a80dd14_ea2f759f","updated":"2015-03-05 16:17:27.000000000","message":"Done","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d4f2219045da1c41477baef5de7f997a32049a21","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":74,"context_line":"        self.number \u003d number"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def setUp(self):"},{"line_number":77,"context_line":"        self.bridge_fixture \u003d self.useFixture(self.bridge_fixture_class())"},{"line_number":78,"context_line":"        self.machines \u003d []"},{"line_number":79,"context_line":"        for index in range(self.number):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_359f2eb6","line":76,"updated":"2015-03-05 15:30:46.000000000","message":"call super.setUp","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b276e1f4c5fec913da04a471851d60f5bfad2d06","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":74,"context_line":"        self.number \u003d number"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def setUp(self):"},{"line_number":77,"context_line":"        self.bridge_fixture \u003d self.useFixture(self.bridge_fixture_class())"},{"line_number":78,"context_line":"        self.machines \u003d []"},{"line_number":79,"context_line":"        for index in range(self.number):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_55b582ec","line":76,"in_reply_to":"9a80dd14_359f2eb6","updated":"2015-03-05 16:17:27.000000000","message":"Done","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":40,"context_line":"        self.bridge \u003d bridge"},{"line_number":41,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":42,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":43,"context_line":"        self.gateway_ip \u003d gateway_ip"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_7da06d90","line":42,"updated":"2015-03-19 09:23:12.000000000","message":"I think \u0027self.ip\u0027 can be replaced by a property instead, as the return value is pre-determined and immutable, but the attribute itself isn\u0027t used internally.","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":40,"context_line":"        self.bridge \u003d bridge"},{"line_number":41,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":42,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":43,"context_line":"        self.gateway_ip \u003d gateway_ip"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_0b5f26e6","line":42,"in_reply_to":"9a80dd14_7da06d90","updated":"2015-03-19 11:33:31.000000000","message":"euf","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def setUp(self):"},{"line_number":46,"context_line":"        super(FakeMachine, self).setUp()"},{"line_number":47,"context_line":"        self.ns_ip_wrapper \u003d self.useFixture("},{"line_number":48,"context_line":"            net_helpers.NamespaceFixture()).ip_wrapper"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.port \u003d self.useFixture("},{"line_number":51,"context_line":"            net_helpers.CidrBoundNamespaceFixture("}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_fdf37d70","line":48,"updated":"2015-03-19 09:23:12.000000000","message":"The constructor should accept a \u0027namespace\u0027 parameter in case the user wants to connect ip_cidr to an already existing namespace (and not create a new one).\n\nAlso, a new \u0027namespace\u0027 property should probably be added, that returns \u0027self.ns_ip_wrapper.namespace\u0027 or the namespace the user provided (so the user doesn\u0027t have to know about the inner implementation). This is useful in case the test wants to mess around with the namespace after the creation of the FakeMachine.","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def setUp(self):"},{"line_number":46,"context_line":"        super(FakeMachine, self).setUp()"},{"line_number":47,"context_line":"        self.ns_ip_wrapper \u003d self.useFixture("},{"line_number":48,"context_line":"            net_helpers.NamespaceFixture()).ip_wrapper"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.port \u003d self.useFixture("},{"line_number":51,"context_line":"            net_helpers.CidrBoundNamespaceFixture("}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_cbc0ae2d","line":48,"in_reply_to":"9a80dd14_fdf37d70","updated":"2015-03-19 11:33:31.000000000","message":"Currently there is no usecase requiring to transform a namespace into a fake machine nor using fake machine namespace name i will add it in daughter change if used)..","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        if self.gateway_ip:"},{"line_number":55,"context_line":"            net_helpers.set_namespace_gateway(self.port, self.gateway_ip)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def execute(self, *args, **kwargs):"},{"line_number":58,"context_line":"        return self.ns_ip_wrapper.netns.execute(*args, **kwargs)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_fd09bd95","line":57,"updated":"2015-03-19 09:23:12.000000000","message":"Maybe it\u0027s worth mentioning that this can only be done after \u0027setUp\u0027 was called?","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        if self.gateway_ip:"},{"line_number":55,"context_line":"            net_helpers.set_namespace_gateway(self.port, self.gateway_ip)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def execute(self, *args, **kwargs):"},{"line_number":58,"context_line":"        return self.ns_ip_wrapper.netns.execute(*args, **kwargs)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_a879c030","line":57,"in_reply_to":"9a80dd14_fd09bd95","updated":"2015-03-19 11:33:31.000000000","message":"Done","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    :type machines: FakeMachine list"},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def __init__(self, bridge_fixture, ip_cidr\u003dNone, number\u003d2):"},{"line_number":73,"context_line":"        self.bridge_fixture \u003d bridge_fixture"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_b85bd320","line":70,"updated":"2015-03-19 09:23:12.000000000","message":"(No action!) is there a plan to enable support for IPv6 later down the line?","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    :type machines: FakeMachine list"},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def __init__(self, bridge_fixture, ip_cidr\u003dNone, number\u003d2):"},{"line_number":73,"context_line":"        self.bridge_fixture \u003d bridge_fixture"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_c8e1949c","line":70,"in_reply_to":"9a80dd14_b85bd320","updated":"2015-03-19 11:33:31.000000000","message":"I am not fluent with IPv6 but it seems already possible by specifying explicitly ip_cidr?","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6527be0434d634b372169027c77271224e016bb6","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    :type machines: FakeMachine list"},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def __init__(self, bridge_fixture, ip_cidr\u003dNone, number\u003d2):"},{"line_number":73,"context_line":"        self.bridge_fixture \u003d bridge_fixture"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_5a6f0b60","line":70,"in_reply_to":"9a80dd14_c8e1949c","updated":"2015-03-19 19:54:28.000000000","message":"No idea, that\u0027s why I asked :)","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def __init__(self, bridge_fixture, ip_cidr\u003dNone, number\u003d2):"},{"line_number":73,"context_line":"        self.bridge_fixture \u003d bridge_fixture"},{"line_number":74,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":75,"context_line":"        self.number \u003d number"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_5d5e4946","line":72,"updated":"2015-03-19 09:23:12.000000000","message":"s/number/amount/g (amount is more descriptive).\n\nWhat happens if ip_cidr\u003d\u0027192.168.5.253/24\u0027 and amount\u003d5? Obviously \u0027192.168.6.1\u0027 doesn\u0027t match the given CIDR - is an exception raised anywhere that lets the user know about this? In other words, is there a boundary check anywhere?","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def __init__(self, bridge_fixture, ip_cidr\u003dNone, number\u003d2):"},{"line_number":73,"context_line":"        self.bridge_fixture \u003d bridge_fixture"},{"line_number":74,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":75,"context_line":"        self.number \u003d number"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_cb8c2e83","line":72,"in_reply_to":"9a80dd14_5d5e4946","updated":"2015-03-19 11:33:31.000000000","message":"That\u0027s a limitation of increment_ip_cidr:\n\n  assert increment_ip_cidr(\u002710.0.0.254/24\u0027, 2) \u003d\u003d \u002710.0.1.0/24\u0027\n\nI will add a check (parent change) in increment_ip_cidr to ensure the incremented ip_cidr is (strictly) in the same cidr","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        super(PeerMachines, self).setUp()"},{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_183e9f8b","line":81,"updated":"2015-03-19 09:23:12.000000000","message":"Doesn\u0027t the \u0027+1\u0027 here means that if ip_cidr \u003d \u0027192.168.5.60\u0027, then the first IP that will be allocated is \u0027192.168.5.61\u0027? That\u0027s not really the expected behavior IMO.","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e146bce651b564a5683bf17783c0330137a742cc","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        super(PeerMachines, self).setUp()"},{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a6ced46_09416439","line":81,"in_reply_to":"1a6ced46_469fcb5f","updated":"2015-03-23 16:48:22.000000000","message":"increment_ip_cidr as neutron in genreral require net.network \u003c ip \u003c net.broadcast so /31 are not supported.","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d58307974a54a108ee909f535f7fbb865ba404b3","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        super(PeerMachines, self).setUp()"},{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a6ced46_661a0770","line":81,"in_reply_to":"1a6ced46_50f5c681","updated":"2015-03-23 16:31:51.000000000","message":"I would say exactly the opposite because otherwise ip_cidr\u003dX.Y.Z.0/24 crashs","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"bbbe7824941e347b4613827d3c4034312f47f789","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        super(PeerMachines, self).setUp()"},{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a6ced46_469fcb5f","line":81,"in_reply_to":"1a6ced46_661a0770","updated":"2015-03-23 16:38:37.000000000","message":"The problem is terminology, then - I expected \u0027ip_cidr\u0027 to indicate the ip addresses which are to be bound, not a subnet CIDR specifier. Also, giving \u0027X.Y.Z.0/24\u0027 will crash more often then not even with the +1 (because most will have a router at \u0027X.Y.Z.1\u0027).\n\nThinking terminology btw, you could potentially specify, for example, \u0027X.Y.Z.4/31\u0027 - and the IP range caught by that CIDR specifier will only allow \u0027X.Y.Z.4\u0027 and \u0027X.Y.Z.5\u0027, so the ip_cidr could potentially specify the entire *allowed* range of IP addresses, and not necessarily the entire subnet in which the IPs will reside.\n\nSee? This is confusing :) I think the terminology here should be very restricting, and then, if you decide to have the ip_cidr point to the ip range allowed - you don\u0027t need to +1 (since the full range is enough). If not, then the +1 doesn\u0027t solve your problem like you described.","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        super(PeerMachines, self).setUp()"},{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_8b41563b","line":81,"in_reply_to":"9a80dd14_183e9f8b","updated":"2015-03-19 11:33:31.000000000","message":"You can typically use such behavior to bind peer machines to an existing router (with an ip):\n\n* router uses 192.168.0.1/24\n* peer machines use 192.168.0.2,3/24 when ip_cidr \u003d 192.168.0.1/24\n\nIMO, that\u0027s the expected behavior but increment_ip_cidr must be safer ... in practice i am not sure we will ever provide explicitly ip_cidr","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"332e995a9aa6a447e6c965af8ccaecf207a6edc7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        super(PeerMachines, self).setUp()"},{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a6ced46_50f5c681","line":81,"in_reply_to":"9a80dd14_8b41563b","updated":"2015-03-23 14:41:10.000000000","message":"I don\u0027t think this works much for Neutron networks - when creating the first instance port on a network, more often then not, 192.168.0.3 is dynamically assigned to a dhcp port (this is because the router statically defined to be .1, the first actual port request is for .2 and then the next free IP is .3, which goes to DHCP. The next port request will probably assign .4).\n\nAnyway, I think we\u0027re better off specifying an exact IP to start with (say 192.168.0.100/24) and then count from that (so .100 and .101 will be assigned if amount\u003d2). I think that down the line the \u0027+1\u0027 logic might be too confusing for consumers.","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.machines \u003d []"},{"line_number":80,"context_line":"        for index in range(self.number):"},{"line_number":81,"context_line":"            ip_cidr \u003d net_helpers.increment_ip_cidr(self.ip_cidr, index + 1)"},{"line_number":82,"context_line":"            machine \u003d self.useFixture("},{"line_number":83,"context_line":"                FakeMachine(self.bridge_fixture, ip_cidr))"},{"line_number":84,"context_line":"            self.machines.append(machine)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_b8fcb3b6","line":82,"updated":"2015-03-19 09:23:12.000000000","message":"nit (no action required): The \u0027machine\u0027 variable can be removed in favor of:\n\n self.machines.append(self.useFixture(FakeMachine(self.bridge_fixture, ip_cidr)))","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"}],"neutron/tests/common/machine_helpers.py":[{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"4e6898b4313cd71444359e74086e4f96005cc077","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        self.bridge \u003d bridge"},{"line_number":79,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":80,"context_line":"        self.amount \u003d amount"}],"source_content_type":"text/x-python","patch_set":31,"id":"da9b358b_f52432b0","line":77,"updated":"2015-03-29 13:30:49.000000000","message":"missing call for super(PeerMachines, self).__init__() ?","commit_id":"4d9652f68151e47c24729c33cd34edf8e01a8796"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d25ee277c2b10abd136d05d284227e6f6586dfed","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        self.bridge \u003d bridge"},{"line_number":79,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":80,"context_line":"        self.amount \u003d amount"}],"source_content_type":"text/x-python","patch_set":31,"id":"da9b358b_ec77b700","line":77,"in_reply_to":"da9b358b_f52432b0","updated":"2015-03-30 12:59:16.000000000","message":"It\u0027s not strictly required as Fixture has no __init__ but it\u0027s better to provide it","commit_id":"4d9652f68151e47c24729c33cd34edf8e01a8796"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e6319ac48d4e336791cf9f1154007b97f60dfb14","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"class PeerMachines(fixtures.Fixture):"},{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_c7f5c5cb","line":67,"updated":"2015-03-31 10:21:12.000000000","message":"Can you add a usage part here, and also known cavities of the class (for example, trying to assign a FakeMachine to an already existing ip address will cause a tear down of all FakeMachines already created)? These seem non-trivial at best and at least they should be written down someplace.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ad2e31312d6fc08493173802a5ad0526b4c7a620","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"class PeerMachines(fixtures.Fixture):"},{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"}],"source_content_type":"text/x-python","patch_set":32,"id":"baa041b7_100af026","line":67,"in_reply_to":"da9b358b_aa3e05d8","updated":"2015-04-02 09:43:55.000000000","message":"Done","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"876c78635c1c6bb716dbe34d18159a297aae467d","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"class PeerMachines(fixtures.Fixture):"},{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_aa3e05d8","line":67,"in_reply_to":"da9b358b_c7f5c5cb","updated":"2015-03-31 11:51:49.000000000","message":"imo, that\u0027s the expected behavior of a fixture: it should cleanUp its resources if setUp succeeds or fails.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e6319ac48d4e336791cf9f1154007b97f60dfb14","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"},{"line_number":71,"context_line":"    :ivar machines: fake machines"},{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_87169def","line":70,"updated":"2015-03-31 10:21:12.000000000","message":"nit: CIDR indicating the subnet on which peer machines will have IPs.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"2bf1f36eaf51fa41fcffc36c09bbb2ce53ea3e51","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"},{"line_number":71,"context_line":"    :ivar machines: fake machines"},{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_70c0f07c","line":70,"in_reply_to":"da9b358b_4d1b131c","updated":"2015-03-31 12:12:47.000000000","message":"Following our discussion the wording I wrote earlier could be changed to something that makes more sense and that will help convey your message better.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ad2e31312d6fc08493173802a5ad0526b4c7a620","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"},{"line_number":71,"context_line":"    :ivar machines: fake machines"},{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"baa041b7_4b0e8d35","line":70,"in_reply_to":"da9b358b_70c0f07c","updated":"2015-04-02 09:43:55.000000000","message":"I will see how i can improve things in next patchsets","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"876c78635c1c6bb716dbe34d18159a297aae467d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Create \u0027amount\u0027 peered machines on an ip_cidr."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :ivar bridge: bridge on which peer machines are bound"},{"line_number":70,"context_line":"    :ivar ip_cidr: ip_cidr on which peer machines have ips"},{"line_number":71,"context_line":"    :ivar machines: fake machines"},{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_4d1b131c","line":70,"in_reply_to":"da9b358b_87169def","updated":"2015-03-31 11:51:49.000000000","message":"Done","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e6319ac48d4e336791cf9f1154007b97f60dfb14","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_16452516","line":75,"updated":"2015-03-31 10:21:12.000000000","message":"I\u0027m still concerned with the terminology here. In my opinion the above subnet describes a subnet range (since it has \u0027/24\u0027 at the end. btw, \u0027192.168.%s.0/24\u0027 is better since the \u00271\u0027 is lost in mask calculations anyway, and is therefor meaningless in this context), but the \u00271\u0027 part (the so-called host identifier) is later used as the actual first IP in the range to be consumed. While this may seem logical and saves some (considerable amounts of) code, it\u0027s just not technically accurate.\n\nSplitting this into 2 variables, \"network_cidr\" and \"first_ip_addr\", is no good as well, since then the network_cidr will not be used by anything other than verification of arguments\u0027 validity.\n\nIn short, I think the way to go here is to remove the subnet-suggesting syntax and replace it with actual IP address syntax - replacing the \u0027192.168.%s.0/24\u0027 by \u0027192.168.%s.X\u0027 (X being first available expected address) and adding a \u0027SUBNET_MASK \u003d 24\u0027 class attribute for various helpers if/when you need them (then, \u0027192.168.%s.X/24\u0027 \u003d\u003d \u0027192.168.%s.Y/24\u0027 for every X,Y in subnet mask calculation, so it shouldn\u0027t damage anything).","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"876c78635c1c6bb716dbe34d18159a297aae467d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_6d1c9713","line":75,"in_reply_to":"da9b358b_16452516","updated":"2015-03-31 11:51:49.000000000","message":"each CIDR_TEMPLATE instance is an ip_cidr not the network cidr so i am not sure where is the trouble","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"2bf1f36eaf51fa41fcffc36c09bbb2ce53ea3e51","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    :type machines: FakeMachine list"},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_109c04bf","line":75,"in_reply_to":"da9b358b_6d1c9713","updated":"2015-03-31 12:12:47.000000000","message":"After discussing this with Cedric on IRC I understand his intention now, so I\u0027m dropping this issue.\n\nI think Cedric\u0027s intentions should be documented somewhere in this class so it will be easier to understand.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e6319ac48d4e336791cf9f1154007b97f60dfb14","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":81,"context_line":"        self.amount \u003d amount"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_27b111e2","line":80,"updated":"2015-03-31 10:21:12.000000000","message":"I think that the last IP address in the subnet is reserved for broadcast and therefor cannot be taken by a device (\u0027192.168.%s.255/24\u0027 is bad), so 256 -\u003e 255.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"2bf1f36eaf51fa41fcffc36c09bbb2ce53ea3e51","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":81,"context_line":"        self.amount \u003d amount"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_90ded46b","line":80,"in_reply_to":"da9b358b_0a9611f0","updated":"2015-03-31 12:12:47.000000000","message":"Yes, but \u0027192.168.%s.255\u0027 on a \u0027/24\u0027 subnet isn\u0027t a valid IP address to use, since it\u0027s reserved to broadcast. In all CIDR subnets, the last IP address is always deserved for broadcast, so you always have 1 less IP address to use.\n\nIn other words, if random.randrange() returns 255, the code will not behave as expected since you\u0027re trying to take an IP address that cannot be used.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"876c78635c1c6bb716dbe34d18159a297aae467d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":81,"context_line":"        self.amount \u003d amount"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"da9b358b_0a9611f0","line":80,"in_reply_to":"da9b358b_27b111e2","updated":"2015-03-31 11:51:49.000000000","message":"random.range(256) returns x with 0 \u003c\u003d x \u003c 256 and 192.168.255.0/24 is a valid cidr.","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a617cb743550bd2a2b7a053618a18d5e1ee3e2bd","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":81,"context_line":"        self.amount \u003d amount"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"baa041b7_d295c240","line":80,"in_reply_to":"da9b358b_90ded46b","updated":"2015-04-01 19:59:07.000000000","message":"it\u0027s 192.168.%s.1/24 not 192.168.1.%s/24","commit_id":"3830a5eb7f06dbd20bef97dfd0bedec756f10852"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Thales Services SAS"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_c39ccc6b","line":1,"updated":"2015-04-17 22:01:21.000000000","message":"(No action required) Why \u0027helpers\u0027?  Isn\u0027t \u0027fixtures\u0027 a more appropriate name?","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Thales Services SAS"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_2125adaa","line":1,"in_reply_to":"3ab451fb_c39ccc6b","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    :ivar gateway_ip: fake machine gateway ip"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    :ivar namespace: namespace emulating the machine"},{"line_number":33,"context_line":"    :type namespace: str"},{"line_number":34,"context_line":"    :ivar port: port binding the namespace to the bridge"},{"line_number":35,"context_line":"    :type port: IPDevice"},{"line_number":36,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_91ce2682","line":33,"updated":"2015-04-17 22:01:21.000000000","message":"Why do these variables have types and not the others?","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    :ivar gateway_ip: fake machine gateway ip"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    :ivar namespace: namespace emulating the machine"},{"line_number":33,"context_line":"    :type namespace: str"},{"line_number":34,"context_line":"    :ivar port: port binding the namespace to the bridge"},{"line_number":35,"context_line":"    :type port: IPDevice"},{"line_number":36,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_41266169","line":33,"in_reply_to":"3ab451fb_91ce2682","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def execute(self, *args, **kwargs):"},{"line_number":58,"context_line":"        \"\"\"Execute a command in fake machine namespace."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        Can be used only after setUp."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        ns_ip_wrapper \u003d ip_lib.IPWrapper(self.namespace)"},{"line_number":63,"context_line":"        return ns_ip_wrapper.netns.execute(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_4c58e0fa","line":60,"updated":"2015-04-17 22:01:21.000000000","message":"This statement is obvious and can probably be omitted.  Public fixture methods should always be assumed to require setUp() being called first.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def execute(self, *args, **kwargs):"},{"line_number":58,"context_line":"        \"\"\"Execute a command in fake machine namespace."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        Can be used only after setUp."},{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        ns_ip_wrapper \u003d ip_lib.IPWrapper(self.namespace)"},{"line_number":63,"context_line":"        return ns_ip_wrapper.netns.execute(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_4158a1fa","line":60,"in_reply_to":"3ab451fb_4c58e0fa","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, gateway_ip\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_f231c20c","line":77,"updated":"2015-04-17 22:01:21.000000000","message":"YAGNI - amount isn\u0027t specified in this patch, so it doesn\u0027t need to appear as a parameter yet.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.1/24\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, gateway_ip\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_c2ba936e","line":77,"in_reply_to":"3ab451fb_f231c20c","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, gateway_ip\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":81,"context_line":"        self.gateway_ip \u003d gateway_ip"},{"line_number":82,"context_line":"        self.amount \u003d amount"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_95b948ec","line":80,"updated":"2015-04-17 22:01:21.000000000","message":"YAGNI - given that these addresses only appear in a namespace, is a random range required?","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def __init__(self, bridge, ip_cidr\u003dNone, gateway_ip\u003dNone, amount\u003d2):"},{"line_number":78,"context_line":"        super(PeerMachines, self).__init__()"},{"line_number":79,"context_line":"        self.bridge \u003d bridge"},{"line_number":80,"context_line":"        self.ip_cidr \u003d ip_cidr or self.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":81,"context_line":"        self.gateway_ip \u003d gateway_ip"},{"line_number":82,"context_line":"        self.amount \u003d amount"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_a2b0bf8c","line":80,"in_reply_to":"3ab451fb_95b948ec","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def setUp(self):"},{"line_number":85,"context_line":"        \"\"\"setUp peer machines."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        This method ensures cleanUp will be called for all created machines"},{"line_number":88,"context_line":"        even if an error is raised during setUp; it typically appends when:"},{"line_number":89,"context_line":"         * 3+ machines are requested on a VethBridge,"},{"line_number":90,"context_line":"         * a machine ip is outside of cidr range."}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_43d67cc6","line":87,"updated":"2015-04-17 22:01:21.000000000","message":"It should be implicit that cleanup is called if an error occurs, so I don\u0027t think that needs to be documented here.  Consider limiting the scope fo the documentation here to possible failure modes.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def setUp(self):"},{"line_number":85,"context_line":"        \"\"\"setUp peer machines."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        This method ensures cleanUp will be called for all created machines"},{"line_number":88,"context_line":"        even if an error is raised during setUp; it typically appends when:"},{"line_number":89,"context_line":"         * 3+ machines are requested on a VethBridge,"},{"line_number":90,"context_line":"         * a machine ip is outside of cidr range."}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_62aaa71b","line":87,"in_reply_to":"3ab451fb_43d67cc6","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        \"\"\"setUp peer machines."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        This method ensures cleanUp will be called for all created machines"},{"line_number":88,"context_line":"        even if an error is raised during setUp; it typically appends when:"},{"line_number":89,"context_line":"         * 3+ machines are requested on a VethBridge,"},{"line_number":90,"context_line":"         * a machine ip is outside of cidr range."},{"line_number":91,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_e377c800","line":88,"updated":"2015-04-17 22:01:21.000000000","message":"appends -\u003e happens","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        \"\"\"setUp peer machines."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        This method ensures cleanUp will be called for all created machines"},{"line_number":88,"context_line":"        even if an error is raised during setUp; it typically appends when:"},{"line_number":89,"context_line":"         * 3+ machines are requested on a VethBridge,"},{"line_number":90,"context_line":"         * a machine ip is outside of cidr range."},{"line_number":91,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_02c1abe4","line":88,"in_reply_to":"3ab451fb_e377c800","updated":"2015-04-20 17:35:36.000000000","message":"Done","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"}],"neutron/tests/common/net_helpers.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            pass"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @staticmethod"},{"line_number":101,"context_line":"    def get_peer_name(name):"},{"line_number":102,"context_line":"        if name.startswith(VETH0_PREFIX):"},{"line_number":103,"context_line":"            return name.replace(VETH0_PREFIX, VETH1_PREFIX)"},{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_dd2cf94c","line":101,"updated":"2015-03-19 09:23:12.000000000","message":"I\u0027m pretty sure setUp()::_create_veth() could use this class. I\u0027m wondering why this wasn\u0027t joined with the previous patch in the series?","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            pass"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @staticmethod"},{"line_number":101,"context_line":"    def get_peer_name(name):"},{"line_number":102,"context_line":"        if name.startswith(VETH0_PREFIX):"},{"line_number":103,"context_line":"            return name.replace(VETH0_PREFIX, VETH1_PREFIX)"},{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_4b575e5a","line":101,"in_reply_to":"9a80dd14_dd2cf94c","updated":"2015-03-19 11:33:31.000000000","message":"Done","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"42f2590c338d366ddea6175fbb7545188bea16f6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"},{"line_number":105,"context_line":"            return name.replace(VETH1_PREFIX, VETH0_PREFIX)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            raise ValueError"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_3d28b532","line":107,"updated":"2015-03-19 09:23:12.000000000","message":"Never throw classes - only instances.\n\n raise ValueError()","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"971a5262aafd8d14a96bca4c633f5ab1538fb1d7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"},{"line_number":105,"context_line":"            return name.replace(VETH1_PREFIX, VETH0_PREFIX)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            raise ValueError"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a6ced46_4a9357a3","line":107,"in_reply_to":"9a80dd14_3ae1779b","updated":"2015-03-23 13:59:34.000000000","message":"let\u0027s do something else :)","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7ad61f57868987b8c763f357a7aec6fec580444c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"},{"line_number":105,"context_line":"            return name.replace(VETH1_PREFIX, VETH0_PREFIX)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            raise ValueError"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_8b3f9624","line":107,"in_reply_to":"9a80dd14_3d28b532","updated":"2015-03-19 11:33:31.000000000","message":"Why?","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"be8bc682ddddee01a2aec09a93b09505474537bd","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"},{"line_number":105,"context_line":"            return name.replace(VETH1_PREFIX, VETH0_PREFIX)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            raise ValueError"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_3ae1779b","line":107,"in_reply_to":"9a80dd14_7a884f22","updated":"2015-03-19 20:00:33.000000000","message":"Sure? I read:\n\nuse \n\n raise ValueError(\u0027message\u0027) \n\ninstead of the older form \n\n raise ValueError, \u0027message\u0027 .","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6527be0434d634b372169027c77271224e016bb6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        elif name.startswith(VETH1_PREFIX):"},{"line_number":105,"context_line":"            return name.replace(VETH1_PREFIX, VETH0_PREFIX)"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            raise ValueError"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_7a884f22","line":107,"in_reply_to":"9a80dd14_8b3f9624","updated":"2015-03-19 19:54:28.000000000","message":"PEP8 says so right around here: https://www.python.org/dev/peps/pep-0008/#programming-recommendations (search for \"When raising an exception in Python 2, use raise ValueError\" for the correct line)","commit_id":"9a87757683dd52495d9f8850a689cd9926de8c07"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @staticmethod"},{"line_number":119,"context_line":"    def get_peer_name(name):"},{"line_number":120,"context_line":"        if name.startswith(VETH0_PREFIX):"},{"line_number":121,"context_line":"            return name.replace(VETH0_PREFIX, VETH1_PREFIX)"},{"line_number":122,"context_line":"        elif name.startswith(VETH1_PREFIX):"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_d5eeb021","line":119,"updated":"2015-04-17 22:01:21.000000000","message":"(No action required) I get why you\u0027re doing this, but it seems unnecessarily complicated.  I would hope that in future we could care less about the human-readable naming of test resources, especially given how many of them are likely to be created and destroyed in the span of a given test run.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b738208e9ffcfbad8eab8b270fcc263725722d3b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @staticmethod"},{"line_number":119,"context_line":"    def get_peer_name(name):"},{"line_number":120,"context_line":"        if name.startswith(VETH0_PREFIX):"},{"line_number":121,"context_line":"            return name.replace(VETH0_PREFIX, VETH1_PREFIX)"},{"line_number":122,"context_line":"        elif name.startswith(VETH1_PREFIX):"}],"source_content_type":"text/x-python","patch_set":36,"id":"dac4157f_54306156","line":119,"in_reply_to":"3ab451fb_d5eeb021","updated":"2015-04-20 17:35:36.000000000","message":"it\u0027s used in [1] to get from a veth endpoint name the veth peer endpoint name.\n\n[1] https://review.openstack.org/#/c/143412/36/neutron/tests/functional/agent/linux/test_iptables_firewall.py","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            self.bridge \u003d self.useFixture(self._create_bridge_fixture()).bridge"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    @classmethod"},{"line_number":152,"context_line":"    def get(cls, bridge, namespace\u003dNone):"},{"line_number":153,"context_line":"        \"\"\"Deduce PortFixture class from bridge type and instantiate it.\"\"\""},{"line_number":154,"context_line":"        if isinstance(bridge, ovs_lib.OVSBridge):"},{"line_number":155,"context_line":"            return OVSPortFixture(bridge, namespace)"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_d5523013","line":152,"updated":"2015-04-17 22:01:21.000000000","message":"(No action required) I am still hoping we can figure out a better way to do this, but I\u0027m fine with it for now.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"51f835405ee28433f8648007817fc1474dee640c","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    @staticmethod"},{"line_number":119,"context_line":"    def get_peer_name(name):"},{"line_number":120,"context_line":"        if name.startswith(VETH0_PREFIX):"},{"line_number":121,"context_line":"            return name.replace(VETH0_PREFIX, VETH1_PREFIX)"},{"line_number":122,"context_line":"        elif name.startswith(VETH1_PREFIX):"}],"source_content_type":"text/x-python","patch_set":38,"id":"dac4157f_066076cd","line":119,"updated":"2015-04-20 20:31:34.000000000","message":"As I said, I get why you\u0027re doing this, but I don\u0027t think the names of veth pairs should be important.","commit_id":"7f7343b1afc0b1b953e5c36a753397a6d37316cb"}],"neutron/tests/functional/agent/linux/base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e37a89e484309be3c1ba572774cf658e45cf0716","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def setUp(self):"},{"line_number":148,"context_line":"        super(BaseIPVethTestCase, self).setUp()"},{"line_number":149,"context_line":"        self.check_sudo_enabled()"},{"line_number":150,"context_line":"        self.pinger \u003d helpers.Pinger(self)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9b07a5c9","side":"PARENT","line":149,"updated":"2014-12-23 11:15:17.000000000","message":"Seems that the check is missing for the new method. Is it intended?","commit_id":"5057a2fa38e1af424ceb8088c3f516712fb70119"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3a0ec3e1da4bd8302822832a2c632b494cb13acd","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class BaseOVSLinuxTestCase(BaseLinuxTestCase):"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        super(BaseOVSLinuxTestCase, self).setUp()"},{"line_number":109,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_26ea1574","line":106,"updated":"2014-12-23 13:56:55.000000000","message":"unrelated but I don\u0027t care","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class BaseOVSLinuxTestCase(BaseLinuxTestCase):"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        super(BaseOVSLinuxTestCase, self).setUp()"},{"line_number":109,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_770125ae","line":106,"in_reply_to":"3a961159_26ea1574","updated":"2014-12-23 16:16:02.000000000","message":"oups","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4e9f739030423059356c046a6ff3d910012df77e","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class BaseOVSLinuxTestCase(BaseLinuxTestCase):"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        super(BaseOVSLinuxTestCase, self).setUp()"},{"line_number":109,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b105b2c3","line":106,"in_reply_to":"3a961159_770125ae","updated":"2015-01-05 22:39:37.000000000","message":"Done","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3a0ec3e1da4bd8302822832a2c632b494cb13acd","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        return port_dev"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def create_fake_vm(self, br, ip_cidr, gateway_ip\u003dNone):"},{"line_number":144,"context_line":"        ns \u003d self._create_namespace()"},{"line_number":145,"context_line":"        port_dev \u003d self.bind_namespace_to_cidr(ns, br, ip_cidr)"},{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_86fae940","line":144,"updated":"2014-12-23 13:56:55.000000000","message":"why every \"vm\" in its own namespace? This is not what happens normally - unless here you see a namespace as a sort of container","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        return port_dev"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def create_fake_vm(self, br, ip_cidr, gateway_ip\u003dNone):"},{"line_number":144,"context_line":"        ns \u003d self._create_namespace()"},{"line_number":145,"context_line":"        port_dev \u003d self.bind_namespace_to_cidr(ns, br, ip_cidr)"},{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1711c103","line":144,"in_reply_to":"3a961159_86fae940","updated":"2014-12-23 16:16:02.000000000","message":"yes, namespaces are used as containers","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3a0ec3e1da4bd8302822832a2c632b494cb13acd","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        ns \u003d self._create_namespace()"},{"line_number":145,"context_line":"        port_dev \u003d self.bind_namespace_to_cidr(ns, br, ip_cidr)"},{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeVM(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_c6c95127","line":147,"updated":"2014-12-23 13:56:55.000000000","message":"technically this is not a fake vm, but a fake interface, is it?","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        ns \u003d self._create_namespace()"},{"line_number":145,"context_line":"        port_dev \u003d self.bind_namespace_to_cidr(ns, br, ip_cidr)"},{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeVM(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_17b621f9","line":147,"in_reply_to":"3a961159_c6c95127","updated":"2014-12-23 16:16:02.000000000","message":"The fake vm has its own linux network namespace (interface, ip, route) so it\u0027s more than a fake interface.","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e37a89e484309be3c1ba572774cf658e45cf0716","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        br \u003d self.create_ovs_bridge()"},{"line_number":156,"context_line":"        return [self.create_fake_vm(br, self.shift_ip_cidr(ip_cidr, offset\u003di))"},{"line_number":157,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_bb362101","line":157,"updated":"2014-12-23 11:15:17.000000000","message":"Why two peers specifically? Can we introduce a new argument to create more of those, if needed?","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        br \u003d self.create_ovs_bridge()"},{"line_number":156,"context_line":"        return [self.create_fake_vm(br, self.shift_ip_cidr(ip_cidr, offset\u003di))"},{"line_number":157,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_d709f995","line":157,"in_reply_to":"3a961159_46dd61df","updated":"2014-12-23 16:16:02.000000000","message":"I fail to find a usecase where 3+ vms are required so i follow Maru YAGNI approach :)\n\nBut if you prefer i can add a count attribute with 2 as default value.","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"3a0ec3e1da4bd8302822832a2c632b494cb13acd","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        br \u003d self.create_ovs_bridge()"},{"line_number":156,"context_line":"        return [self.create_fake_vm(br, self.shift_ip_cidr(ip_cidr, offset\u003di))"},{"line_number":157,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_46dd61df","line":157,"in_reply_to":"3a961159_bb362101","updated":"2014-12-23 13:56:55.000000000","message":"probably the author wanted to create a \"pair\" rather than \"peers\"?","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"946f39e39dc3fbccfa76dc8c8697246168c23ca0","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        port_dev.addr.add(net.version, str(net), net.broadcast)"},{"line_number":141,"context_line":"        return port_dev"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def create_fake_machine(self, br, ip_cidr, gateway_ip\u003dNone):"},{"line_number":144,"context_line":"        ns \u003d self._create_namespace()"},{"line_number":145,"context_line":"        port_dev \u003d self.bind_namespace_to_cidr(ns, br, ip_cidr)"},{"line_number":146,"context_line":"        if gateway_ip:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_83659746","line":143,"updated":"2015-01-07 13:28:44.000000000","message":"Logic dictates (IMO) that helpers.FakeMachine should be able to create the and bind all the resources it needs. Otherwise, the way it is right now, FakeMachine is merely a container of attributes (can be replaced by namedtuple?)\n\nThis should be easy to refactor since FakeMachine already accepts testcase (so it should have all these functions in its scope). Otherwise I\u0027d see if we can indeed just remove it in favour of namedtuple.","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"946f39e39dc3fbccfa76dc8c8697246168c23ca0","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeMachine(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_peer_machines(self, ip_cidr\u003dNone):"},{"line_number":152,"context_line":"        if ip_cidr is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_23f86349","line":149,"updated":"2015-01-07 13:28:44.000000000","message":"Another issue I have with the current design is that the entity holding the responsibility for cleaning up all the resources this function creates is very much implicit. I would expect that FakeMachine will be a fixture, and then you could simply do:\n\n vm \u003d FakeMachine(br, ip_cidr, gateway_ip)\n self.useFixture(vm)\n\nto assure that these are cleaned up afterwards.","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3dd79ec51f218ed3ef3700a08e20aab820272414","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeMachine(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_peer_machines(self, ip_cidr\u003dNone):"},{"line_number":152,"context_line":"        if ip_cidr is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_dd0697cd","line":149,"in_reply_to":"3a961159_23f86349","updated":"2015-01-07 15:40:31.000000000","message":"the method uses _create_namespace and bind_namespace_to_cidr which uses create_resource for creating and cleaning resources which imposes the design.","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4b9dc7e2b28414f84d616a14383aad450c840d2d","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeMachine(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_peer_machines(self, ip_cidr\u003dNone):"},{"line_number":152,"context_line":"        if ip_cidr is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_def4ca56","line":149,"in_reply_to":"3a961159_3ee5cedb","updated":"2015-01-07 19:21:11.000000000","message":"it was my first idea but i changed because it implies an unclear/implicit requirement on the methods proposed by FakeMachine.testcase","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1b550d7f8afdeff236262bcc60429ba4139b67e6","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeMachine(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_peer_machines(self, ip_cidr\u003dNone):"},{"line_number":152,"context_line":"        if ip_cidr is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_ca1a446e","line":149,"in_reply_to":"3a961159_5e137a64","updated":"2015-01-07 21:03:47.000000000","message":"a), imo, implies to transform these methods in 1+ helper(s) (and reduces readibility?).\n\nb) is for sure a wrong approach as FakeMachine does not require testcase to inherit from BaseOVSLinuxTestCase but to provide some methods ... if we want to explicit them, we could define an abstract class with FakeMachine requirements?","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"aa64195aa86382e27973fc3188accff59187d0b1","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeMachine(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_peer_machines(self, ip_cidr\u003dNone):"},{"line_number":152,"context_line":"        if ip_cidr is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3ee5cedb","line":149,"in_reply_to":"3a961159_dd0697cd","updated":"2015-01-07 19:13:47.000000000","message":"Fair enough, I didn\u0027t notice that. There still remains the point that FakeMachine IMO seems a bit weird since it receives initialized resources (namespace, interface) instead of creating them on its own.\n\nIn other words, if I were to initialize a FakeMachine(), I would expect it to receive the bridge and the ip address it should fake, and create the namespace and interfaces on its own. If I\u0027m not directly inheriting from BaseOVSLinuxTestCase (and can\u0027t access the functions you\u0027re using now), this is difficult to achieve.","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e3fbd83a068a95c70e8395631485e92eedda8a94","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if gateway_ip:"},{"line_number":147,"context_line":"            self.set_namespace_gateway(port_dev, gateway_ip)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        return helpers.FakeMachine(self, ns, port_dev, ip_cidr)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_peer_machines(self, ip_cidr\u003dNone):"},{"line_number":152,"context_line":"        if ip_cidr is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_5e137a64","line":149,"in_reply_to":"3a961159_def4ca56","updated":"2015-01-07 19:29:47.000000000","message":"I agree, that wouldn\u0027t be much better.\n\nThe more I think about this, either a) these functions (create_namespace, bind_namespace_To_cidr, set_namespace_gateway) need to be taken out from BaseOVSLinuxTestCase and be put in some easy-to-access API, or b) the full-stack BaseIntegrationTestCase [1] should inherit from BaseOVSLinuxTestCase.\n\nI\u0027m not sure how much sense b) makes since in my eyes the base full-stack shouldn\u0027t depend on OVS features (can run on LinuxBridge, for example), and probably a) will be quite a bit of work.\n\n@Maru, what do you think here?","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6f3ca1ee64635040553731903b2416ffefba0b9d","unresolved":false,"context_lines":[{"line_number":106,"context_line":"class BaseOVSLinuxTestCase(BaseLinuxTestCase):"},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        super(BaseOVSLinuxTestCase, self).setUp()"},{"line_number":109,"context_line":"        self.check_sudo_enabled()"},{"line_number":110,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":111,"context_line":"        self.ip \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_5f051878","line":109,"updated":"2015-01-08 16:54:05.000000000","message":"is this check necessary here? You check that sudo is enabled in FakeMachine.create()","commit_id":"7868069acdf25bacafd8ee48d3fa22ef48a2168d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"475964ebb629f2ded36cce4edfc82d85041d3d2e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"class BaseOVSLinuxTestCase(BaseLinuxTestCase):"},{"line_number":107,"context_line":"    def setUp(self):"},{"line_number":108,"context_line":"        super(BaseOVSLinuxTestCase, self).setUp()"},{"line_number":109,"context_line":"        self.check_sudo_enabled()"},{"line_number":110,"context_line":"        self.ovs \u003d ovs_lib.BaseOVS(self.root_helper)"},{"line_number":111,"context_line":"        self.ip \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_7f7d74e6","line":109,"in_reply_to":"3a961159_5f051878","updated":"2015-01-08 16:58:24.000000000","message":"indeed it\u0027s not needed\n\nDone","commit_id":"7868069acdf25bacafd8ee48d3fa22ef48a2168d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def prepare_veth_pairs(self):"},{"line_number":59,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":60,"context_line":"        machines \u003d self.useFixture("},{"line_number":61,"context_line":"            machine_helpers.PeerMachines(bridge)).machines"},{"line_number":62,"context_line":"        self.SRC_ADDRESS \u003d machines[0].ip"},{"line_number":63,"context_line":"        self.DST_ADDRESS \u003d machines[1].ip"},{"line_number":64,"context_line":"        return [ip_lib.IPWrapper(m.namespace) for m in machines]"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_75c59c8c","line":61,"updated":"2015-04-17 22:01:21.000000000","message":"(No action required) Given that peers are likely going to always use the same bridge, maybe they could be typed, e.g. VethPeerMachines.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"f7db5309b1006c9df64ff2ddcb7af5fc2439608c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        bridge \u003d self.useFixture(net_helpers.VethBridgeFixture()).bridge"},{"line_number":60,"context_line":"        machines \u003d self.useFixture("},{"line_number":61,"context_line":"            machine_helpers.PeerMachines(bridge)).machines"},{"line_number":62,"context_line":"        self.SRC_ADDRESS \u003d machines[0].ip"},{"line_number":63,"context_line":"        self.DST_ADDRESS \u003d machines[1].ip"},{"line_number":64,"context_line":"        return [ip_lib.IPWrapper(m.namespace) for m in machines]"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ab451fb_1501b8ae","line":62,"updated":"2015-04-17 22:01:21.000000000","message":"(No action required) The fact that the namespaces are returned but the addresses are set on the instance seems very strange.  I see you\u0027re fixing this in a subsequent patch, though.","commit_id":"573d5ee49d63be8907aa5f66f0777d8eac384178"}],"neutron/tests/functional/agent/linux/helpers.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e37a89e484309be3c1ba572774cf658e45cf0716","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class Pinger(object):"},{"line_number":35,"context_line":"    def __init__(self, testcase, namespace, timeout\u003d1, max_attempts\u003d1):"},{"line_number":36,"context_line":"        self.testcase \u003d testcase"},{"line_number":37,"context_line":"        self.namespace \u003d namespace"},{"line_number":38,"context_line":"        self._timeout \u003d timeout"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_fb0d0990","line":35,"updated":"2014-12-23 11:15:17.000000000","message":"This seems like an irrelevant change that can easily go into separate patch.","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class Pinger(object):"},{"line_number":35,"context_line":"    def __init__(self, testcase, namespace, timeout\u003d1, max_attempts\u003d1):"},{"line_number":36,"context_line":"        self.testcase \u003d testcase"},{"line_number":37,"context_line":"        self.namespace \u003d namespace"},{"line_number":38,"context_line":"        self._timeout \u003d timeout"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_77a84520","line":35,"in_reply_to":"3a961159_fb0d0990","updated":"2014-12-23 16:16:02.000000000","message":"This change is required to transform Pinger as a FakeVM tool.","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e37a89e484309be3c1ba572774cf658e45cf0716","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"class FakeVM(object):"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __init__(self, testcase, namespace, port_dev, ip_cidr):"},{"line_number":68,"context_line":"        self.testcase \u003d testcase"},{"line_number":69,"context_line":"        self.namespace \u003d namespace"},{"line_number":70,"context_line":"        self.port_dev \u003d port_dev"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1bdd75e0","line":67,"updated":"2014-12-23 11:15:17.000000000","message":"(No action required)\n\nI know that is not directly applicable here because we probably won\u0027t introduce multiple inheritance later for the class. But this is a good place for my general rant about __init__ not calling super().__init__(). The \u0027why\u0027 it\u0027s wrong is described, among other things, at: \n\nhttps://fuhm.net/super-harmful/\n\nQuoting: \"People omit calls to super(...).__init__ if the only superclass is \u0027object\u0027, as, after all, object.__init__ doesn\u0027t do anything! However, this is very incorrect. Doing so will cause other classes\u0027 __init__ methods to not be called.\"\n\nI really dream of times when all classes will call to super() consistently.","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"class FakeVM(object):"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __init__(self, testcase, namespace, port_dev, ip_cidr):"},{"line_number":68,"context_line":"        self.testcase \u003d testcase"},{"line_number":69,"context_line":"        self.namespace \u003d namespace"},{"line_number":70,"context_line":"        self.port_dev \u003d port_dev"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_97ebf1a2","line":67,"in_reply_to":"3a961159_1bdd75e0","updated":"2014-12-23 16:16:02.000000000","message":"Done","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e37a89e484309be3c1ba572774cf658e45cf0716","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.namespace \u003d namespace"},{"line_number":70,"context_line":"        self.port_dev \u003d port_dev"},{"line_number":71,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":72,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def pinger(self, timeout\u003d1, max_attempts\u003d1):"},{"line_number":75,"context_line":"        return Pinger(self.testcase, self.namespace, timeout\u003dtimeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_ed52b011","line":72,"updated":"2014-12-23 11:15:17.000000000","message":"I saw that idiom twice already in the patch. Can we create a util function for that?","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"4e9f739030423059356c046a6ff3d910012df77e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.namespace \u003d namespace"},{"line_number":70,"context_line":"        self.port_dev \u003d port_dev"},{"line_number":71,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":72,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def pinger(self, timeout\u003d1, max_attempts\u003d1):"},{"line_number":75,"context_line":"        return Pinger(self.testcase, self.namespace, timeout\u003dtimeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_76ae5d83","line":72,"in_reply_to":"3a961159_573c292f","updated":"2015-01-05 22:39:37.000000000","message":"Function created in an other change[1]\n\nThis change will not depend on it for the moment ... as the future of [1] is unclear.\n\n[1] https://review.openstack.org/143811","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5f9863d18c099e1f065d649239eab1c06b05edcd","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.namespace \u003d namespace"},{"line_number":70,"context_line":"        self.port_dev \u003d port_dev"},{"line_number":71,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":72,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def pinger(self, timeout\u003d1, max_attempts\u003d1):"},{"line_number":75,"context_line":"        return Pinger(self.testcase, self.namespace, timeout\u003dtimeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_573c292f","line":72,"in_reply_to":"3a961159_ed52b011","updated":"2014-12-23 16:16:02.000000000","message":"This idiom can be found many times in L3 agent class :/","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"946f39e39dc3fbccfa76dc8c8697246168c23ca0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        except RuntimeError:"},{"line_number":49,"context_line":"            self.testcase.fail(\"destination ip %(dst_ip)s is not replying \""},{"line_number":50,"context_line":"                               \"to ping from namespace %(src_ns)s\" %"},{"line_number":51,"context_line":"                               {\u0027src_ns\u0027: self.namespace.namespace,"},{"line_number":52,"context_line":"                                \u0027dst_ip\u0027: dst_ip})"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def assert_no_ping(self, dst_ip):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c3e87fb5","line":51,"updated":"2015-01-07 13:28:44.000000000","message":"\u0027src_ns\u0027 isn\u0027t accurate anymore since it\u0027s \u0027self.namespace\u0027 now.","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"7338b6400847c5676d5b913944d0e415a2eb3a0b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        except RuntimeError:"},{"line_number":49,"context_line":"            self.testcase.fail(\"destination ip %(dst_ip)s is not replying \""},{"line_number":50,"context_line":"                               \"to ping from namespace %(src_ns)s\" %"},{"line_number":51,"context_line":"                               {\u0027src_ns\u0027: self.namespace.namespace,"},{"line_number":52,"context_line":"                                \u0027dst_ip\u0027: dst_ip})"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def assert_no_ping(self, dst_ip):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_f127f7b3","line":51,"in_reply_to":"3a961159_7df5a3c9","updated":"2015-01-07 19:32:05.000000000","message":"i reread your remark ... i don\u0027t see where is the trouble, src_ns is never printed","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3dd79ec51f218ed3ef3700a08e20aab820272414","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        except RuntimeError:"},{"line_number":49,"context_line":"            self.testcase.fail(\"destination ip %(dst_ip)s is not replying \""},{"line_number":50,"context_line":"                               \"to ping from namespace %(src_ns)s\" %"},{"line_number":51,"context_line":"                               {\u0027src_ns\u0027: self.namespace.namespace,"},{"line_number":52,"context_line":"                                \u0027dst_ip\u0027: dst_ip})"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def assert_no_ping(self, dst_ip):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_7df5a3c9","line":51,"in_reply_to":"3a961159_c3e87fb5","updated":"2015-01-07 15:40:31.000000000","message":"Done","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5867150c4a04d1d2fe29d6679226164ccf1ee0f9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        except RuntimeError:"},{"line_number":49,"context_line":"            self.testcase.fail(\"destination ip %(dst_ip)s is not replying \""},{"line_number":50,"context_line":"                               \"to ping from namespace %(src_ns)s\" %"},{"line_number":51,"context_line":"                               {\u0027src_ns\u0027: self.namespace.namespace,"},{"line_number":52,"context_line":"                                \u0027dst_ip\u0027: dst_ip})"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def assert_no_ping(self, dst_ip):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_71b06743","line":51,"in_reply_to":"3a961159_f127f7b3","updated":"2015-01-07 19:36:04.000000000","message":"It\u0027s the key of a value in the dict you pass on for string formatting. Thinking about it again, it\u0027s pretty much a nit... :)","commit_id":"4b39bc66c72cfedc4c9b1d16caa39fb4ef9ef0b0"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class Pinger(object):"},{"line_number":90,"context_line":"    def __init__(self, testcase, namespace, timeout\u003d1, max_attempts\u003d1):"},{"line_number":91,"context_line":"        self.testcase \u003d testcase"},{"line_number":92,"context_line":"        self.namespace \u003d namespace"},{"line_number":93,"context_line":"        self._timeout \u003d timeout"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_42cdedb6","line":90,"updated":"2015-01-12 21:04:34.000000000","message":"Do we always want to be executing this helper in a namespace, or would tests from the root namespace ever make sense?","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0311dc16de79f828cbeb9a234eb37fbc58e8d7df","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class Pinger(object):"},{"line_number":90,"context_line":"    def __init__(self, testcase, namespace, timeout\u003d1, max_attempts\u003d1):"},{"line_number":91,"context_line":"        self.testcase \u003d testcase"},{"line_number":92,"context_line":"        self.namespace \u003d namespace"},{"line_number":93,"context_line":"        self._timeout \u003d timeout"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_32c0382a","line":90,"in_reply_to":"3a961159_42cdedb6","updated":"2015-01-29 17:17:27.000000000","message":"imo, we won\u0027t use Pinger in root namespace as using Pinger from root namespace implies to have tests depend on root namespace ip config (bad) or to update root namespace ip config (bad²)","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        try:"},{"line_number":102,"context_line":"            self._ping_destination(dst_ip)"},{"line_number":103,"context_line":"        except RuntimeError:"},{"line_number":104,"context_line":"            self.testcase.fail(\"destination ip %(dst_ip)s is not replying \""},{"line_number":105,"context_line":"                               \"to ping from namespace %(ns)s\" %"},{"line_number":106,"context_line":"                               {\u0027ns\u0027: self.namespace.namespace,"},{"line_number":107,"context_line":"                                \u0027dst_ip\u0027: dst_ip})"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_626f4994","line":104,"updated":"2015-01-12 21:04:34.000000000","message":"(No action required) I guess I missed when the original code was up for review, but it doesn\u0027t make sense to add a dependency on testcase solely for the fail() method.  It\u0027s possible to have the same result by raising the appropriate exception and reduce the coupling.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0311dc16de79f828cbeb9a234eb37fbc58e8d7df","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        try:"},{"line_number":102,"context_line":"            self._ping_destination(dst_ip)"},{"line_number":103,"context_line":"        except RuntimeError:"},{"line_number":104,"context_line":"            self.testcase.fail(\"destination ip %(dst_ip)s is not replying \""},{"line_number":105,"context_line":"                               \"to ping from namespace %(ns)s\" %"},{"line_number":106,"context_line":"                               {\u0027ns\u0027: self.namespace.namespace,"},{"line_number":107,"context_line":"                                \u0027dst_ip\u0027: dst_ip})"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_32d758ef","line":104,"in_reply_to":"3a961159_626f4994","updated":"2015-01-29 17:17:27.000000000","message":"will be done in an other change","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def __init__(self, testcase, br, ip_cidr, gateway_ip\u003dNone,"},{"line_number":181,"context_line":"                 auto_create\u003dTrue):"},{"line_number":182,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":183,"context_line":"        self.testcase \u003d testcase"},{"line_number":184,"context_line":"        self.br \u003d br"},{"line_number":185,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":186,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a2aa116f","line":183,"updated":"2015-01-12 21:04:34.000000000","message":"Accepting a generic \u0027testcase\u0027 parameter implies that any testcase will do, but based on the usage in the rest of the class it is clear that only specific implementations will do.  As per my comment re: Pinger\u0027s of testcase, consider refactoring the code involved so that a more natural composition is possible while still retaining automated cleanup.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"88f3d27894c8843a99bee867904c6f31b27bd13f","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def __init__(self, testcase, br, ip_cidr, gateway_ip\u003dNone,"},{"line_number":181,"context_line":"                 auto_create\u003dTrue):"},{"line_number":182,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":183,"context_line":"        self.testcase \u003d testcase"},{"line_number":184,"context_line":"        self.br \u003d br"},{"line_number":185,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":186,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_9c6ac319","line":183,"in_reply_to":"3a961159_7919b386","updated":"2015-01-13 12:06:38.000000000","message":"me too but it implies to rewrite quite everything using create_resource method.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"b0a4e76bf7b4674cc18e2144b046c60a304b44a1","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def __init__(self, testcase, br, ip_cidr, gateway_ip\u003dNone,"},{"line_number":181,"context_line":"                 auto_create\u003dTrue):"},{"line_number":182,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":183,"context_line":"        self.testcase \u003d testcase"},{"line_number":184,"context_line":"        self.br \u003d br"},{"line_number":185,"context_line":"        self.ip_cidr \u003d ip_cidr"},{"line_number":186,"context_line":"        self.ip \u003d self.ip_cidr.partition(\u0027/\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_7919b386","line":183,"in_reply_to":"3a961159_a2aa116f","updated":"2015-01-13 05:39:46.000000000","message":"Depending on the end result of the next patchset Cedric is working on, I think we might actually want to keep \u0027testcase\u0027 for the \u0027addCleanup\u0027 functionality (if this class wants to create a namespace, it should probably also schedule it for cleanup sometime in the near future, right?)\n\nA different approach (the test calls \u0027create\u0027 and runs \u0027addCleanup(my_fake_vm.destroy)\u0027 - \u0027destroy\u0027 being a function of this instance that schedules the deletion of these resources.\n\nI actually like the second approach better :)","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        if self.gateway_ip:"},{"line_number":200,"context_line":"            self.testcase.set_namespace_gateway(self.port_dev, self.gateway_ip)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def pinger(self, timeout\u003d1, max_attempts\u003d1):"},{"line_number":203,"context_line":"        return Pinger(self.testcase, self.namespace, timeout\u003dtimeout,"},{"line_number":204,"context_line":"                      max_attempts\u003dmax_attempts)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_02ca051a","line":202,"updated":"2015-01-12 21:04:34.000000000","message":"pinger -\u003e {get/create/etc}_pinger\n\nIn general, method name should take the form of an action statement.  If a noun is in fact what you want, turning this method into a property may be appropriate.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"88f3d27894c8843a99bee867904c6f31b27bd13f","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        if self.gateway_ip:"},{"line_number":200,"context_line":"            self.testcase.set_namespace_gateway(self.port_dev, self.gateway_ip)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def pinger(self, timeout\u003d1, max_attempts\u003d1):"},{"line_number":203,"context_line":"        return Pinger(self.testcase, self.namespace, timeout\u003dtimeout,"},{"line_number":204,"context_line":"                      max_attempts\u003dmax_attempts)"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_bc65bf4a","line":202,"in_reply_to":"3a961159_02ca051a","updated":"2015-01-13 12:06:38.000000000","message":"Done","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                      max_attempts\u003dmax_attempts)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @classmethod"},{"line_number":207,"context_line":"    def peers(cls, testcase, ip_cidr\u003dNone):"},{"line_number":208,"context_line":"        if ip_cidr is None:"},{"line_number":209,"context_line":"            ip_cidr \u003d cls.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_82d515b9","line":207,"updated":"2015-01-12 21:04:34.000000000","message":"peers -\u003e {get/create/generate/etc}_peers","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"88f3d27894c8843a99bee867904c6f31b27bd13f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                      max_attempts\u003dmax_attempts)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @classmethod"},{"line_number":207,"context_line":"    def peers(cls, testcase, ip_cidr\u003dNone):"},{"line_number":208,"context_line":"        if ip_cidr is None:"},{"line_number":209,"context_line":"            ip_cidr \u003d cls.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_dc744b00","line":207,"in_reply_to":"3a961159_82d515b9","updated":"2015-01-13 12:06:38.000000000","message":"Done","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0311dc16de79f828cbeb9a234eb37fbc58e8d7df","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                      max_attempts\u003dmax_attempts)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @classmethod"},{"line_number":207,"context_line":"    def peers(cls, testcase, ip_cidr\u003dNone):"},{"line_number":208,"context_line":"        if ip_cidr is None:"},{"line_number":209,"context_line":"            ip_cidr \u003d cls.CIDR_TEMPLATE % random.randrange(256)"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_864e0295","line":207,"in_reply_to":"3a961159_dc744b00","updated":"2015-01-29 17:17:27.000000000","message":"Done (removed)","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e6d80ea653a21661eb3bbf0eb493e856912a4009","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        br \u003d testcase.create_ovs_bridge()"},{"line_number":212,"context_line":"        return [cls(testcase, br, testcase.shift_ip_cidr(ip_cidr, i))"},{"line_number":213,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_8bc1bb83","line":213,"updated":"2015-01-12 16:47:43.000000000","message":"What if I want more than 2 peers? Seems like the function should accept a number to indicate the amount of peers to return.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"99a938da73d545127ab34e654c5bd5215a2e76e7","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        br \u003d testcase.create_ovs_bridge()"},{"line_number":212,"context_line":"        return [cls(testcase, br, testcase.shift_ip_cidr(ip_cidr, i))"},{"line_number":213,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_cbe2e39f","line":213,"in_reply_to":"3a961159_2b07e782","updated":"2015-01-12 16:57:13.000000000","message":"Not right now, but I can see why one might need more than 2 (check that DHCP works for some 253 peers on a network, for example). Or am I misunderstanding the purpose of this function?","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9f348c055f2fe2fb3e2425e2c2813cf8f27c91cf","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        br \u003d testcase.create_ovs_bridge()"},{"line_number":212,"context_line":"        return [cls(testcase, br, testcase.shift_ip_cidr(ip_cidr, i))"},{"line_number":213,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_2b07e782","line":213,"in_reply_to":"3a961159_8bc1bb83","updated":"2015-01-12 16:53:29.000000000","message":"Do you have a usecase requiring more than 2 peers?","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0311dc16de79f828cbeb9a234eb37fbc58e8d7df","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        br \u003d testcase.create_ovs_bridge()"},{"line_number":212,"context_line":"        return [cls(testcase, br, testcase.shift_ip_cidr(ip_cidr, i))"},{"line_number":213,"context_line":"                for i in range(1, 3)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_66190e88","line":213,"in_reply_to":"3a961159_cbe2e39f","updated":"2015-01-29 17:17:27.000000000","message":"removed as FakeMachine will not replace veth based test for the moment.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3702e78ffe1af550be7e65d6c069c5e1fd4d3798","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                setattr(self, proc_attr, None)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class FakeMachine(object):"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_34e9e4b8","line":286,"updated":"2015-01-29 13:13:19.000000000","message":"A docstring would be nice.","commit_id":"57de0798cdfc74142a376267bd684db456794711"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ae9847fefec876901f34d4d22ff0328ffef7f559","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                setattr(self, proc_attr, None)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class FakeMachine(object):"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_f939ee41","line":286,"in_reply_to":"fa81d914_34e9e4b8","updated":"2015-01-29 21:03:01.000000000","message":"Done","commit_id":"57de0798cdfc74142a376267bd684db456794711"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3702e78ffe1af550be7e65d6c069c5e1fd4d3798","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def __init__(self, testcase, br, ip_cidr, gateway_ip\u003dNone,"},{"line_number":291,"context_line":"                 auto_create\u003dTrue):"},{"line_number":292,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":293,"context_line":"        self.testcase \u003d testcase"},{"line_number":294,"context_line":"        self.br \u003d br"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_d7a96a7c","line":291,"updated":"2015-01-29 13:13:19.000000000","message":"I would like to see a docstring or comment saying that testcase must be a instance of BaseOVSLinuxTestCase or a descendant.","commit_id":"57de0798cdfc74142a376267bd684db456794711"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ae9847fefec876901f34d4d22ff0328ffef7f559","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def __init__(self, testcase, br, ip_cidr, gateway_ip\u003dNone,"},{"line_number":291,"context_line":"                 auto_create\u003dTrue):"},{"line_number":292,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":293,"context_line":"        self.testcase \u003d testcase"},{"line_number":294,"context_line":"        self.br \u003d br"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_594afac5","line":291,"in_reply_to":"fa81d914_d7a96a7c","updated":"2015-01-29 21:03:01.000000000","message":"Done","commit_id":"57de0798cdfc74142a376267bd684db456794711"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":288,"context_line":"class FakeMachine(object):"},{"line_number":289,"context_line":"    \"\"\"Helper class to emulate a machine."},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    This class emulates a machine (a vm, a client/server machine, etc.) through"},{"line_number":292,"context_line":"    a namespace with:"},{"line_number":293,"context_line":"    - a port bound to an OVS bridge,"},{"line_number":294,"context_line":"    - an ip on the port,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_9ed5a2bb","line":291,"updated":"2015-02-27 01:08:45.000000000","message":"I\u0027m not sure this docstring provides useful detail that can\u0027t be gleaned from the constructor docstring.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"054b42cbd7c784f5b7f5cc5878084fff65be92aa","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    - a gateway (if requested)."},{"line_number":296,"context_line":"    \"\"\""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    CIDR_TEMPLATE \u003d \u0027192.168.%s.0/24\u0027"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def __init__(self, testcase, br, ip_cidr, gateway_ip\u003dNone,"},{"line_number":301,"context_line":"                 auto_create\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_a110db59","line":298,"updated":"2015-02-25 15:41:53.000000000","message":"Nit: not used yet, this could be left out for now.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        :param testcase: BaseOVSLinuxTestCase instance or testcase"},{"line_number":305,"context_line":"                         implementing BaseOVSLinuxTestCase methods"},{"line_number":306,"context_line":"        :param br: OVSBridge instance on which the fake machine will be bound"},{"line_number":307,"context_line":"        :param ip_cidr: fake machine ip_cidr"},{"line_number":308,"context_line":"        :param gateway_ip: fake machine gateway ip"},{"line_number":309,"context_line":"        :param auto_create: constructor auto creates the fake machine if True."}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_1ee37234","line":306,"updated":"2015-02-27 01:08:45.000000000","message":"br -\u003e bridge \n\nPlease avoid overly-short variable names outside of loop variables.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        :param gateway_ip: fake machine gateway ip"},{"line_number":309,"context_line":"        :param auto_create: constructor auto creates the fake machine if True."},{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":"        # TODO(cbrandily): remove requirements on testcase by transforming"},{"line_number":312,"context_line":"        # BaseOVSLinuxTestCase methods into helpers."},{"line_number":313,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":314,"context_line":"        self.testcase \u003d testcase"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_fe6a1e80","line":311,"updated":"2015-02-27 01:08:45.000000000","message":"I\u0027d prefer to see the conversion to helpers happen first, but if you swear that you\u0027ll do it in a timely fashion I\u0027m willing to be lenient.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":"        # TODO(cbrandily): remove requirements on testcase by transforming"},{"line_number":312,"context_line":"        # BaseOVSLinuxTestCase methods into helpers."},{"line_number":313,"context_line":"        super(FakeMachine, self).__init__()"},{"line_number":314,"context_line":"        self.testcase \u003d testcase"},{"line_number":315,"context_line":"        self.br \u003d br"},{"line_number":316,"context_line":"        self.ip_cidr \u003d ip_cidr"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_bedb467c","line":313,"updated":"2015-02-27 01:08:45.000000000","message":"It isn\u0027t necessary to call __init__ on object.  All it does is check that no arguments were passed.\n\nhttp://stackoverflow.com/questions/8611712/what-does-objects-init-do-in-python","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        self.namespace \u003d None"},{"line_number":320,"context_line":"        self.port_dev \u003d None"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        if auto_create:"},{"line_number":323,"context_line":"            self.create()"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_9ece82b3","line":322,"updated":"2015-02-27 01:08:45.000000000","message":"(No action necessary) My intuition tells me that it would be preferable to have to call create() explicitly.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6bdc7ef665ebbe935c06eb43ee27c476531e0a06","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            self.create()"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create(self):"},{"line_number":326,"context_line":"        self.testcase.check_sudo_enabled()"},{"line_number":327,"context_line":"        self.namespace \u003d self.testcase.create_namespace()"},{"line_number":328,"context_line":"        self.port_dev \u003d self.testcase.bind_namespace_to_cidr("},{"line_number":329,"context_line":"            self.namespace, self.br, self.ip_cidr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_97423566","line":326,"updated":"2015-02-25 15:47:09.000000000","message":"nit: I think that the sudo check should be in the __init__ - we don\u0027t want to have to stop mid-test if we can stop before it even started.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            self.create()"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create(self):"},{"line_number":326,"context_line":"        self.testcase.check_sudo_enabled()"},{"line_number":327,"context_line":"        self.namespace \u003d self.testcase.create_namespace()"},{"line_number":328,"context_line":"        self.port_dev \u003d self.testcase.bind_namespace_to_cidr("},{"line_number":329,"context_line":"            self.namespace, self.br, self.ip_cidr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_9e45a219","line":326,"in_reply_to":"ba7be1f8_97423566","updated":"2015-02-27 01:08:45.000000000","message":"As per discussion around [1], prompted by this comment, sudo checks are going to be done in setUp to minimize unnecessary setup costs.\n\n1: https://review.openstack.org/#/c/159193/","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"e5b4c39651f71c3aee62f64b6ca4716fe971d8d3","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            self.create()"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create(self):"},{"line_number":326,"context_line":"        self.testcase.check_sudo_enabled()"},{"line_number":327,"context_line":"        self.namespace \u003d self.testcase.create_namespace()"},{"line_number":328,"context_line":"        self.port_dev \u003d self.testcase.bind_namespace_to_cidr("},{"line_number":329,"context_line":"            self.namespace, self.br, self.ip_cidr)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_43627517","line":326,"in_reply_to":"ba7be1f8_97423566","updated":"2015-02-27 00:42:48.000000000","message":"This is probably a good idea. Let\u0027s also wait until https://review.openstack.org/159193 merges to see where the sudo check(s) end up.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create(self):"},{"line_number":326,"context_line":"        self.testcase.check_sudo_enabled()"},{"line_number":327,"context_line":"        self.namespace \u003d self.testcase.create_namespace()"},{"line_number":328,"context_line":"        self.port_dev \u003d self.testcase.bind_namespace_to_cidr("},{"line_number":329,"context_line":"            self.namespace, self.br, self.ip_cidr)"},{"line_number":330,"context_line":"        if self.gateway_ip:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_de68fa23","line":327,"updated":"2015-02-27 01:08:45.000000000","message":"Maybe a more appropriate name would be \u0027ip_wrapper\u0027 rather than \u0027namespace\u0027?  It\u0027s not really a namespace, or even the name of one.","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"}],"neutron/tests/functional/agent/linux/test_ipset.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e37a89e484309be3c1ba572774cf658e45cf0716","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.ipset._add_member_to_set(IPSET_SET, self.src_vm.ip)"},{"line_number":67,"context_line":"        self.pinger.assert_ping(self.dst_vm.ip)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_del_member_denies_ping(self):"},{"line_number":70,"context_line":"        self.ipset._add_member_to_set(IPSET_SET, self.src_vm.ip)"},{"line_number":71,"context_line":"        self.pinger.assert_ping(self.dst_vm.ip)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_db104d5b","line":69,"updated":"2014-12-23 11:15:17.000000000","message":"(No action required)\n\nThis seems pretty similar to test_add_member_allows_ping. I think we can squash them (later).","commit_id":"60dacb7e20beac647041250e4822ccdf09362e68"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":24,"context_line":"UNRELATED_IP \u003d \u00271.1.1.1\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class IpsetBase(base.BaseOVSLinuxTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(IpsetBase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_a2ef71b0","line":27,"updated":"2015-01-12 21:04:34.000000000","message":"I don\u0027t think it\u0027s desirable to increase the scope of this test case such that traffic flows through an OVS bridge.  Consider supporting both veth pair-peered and ovs-peered FakeMachine instances so that the intent of the original test code can be maintained.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0311dc16de79f828cbeb9a234eb37fbc58e8d7df","unresolved":false,"context_lines":[{"line_number":24,"context_line":"UNRELATED_IP \u003d \u00271.1.1.1\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class IpsetBase(base.BaseOVSLinuxTestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(IpsetBase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_e60c1e45","line":27,"in_reply_to":"3a961159_a2ef71b0","updated":"2015-01-29 17:17:27.000000000","message":"Done","commit_id":"300652d8c5ae112748283b140fcefadfae675320"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"492dc15a72ecd3a384c400aeb6e827d09742bc11","unresolved":false,"context_lines":[{"line_number":63,"context_line":"class IpsetManagerTestCase(IpsetBase):"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def test_add_member_allows_ping(self):"},{"line_number":66,"context_line":"        self.pinger.assert_no_ping(self.server.ip)"},{"line_number":67,"context_line":"        self.ipset._add_member_to_set(IPSET_SET, self.client.ip)"},{"line_number":68,"context_line":"        self.pinger.assert_ping(self.server.ip)"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_6223c906","line":66,"updated":"2015-01-12 21:04:34.000000000","message":"I think this is a definite readability improvement.","commit_id":"300652d8c5ae112748283b140fcefadfae675320"}],"neutron/tests/functional/agent/test_l3_agent.py":[{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3b4ed1304a0b04f18610ecb7afe7c55ebe0ebe0f","unresolved":false,"context_lines":[{"line_number":561,"context_line":"        router_ip_cidr \u003d router.internal_ports[0][\u0027ip_cidr\u0027]"},{"line_number":562,"context_line":"        ip_cidr \u003d self.shift_ip_cidr(router_ip_cidr)"},{"line_number":563,"context_line":"        br_int \u003d self.get_ovs_bridge(self.agent.conf.ovs_integration_bridge)"},{"line_number":564,"context_line":"        vm \u003d helpers.FakeMachine("},{"line_number":565,"context_line":"            self, br_int, ip_cidr, gateway_ip\u003drouter_ip_cidr.partition(\u0027/\u0027)[0])"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"        # Query metadata proxy"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_2849e08e","line":564,"updated":"2015-02-27 01:08:45.000000000","message":"vm -\u003e fm ? ;)","commit_id":"0a4c00ab9b5ffa5a62d8068362064429e66faf66"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"64bede7452786f699eced9485c3d67703d85ab1c","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            self.agent.conf.ovs_integration_bridge)"},{"line_number":566,"context_line":"        machine \u003d self.useFixture("},{"line_number":567,"context_line":"            c_helpers.FakeMachine("},{"line_number":568,"context_line":"                net_helpers.get_bridge_context(br_int),"},{"line_number":569,"context_line":"                net_helpers.increment_ip_cidr(router_ip_cidr),"},{"line_number":570,"context_line":"                router_ip_cidr.partition(\u0027/\u0027)[0]))"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_8748b488","line":568,"updated":"2015-03-05 15:13:04.000000000","message":"Hm, I don\u0027t see the functin to be defined in the file. Do you mean get_bridge_fixture?","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d4f2219045da1c41477baef5de7f997a32049a21","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            self.agent.conf.ovs_integration_bridge)"},{"line_number":566,"context_line":"        machine \u003d self.useFixture("},{"line_number":567,"context_line":"            c_helpers.FakeMachine("},{"line_number":568,"context_line":"                net_helpers.get_bridge_context(br_int),"},{"line_number":569,"context_line":"                net_helpers.increment_ip_cidr(router_ip_cidr),"},{"line_number":570,"context_line":"                router_ip_cidr.partition(\u0027/\u0027)[0]))"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_8a16f953","line":568,"in_reply_to":"9a80dd14_8748b488","updated":"2015-03-05 15:30:46.000000000","message":"Indeed","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b276e1f4c5fec913da04a471851d60f5bfad2d06","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            self.agent.conf.ovs_integration_bridge)"},{"line_number":566,"context_line":"        machine \u003d self.useFixture("},{"line_number":567,"context_line":"            c_helpers.FakeMachine("},{"line_number":568,"context_line":"                net_helpers.get_bridge_context(br_int),"},{"line_number":569,"context_line":"                net_helpers.increment_ip_cidr(router_ip_cidr),"},{"line_number":570,"context_line":"                router_ip_cidr.partition(\u0027/\u0027)[0]))"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_15894a26","line":568,"in_reply_to":"9a80dd14_8a16f953","updated":"2015-03-05 16:17:27.000000000","message":"Done","commit_id":"76bfd96af5119c9378c1503d8f2f8db222156ee1"}]}
