)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support to the port binding extension for the NVP plugin."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Also, this patch removes the non-seriaizable object for"},{"line_number":10,"context_line":"port profile. This went undetected for quite some time."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements blueprint nvp-port-binding-extension"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAAPn%2F%2FiZI%3D","line":9,"updated":"2013-06-28 09:27:20.000000000","message":"ah le typo.......","commit_id":"440477da32764878975d95de6d0affd87296a3f8"}],"neutron/db/portbindings_db.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3a199a80bbb1a0bd010341f652816b63fea44618","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAP3%2F%2Fqsc%3D","line":76,"updated":"2013-07-14 20:06:47.000000000","message":"(Continued from patch set 8)\nI investigated the usage of this method more. In other plugins such OVS plugin, it is expected that port_data is passed in the request and port is retrieved from db. On the other hand, NVP plugin, data from the API is passed to \"port\" argument.\nIf \"port\" is retrieved from db, there is no case where object() exists in \"port\".\n\nIt is better to clarify whether \"data in the API request\" such as ATTR_NOT_SPECIFIED is allowed in \"port\" argument. I think what Yong would like to say in patch set 8 is that data like object() should not be passed to \"port\" argument and such data should be deleted in your plugin before calling this method.\n\nWhat do you think?\n\n\nIn addition, the condition in L.75 is same as \"if binding_profile is ATTR_NOT_SPECIFIED:\".\nI think comparing directly with ATTR_NOT_SPECIFIED is easy to understand.","commit_id":"4a580a8b7ee100c6975aafd109be0a99e6c0bbd8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3a199a80bbb1a0bd010341f652816b63fea44618","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAQn%2F%2FxGE%3D","line":76,"in_reply_to":"AAAAP3%2F%2FoxE%3D","updated":"2013-07-23 16:05:11.000000000","message":"Sorry for the late response. Your change looks reasonable since it makes the method more robust.","commit_id":"4a580a8b7ee100c6975aafd109be0a99e6c0bbd8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAP3%2F%2FoxE%3D","line":76,"in_reply_to":"AAAAP3%2F%2Fpxs%3D","updated":"2013-07-15 15:09:45.000000000","message":"I found out about the \u0027object\u0027 while working on the extension to the NVP plugin. Differently from the openvswitch plugin, this plugin does not overwrite \u0027port\u0027, therefore we\u0027ll end up having the non serializable object in the port response body. We cannot assume that every plugin behaves like the ovs one does, therefore I thought of adding this code here.","commit_id":"4a580a8b7ee100c6975aafd109be0a99e6c0bbd8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3a199a80bbb1a0bd010341f652816b63fea44618","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAP3%2F%2Fpxs%3D","line":76,"in_reply_to":"AAAAP3%2F%2FqpU%3D","updated":"2013-07-15 08:52:21.000000000","message":"What I concern now is why this code is needed. I think it is from the fact the assumption of the arguments (port and port_data) is not clear. (I didn\u0027t notice it at first)\n\nRegarding comparing ATTR_NOT_SPECIFIED vs a method, I am okay if you keep the current code (is_attr_set() and comparing with None).\nIn general I agree using a method is better. Honestly, using is_attr_set and then comparing with None is not so different from comparing with ATTR_NOT_SPECIFIED directly. It is a tricky point of the current Neutron code. (is_attr_set is used but None and ATTR_NOT_SPECIFIED have different meanings in several places.) I think it is better to clean up in the future but it is not an easy task.","commit_id":"4a580a8b7ee100c6975aafd109be0a99e6c0bbd8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAP3%2F%2FqpU%3D","line":76,"in_reply_to":"AAAAP3%2F%2Fqsc%3D","updated":"2013-07-14 21:01:52.000000000","message":"Look, I totally get what you\u0027re saying...but I only wish that what\u0027s  \"easy to understand\" is agreed fully by everyone who jumps on the review or read the code. I have seen people suggest to use the method is_attr_set instead of directly ATTR_NOT_SPECIFIED to avoid leaking implementation details and provide better abstraction. Frankly I am not fussed either way, and if I look at the occurrences of the use of one over the other there is no clear winner. In a nutshell, I can change it to follow your suggestion, as I don\u0027t want to delay this review any further...but I am not changing it back :)","commit_id":"4a580a8b7ee100c6975aafd109be0a99e6c0bbd8"}],"quantum/db/portbindings_db.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2F%2Bwg%3D","line":76,"updated":"2013-06-15 23:37:19.000000000","message":"Well done for spotting that we were keeping a non-serializable value in the object.\nThis probably deserves to be stated in the commit message (that this patch also fixes something else), as the change is unrelated to the topic.\n\nFor this particular task, it might be better to explicitly compare with ATTR_NOT_SPECIFIED as we do in create_subnet and other routines.","commit_id":"b582f4471a31b7b4772b6d0ec28de609d103edf2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e5e7734fff2f9fcad1741cfe62dc695dd510f697","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2F8sE%3D","line":76,"in_reply_to":"AAAAPn%2F%2F%2Bwg%3D","updated":"2013-06-17 16:26:44.000000000","message":"You mean replacing line 74 with a check directly against ATTR_NOT_SPECIFIED? I thought about it, but checking directly against this *special* value leaks implementation details IMO.","commit_id":"b582f4471a31b7b4772b6d0ec28de609d103edf2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3a199a80bbb1a0bd010341f652816b63fea44618","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2Fel4%3D","line":76,"updated":"2013-07-01 02:54:59.000000000","message":"In my understanding you are trying to remove port profile if it is ATTR_NOT_SPECIFIED, but it also removes an empty dict. Though in this case an empty dict has no meaning, it is better to be compared with ATTR_NOT_SPEICIFIED. IMO it is better to add a method such as is_attr_unspecified to api/v2/attributes.py.","commit_id":"0172e8ea731cd7d3de0b01ad0cf21101284e05bf"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FdcQ%3D","line":76,"in_reply_to":"AAAAPn%2F%2Fejw%3D","updated":"2013-07-01 14:23:42.000000000","message":"upstream plugin? There is no such thing is there? You maybe mean the base class? If you want to understand why these lines are needed, look at the the request/response to a port show in the case where a plugin does not implement the extension and see it for yourself. The API introduce an object() for the profile when it\u0027s not specified.","commit_id":"0172e8ea731cd7d3de0b01ad0cf21101284e05bf"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"unresolved":false,"context_lines":[{"line_number":73,"context_line":"        binding_profile \u003d port.get(portbindings.PROFILE)"},{"line_number":74,"context_line":"        binding_profile_set \u003d attributes.is_attr_set(binding_profile)"},{"line_number":75,"context_line":"        if not binding_profile_set and binding_profile is not None:"},{"line_number":76,"context_line":"            del port[portbindings.PROFILE]"},{"line_number":77,"context_line":"        host \u003d port_data.get(portbindings.HOST_ID)"},{"line_number":78,"context_line":"        host_set \u003d attributes.is_attr_set(host)"},{"line_number":79,"context_line":"        if not host_set:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2Fejw%3D","line":76,"in_reply_to":"AAAAPn%2F%2Fel4%3D","updated":"2013-07-01 03:26:41.000000000","message":"I do not quite understand why line 73-76 are needed. If u don\u0027t need portbindings.PROFILE, we can do it in the upstream plugin.\nthe extra_binding_dict is to decide what is in result port dict too.","commit_id":"0172e8ea731cd7d3de0b01ad0cf21101284e05bf"}],"quantum/plugins/nicira/QuantumPlugin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7e79b4ce7ef810d7bcaa41c696d355178f436479","unresolved":false,"context_lines":[{"line_number":744,"context_line":"            network[pnet.PHYSICAL_NETWORK] \u003d binding.phy_uuid"},{"line_number":745,"context_line":"            network[pnet.SEGMENTATION_ID] \u003d binding.vlan_id"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    def _extend_port_dict_binding(self, context, port):"},{"line_number":748,"context_line":"        port[pbin.VIF_TYPE] \u003d pbin.VIF_TYPE_OVS"},{"line_number":749,"context_line":"        port[pbin.CAPABILITIES] \u003d {"},{"line_number":750,"context_line":"            pbin.CAP_PORT_FILTER:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F5xc%3D","line":747,"updated":"2013-06-06 12:41:45.000000000","message":"I think that this can now be done in the __init__ please look at the ovs plugin as an example.","commit_id":"4fdfcc56d37d0bb9abbc19b36de432f1923cbcb9"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e5e7734fff2f9fcad1741cfe62dc695dd510f697","unresolved":false,"context_lines":[{"line_number":744,"context_line":"            network[pnet.PHYSICAL_NETWORK] \u003d binding.phy_uuid"},{"line_number":745,"context_line":"            network[pnet.SEGMENTATION_ID] \u003d binding.vlan_id"},{"line_number":746,"context_line":""},{"line_number":747,"context_line":"    def _extend_port_dict_binding(self, context, port):"},{"line_number":748,"context_line":"        port[pbin.VIF_TYPE] \u003d pbin.VIF_TYPE_OVS"},{"line_number":749,"context_line":"        port[pbin.CAPABILITIES] \u003d {"},{"line_number":750,"context_line":"            pbin.CAP_PORT_FILTER:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPX%2F%2F48k%3D","line":747,"in_reply_to":"AAAAPX%2F%2F5xc%3D","updated":"2013-06-06 17:11:41.000000000","message":"Thanks, I\u0027ll look into that.","commit_id":"4fdfcc56d37d0bb9abbc19b36de432f1923cbcb9"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"b86319c8ad685f254e16aa173094e477bf4415ea","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        return net"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    def get_ports(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":1070,"context_line":"        if filters is None:"},{"line_number":1071,"context_line":"            filters \u003d {}"},{"line_number":1072,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1073,"context_line":"            quantum_lports \u003d super(NvpPluginV2, self).get_ports("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgWQ%3D","line":1070,"updated":"2013-06-28 22:09:27.000000000","message":"filters \u003d filters or {}","commit_id":"be8dc7a98ff6c17ea1c8f55690c7e0d27c58013e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c74d1b299f930bad9d350f61e4a63d1428dc5740","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        return net"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    def get_ports(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":1070,"context_line":"        if filters is None:"},{"line_number":1071,"context_line":"            filters \u003d {}"},{"line_number":1072,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1073,"context_line":"            quantum_lports \u003d super(NvpPluginV2, self).get_ports("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2FgVg%3D","line":1070,"in_reply_to":"AAAAPn%2F%2FgWQ%3D","updated":"2013-06-28 22:13:22.000000000","message":"Done","commit_id":"be8dc7a98ff6c17ea1c8f55690c7e0d27c58013e"}]}
