)]}'
{"neutron/plugins/ml2/managers.py":[{"author":{"_account_id":8792,"name":"Manish Godara","email":"manishg@yahoo-inc.com","username":"manishg"},"change_message_id":"ca3747e4a413a02e0025f56295515fe3e5f55082","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            # at the same time."},{"line_number":97,"context_line":"            if attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":98,"context_line":"                raise mpnet.SegmentsSetInConjunctionWithProviders()"},{"line_number":99,"context_line":"            return [self._process_provider_segment(network)]"},{"line_number":100,"context_line":"        elif attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":101,"context_line":"            segments \u003d [self._process_provider_segment(s)"},{"line_number":102,"context_line":"                        for s in network[mpnet.SEGMENTS]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_547634d8","line":99,"updated":"2015-01-30 03:42:56.000000000","message":"The method _process_provider_segment() expects a segment.  Here you are passing a network.  It will work now but with the work approved for kilo in [1] it will create confusion and likely generate a bug here or an error.  But again it will likely be caught as the object passed to process_provider_segment() won\u0027t match the expected object.\n\nIn principle, what you are doing makes sense - it\u0027s a dict after all!  And if is mpnet then in that case network !\u003d segment but that is already taken care of in the if prior to this statement.\n\n[1] https://blueprints.launchpad.net/neutron/+spec/plugin-interface-perestroika","commit_id":"89ae3444d66f8bf8f9e0b6fffce707160eeed06b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"8514760f8a31a62dce6f45a4a681bd5b8704f31a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            # at the same time."},{"line_number":97,"context_line":"            if attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":98,"context_line":"                raise mpnet.SegmentsSetInConjunctionWithProviders()"},{"line_number":99,"context_line":"            return [self._process_provider_segment(network)]"},{"line_number":100,"context_line":"        elif attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":101,"context_line":"            segments \u003d [self._process_provider_segment(s)"},{"line_number":102,"context_line":"                        for s in network[mpnet.SEGMENTS]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_ea2408c8","line":99,"in_reply_to":"da86d52c_1548b75a","updated":"2015-02-02 02:44:53.000000000","message":"my impression is that an mpnet segment is a subset of a network by design.\n\nwrt heavy api refactoring, i\u0027d just fold providernet into mpnet as a special case where len(segs) \u003d\u003d 1.","commit_id":"89ae3444d66f8bf8f9e0b6fffce707160eeed06b"},{"author":{"_account_id":8792,"name":"Manish Godara","email":"manishg@yahoo-inc.com","username":"manishg"},"change_message_id":"f4218efd5f677dcbc115d6bada3e34495d7ed0c7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            # at the same time."},{"line_number":97,"context_line":"            if attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":98,"context_line":"                raise mpnet.SegmentsSetInConjunctionWithProviders()"},{"line_number":99,"context_line":"            return [self._process_provider_segment(network)]"},{"line_number":100,"context_line":"        elif attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":101,"context_line":"            segments \u003d [self._process_provider_segment(s)"},{"line_number":102,"context_line":"                        for s in network[mpnet.SEGMENTS]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_2f733b81","line":99,"in_reply_to":"da86d52c_ea2408c8","updated":"2015-02-03 16:57:34.000000000","message":"that\u0027s true.  we should refactor it as one of the cases of mpnet during that timeframe.","commit_id":"89ae3444d66f8bf8f9e0b6fffce707160eeed06b"},{"author":{"_account_id":8792,"name":"Manish Godara","email":"manishg@yahoo-inc.com","username":"manishg"},"change_message_id":"58c49fa0081f8e01eaea909df47d262b1d41bc05","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            # at the same time."},{"line_number":97,"context_line":"            if attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":98,"context_line":"                raise mpnet.SegmentsSetInConjunctionWithProviders()"},{"line_number":99,"context_line":"            return [self._process_provider_segment(network)]"},{"line_number":100,"context_line":"        elif attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":101,"context_line":"            segments \u003d [self._process_provider_segment(s)"},{"line_number":102,"context_line":"                        for s in network[mpnet.SEGMENTS]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_1548b75a","line":99,"in_reply_to":"fa81d914_14902349","updated":"2015-01-31 01:02:54.000000000","message":"the shim layer will be responsible for converting but not at this layer.  That will happen at plugin layer and internally if a method that is expecting a network is passed a segment then it will create confusion and further bug (possibly).  Here it works because network dict (in one particular case) happens to be the superset (but that doesn\u0027t necessarily make it a good assumption though).\n\nI\u0027d rather see something like this (although no-op but clearer):\n\ndef _extract_segment_from_network(self, network):\n     return network #it\u0027s just a dict\n\nand replace the return statement with:\n    segment \u003d self._extract_segment(network)\n    return [self._process_provider_segment(segment)]","commit_id":"89ae3444d66f8bf8f9e0b6fffce707160eeed06b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"29824655b310bdea520f8175d27123b84554b7a5","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            # at the same time."},{"line_number":97,"context_line":"            if attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":98,"context_line":"                raise mpnet.SegmentsSetInConjunctionWithProviders()"},{"line_number":99,"context_line":"            return [self._process_provider_segment(network)]"},{"line_number":100,"context_line":"        elif attributes.is_attr_set(network.get(mpnet.SEGMENTS)):"},{"line_number":101,"context_line":"            segments \u003d [self._process_provider_segment(s)"},{"line_number":102,"context_line":"                        for s in network[mpnet.SEGMENTS]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_14902349","line":99,"in_reply_to":"fa81d914_547634d8","updated":"2015-01-30 18:08:27.000000000","message":"The change itself makes sense, of course. The point Manish mentioned is a good point too. We can assume a network dict passed is a super set of a provider segment info, so I am okay \npassing a network to _process_provider_segment directly.\n\nRegarding the new plugin interface, the shim layer should be responsible to converting a format which v2 plugin expects, though it bring another ugly layer :-(","commit_id":"89ae3444d66f8bf8f9e0b6fffce707160eeed06b"}]}
