)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"da5e4423de53a07b86db35c18559ca481bd54943","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_35e183d0","line":234,"updated":"2014-07-25 14:56:17.000000000","message":"now it doesn\u0027t handle the case if attrs \u003d\u003d None, consider:\n if attrs and portbindings.PROFILE in attrs","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4d4416316ff96e3abc1757c71f6b5f5fb225c2a7","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_6b49578d","line":234,"in_reply_to":"baada198_35e183d0","updated":"2014-07-25 19:01:34.000000000","message":"Done","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f41534126bcbb2685a23d82a25c4912ef93c1b59","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f5ee88ec","line":235,"updated":"2014-07-23 12:59:43.000000000","message":"nit: 233-235 could be squashed into\n profile \u003d attrs.get(portbindings.PROFILE, {})","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"change_message_id":"44679d0639d039122e35884328967a9d77ea4fc3","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_8f6b74f0","line":235,"in_reply_to":"baada198_4f8ddc29","updated":"2014-07-23 16:54:09.000000000","message":"Rosella\u0027s proposal sounds doable! Let\u0027s that it with that change.","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"1c43d2d8519fdda76c642413cb2f422016e33e5e","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_db1d3579","line":235,"in_reply_to":"baada198_7bcfc929","updated":"2014-07-23 13:54:30.000000000","message":"ok, i see now that my version is changing the logic.\nIt seemed a bit redundant to call\n if portbindings.PROFILE in attrs\nbefore calling\n profile \u003d attrs.get()\n\nsorry for the confusion","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"23dff6ca1540f43275be8c9d30772bb92d768b8e","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0d33da13","line":235,"in_reply_to":"baada198_8f6b74f0","updated":"2014-07-24 05:27:03.000000000","message":"The proposed line is not doing the job. If profile attribute is specified and is None, it should clear the existing profile \u003d\u003e profile \u003d {}.\nPort-update for some attribute (not profile) will contain only this attribute settings, and the proposed line will set profile to None.\nAlthough the proposed code is not elegant, but it does the job.\nI am open for better suggestions.","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"148f5807e294b8f610f1df1b16194b27e16ed0d7","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7bcfc929","line":235,"in_reply_to":"baada198_98d2e3cf","updated":"2014-07-23 13:49:57.000000000","message":"checked with squashed code and it does not work..\nThe required behavior is:\nif profile is not specified, do not change the profile\nif profile is specified and its None, set it to {} and clear the existing profile.\nif profile is specified and is different from existing one, change it.","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"80835cfb49f158d34b2d8f98eeadbbc368e2d9bb","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4f8ddc29","line":235,"in_reply_to":"baada198_db1d3579","updated":"2014-07-23 16:41:15.000000000","message":"How about:\n\nprofile \u003d attrs.get(portbindings.PROFILE, attributes.ATTR_NOT_SPECIFIED)\n\nThat doesn\u0027t change the logic and eliminates the need of track a third state that is profile \u003d None","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"384186fbe4662280ce33879d07bb4c2a5d47fe4b","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_98d2e3cf","line":235,"in_reply_to":"baada198_f5ee88ec","updated":"2014-07-23 13:22:02.000000000","message":"Done","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"da5e4423de53a07b86db35c18559ca481bd54943","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":239,"context_line":"                           binding_profile):"},{"line_number":240,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_95f6cf8e","line":237,"updated":"2014-07-25 14:56:17.000000000","message":"nit: may use self._get_profile(binding) in place","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"4d4416316ff96e3abc1757c71f6b5f5fb225c2a7","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        if portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        binding_profile \u003d self._get_profile(binding)"},{"line_number":238,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":239,"context_line":"                           binding_profile):"},{"line_number":240,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_eb0ac725","line":237,"in_reply_to":"baada198_95f6cf8e","updated":"2014-07-25 19:01:34.000000000","message":"Done","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"fb00ae063073732083412c356b78b840235674d6","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if attrs and portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":238,"context_line":"                           self._get_profile(binding)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_5bfd1308","line":235,"updated":"2014-07-28 13:57:54.000000000","message":"I\u0027m slightly confused about the possible input values on a port_update. Are these the intended result for each possible input?:\n\n1) not in attrs - no change, keep current value\n2) ATTR_NOT_SPECIFIED - no change, keep current value\n3) None - remove current value, setting to empty dict\n4) anything else - replace current value with supplied value\n\nWhat CLI syntax is used for each of cases 1, 2, and 3? Are these all possible with the CLI and/or with the client library?","commit_id":"cbaa3fe07b68e650d7c7714775e56f4e28c3af82"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"3d7807cb2c21332e9fcf048d52620f57c0d421c7","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if attrs and portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":238,"context_line":"                           self._get_profile(binding)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_c756882b","line":235,"in_reply_to":"baada198_5bfd1308","updated":"2014-07-29 06:53:29.000000000","message":"Hi Bob,\nYou are right regarding cases in (1), except for what I seen is that  ATTR_NOT_SPECIFIED is not received during port-update, only during port-create. So what happened before the proposed fix is that profile that was not  set for port-update, and profile clear request, both resulted in profile\u003dNone.\nFor your second question, please see CLI invocations for all cases:\n1. port create with profile\nneutron port-create net1 --name\u003dport1 --binding:profile type\u003ddict \u0027p1\u0027\u003d\u0027w1\u0027\n\n2. port update admin state\nneutron  port-update port1 --admin_state_up\u003dFalse\n\n3. port create without specified profile:\nneutron port-create net1 --name\u003dport2\n\n4. port update profile\nneutron  port-update port2 --binding:profile type\u003ddict \u0027k2\u0027\u003d\u0027w2\u0027  \n\n5. port update to clear profile\nneutron - port-update  port2 --binding:profile  action\u003dclear","commit_id":"cbaa3fe07b68e650d7c7714775e56f4e28c3af82"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"35ceb063d773ac7da022603db76fa6ba7d114a51","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        # treat None as clear of profile."},{"line_number":233,"context_line":"        profile \u003d None"},{"line_number":234,"context_line":"        if attrs and portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":238,"context_line":"                           self._get_profile(binding)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_05ab03d8","line":235,"in_reply_to":"baada198_c756882b","updated":"2014-07-29 16:26:40.000000000","message":"OK, this all makes sense. I was missing that \"action\u003dclear\" results in the value None being received.","commit_id":"cbaa3fe07b68e650d7c7714775e56f4e28c3af82"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"35ceb063d773ac7da022603db76fa6ba7d114a51","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        if attrs and portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":238,"context_line":"                           self._get_profile(binding)):"},{"line_number":239,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"},{"line_number":240,"context_line":"            if len(binding.profile) \u003e models.BINDING_PROFILE_LEN:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_45ba5b0c","line":237,"updated":"2014-07-29 16:26:40.000000000","message":"If the \"or {}\" on line 235 replaces None with {}. there should be no need to include None in this list.","commit_id":"cbaa3fe07b68e650d7c7714775e56f4e28c3af82"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"2db663e319a26a321a9c95064542aedaa22d7691","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        if attrs and portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":238,"context_line":"                           self._get_profile(binding)):"},{"line_number":239,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"},{"line_number":240,"context_line":"            if len(binding.profile) \u003e models.BINDING_PROFILE_LEN:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_945e3ce7","line":237,"in_reply_to":"baada198_1bf282e3","updated":"2014-07-30 13:34:43.000000000","message":"Right. With the comments expanded, I lost track of the indentation and didn\u0027t realize profile could be None from line 233.","commit_id":"cbaa3fe07b68e650d7c7714775e56f4e28c3af82"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e446edafb7e870946707855c58c6b4535a00d7db","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        if attrs and portbindings.PROFILE in attrs:"},{"line_number":235,"context_line":"            profile \u003d attrs.get(portbindings.PROFILE) or {}"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        if profile not in (None, attributes.ATTR_NOT_SPECIFIED,"},{"line_number":238,"context_line":"                           self._get_profile(binding)):"},{"line_number":239,"context_line":"            binding.profile \u003d jsonutils.dumps(profile)"},{"line_number":240,"context_line":"            if len(binding.profile) \u003e models.BINDING_PROFILE_LEN:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_1bf282e3","line":237,"in_reply_to":"baada198_45ba5b0c","updated":"2014-07-29 17:20:24.000000000","message":"The line 235 replaces None with {} only if it received profile\u003dNone in the request otherwise profile stays None and should not impact existing profile","commit_id":"cbaa3fe07b68e650d7c7714775e56f4e28c3af82"}],"neutron/tests/unit/ml2/test_ml2_plugin.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f41534126bcbb2685a23d82a25c4912ef93c1b59","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                {\u0027port\u0027: state_arg})[\u0027port\u0027]"},{"line_number":238,"context_line":"            self._check_port_binding_profile(port, profile)"},{"line_number":239,"context_line":"            port \u003d self._show(\u0027ports\u0027, port_id)[\u0027port\u0027]"},{"line_number":240,"context_line":"            self._check_port_binding_profile(port, profile)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestMl2PortBindingNoSG(TestMl2PortBinding):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_95b54cef","line":240,"updated":"2014-07-23 12:59:43.000000000","message":"is this check really necessary?","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"517f8d9e1e5bed1685632e4591dc470ed7a00321","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                {\u0027port\u0027: state_arg})[\u0027port\u0027]"},{"line_number":238,"context_line":"            self._check_port_binding_profile(port, profile)"},{"line_number":239,"context_line":"            port \u003d self._show(\u0027ports\u0027, port_id)[\u0027port\u0027]"},{"line_number":240,"context_line":"            self._check_port_binding_profile(port, profile)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestMl2PortBindingNoSG(TestMl2PortBinding):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_db8e157a","line":240,"in_reply_to":"baada198_58bbebe3","updated":"2014-07-23 13:35:03.000000000","message":"no, after second thought i think it\u0027s ok to keep it.","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"384186fbe4662280ce33879d07bb4c2a5d47fe4b","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                {\u0027port\u0027: state_arg})[\u0027port\u0027]"},{"line_number":238,"context_line":"            self._check_port_binding_profile(port, profile)"},{"line_number":239,"context_line":"            port \u003d self._show(\u0027ports\u0027, port_id)[\u0027port\u0027]"},{"line_number":240,"context_line":"            self._check_port_binding_profile(port, profile)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestMl2PortBindingNoSG(TestMl2PortBinding):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_58bbebe3","line":240,"in_reply_to":"baada198_95b54cef","updated":"2014-07-23 13:22:02.000000000","message":"Not necessary, just to verify that port-show provides the same content. Do you suggest to remove?","commit_id":"df9a5913dcdbb9af28f929d9904aee80a9133292"}]}
