)]}'
{"neutron/plugins/ml2/drivers/agent/_common_agent.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"ff326c69171cbd436287f713dfd74eb866b8e795","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                registry.publish(local_resources.PORT_DEVICE,"},{"line_number":312,"context_line":"                                 events.AFTER_UPDATE, self,"},{"line_number":313,"context_line":"                                 payload\u003devents.DBEventPayload("},{"line_number":314,"context_line":"                                     self.context, states\u003d(device_details,),"},{"line_number":315,"context_line":"                                     resource_id\u003ddevice_details[\u0027port_id\u0027]))"},{"line_number":316,"context_line":"            elif c_const.NO_ACTIVE_BINDING in device_details:"},{"line_number":317,"context_line":"                LOG.info(\"Device %s has no active binding in host\", device)"},{"line_number":318,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfdaf3ff_d920e74c","line":315,"range":{"start_line":314,"start_character":0,"end_line":315,"end_character":76},"updated":"2019-01-10 21:26:05.000000000","message":"The parameter of the payload doesn\u0027t look intuitive. I listed them as below:\n\n1. resource: PORT_DEVICE\n2. resource states: (device_details,)\n3. resource_id: ID of the port\n\nThe first and second suggests this event is about a port device, while the third one uses the ID of the port as the resource ID. This looks inconsistent.","commit_id":"1071c72459b16b5311fde9178c09482630233f1f"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ca7c17fe0052e049c0f7eeea2a1bb5b0b993c0e2","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                registry.publish(local_resources.PORT_DEVICE,"},{"line_number":312,"context_line":"                                 events.AFTER_UPDATE, self,"},{"line_number":313,"context_line":"                                 payload\u003devents.DBEventPayload("},{"line_number":314,"context_line":"                                     self.context, states\u003d(device_details,),"},{"line_number":315,"context_line":"                                     resource_id\u003ddevice_details[\u0027port_id\u0027]))"},{"line_number":316,"context_line":"            elif c_const.NO_ACTIVE_BINDING in device_details:"},{"line_number":317,"context_line":"                LOG.info(\"Device %s has no active binding in host\", device)"},{"line_number":318,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfdaf3ff_68ed2b8a","line":315,"range":{"start_line":314,"start_character":0,"end_line":315,"end_character":76},"in_reply_to":"bfdaf3ff_798e9b2f","updated":"2019-01-14 22:40:48.000000000","message":"Good points.\nIdeally we could pass both the before/after copy of the details as states, but if no one is using them IMHO it\u0027s not worth adding complexity to get/pass them here.\n\n\nI updated to use the device as the resource_id in the latest patch set. Let me know what you think.","commit_id":"1071c72459b16b5311fde9178c09482630233f1f"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c242057b19475f08c63ef1a02694ea0dae4cb087","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                registry.publish(local_resources.PORT_DEVICE,"},{"line_number":312,"context_line":"                                 events.AFTER_UPDATE, self,"},{"line_number":313,"context_line":"                                 payload\u003devents.DBEventPayload("},{"line_number":314,"context_line":"                                     self.context, states\u003d(device_details,),"},{"line_number":315,"context_line":"                                     resource_id\u003ddevice_details[\u0027port_id\u0027]))"},{"line_number":316,"context_line":"            elif c_const.NO_ACTIVE_BINDING in device_details:"},{"line_number":317,"context_line":"                LOG.info(\"Device %s has no active binding in host\", device)"},{"line_number":318,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfdaf3ff_798e9b2f","line":315,"range":{"start_line":314,"start_character":0,"end_line":315,"end_character":76},"in_reply_to":"bfdaf3ff_d920e74c","updated":"2019-01-10 21:29:42.000000000","message":"How about changing the first and second one to port, or using device_details[\u0027device\u0027] as the resource_id in the third one?","commit_id":"1071c72459b16b5311fde9178c09482630233f1f"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"ff326c69171cbd436287f713dfd74eb866b8e795","unresolved":false,"context_lines":[{"line_number":358,"context_line":"                resync \u003d True"},{"line_number":359,"context_line":"            registry.publish(local_resources.PORT_DEVICE, events.AFTER_DELETE,"},{"line_number":360,"context_line":"                             self, payload\u003devents.DBEventPayload("},{"line_number":361,"context_line":"                                 self.context, states\u003d(device,),"},{"line_number":362,"context_line":"                                 resource_id\u003dport_id))"},{"line_number":363,"context_line":"        self.mgr.delete_arp_spoofing_protection(devices)"},{"line_number":364,"context_line":"        return resync"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfdaf3ff_f9460b22","line":361,"range":{"start_line":361,"start_character":55,"end_line":361,"end_character":61},"updated":"2019-01-10 21:26:05.000000000","message":"It seems this is basically the name of the device. It looks a bit odd to me to treat it as the \"state\" of the resource. In addition, this is not consistent with line #314 in which \"device_details\" is used as the state.","commit_id":"1071c72459b16b5311fde9178c09482630233f1f"}]}
