)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"5adaa7583b8888711b5c4571cf299d47c6db67cf","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-03-05 09:24:10 +0000"},{"line_number":4,"context_line":"Commit:     rossella \u003crsblendido@suse.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-05 17:45:30 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add get event to OVSDB monitor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"OVSDB monitor can generate the events that the OVS agent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_b7bb02e4","line":6,"updated":"2015-03-06 04:28:21.000000000","message":"Please take a look at https://review.openstack.org/#/c/158097/ and https://review.openstack.org/#/c/149647/. I think you can simplify the functional test if the monitor starts in a blocking manner, and also you can get an event in a blocking manner so you don\u0027t have to manually write those wait loops.\n\nFinally, I think that the patch should be split into two: Once that enhances the OVSDB monitor and tests it properly, and the next to integrate the enhancement into the OVS agent.","commit_id":"b709cb3961001a2902d2b4f9b01aa57aec7a23fc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"7afecdba83d4f3b49f41874c2e2a37ac97b1dccc","unresolved":false,"context_lines":[{"line_number":3,"context_line":"AuthorDate: 2015-03-05 09:24:10 +0000"},{"line_number":4,"context_line":"Commit:     rossella \u003crsblendido@suse.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-05 17:45:30 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add get event to OVSDB monitor"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"OVSDB monitor can generate the events that the OVS agent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a80dd14_c5c67b48","line":6,"in_reply_to":"9a80dd14_b7bb02e4","updated":"2015-03-16 16:24:44.000000000","message":"Thanks! I modified the test and will split in 2 patches.","commit_id":"b709cb3961001a2902d2b4f9b01aa57aec7a23fc"}],"neutron/agent/linux/ovsdb_monitor.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"503761d000d1d060804787620a990d1d84fd2a57","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OVS_ACTION_INITIAL \u003d \u0027initial\u0027"},{"line_number":27,"context_line":"OVS_ACTION_INSERT \u003d \u0027insert\u0027"},{"line_number":28,"context_line":"OVS_ACTION_DELETE \u003d \u0027delete\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class OvsdbMonitor(async_process.AsyncProcess):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_ceada134","line":28,"updated":"2015-03-17 03:42:40.000000000","message":"i think OVSDB_ prefix is more appropriate","commit_id":"907780d7f53a3587f6f4962633351872032721bc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a20ca739f62c2962dd9361745ab3ec945b840af6","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"OVS_ACTION_INITIAL \u003d \u0027initial\u0027"},{"line_number":27,"context_line":"OVS_ACTION_INSERT \u003d \u0027insert\u0027"},{"line_number":28,"context_line":"OVS_ACTION_DELETE \u003d \u0027delete\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class OvsdbMonitor(async_process.AsyncProcess):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_37c84456","line":28,"in_reply_to":"9a80dd14_ceada134","updated":"2015-03-17 10:22:28.000000000","message":"OK","commit_id":"907780d7f53a3587f6f4962633351872032721bc"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"503761d000d1d060804787620a990d1d84fd2a57","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                # done for DbCommand"},{"line_number":114,"context_line":"                device \u003d {\u0027name\u0027: record[2],"},{"line_number":115,"context_line":"                          \u0027ofport\u0027: record[3],"},{"line_number":116,"context_line":"                          \u0027external_ids\u0027: record[3]}"},{"line_number":117,"context_line":"                if (action \u003d\u003d OVS_ACTION_INITIAL or"},{"line_number":118,"context_line":"                        action \u003d\u003d OVS_ACTION_INSERT):"},{"line_number":119,"context_line":"                    devices_added.append(device)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_4eba9172","line":116,"updated":"2015-03-17 03:42:40.000000000","message":"you mean record[4] ?","commit_id":"907780d7f53a3587f6f4962633351872032721bc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a20ca739f62c2962dd9361745ab3ec945b840af6","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                # done for DbCommand"},{"line_number":114,"context_line":"                device \u003d {\u0027name\u0027: record[2],"},{"line_number":115,"context_line":"                          \u0027ofport\u0027: record[3],"},{"line_number":116,"context_line":"                          \u0027external_ids\u0027: record[3]}"},{"line_number":117,"context_line":"                if (action \u003d\u003d OVS_ACTION_INITIAL or"},{"line_number":118,"context_line":"                        action \u003d\u003d OVS_ACTION_INSERT):"},{"line_number":119,"context_line":"                    devices_added.append(device)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_d7b9a8cc","line":116,"in_reply_to":"9a80dd14_4eba9172","updated":"2015-03-17 10:22:28.000000000","message":"yes, this should be more tested","commit_id":"907780d7f53a3587f6f4962633351872032721bc"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"503761d000d1d060804787620a990d1d84fd2a57","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                        action \u003d\u003d OVS_ACTION_INSERT):"},{"line_number":119,"context_line":"                    devices_added.append(device)"},{"line_number":120,"context_line":"                elif (action \u003d\u003d OVS_ACTION_DELETE):"},{"line_number":121,"context_line":"                    devices_removed.append(device)"},{"line_number":122,"context_line":"        self.new_events[\u0027added\u0027].extend(devices_added)"},{"line_number":123,"context_line":"        self.new_events[\u0027removed\u0027].extend(devices_removed)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_e20fd986","line":121,"updated":"2015-03-17 03:42:40.000000000","message":"you intentionally don\u0027t care about \u0027old\u0027 \u0027new\u0027 actions?","commit_id":"907780d7f53a3587f6f4962633351872032721bc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"a20ca739f62c2962dd9361745ab3ec945b840af6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                        action \u003d\u003d OVS_ACTION_INSERT):"},{"line_number":119,"context_line":"                    devices_added.append(device)"},{"line_number":120,"context_line":"                elif (action \u003d\u003d OVS_ACTION_DELETE):"},{"line_number":121,"context_line":"                    devices_removed.append(device)"},{"line_number":122,"context_line":"        self.new_events[\u0027added\u0027].extend(devices_added)"},{"line_number":123,"context_line":"        self.new_events[\u0027removed\u0027].extend(devices_removed)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_f7978c38","line":121,"in_reply_to":"9a80dd14_e20fd986","updated":"2015-03-17 10:22:28.000000000","message":"what do you mean?","commit_id":"907780d7f53a3587f6f4962633351872032721bc"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9e505a9890a8ec9a6e98ba70b3f03f44d2d4e4da","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return events"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def process_events(self):"},{"line_number":105,"context_line":"        data \u003d list(self.iter_stdout())"},{"line_number":106,"context_line":"        devices_added \u003d []"},{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa963961_b1480a89","line":105,"updated":"2015-03-26 15:15:36.000000000","message":"why do you need to transform it in a list?\n\n for row in self.iter_stdout():\n\nwould have the same behavior?","commit_id":"8dedfc939abe338f8ad8a4c7f349cbfc61f79fdc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9972c27a359643649e31b50311efb3174ab99c0b","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return events"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def process_events(self):"},{"line_number":105,"context_line":"        data \u003d list(self.iter_stdout())"},{"line_number":106,"context_line":"        devices_added \u003d []"},{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_be352747","line":105,"in_reply_to":"fa963961_b1480a89","updated":"2015-04-03 12:58:02.000000000","message":"Done","commit_id":"8dedfc939abe338f8ad8a4c7f349cbfc61f79fdc"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9e505a9890a8ec9a6e98ba70b3f03f44d2d4e4da","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"},{"line_number":109,"context_line":"            json \u003d jsonutils.loads(row).get(\u0027data\u0027)"},{"line_number":110,"context_line":"            for record in json:"},{"line_number":111,"context_line":"                action \u003d record[1]"},{"line_number":112,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":113,"context_line":"                # done for DbCommand"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa963961_51065e21","line":110,"updated":"2015-03-26 15:15:36.000000000","message":"you can use:\n\n  for \u003cunused\u003e, action, name, ofport, external_ids in json:","commit_id":"8dedfc939abe338f8ad8a4c7f349cbfc61f79fdc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9972c27a359643649e31b50311efb3174ab99c0b","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"},{"line_number":109,"context_line":"            json \u003d jsonutils.loads(row).get(\u0027data\u0027)"},{"line_number":110,"context_line":"            for record in json:"},{"line_number":111,"context_line":"                action \u003d record[1]"},{"line_number":112,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":113,"context_line":"                # done for DbCommand"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_9e38233f","line":110,"in_reply_to":"fa963961_51065e21","updated":"2015-04-03 12:58:02.000000000","message":"Done","commit_id":"8dedfc939abe338f8ad8a4c7f349cbfc61f79fdc"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"9e505a9890a8ec9a6e98ba70b3f03f44d2d4e4da","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                if (action \u003d\u003d OVSDB_ACTION_INITIAL or"},{"line_number":118,"context_line":"                        action \u003d\u003d OVSDB_ACTION_INSERT):"},{"line_number":119,"context_line":"                    devices_added.append(device)"},{"line_number":120,"context_line":"                elif (action \u003d\u003d OVSDB_ACTION_DELETE):"},{"line_number":121,"context_line":"                    devices_removed.append(device)"},{"line_number":122,"context_line":"        self.new_events[\u0027added\u0027].extend(devices_added)"},{"line_number":123,"context_line":"        self.new_events[\u0027removed\u0027].extend(devices_removed)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa963961_f13572f7","line":120,"updated":"2015-03-26 15:15:36.000000000","message":"() are not required","commit_id":"8dedfc939abe338f8ad8a4c7f349cbfc61f79fdc"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9972c27a359643649e31b50311efb3174ab99c0b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                if (action \u003d\u003d OVSDB_ACTION_INITIAL or"},{"line_number":118,"context_line":"                        action \u003d\u003d OVSDB_ACTION_INSERT):"},{"line_number":119,"context_line":"                    devices_added.append(device)"},{"line_number":120,"context_line":"                elif (action \u003d\u003d OVSDB_ACTION_DELETE):"},{"line_number":121,"context_line":"                    devices_removed.append(device)"},{"line_number":122,"context_line":"        self.new_events[\u0027added\u0027].extend(devices_added)"},{"line_number":123,"context_line":"        self.new_events[\u0027removed\u0027].extend(devices_removed)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_7e40bfa5","line":120,"in_reply_to":"fa963961_f13572f7","updated":"2015-04-03 12:58:02.000000000","message":"Done","commit_id":"8dedfc939abe338f8ad8a4c7f349cbfc61f79fdc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d66719b2c7ce531ba5e25bebb2eb106c11575924","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def has_updates(self):"},{"line_number":87,"context_line":"        \"\"\"Indicate whether the ovsdb Interface table has been updated."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        If the monitor process is not active an error will be logged since"},{"line_number":90,"context_line":"        it won\u0027t be able to communicate any update. This situation should be"},{"line_number":91,"context_line":"        temporary if respawn_interval is set."},{"line_number":92,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_b1c0c87d","line":89,"updated":"2015-04-07 20:02:51.000000000","message":"I\u0027m a little curious why you decided to remove the old \u0027fail open\u0027 behavior.  If it isn\u0027t necessary, it should at least get a mention in the commit message.","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6de45fdb5c00613ca0cb05c39d2c92a629e48dbc","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def has_updates(self):"},{"line_number":87,"context_line":"        \"\"\"Indicate whether the ovsdb Interface table has been updated."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        If the monitor process is not active an error will be logged since"},{"line_number":90,"context_line":"        it won\u0027t be able to communicate any update. This situation should be"},{"line_number":91,"context_line":"        temporary if respawn_interval is set."},{"line_number":92,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_5308582d","line":89,"in_reply_to":"9aa53dc9_b1c0c87d","updated":"2015-04-14 13:08:01.000000000","message":"The monitor now provides events, if the monitor is not active it can\u0027t provide any event. I could return something to signal that so that the l2 agent can react. I thought since now the ovs monitor will be respawn if it dies, it\u0027s probably an overkill to add complexity to take care of the time where the monitor is dead. What do you think?","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d1ddd47b96d33423c55d50a28a3585e60b378f48","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return events"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def process_events(self):"},{"line_number":105,"context_line":"        data \u003d list(self.iter_stdout())"},{"line_number":106,"context_line":"        devices_added \u003d []"},{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_1691b799","line":105,"updated":"2015-04-07 15:20:00.000000000","message":"you can use directly:\n\n  for row in self.iter_stdout():","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d66719b2c7ce531ba5e25bebb2eb106c11575924","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return events"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def process_events(self):"},{"line_number":105,"context_line":"        data \u003d list(self.iter_stdout())"},{"line_number":106,"context_line":"        devices_added \u003d []"},{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_861eac61","line":105,"in_reply_to":"9aa53dc9_1691b799","updated":"2015-04-07 20:02:51.000000000","message":"+1  I don\u0027t see a need to iterate in to a list here.  Is there a specific reason you did this?","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6de45fdb5c00613ca0cb05c39d2c92a629e48dbc","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        return events"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def process_events(self):"},{"line_number":105,"context_line":"        data \u003d list(self.iter_stdout())"},{"line_number":106,"context_line":"        devices_added \u003d []"},{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_9e5a6729","line":105,"in_reply_to":"9aa53dc9_861eac61","updated":"2015-04-14 13:08:01.000000000","message":"Done","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d66719b2c7ce531ba5e25bebb2eb106c11575924","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"},{"line_number":109,"context_line":"            json \u003d jsonutils.loads(row).get(\u0027data\u0027)"},{"line_number":110,"context_line":"            for _, action, name, ofport, external_ids in json:"},{"line_number":111,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":112,"context_line":"                # done for DbCommand"},{"line_number":113,"context_line":"                device \u003d {\u0027name\u0027: name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_6b737116","line":110,"updated":"2015-04-07 20:02:51.000000000","message":"nit:  Should you use _ as a variable name?  We no longer use _ for translation in this file so you\u0027re not masking the name but maybe there is a better name.","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6de45fdb5c00613ca0cb05c39d2c92a629e48dbc","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        devices_removed \u003d []"},{"line_number":108,"context_line":"        for row in data:"},{"line_number":109,"context_line":"            json \u003d jsonutils.loads(row).get(\u0027data\u0027)"},{"line_number":110,"context_line":"            for _, action, name, ofport, external_ids in json:"},{"line_number":111,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":112,"context_line":"                # done for DbCommand"},{"line_number":113,"context_line":"                device \u003d {\u0027name\u0027: name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_9e85c708","line":110,"in_reply_to":"9aa53dc9_6b737116","updated":"2015-04-14 13:08:01.000000000","message":"Done","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d66719b2c7ce531ba5e25bebb2eb106c11575924","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":114,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":115,"context_line":"                          \u0027external_ids\u0027: external_ids}"},{"line_number":116,"context_line":"                if (action \u003d\u003d OVSDB_ACTION_INITIAL or"},{"line_number":117,"context_line":"                        action \u003d\u003d OVSDB_ACTION_INSERT):"},{"line_number":118,"context_line":"                    devices_added.append(device)"},{"line_number":119,"context_line":"                elif action \u003d\u003d OVSDB_ACTION_DELETE:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa53dc9_abfe1936","line":116,"updated":"2015-04-07 20:02:51.000000000","message":"nit:  if action in (...):\n\nMay not need to wrap the line but it isn\u0027t a big deal.","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"6de45fdb5c00613ca0cb05c39d2c92a629e48dbc","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":114,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":115,"context_line":"                          \u0027external_ids\u0027: external_ids}"},{"line_number":116,"context_line":"                if (action \u003d\u003d OVSDB_ACTION_INITIAL or"},{"line_number":117,"context_line":"                        action \u003d\u003d OVSDB_ACTION_INSERT):"},{"line_number":118,"context_line":"                    devices_added.append(device)"},{"line_number":119,"context_line":"                elif action \u003d\u003d OVSDB_ACTION_DELETE:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_fe74cb9c","line":116,"in_reply_to":"9aa53dc9_abfe1936","updated":"2015-04-14 13:08:01.000000000","message":"I will change it","commit_id":"ddb57909e137f9c883cdb6fc343636e875d14796"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ce4319733d0426cc9d94094b61504c64cc10d906","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            format\u003d\u0027json\u0027,"},{"line_number":74,"context_line":"            respawn_interval\u003drespawn_interval,"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        self.data_received \u003d False"},{"line_number":77,"context_line":"        self.new_events \u003d {\u0027added\u0027: [], \u0027removed\u0027: []}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_61ad0c31","line":76,"updated":"2015-04-22 18:53:14.000000000","message":"It\u0027s hard for me to know, do you expect clients to access new_events directly, without using get_events? If so, why? If not, consider removing self.new_events and just have process_events return a result.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3e7bbe51298c88a813f3b9046f596c1bf99cb740","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            format\u003d\u0027json\u0027,"},{"line_number":74,"context_line":"            respawn_interval\u003drespawn_interval,"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        self.data_received \u003d False"},{"line_number":77,"context_line":"        self.new_events \u003d {\u0027added\u0027: [], \u0027removed\u0027: []}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_765253df","line":76,"in_reply_to":"bab921fb_61ad0c31","updated":"2015-04-23 10:48:58.000000000","message":"I don\u0027t expect clients to access new_events directly but I need a variable to store the events. If you look at has_updates it calls process_events to check if there\u0027s a new event but then it doesn\u0027t return them. I don\u0027t like it much either but I don\u0027t have any better idea to insert a new method and preserve the old methods. If you have any suggestion I am glad to hear them","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"57ce8544f93f70050bdc373acac716eca645ea52","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        This \u0027failing open\u0027 minimizes the risk of falsely indicating"},{"line_number":78,"context_line":"        the absence of updates at the expense of potential false"},{"line_number":79,"context_line":"        positives."},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        return bool(list(self.iter_stdout())) or not self.is_active()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def start(self, block\u003dFalse, timeout\u003d5):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5ad0253b_28fa2fbe","side":"PARENT","line":80,"updated":"2015-04-29 11:47:20.000000000","message":"Looking back at this, why isn\u0027t this enough? Can\u0027t you just check if iter_stdout is not empty?","commit_id":"298e8dc755080d4cd56b4473608054d0c1eeb6cf"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ba697870bb503642f94e2fa59333495be233f829","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        This \u0027failing open\u0027 minimizes the risk of falsely indicating"},{"line_number":78,"context_line":"        the absence of updates at the expense of potential false"},{"line_number":79,"context_line":"        positives."},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        return bool(list(self.iter_stdout())) or not self.is_active()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def start(self, block\u003dFalse, timeout\u003d5):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3acd31a7_98514711","side":"PARENT","line":80,"in_reply_to":"3acd31a7_d230beea","updated":"2015-05-04 13:25:31.000000000","message":"Right, gotcha. I see that has_updates is currently only used by the polling minimizer, and it doesn\u0027t actually need the events, so it\u0027s happy to just throw them away.","commit_id":"298e8dc755080d4cd56b4473608054d0c1eeb6cf"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"00489f6842412f9f80f89613d48bff446c1a5fc2","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        This \u0027failing open\u0027 minimizes the risk of falsely indicating"},{"line_number":78,"context_line":"        the absence of updates at the expense of potential false"},{"line_number":79,"context_line":"        positives."},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        return bool(list(self.iter_stdout())) or not self.is_active()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def start(self, block\u003dFalse, timeout\u003d5):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3acd31a7_d230beea","side":"PARENT","line":80,"in_reply_to":"5ad0253b_28fa2fbe","updated":"2015-05-04 12:01:22.000000000","message":"self.iter_stdout() would be enough to see if there\u0027s an update. The thing is that I need to store the events in self.new_events. If I just call self.iter_stdout() I lose them. That\u0027s why I call process_events()","commit_id":"298e8dc755080d4cd56b4473608054d0c1eeb6cf"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"a4ad533f88f8e6d34da4ba928bac77ff36502efe","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":106,"context_line":"                # done for DbCommand"},{"line_number":107,"context_line":"                if external_ids:"},{"line_number":108,"context_line":"                    external_ids \u003d {x: y for x, y in external_ids[1]}"},{"line_number":109,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":110,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":111,"context_line":"                          \u0027external_ids\u0027: external_ids}"}],"source_content_type":"text/x-python","patch_set":21,"id":"7a016987_33dfef3b","line":108,"updated":"2015-05-28 20:27:04.000000000","message":"For someone (like me) who does not know the structure of the data, this external_ids[1] looks magical. What\u0027s in external_ids[0] and why is it ignored?\n\nOK, I ran it in a debugger and it looks like it is a tag (\u0027map\u0027), but some comments would be helpful. Or is the intention of the TODO comment to both beautify it and make it clear what\u0027s going on? Is there a follow-up bug/patch for this?","commit_id":"1019f74a546882cb2c3c8aa104decf84f9055273"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"35b00651e6604e30fcf015d3c2354fb0259b578c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":106,"context_line":"                # done for DbCommand"},{"line_number":107,"context_line":"                if external_ids:"},{"line_number":108,"context_line":"                    external_ids \u003d {x: y for x, y in external_ids[1]}"},{"line_number":109,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":110,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":111,"context_line":"                          \u0027external_ids\u0027: external_ids}"}],"source_content_type":"text/x-python","patch_set":21,"id":"7a016987_6c090484","line":108,"in_reply_to":"7a016987_33dfef3b","updated":"2015-05-28 21:58:13.000000000","message":"I will clarify it when I respin this patch.","commit_id":"1019f74a546882cb2c3c8aa104decf84f9055273"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"5262d0416f382a4ca9d61af0b70bbe7ee911ceae","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":106,"context_line":"                # done for DbCommand"},{"line_number":107,"context_line":"                if external_ids:"},{"line_number":108,"context_line":"                    external_ids \u003d {x: y for x, y in external_ids[1]}"},{"line_number":109,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":110,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":111,"context_line":"                          \u0027external_ids\u0027: external_ids}"}],"source_content_type":"text/x-python","patch_set":21,"id":"7a016987_a7839555","line":108,"in_reply_to":"7a016987_6c090484","updated":"2015-05-28 22:15:43.000000000","message":"why not reusing:\n\n  neutron.agent.ovsdb.impl_vsctl._val_to_py\n\nwhich transforms ovs json value in python objects?","commit_id":"1019f74a546882cb2c3c8aa104decf84f9055273"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"d93b6e50eabeedd328cc38a4372df3868d29807d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                #TODO(rossella_s) this is ugly, do something similar to what\u0027s"},{"line_number":106,"context_line":"                # done for DbCommand"},{"line_number":107,"context_line":"                if external_ids:"},{"line_number":108,"context_line":"                    external_ids \u003d {x: y for x, y in external_ids[1]}"},{"line_number":109,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":110,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":111,"context_line":"                          \u0027external_ids\u0027: external_ids}"}],"source_content_type":"text/x-python","patch_set":21,"id":"5afe65bd_5db4dacf","line":108,"in_reply_to":"7a016987_a7839555","updated":"2015-06-03 17:18:24.000000000","message":"I will address my TODO then :)","commit_id":"1019f74a546882cb2c3c8aa104decf84f9055273"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71692fb09ff0a988dd01b9b73c55cac27dfd9376","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import eventlet"},{"line_number":16,"context_line":"from oslo_log import log as logging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_serialization import jsonutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.linux import async_process"}],"source_content_type":"text/x-python","patch_set":22,"id":"5afe65bd_549a6864","line":17,"updated":"2015-06-04 00:44:20.000000000","message":"Nit: I think you can group all oslo_* imports together (remove line 17).","commit_id":"655258f106ee07d5e88670608d7e2a564822e85d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f02eaaa2243fcd18940b9cb2fa1d0ad57f47887f","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import eventlet"},{"line_number":16,"context_line":"from oslo_log import log as logging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_serialization import jsonutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.agent.linux import async_process"}],"source_content_type":"text/x-python","patch_set":22,"id":"5afe65bd_eada7be7","line":17,"in_reply_to":"5afe65bd_549a6864","updated":"2015-06-04 15:14:44.000000000","message":"yes","commit_id":"655258f106ee07d5e88670608d7e2a564822e85d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71692fb09ff0a988dd01b9b73c55cac27dfd9376","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            json \u003d jsonutils.loads(row).get(\u0027data\u0027)"},{"line_number":105,"context_line":"            for ovs_id, action, name, ofport, external_ids in json:"},{"line_number":106,"context_line":"                if external_ids:"},{"line_number":107,"context_line":"                    external_ids \u003d impl_vsctl._val_to_py(external_ids)"},{"line_number":108,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":109,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":110,"context_line":"                          \u0027external_ids\u0027: external_ids}"}],"source_content_type":"text/x-python","patch_set":22,"id":"5afe65bd_d44ad8c4","line":107,"updated":"2015-06-04 00:44:20.000000000","message":"Could you follow up with a patch make _val_to_py() non-private, i.e. remove the leading underscore?\n\nBTW, the code is much clearer now that it is using val_to_py(), thanks.","commit_id":"655258f106ee07d5e88670608d7e2a564822e85d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f02eaaa2243fcd18940b9cb2fa1d0ad57f47887f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            json \u003d jsonutils.loads(row).get(\u0027data\u0027)"},{"line_number":105,"context_line":"            for ovs_id, action, name, ofport, external_ids in json:"},{"line_number":106,"context_line":"                if external_ids:"},{"line_number":107,"context_line":"                    external_ids \u003d impl_vsctl._val_to_py(external_ids)"},{"line_number":108,"context_line":"                device \u003d {\u0027name\u0027: name,"},{"line_number":109,"context_line":"                          \u0027ofport\u0027: ofport,"},{"line_number":110,"context_line":"                          \u0027external_ids\u0027: external_ids}"}],"source_content_type":"text/x-python","patch_set":22,"id":"5afe65bd_cae33fa3","line":107,"in_reply_to":"5afe65bd_d44ad8c4","updated":"2015-06-04 15:14:44.000000000","message":"I will do that","commit_id":"655258f106ee07d5e88670608d7e2a564822e85d"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a1afdcc6eb8ee5d841b8574dbb6b4bd397d9e056","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        temporary if respawn_interval is set."},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        if not self.is_active():"},{"line_number":88,"context_line":"            LOG.info(_LI(\"Interface monitor is not active\"))"},{"line_number":89,"context_line":"        else:"},{"line_number":90,"context_line":"            self.process_events()"},{"line_number":91,"context_line":"        return bool(self.new_events[\u0027added\u0027] or self.new_events[\u0027removed\u0027])"}],"source_content_type":"text/x-python","patch_set":24,"id":"3afb71cf_e901aa6b","line":88,"updated":"2015-06-08 05:52:15.000000000","message":"the docstring makes it sound like this is an error condition? should it be logged at the error level?","commit_id":"f5717c81caad50832a6d65631765a9946fa35682"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3285351964640c931c329b695c2808c812a748f5","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        temporary if respawn_interval is set."},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        if not self.is_active():"},{"line_number":88,"context_line":"            LOG.info(_LI(\"Interface monitor is not active\"))"},{"line_number":89,"context_line":"        else:"},{"line_number":90,"context_line":"            self.process_events()"},{"line_number":91,"context_line":"        return bool(self.new_events[\u0027added\u0027] or self.new_events[\u0027removed\u0027])"}],"source_content_type":"text/x-python","patch_set":24,"id":"3afb71cf_65aeef86","line":88,"in_reply_to":"3afb71cf_e901aa6b","updated":"2015-06-08 12:40:08.000000000","message":"Done","commit_id":"f5717c81caad50832a6d65631765a9946fa35682"}],"neutron/agent/linux/polling.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ce4319733d0426cc9d94094b61504c64cc10d906","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        # collect output."},{"line_number":61,"context_line":"        eventlet.sleep()"},{"line_number":62,"context_line":"        return self._monitor.has_updates"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def get_events(self):"},{"line_number":65,"context_line":"        return self._monitor.get_events()"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_8102603d","line":63,"updated":"2015-04-22 18:53:14.000000000","message":"Does this change belong in this patch?","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3e7bbe51298c88a813f3b9046f596c1bf99cb740","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        # collect output."},{"line_number":61,"context_line":"        eventlet.sleep()"},{"line_number":62,"context_line":"        return self._monitor.has_updates"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def get_events(self):"},{"line_number":65,"context_line":"        return self._monitor.get_events()"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_565e2fea","line":63,"in_reply_to":"bab921fb_8102603d","updated":"2015-04-23 10:48:58.000000000","message":"Yes, it\u0027s the new method that allows the ovs agent to query the events","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"}],"neutron/tests/common/net_helpers.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a1afdcc6eb8ee5d841b8574dbb6b4bd397d9e056","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class OVSPortFixture(PortFixture):"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def __init__(self, bridge\u003dNone, namespace\u003dNone, attrs\u003d[]):"},{"line_number":185,"context_line":"        super(OVSPortFixture, self).__init__(bridge, namespace)"},{"line_number":186,"context_line":"        self.attrs \u003d attrs"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3afb71cf_c9f94e82","line":184,"updated":"2015-06-08 05:52:15.000000000","message":"here you are setting a function argument default to a mutable which is then modified on the create_port call down on line 203. This means every OVSPortFixture using the default attrs will be sharing with every other one, which I don\u0027t think is what you want.\n\n\n\u003e\u003e\u003e class MyObject(object):\n...     def __init__(self, attrs\u003d[]):\n...         self.attrs \u003d attrs\n...     def add(self):\n...         self.attrs.append(44)\n...\n\u003e\u003e\u003e f1 \u003d MyObject()\n\u003e\u003e\u003e f1.add()\n\u003e\u003e\u003e f1.attrs\n[44]\n\u003e\u003e\u003e f2 \u003d MyObject()\n\u003e\u003e\u003e f2.attrs\n[44]\n\u003e\u003e\u003e f2.add()\n\u003e\u003e\u003e f1.attrs\n[44, 44]\n\u003e\u003e\u003e f2.attrs\n[44, 44]\n\u003e\u003e\u003e f2.__init__.func_defaults\n([44, 44],)\n\u003e\u003e\u003e f2.attrs is f1.attrs\nTrue\n\u003e\u003e\u003e f3 \u003d MyObject([])\n\u003e\u003e\u003e f1.attrs is f3.attrs\nFalse","commit_id":"f5717c81caad50832a6d65631765a9946fa35682"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3285351964640c931c329b695c2808c812a748f5","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class OVSPortFixture(PortFixture):"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def __init__(self, bridge\u003dNone, namespace\u003dNone, attrs\u003d[]):"},{"line_number":185,"context_line":"        super(OVSPortFixture, self).__init__(bridge, namespace)"},{"line_number":186,"context_line":"        self.attrs \u003d attrs"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3afb71cf_a57867c5","line":184,"in_reply_to":"3afb71cf_c9f94e82","updated":"2015-06-08 12:40:08.000000000","message":"My bad","commit_id":"f5717c81caad50832a6d65631765a9946fa35682"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"87c1b8dbc5420c1065b60d05467136c6e6286c85","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    def __init__(self, bridge\u003dNone, namespace\u003dNone, attrs\u003dNone):"},{"line_number":185,"context_line":"        super(OVSPortFixture, self).__init__(bridge, namespace)"},{"line_number":186,"context_line":"        if attrs is None:"},{"line_number":187,"context_line":"            attrs \u003d []"},{"line_number":188,"context_line":"        self.attrs \u003d attrs"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def _create_bridge_fixture(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa32b979_0f5f1ce6","line":187,"updated":"2015-06-16 07:25:39.000000000","message":"For future reference, this can be shortened up to\n\nattrs \u003d attrs or []","commit_id":"725543684cbe0df0edc4b6924f85e63e1628fa92"}],"neutron/tests/functional/agent/linux/test_ovsdb_monitor.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d5bf771e6ad5e071c44e94afaa942f48ada6496b","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # has_updates after port addition should become True"},{"line_number":113,"context_line":"        self.assertTrue(self.monitor.has_updates)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_get_events(self):"},{"line_number":116,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":117,"context_line":"        self.assertTrue(devices.get(\u0027added\u0027),"},{"line_number":118,"context_line":"                        \u0027Initial call should always be true\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_f23568f7","line":115,"updated":"2015-04-22 20:08:17.000000000","message":"These tests assume that nothing else is using OVSDB at the same time. Since multiple tests are run in parallel, other tests will be creating/removing devices and will break these tests.\n\nUnless we come up with a way to use the OVS sandbox stuff to give each test its own sandbox, I don\u0027t think these tests will work.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3e7bbe51298c88a813f3b9046f596c1bf99cb740","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # has_updates after port addition should become True"},{"line_number":113,"context_line":"        self.assertTrue(self.monitor.has_updates)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_get_events(self):"},{"line_number":116,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":117,"context_line":"        self.assertTrue(devices.get(\u0027added\u0027),"},{"line_number":118,"context_line":"                        \u0027Initial call should always be true\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_36317ba3","line":115,"in_reply_to":"bab921fb_3ff9684e","updated":"2015-04-23 10:48:58.000000000","message":"Thanks Terry, I should have thought about it. I will modify the test to be less strict then.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4560cc5b469b9fe4b682b43fb6f62d3afba9f0f6","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # has_updates after port addition should become True"},{"line_number":113,"context_line":"        self.assertTrue(self.monitor.has_updates)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_get_events(self):"},{"line_number":116,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":117,"context_line":"        self.assertTrue(devices.get(\u0027added\u0027),"},{"line_number":118,"context_line":"                        \u0027Initial call should always be true\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_3ff9684e","line":115,"in_reply_to":"bab921fb_ad39d543","updated":"2015-04-22 20:50:30.000000000","message":"Not to my knowledge. Usually we get around this kind of thing by just generating ports/bridges with unique names and only doing tests related to those names--never asserting on something that relies on global state like total number of devices, etc.\n\nI think as long as we don\u0027t do things like asserting that no device was added/removed, and do things like\n\n assertIn(p.port.name, $deleted_port_names)\n\ninstead of\n\n assertEqual(p.port.name, devices.get(\u0027removed\u0027)[0][\u0027name\u0027])\n\nwe can get by for now.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"87ef372ebe8785230dd005477c5beb82af3e5268","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # has_updates after port addition should become True"},{"line_number":113,"context_line":"        self.assertTrue(self.monitor.has_updates)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_get_events(self):"},{"line_number":116,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":117,"context_line":"        self.assertTrue(devices.get(\u0027added\u0027),"},{"line_number":118,"context_line":"                        \u0027Initial call should always be true\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_ad39d543","line":115,"in_reply_to":"bab921fb_f23568f7","updated":"2015-04-22 20:21:58.000000000","message":"Would there be a clever way to utilize namespaces here? Does OVSDB somehow know what namespace a device is in?","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ce4319733d0426cc9d94094b61504c64cc10d906","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_get_events(self):"},{"line_number":116,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":117,"context_line":"        self.assertTrue(devices.get(\u0027added\u0027),"},{"line_number":118,"context_line":"                        \u0027Initial call should always be true\u0027)"},{"line_number":119,"context_line":"        self.assertFalse(devices.get(\u0027removed\u0027),"},{"line_number":120,"context_line":"                         \u0027Initial call, removed devices should be empty\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_414e88c2","line":117,"updated":"2015-04-22 18:53:14.000000000","message":"I like the message in case the assertion fails, it doubles as an in-line comment... I should start doing this myself.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3e7bbe51298c88a813f3b9046f596c1bf99cb740","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_get_events(self):"},{"line_number":116,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":117,"context_line":"        self.assertTrue(devices.get(\u0027added\u0027),"},{"line_number":118,"context_line":"                        \u0027Initial call should always be true\u0027)"},{"line_number":119,"context_line":"        self.assertFalse(devices.get(\u0027removed\u0027),"},{"line_number":120,"context_line":"                         \u0027Initial call, removed devices should be empty\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_f62ae32b","line":117,"in_reply_to":"bab921fb_414e88c2","updated":"2015-04-23 10:48:58.000000000","message":":)","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ce4319733d0426cc9d94094b61504c64cc10d906","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                         \u0027Initial call, removed devices should be empty\u0027)"},{"line_number":121,"context_line":"        p \u003d self.useFixture(net_helpers.OVSPortFixture())"},{"line_number":122,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":123,"context_line":"        added_devices \u003d [dev[\u0027name\u0027] for dev in devices.get(\u0027added\u0027)]"},{"line_number":124,"context_line":"        self.assertTrue(p.bridge.br_name in added_devices)"},{"line_number":125,"context_line":"        self.assertTrue(p.port.name in added_devices)"},{"line_number":126,"context_line":"        self.assertFalse(devices.get(\u0027removed\u0027), \u0027No device was removed\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_0112d0b4","line":123,"updated":"2015-04-22 18:53:14.000000000","message":"You can use assertIn for this.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3e7bbe51298c88a813f3b9046f596c1bf99cb740","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                         \u0027Initial call, removed devices should be empty\u0027)"},{"line_number":121,"context_line":"        p \u003d self.useFixture(net_helpers.OVSPortFixture())"},{"line_number":122,"context_line":"        devices \u003d self.monitor.get_events()"},{"line_number":123,"context_line":"        added_devices \u003d [dev[\u0027name\u0027] for dev in devices.get(\u0027added\u0027)]"},{"line_number":124,"context_line":"        self.assertTrue(p.bridge.br_name in added_devices)"},{"line_number":125,"context_line":"        self.assertTrue(p.port.name in added_devices)"},{"line_number":126,"context_line":"        self.assertFalse(devices.get(\u0027removed\u0027), \u0027No device was removed\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_5441880a","line":123,"in_reply_to":"bab921fb_0112d0b4","updated":"2015-04-23 10:48:58.000000000","message":"Indeed :)","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0573add0d0c743bf8d9f075ee12b2f8e7945b270","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        event_devices \u003d [dev[\u0027name\u0027] for dev in events.get(state)]"},{"line_number":119,"context_line":"        if not missing_devices:"},{"line_number":120,"context_line":"            for dev in devices:"},{"line_number":121,"context_line":"                missing_devices.append(dev)"},{"line_number":122,"context_line":"        for dev in event_devices:"},{"line_number":123,"context_line":"            try:"},{"line_number":124,"context_line":"                missing_devices.remove(dev)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9abe1de1_40bb1f0f","line":121,"updated":"2015-04-27 11:33:05.000000000","message":"use extend() here, will fix it in next patch","commit_id":"c56d1e6984ad054b4c0869a07328d7eab9ef6b19"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"542172761a8a2463347103d02550b0b8906ed2a3","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        utils.wait_until_true(lambda: self.monitor.data_received is True)"},{"line_number":106,"context_line":"        self.assertTrue(self.monitor.has_updates,"},{"line_number":107,"context_line":"                        \u0027Initial call should always be true\u0027)"},{"line_number":108,"context_line":"        self.assertFalse(self.monitor.has_updates,"},{"line_number":109,"context_line":"                         \u0027has_updates without port addition should be False\u0027)"},{"line_number":110,"context_line":"        self.useFixture(net_helpers.OVSPortFixture())"},{"line_number":111,"context_line":"        # has_updates after port addition should become True"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aca2d91_11e20d04","side":"PARENT","line":108,"updated":"2015-05-06 13:50:39.000000000","message":"I had to remove this assertion because it is failing quite often. Since there\u0027s no isolation, the monitor was receiving events caused by other tests. The previous implementation of has_update didn\u0027t trigger as many failures because:\n\nreturn bool(list(self.iter_stdout())) or not self.is_active\n\nit checks self.iter_stdout() in one point. With this implementation process_events does:\n\nfor row in self.iter_stdout():\n\nso self.iter_stdout() is called for every iteration, it\u0027s more probable that a new event generated by another test is caught here. I verified in the previous PS that modifying it:\n\ndata \u003d self.iter_stdout()\nfor row in data\n\n\nfixes the test but I think the code is correct as it is so I am removing this assertion.","commit_id":"94f3a14f54a154f45a3451dac71a8f8dcbfa329e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71692fb09ff0a988dd01b9b73c55cac27dfd9376","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # has_updates after port addition should become True"},{"line_number":114,"context_line":"        utils.wait_until_true(lambda: self.monitor.has_updates is True)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _expected_devices_events(self, devices, state, missing_devices\u003d[]):"},{"line_number":117,"context_line":"        events \u003d self.monitor.get_events()"},{"line_number":118,"context_line":"        event_devices \u003d ["},{"line_number":119,"context_line":"            (dev[\u0027name\u0027], dev[\u0027external_ids\u0027]) for dev in events.get(state)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"5afe65bd_b454fc20","line":116,"updated":"2015-06-04 00:44:20.000000000","message":"The problem with mutable a default argument is that it is global to the module. That means that no one can use it from another test case.\n\nI would just drain \u0027devices\u0027. The following works for lines 120-128:\n\n        for dev in event_devices:\n            if dev[0] in devices:\n                devices.remove(dev[0])\n                self.assertEqual(dev[1].get(\u0027iface-status\u0027), \u0027active\u0027)\n            if not devices:\n                return True\n\nYou might want to add a docstring to alert callers that items with \u0027state\u0027 are removed from the \u0027devices\u0027 list.","commit_id":"655258f106ee07d5e88670608d7e2a564822e85d"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f02eaaa2243fcd18940b9cb2fa1d0ad57f47887f","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # has_updates after port addition should become True"},{"line_number":114,"context_line":"        utils.wait_until_true(lambda: self.monitor.has_updates is True)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _expected_devices_events(self, devices, state, missing_devices\u003d[]):"},{"line_number":117,"context_line":"        events \u003d self.monitor.get_events()"},{"line_number":118,"context_line":"        event_devices \u003d ["},{"line_number":119,"context_line":"            (dev[\u0027name\u0027], dev[\u0027external_ids\u0027]) for dev in events.get(state)]"}],"source_content_type":"text/x-python","patch_set":22,"id":"5afe65bd_aa4923b9","line":116,"in_reply_to":"5afe65bd_b454fc20","updated":"2015-06-04 15:14:44.000000000","message":"Draining \u0027devices\u0027 is not much cleaner anyway since it simplifies the code a bit, I\u0027ll go for it.","commit_id":"655258f106ee07d5e88670608d7e2a564822e85d"}],"neutron/tests/unit/agent/linux/test_ovsdb_monitor.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ce4319733d0426cc9d94094b61504c64cc10d906","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                return_value\u003doutput):"},{"line_number":95,"context_line":"            self.monitor._read_stdout()"},{"line_number":96,"context_line":"        self.assertFalse(self.monitor.data_received)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_get_event_empties_has_updates(self):"},{"line_number":99,"context_line":"        with mock.patch.object("},{"line_number":100,"context_line":"                self.monitor, \u0027process_events\u0027) as process_events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_211dd4bd","line":97,"updated":"2015-04-22 18:53:14.000000000","message":"What do you mean by \u0027empties\u0027? On another note, do you think that this test still has value with the functional test in place? Additional tests are not free, you\u0027ll have to continue to maintain them.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3e7bbe51298c88a813f3b9046f596c1bf99cb740","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                return_value\u003doutput):"},{"line_number":95,"context_line":"            self.monitor._read_stdout()"},{"line_number":96,"context_line":"        self.assertFalse(self.monitor.data_received)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_get_event_empties_has_updates(self):"},{"line_number":99,"context_line":"        with mock.patch.object("},{"line_number":100,"context_line":"                self.monitor, \u0027process_events\u0027) as process_events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_96c84776","line":97,"in_reply_to":"bab921fb_211dd4bd","updated":"2015-04-23 10:48:58.000000000","message":"\"empties\" I meant that when you call get_event and then has_updates if there\u0027s no new event in the middle, has_updates is false. I can rename the method. I would like to keep this test.","commit_id":"0ff612e68bea36e27bd32af2a6b2fb48ce1cbff0"}]}
