)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"23bc8787f59f70fbe83d00983d4d43574c7a465e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Register OVN metadata as an agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch register the OVN metadata as an agent in Neutron."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Since the OVN Controller / Gateway used the Chassis UUID as its own"},{"line_number":12,"context_line":"agent UUID, the OVN Metadata creates can\u0027t re-use that. Instead, this"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_15a2599b","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":19},"updated":"2018-08-21 13:22:35.000000000","message":"nit : registers","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Register OVN metadata as an agent"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch register the OVN metadata as an agent in Neutron."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Since the OVN Controller / Gateway used the Chassis UUID as its own"},{"line_number":12,"context_line":"agent UUID, the OVN Metadata creates can\u0027t re-use that. Instead, this"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_7587d7b7","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":19},"in_reply_to":"3f79a3b5_15a2599b","updated":"2018-09-17 14:04:09.000000000","message":"Done","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"23bc8787f59f70fbe83d00983d4d43574c7a465e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch register the OVN metadata as an agent in Neutron."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Since the OVN Controller / Gateway used the Chassis UUID as its own"},{"line_number":12,"context_line":"agent UUID, the OVN Metadata creates can\u0027t re-use that. Instead, this"},{"line_number":13,"context_line":"patch generates a random UUID for each Metadata agent and saves it to the"},{"line_number":14,"context_line":"external_ids\u0027 column in the Chassis table. At startup time, the metadata"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_359d1557","line":11,"range":{"start_line":11,"start_character":35,"end_line":11,"end_character":39},"updated":"2018-08-21 13:22:35.000000000","message":"nit: use","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch register the OVN metadata as an agent in Neutron."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Since the OVN Controller / Gateway used the Chassis UUID as its own"},{"line_number":12,"context_line":"agent UUID, the OVN Metadata creates can\u0027t re-use that. Instead, this"},{"line_number":13,"context_line":"patch generates a random UUID for each Metadata agent and saves it to the"},{"line_number":14,"context_line":"external_ids\u0027 column in the Chassis table. At startup time, the metadata"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_9584f3b2","line":11,"range":{"start_line":11,"start_character":35,"end_line":11,"end_character":39},"in_reply_to":"3f79a3b5_359d1557","updated":"2018-09-17 14:04:09.000000000","message":"Done","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"23bc8787f59f70fbe83d00983d4d43574c7a465e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch register the OVN metadata as an agent in Neutron."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Since the OVN Controller / Gateway used the Chassis UUID as its own"},{"line_number":12,"context_line":"agent UUID, the OVN Metadata creates can\u0027t re-use that. Instead, this"},{"line_number":13,"context_line":"patch generates a random UUID for each Metadata agent and saves it to the"},{"line_number":14,"context_line":"external_ids\u0027 column in the Chassis table. At startup time, the metadata"},{"line_number":15,"context_line":"agent will check if the \"neutron:ovn-metadata-id\" key is present in the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_f5a6bdab","line":12,"range":{"start_line":12,"start_character":29,"end_line":12,"end_character":36},"updated":"2018-08-21 13:22:35.000000000","message":"nit: create","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch register the OVN metadata as an agent in Neutron."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Since the OVN Controller / Gateway used the Chassis UUID as its own"},{"line_number":12,"context_line":"agent UUID, the OVN Metadata creates can\u0027t re-use that. Instead, this"},{"line_number":13,"context_line":"patch generates a random UUID for each Metadata agent and saves it to the"},{"line_number":14,"context_line":"external_ids\u0027 column in the Chassis table. At startup time, the metadata"},{"line_number":15,"context_line":"agent will check if the \"neutron:ovn-metadata-id\" key is present in the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_358ddfd3","line":12,"range":{"start_line":12,"start_character":29,"end_line":12,"end_character":36},"in_reply_to":"3f79a3b5_f5a6bdab","updated":"2018-09-17 14:04:09.000000000","message":"Done","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"7eeb945ced623bc079ab4122d41dcc7496f34cf2","unresolved":false,"context_lines":[{"line_number":17,"context_line":"it will generate a random UUID for it."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"In order to know if the OVN metadata agent is alive or not, it will use"},{"line_number":20,"context_line":"the same strategy as the OVN Controller agent by relying on the \"nb_conf\""},{"line_number":21,"context_line":"counter from the Southbound database."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Partial-Bug: #1719574"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f7c97a3_4e9f5cf5","line":20,"range":{"start_line":20,"start_character":65,"end_line":20,"end_character":72},"updated":"2018-08-01 09:22:55.000000000","message":"nb_cfg no?","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"it will generate a random UUID for it."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"In order to know if the OVN metadata agent is alive or not, it will use"},{"line_number":20,"context_line":"the same strategy as the OVN Controller agent by relying on the \"nb_conf\""},{"line_number":21,"context_line":"counter from the Southbound database."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Partial-Bug: #1719574"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f79a3b5_558adbbb","line":20,"range":{"start_line":20,"start_character":65,"end_line":20,"end_character":72},"in_reply_to":"5f7c97a3_4e9f5cf5","updated":"2018-09-17 14:04:09.000000000","message":"Done","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"}],"networking_ovn/agent/metadata/agent.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"b58ec1e6071bb038809611da9116fc5f3ecbf316","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        proxy.wait()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _register_metadata_agent(self):"},{"line_number":176,"context_line":"        # Check if the ovn-metadata-id already exists and re-use it. Or,"},{"line_number":177,"context_line":"        # create a new one"},{"line_number":178,"context_line":"        chassis_row \u003d self.sb_idl.db_find("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_7b6f89f9","line":175,"updated":"2018-07-19 14:58:03.000000000","message":"I *think* instead of doing a db_find and then a set, you can just do a db_add() which, at least according to the docs, is supposed to only set a value in a map if the key doesn\u0027t already exist.","commit_id":"f86e032db32dee804404f651a844c26f740fcc36"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"fea7bc33362724af0b0bc2647c0beda46aa1bb75","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        proxy.wait()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _register_metadata_agent(self):"},{"line_number":176,"context_line":"        # Check if the ovn-metadata-id already exists and re-use it. Or,"},{"line_number":177,"context_line":"        # create a new one"},{"line_number":178,"context_line":"        chassis_row \u003d self.sb_idl.db_find("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_a4e3be9f","line":175,"in_reply_to":"5f7c97a3_3e581f23","updated":"2018-07-19 16:37:40.000000000","message":"Though I keep forgetting that we do lookups by name on the chassis instead of the uuid. DbAddComand does the old row_by_record() instead of lookup() which supports lookup tables outside of open_vswitch schema. I\u0027ll fix that.","commit_id":"f86e032db32dee804404f651a844c26f740fcc36"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d6c2c4d6d32f4c9d93ed6e7e74450e004d10ed4c","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        proxy.wait()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _register_metadata_agent(self):"},{"line_number":176,"context_line":"        # Check if the ovn-metadata-id already exists and re-use it. Or,"},{"line_number":177,"context_line":"        # create a new one"},{"line_number":178,"context_line":"        chassis_row \u003d self.sb_idl.db_find("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_3e581f23","line":175,"in_reply_to":"5f7c97a3_7b6f89f9","updated":"2018-07-19 15:03:12.000000000","message":"Sounds good and simpler! I will try it would","commit_id":"f86e032db32dee804404f651a844c26f740fcc36"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"409142a469144093b96537dfb37c1b2c3ab1bd94","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        proxy.wait()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def _register_metadata_agent(self):"},{"line_number":176,"context_line":"        # Check if the ovn-metadata-id already exists and re-use it. Or,"},{"line_number":177,"context_line":"        # create a new one"},{"line_number":178,"context_line":"        chassis_row \u003d self.sb_idl.db_find("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_463e5cb9","line":175,"in_reply_to":"5f7c97a3_a4e3be9f","updated":"2018-07-20 08:50:54.000000000","message":"Oh right, yeah cause \"self.chassis\" in this case is actually the name of the chassis.\n\nI tried the db_add()as [0] but it didn\u0027t work. So I guess I it\u0027s best to wait for your fix ? Cause otherwise I will need a db_find to get the UUID of the Chassis anyway.\n\nAlso, this code runs only once when the metadata agent starts, so it\u0027s not critical to optimize. I will leave a TODO to replace it with db_add(). \n\n[0] ERROR neutron RowNotFound: Cannot find Chassis with uuid\u003dd8bc7bd4-a665-49d8-bc1a-513d8b5305c5","commit_id":"f86e032db32dee804404f651a844c26f740fcc36"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"334fa354a03f5b9a1fc7748ff944a56148111300","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def _register_metadata_agent(self):"},{"line_number":173,"context_line":"        # Check if the OVN_AGENT_METADATA_ID_KEY already exists and"},{"line_number":174,"context_line":"        # re-use it. Or, create a new one"},{"line_number":175,"context_line":"        chassis_row \u003d self.sb_idl.db_find("},{"line_number":176,"context_line":"            \u0027Chassis\u0027, (\u0027name\u0027, \u0027\u003d\u0027, self.chassis)).execute("},{"line_number":177,"context_line":"            check_error\u003dTrue)[0]"},{"line_number":178,"context_line":"        agent_id \u003d chassis_row.get(\u0027external_ids\u0027, {}).get("}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_d67c60ec","line":175,"updated":"2018-09-07 16:23:54.000000000","message":"Pretty sure his all can just be a db_add() now, even in stable/rocky ovsdbapp\u0027s db_add will do a lookup() which will support looking up by uuid or lookup_table (e.g. name). db_add will only update the field if it doesn\u0027t already exist.\n\nso just a \n  self.sb_idl.db_add(\u0027Chassis\u0027, self.chassis, \u0027external_ids\u0027, str(uuidutils.generate_uuid())).execute(check_error\u003dTrue)\n\nI think would be both this whole function and sb_idl.register_metadata_agent.","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def _register_metadata_agent(self):"},{"line_number":173,"context_line":"        # Check if the OVN_AGENT_METADATA_ID_KEY already exists and"},{"line_number":174,"context_line":"        # re-use it. Or, create a new one"},{"line_number":175,"context_line":"        chassis_row \u003d self.sb_idl.db_find("},{"line_number":176,"context_line":"            \u0027Chassis\u0027, (\u0027name\u0027, \u0027\u003d\u0027, self.chassis)).execute("},{"line_number":177,"context_line":"            check_error\u003dTrue)[0]"},{"line_number":178,"context_line":"        agent_id \u003d chassis_row.get(\u0027external_ids\u0027, {}).get("}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_9572b3e2","line":175,"in_reply_to":"3f79a3b5_9c5a22f0","updated":"2018-09-17 14:04:09.000000000","message":"Awesome! Thanks a lot for that terry, I will take a look at it","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"07c8c6886cc07ba213277095bdfcdc3a6d96df7e","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def _register_metadata_agent(self):"},{"line_number":173,"context_line":"        # Check if the OVN_AGENT_METADATA_ID_KEY already exists and"},{"line_number":174,"context_line":"        # re-use it. Or, create a new one"},{"line_number":175,"context_line":"        chassis_row \u003d self.sb_idl.db_find("},{"line_number":176,"context_line":"            \u0027Chassis\u0027, (\u0027name\u0027, \u0027\u003d\u0027, self.chassis)).execute("},{"line_number":177,"context_line":"            check_error\u003dTrue)[0]"},{"line_number":178,"context_line":"        agent_id \u003d chassis_row.get(\u0027external_ids\u0027, {}).get("}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_9c5a22f0","line":175,"in_reply_to":"3f79a3b5_d67c60ec","updated":"2018-09-13 05:38:12.000000000","message":"Thanks for the learning. So we can just use db_add instead of a db_find ...","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"7eeb945ced623bc079ab4122d41dcc7496f34cf2","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            check_error\u003dTrue)[0]"},{"line_number":178,"context_line":"        agent_id \u003d chassis_row.get(\u0027external_ids\u0027, {}).get("},{"line_number":179,"context_line":"            ovn_const.OVN_AGENT_METADATA_ID_KEY)"},{"line_number":180,"context_line":"        if agent_id is None:"},{"line_number":181,"context_line":"            agent_id \u003d uuidutils.generate_uuid()"},{"line_number":182,"context_line":"            self.sb_idl.register_metadata_agent("},{"line_number":183,"context_line":"                self.chassis, agent_id).execute(check_error\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_0e95e4e2","line":180,"range":{"start_line":180,"start_character":8,"end_line":180,"end_character":28},"updated":"2018-08-01 09:22:55.000000000","message":"nit: if not agent_id: \n:)))","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            check_error\u003dTrue)[0]"},{"line_number":178,"context_line":"        agent_id \u003d chassis_row.get(\u0027external_ids\u0027, {}).get("},{"line_number":179,"context_line":"            ovn_const.OVN_AGENT_METADATA_ID_KEY)"},{"line_number":180,"context_line":"        if agent_id is None:"},{"line_number":181,"context_line":"            agent_id \u003d uuidutils.generate_uuid()"},{"line_number":182,"context_line":"            self.sb_idl.register_metadata_agent("},{"line_number":183,"context_line":"                self.chassis, agent_id).execute(check_error\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_b5400f61","line":180,"range":{"start_line":180,"start_character":8,"end_line":180,"end_character":28},"in_reply_to":"5f7c97a3_0e95e4e2","updated":"2018-09-17 14:04:09.000000000","message":"++","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"}],"networking_ovn/ml2/mech_driver.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"334fa354a03f5b9a1fc7748ff944a56148111300","unresolved":false,"context_lines":[{"line_number":819,"context_line":"                            \" networking-ovn-metadata-agent status/logs.\","},{"line_number":820,"context_line":"                            port_id)"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def _format_agent_info(self, chassis, binary, agent_id, type_,"},{"line_number":823,"context_line":"                           description, alive):"},{"line_number":824,"context_line":"        return {"},{"line_number":825,"context_line":"            \u0027binary\u0027: binary,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_8a2002b2","line":822,"updated":"2018-09-07 16:23:54.000000000","message":"my patch (https://review.openstack.org/585027) is probably going to break this a little. nothing too bad.","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":819,"context_line":"                            \" networking-ovn-metadata-agent status/logs.\","},{"line_number":820,"context_line":"                            port_id)"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    def _format_agent_info(self, chassis, binary, agent_id, type_,"},{"line_number":823,"context_line":"                           description, alive):"},{"line_number":824,"context_line":"        return {"},{"line_number":825,"context_line":"            \u0027binary\u0027: binary,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_b5356ff8","line":822,"in_reply_to":"3f79a3b5_8a2002b2","updated":"2018-09-17 14:04:09.000000000","message":"I will rebase on it","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"7eeb945ced623bc079ab4122d41dcc7496f34cf2","unresolved":false,"context_lines":[{"line_number":899,"context_line":"    filters \u003d filters or {}"},{"line_number":900,"context_line":"    agent_list \u003d []"},{"line_number":901,"context_line":"    for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":902,"context_line":"        for a in _driver.agents_from_chassis(c).values():"},{"line_number":903,"context_line":"            if all(a[k] in v for k, v in filters.items()):"},{"line_number":904,"context_line":"                agent_list.append(a)"},{"line_number":905,"context_line":"    return agent_list"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_0ebe4463","line":904,"range":{"start_line":902,"start_character":0,"end_line":904,"end_character":36},"updated":"2018-08-01 09:22:55.000000000","message":"Miguel will cry after seeing this :p  (not really from this patch though :p)","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"07c8c6886cc07ba213277095bdfcdc3a6d96df7e","unresolved":false,"context_lines":[{"line_number":899,"context_line":"    filters \u003d filters or {}"},{"line_number":900,"context_line":"    agent_list \u003d []"},{"line_number":901,"context_line":"    for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":902,"context_line":"        for a in _driver.agents_from_chassis(c).values():"},{"line_number":903,"context_line":"            if all(a[k] in v for k, v in filters.items()):"},{"line_number":904,"context_line":"                agent_list.append(a)"},{"line_number":905,"context_line":"    return agent_list"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_fc6a367f","line":904,"range":{"start_line":902,"start_character":0,"end_line":904,"end_character":36},"in_reply_to":"3f79a3b5_1013c002","updated":"2018-09-13 05:38:12.000000000","message":"That was what I was wondering :)","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"334fa354a03f5b9a1fc7748ff944a56148111300","unresolved":false,"context_lines":[{"line_number":899,"context_line":"    filters \u003d filters or {}"},{"line_number":900,"context_line":"    agent_list \u003d []"},{"line_number":901,"context_line":"    for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":902,"context_line":"        for a in _driver.agents_from_chassis(c).values():"},{"line_number":903,"context_line":"            if all(a[k] in v for k, v in filters.items()):"},{"line_number":904,"context_line":"                agent_list.append(a)"},{"line_number":905,"context_line":"    return agent_list"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_1013c002","line":904,"range":{"start_line":902,"start_character":0,"end_line":904,"end_character":36},"in_reply_to":"3f79a3b5_c4aaf117","updated":"2018-09-07 16:23:54.000000000","message":"Reedip: mostly because i figured a \u003d agent_from_chassis/agents.append(a) made it clear enough that it was an agent and it was just two lines of code. But there is definitely room on the line for it to just be \u0027agent\u0027. :)","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"23bc8787f59f70fbe83d00983d4d43574c7a465e","unresolved":false,"context_lines":[{"line_number":899,"context_line":"    filters \u003d filters or {}"},{"line_number":900,"context_line":"    agent_list \u003d []"},{"line_number":901,"context_line":"    for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":902,"context_line":"        for a in _driver.agents_from_chassis(c).values():"},{"line_number":903,"context_line":"            if all(a[k] in v for k, v in filters.items()):"},{"line_number":904,"context_line":"                agent_list.append(a)"},{"line_number":905,"context_line":"    return agent_list"},{"line_number":906,"context_line":""},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_c4aaf117","line":904,"range":{"start_line":902,"start_character":0,"end_line":904,"end_character":36},"in_reply_to":"5f7c97a3_0ebe4463","updated":"2018-08-21 13:22:35.000000000","message":"Why \"a\" ?","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"334fa354a03f5b9a1fc7748ff944a56148111300","unresolved":false,"context_lines":[{"line_number":908,"context_line":"def get_agent(self, context, id, fields\u003dNone, _driver\u003dNone):"},{"line_number":909,"context_line":"    chassis \u003d None"},{"line_number":910,"context_line":"    try:"},{"line_number":911,"context_line":"        chassis \u003d _driver._sb_ovn.tables[\u0027Chassis\u0027].rows[uuid.UUID(id)]"},{"line_number":912,"context_line":"    except KeyError:"},{"line_number":913,"context_line":"        # If the UUID is not found, check for the metadata agent ID"},{"line_number":914,"context_line":"        for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_d092284b","line":911,"updated":"2018-09-07 16:23:54.000000000","message":"I probably should have used lookup() here originally instead of directly accessing rows(). My fault, not yours. :p","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"23bc8787f59f70fbe83d00983d4d43574c7a465e","unresolved":false,"context_lines":[{"line_number":911,"context_line":"        chassis \u003d _driver._sb_ovn.tables[\u0027Chassis\u0027].rows[uuid.UUID(id)]"},{"line_number":912,"context_line":"    except KeyError:"},{"line_number":913,"context_line":"        # If the UUID is not found, check for the metadata agent ID"},{"line_number":914,"context_line":"        for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":915,"context_line":"            metadata_agent_id \u003d c.external_ids.get("},{"line_number":916,"context_line":"                ovn_const.OVN_AGENT_METADATA_ID_KEY)"},{"line_number":917,"context_line":"            if id \u003d\u003d metadata_agent_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_446ca107","line":914,"range":{"start_line":914,"start_character":12,"end_line":914,"end_character":13},"updated":"2018-08-21 13:22:35.000000000","message":"Why \"c\" ?\nCant we write something else? :)","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"07c8c6886cc07ba213277095bdfcdc3a6d96df7e","unresolved":false,"context_lines":[{"line_number":911,"context_line":"        chassis \u003d _driver._sb_ovn.tables[\u0027Chassis\u0027].rows[uuid.UUID(id)]"},{"line_number":912,"context_line":"    except KeyError:"},{"line_number":913,"context_line":"        # If the UUID is not found, check for the metadata agent ID"},{"line_number":914,"context_line":"        for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":915,"context_line":"            metadata_agent_id \u003d c.external_ids.get("},{"line_number":916,"context_line":"                ovn_const.OVN_AGENT_METADATA_ID_KEY)"},{"line_number":917,"context_line":"            if id \u003d\u003d metadata_agent_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_bc027eb9","line":914,"range":{"start_line":914,"start_character":12,"end_line":914,"end_character":13},"in_reply_to":"3f79a3b5_369834be","updated":"2018-09-13 05:38:12.000000000","message":"Today is Thursday :)","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"334fa354a03f5b9a1fc7748ff944a56148111300","unresolved":false,"context_lines":[{"line_number":911,"context_line":"        chassis \u003d _driver._sb_ovn.tables[\u0027Chassis\u0027].rows[uuid.UUID(id)]"},{"line_number":912,"context_line":"    except KeyError:"},{"line_number":913,"context_line":"        # If the UUID is not found, check for the metadata agent ID"},{"line_number":914,"context_line":"        for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values():"},{"line_number":915,"context_line":"            metadata_agent_id \u003d c.external_ids.get("},{"line_number":916,"context_line":"                ovn_const.OVN_AGENT_METADATA_ID_KEY)"},{"line_number":917,"context_line":"            if id \u003d\u003d metadata_agent_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_369834be","line":914,"range":{"start_line":914,"start_character":12,"end_line":914,"end_character":13},"in_reply_to":"3f79a3b5_446ca107","updated":"2018-09-07 16:23:54.000000000","message":"Since it is Friday, I enter my one-line code-golf attempt:\n\n chassis \u003d next((c for c in _driver._sb_ovn.tables[\u0027Chassis\u0027].rows.values() if c.external_ids.get(ovn_const.OVN_AGENT_METADATA_KEY) \u003d\u003d id), None) or six.raise_from(e, None)\n\n;-P","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"334fa354a03f5b9a1fc7748ff944a56148111300","unresolved":false,"context_lines":[{"line_number":933,"context_line":"    if not agent.get(\u0027admin_state_up\u0027, True):"},{"line_number":934,"context_line":"        pass"},{"line_number":935,"context_line":"    elif \u0027description\u0027 in agent:"},{"line_number":936,"context_line":"        _driver._sb_ovn.set_chassis_neutron_description("},{"line_number":937,"context_line":"            chassis_name, agent[\u0027description\u0027],"},{"line_number":938,"context_line":"            agent_type).execute(check_error\u003dTrue)"},{"line_number":939,"context_line":"        return agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_f6fe3cad","line":936,"updated":"2018-09-07 16:23:54.000000000","message":"nit: It might be premature generalization, but we could consider just passing in the agent dict and doing a set_chassis_agent_info(chassis_uuid, agent) just in case there was something other than description that we could update in the future and save passing individual fields. No strong feelings, we can certainly do that later too.","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bfcbed050c15e0a78dd619b332ac8c7d11b4468d","unresolved":false,"context_lines":[{"line_number":933,"context_line":"    if not agent.get(\u0027admin_state_up\u0027, True):"},{"line_number":934,"context_line":"        pass"},{"line_number":935,"context_line":"    elif \u0027description\u0027 in agent:"},{"line_number":936,"context_line":"        _driver._sb_ovn.set_chassis_neutron_description("},{"line_number":937,"context_line":"            chassis_name, agent[\u0027description\u0027],"},{"line_number":938,"context_line":"            agent_type).execute(check_error\u003dTrue)"},{"line_number":939,"context_line":"        return agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_900e4130","line":936,"in_reply_to":"3f79a3b5_f6fe3cad","updated":"2018-09-17 14:04:09.000000000","message":"Indeed that would be a good thing instead of using specialized methods for each field","commit_id":"75b27fbfbb6dc57e9736bef02166d36045cfd420"}]}
