)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"07038d4b6c87da890cf0edc6f69ceb2805ffa997","unresolved":false,"context_lines":[{"line_number":21,"context_line":"configure the Chassis. The follow syntax has been used:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"$ ovs-vsctl set Open_VSwitch ."},{"line_number":24,"context_line":"external-ids:ovn-cms-options\u003d\"enable-chassis-as-gw,availability-zones\u003daz0:az1\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In the example above, the Chassis has been configure to belong to two"},{"line_number":27,"context_line":"AZs: \"az0\" and \"az1\"."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ff570b3c_a909bbdd","line":24,"range":{"start_line":24,"start_character":51,"end_line":24,"end_character":77},"updated":"2020-06-04 08:02:17.000000000","message":"Is that something core-ovn related?\nIf not, maybe we could clarify this with setting `neutron-availbility-zones` key?","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"6c223eec886454ac47035c82923060dc675147fe","unresolved":false,"context_lines":[{"line_number":21,"context_line":"configure the Chassis. The follow syntax has been used:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"$ ovs-vsctl set Open_VSwitch ."},{"line_number":24,"context_line":"external-ids:ovn-cms-options\u003d\"enable-chassis-as-gw,availability-zones\u003daz0:az1\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In the example above, the Chassis has been configure to belong to two"},{"line_number":27,"context_line":"AZs: \"az0\" and \"az1\"."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ff570b3c_c793334e","line":24,"range":{"start_line":24,"start_character":51,"end_line":24,"end_character":77},"in_reply_to":"ff570b3c_27caef9f","updated":"2020-06-04 12:28:11.000000000","message":"Hmmm, in those terms that makes sense. Lets leave it as it is. Thanks for explanation.","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"220cc80d557e33895f236715aed4d3bbcc4f4c18","unresolved":false,"context_lines":[{"line_number":21,"context_line":"configure the Chassis. The follow syntax has been used:"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"$ ovs-vsctl set Open_VSwitch ."},{"line_number":24,"context_line":"external-ids:ovn-cms-options\u003d\"enable-chassis-as-gw,availability-zones\u003daz0:az1\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In the example above, the Chassis has been configure to belong to two"},{"line_number":27,"context_line":"AZs: \"az0\" and \"az1\"."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ff570b3c_27caef9f","line":24,"range":{"start_line":24,"start_character":51,"end_line":24,"end_character":77},"in_reply_to":"ff570b3c_a909bbdd","updated":"2020-06-04 12:19:09.000000000","message":"Thanks for pointing it out.\n\nI thought about it. This option lives in the \"ovn-cms-options\" which already says that it\u0027s configuration for the CMS (same for enable-chassis-as-gw, it\u0027s not used by core OVN).\n\n\"\nexternal_ids:ovn-cms-options\n     A list of options that will be consumed by the CMS\n     Plugin and which specific to this particular chassis.\n     An example would be: cms_option1,cms_option2:foo.\n\"\n\nhttps://www.man7.org/linux/man-pages/man8/ovn-controller.8.html\n\nI think adding neutron- is redundant here, what u think ?","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Since the OVN driver does not rely on the L3 agent, this patch does not"},{"line_number":17,"context_line":"re-use the configuration option for the agent to configure the"},{"line_number":18,"context_line":"availability zone that a Chassis belongs to (even because there\u0027s no"},{"line_number":19,"context_line":"configuration file in nodes such as networker nodes). Instead this"},{"line_number":20,"context_line":"patch reuses the \"ovn-cms-options\" field from the local OVSDB to"},{"line_number":21,"context_line":"configure the Chassis. The follow syntax has been used:"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bf51134e_3ab6cf8b","line":19,"range":{"start_line":19,"start_character":61,"end_line":19,"end_character":62},"updated":"2020-06-22 18:59:27.000000000","message":"nit: Instead\",\"   (add a comma)","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Since the OVN driver does not rely on the L3 agent, this patch does not"},{"line_number":17,"context_line":"re-use the configuration option for the agent to configure the"},{"line_number":18,"context_line":"availability zone that a Chassis belongs to (even because there\u0027s no"},{"line_number":19,"context_line":"configuration file in nodes such as networker nodes). Instead this"},{"line_number":20,"context_line":"patch reuses the \"ovn-cms-options\" field from the local OVSDB to"},{"line_number":21,"context_line":"configure the Chassis. The follow syntax has been used:"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bf51134e_e63dd58f","line":19,"range":{"start_line":19,"start_character":61,"end_line":19,"end_character":62},"in_reply_to":"bf51134e_3ab6cf8b","updated":"2020-06-23 09:02:37.000000000","message":"++","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":23,"context_line":"$ ovs-vsctl set Open_VSwitch ."},{"line_number":24,"context_line":"external-ids:ovn-cms-options\u003d\"enable-chassis-as-gw,availability-zones\u003daz0:az1\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In the example above, the Chassis has been configure to belong to two"},{"line_number":27,"context_line":"AZs: \"az0\" and \"az1\"."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"This patch also implements listing the availability zones:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bf51134e_faf1f76c","line":26,"updated":"2020-06-22 18:59:27.000000000","message":"nit: has been \"configured\" (add a \u0027d\u0027)","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":23,"context_line":"$ ovs-vsctl set Open_VSwitch ."},{"line_number":24,"context_line":"external-ids:ovn-cms-options\u003d\"enable-chassis-as-gw,availability-zones\u003daz0:az1\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In the example above, the Chassis has been configure to belong to two"},{"line_number":27,"context_line":"AZs: \"az0\" and \"az1\"."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"This patch also implements listing the availability zones:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bf51134e_864cd942","line":26,"in_reply_to":"bf51134e_faf1f76c","updated":"2020-06-23 09:02:37.000000000","message":"++","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/common/ovn/constants.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"07038d4b6c87da890cf0edc6f69ceb2805ffa997","unresolved":false,"context_lines":[{"line_number":292,"context_line":"NEUTRON_AVAILABILITY_ZONES \u003d \u0027neutron-availability-zones\u0027"},{"line_number":293,"context_line":"OVN_CMS_OPTIONS \u003d \u0027ovn-cms-options\u0027"},{"line_number":294,"context_line":"CMS_OPT_CHASSIS_AS_GW \u003d \u0027enable-chassis-as-gw\u0027"},{"line_number":295,"context_line":"CMS_OPT_AVAILABILITY_ZONES \u003d \u0027availability-zones\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff570b3c_a9325ba5","line":295,"range":{"start_line":295,"start_character":30,"end_line":295,"end_character":48},"updated":"2020-06-04 08:02:17.000000000","message":"As this is neutron-only configuration and doesn\u0027t reflect Core-OVN functionality, can we set it as `neutron-availability-zones`?","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"6c223eec886454ac47035c82923060dc675147fe","unresolved":false,"context_lines":[{"line_number":292,"context_line":"NEUTRON_AVAILABILITY_ZONES \u003d \u0027neutron-availability-zones\u0027"},{"line_number":293,"context_line":"OVN_CMS_OPTIONS \u003d \u0027ovn-cms-options\u0027"},{"line_number":294,"context_line":"CMS_OPT_CHASSIS_AS_GW \u003d \u0027enable-chassis-as-gw\u0027"},{"line_number":295,"context_line":"CMS_OPT_AVAILABILITY_ZONES \u003d \u0027availability-zones\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff570b3c_079a4b60","line":295,"range":{"start_line":295,"start_character":30,"end_line":295,"end_character":48},"in_reply_to":"ff570b3c_07424b0f","updated":"2020-06-04 12:28:11.000000000","message":"++ ok","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"220cc80d557e33895f236715aed4d3bbcc4f4c18","unresolved":false,"context_lines":[{"line_number":292,"context_line":"NEUTRON_AVAILABILITY_ZONES \u003d \u0027neutron-availability-zones\u0027"},{"line_number":293,"context_line":"OVN_CMS_OPTIONS \u003d \u0027ovn-cms-options\u0027"},{"line_number":294,"context_line":"CMS_OPT_CHASSIS_AS_GW \u003d \u0027enable-chassis-as-gw\u0027"},{"line_number":295,"context_line":"CMS_OPT_AVAILABILITY_ZONES \u003d \u0027availability-zones\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff570b3c_07424b0f","line":295,"range":{"start_line":295,"start_character":30,"end_line":295,"end_character":48},"in_reply_to":"ff570b3c_a9325ba5","updated":"2020-06-04 12:19:09.000000000","message":"ditto, these are CMS options. Same for the \"enable-chassis-as-gw\" it is also not used by core OVN.","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"}],"neutron/common/ovn/extensions.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b0d5a69c8d19436a4fbed3dca314b6b5d56138ee","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \u0027sorting\u0027,"},{"line_number":32,"context_line":"    \u0027project-id\u0027,"},{"line_number":33,"context_line":"    \u0027dns-integration\u0027,"},{"line_number":34,"context_line":"    agent_def.ALIAS,"},{"line_number":35,"context_line":"    az_def.ALIAS,"},{"line_number":36,"context_line":"    raz_def.ALIAS,"},{"line_number":37,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_a053ba15","line":34,"updated":"2020-06-02 10:33:19.000000000","message":"Why do we need the agent extension?","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"31f5cf9582b02dbe6667970eb458206fb31866a5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \u0027sorting\u0027,"},{"line_number":32,"context_line":"    \u0027project-id\u0027,"},{"line_number":33,"context_line":"    \u0027dns-integration\u0027,"},{"line_number":34,"context_line":"    agent_def.ALIAS,"},{"line_number":35,"context_line":"    az_def.ALIAS,"},{"line_number":36,"context_line":"    raz_def.ALIAS,"},{"line_number":37,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_9b242b62","line":34,"in_reply_to":"ff570b3c_9b0b8bd3","updated":"2020-06-02 11:19:38.000000000","message":"Sorry, so the router availability zones, requires the availability zone extension which requires the agent extension [0]\n\n[0] https://github.com/openstack/neutron-lib/blob/e1b0ae910b9aaf97576da9f17c5fded6e7872eff/neutron_lib/api/definitions/availability_zone.py#L47\n\nThat\u0027s why I need to enable it in order to get it loaded.","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cea9cab779adce22704c52b232618a38c6b1f312","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \u0027sorting\u0027,"},{"line_number":32,"context_line":"    \u0027project-id\u0027,"},{"line_number":33,"context_line":"    \u0027dns-integration\u0027,"},{"line_number":34,"context_line":"    agent_def.ALIAS,"},{"line_number":35,"context_line":"    az_def.ALIAS,"},{"line_number":36,"context_line":"    raz_def.ALIAS,"},{"line_number":37,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_9b0b8bd3","line":34,"in_reply_to":"ff570b3c_a053ba15","updated":"2020-06-02 11:17:53.000000000","message":"Yeah, cause the router availability zone depends on it [0]. If I don\u0027t enable it the router az does not load.\n\n[0] https://github.com/openstack/neutron-lib/blob/e1b0ae910b9aaf97576da9f17c5fded6e7872eff/neutron_lib/api/definitions/router_availability_zone.py#L42","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b0d5a69c8d19436a4fbed3dca314b6b5d56138ee","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \u0027dns-integration\u0027,"},{"line_number":34,"context_line":"    agent_def.ALIAS,"},{"line_number":35,"context_line":"    az_def.ALIAS,"},{"line_number":36,"context_line":"    raz_def.ALIAS,"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":"ML2_SUPPORTED_API_EXTENSIONS \u003d ["},{"line_number":39,"context_line":"    \u0027address-scope\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_604d2271","line":36,"updated":"2020-06-02 10:33:19.000000000","message":"+1 for using the n-lib definition constants","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"}],"neutron/common/ovn/utils.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b0d5a69c8d19436a4fbed3dca314b6b5d56138ee","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"def get_ovn_cms_options(chassis):"},{"line_number":496,"context_line":"    \"\"\"Return the list of CMS options in a Chassis.\"\"\""},{"line_number":497,"context_line":"    return [opt.strip() for opt in chassis.external_ids.get("},{"line_number":498,"context_line":"            constants.OVN_CMS_OPTIONS, \u0027\u0027).split(\u0027,\u0027)]"},{"line_number":499,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_80a6760e","line":496,"updated":"2020-06-02 10:33:19.000000000","message":"nit (not for this patch): to use this method in [1]\n\n[1]http://codesearch.openstack.org/?q\u003dget%5C(%27ovn-cms-options%27\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8d8d9d58b89845f8c75b093c58419549b9dcc8f7","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"def get_ovn_cms_options(chassis):"},{"line_number":496,"context_line":"    \"\"\"Return the list of CMS options in a Chassis.\"\"\""},{"line_number":497,"context_line":"    return [opt.strip() for opt in chassis.external_ids.get("},{"line_number":498,"context_line":"            constants.OVN_CMS_OPTIONS, \u0027\u0027).split(\u0027,\u0027)]"},{"line_number":499,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_2305f1c2","line":496,"in_reply_to":"ff570b3c_80a6760e","updated":"2020-06-02 13:37:12.000000000","message":"++","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":524,"context_line":""},{"line_number":525,"context_line":"def get_az_hints(resource):"},{"line_number":526,"context_line":"    \"\"\"Return the availability zone hints from a given resource.\"\"\""},{"line_number":527,"context_line":"    return (resource.get(az_def.AZ_HINTS) or CONF.default_availability_zones)"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def get_chassis_availability_zones(chassis):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_9417ea45","line":527,"updated":"2020-06-22 18:57:54.000000000","message":"nit:\n\n resource.get(az_def.AZ_HINTS, CONF.default_availability_zones)\n\nIf I\u0027m reading the patch correctly, is it ultimately this call that required the create_lrouter_port() router_id-\u003erouter change and then having to do some get_router() calls in other functions? I have no idea whether it would be better to have a router-specific get_az_hints() and do the lookup only here or not--you\u0027d know far better than I do. Just noticed that there were some cascading changes due to the API change.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":524,"context_line":""},{"line_number":525,"context_line":"def get_az_hints(resource):"},{"line_number":526,"context_line":"    \"\"\"Return the availability zone hints from a given resource.\"\"\""},{"line_number":527,"context_line":"    return (resource.get(az_def.AZ_HINTS) or CONF.default_availability_zones)"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def get_chassis_availability_zones(chassis):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_c6aa516f","line":527,"in_reply_to":"bf51134e_9417ea45","updated":"2020-06-23 09:02:37.000000000","message":"Thanks for pointing it out, this was something that I considered at first but then I realized that I didn\u0027t need to change the \"public\" APIs for this and could avoid another select in the neutron db.\n\nFor example the create_router_port() method [0] still receives the router_id, I just moved the get_router() to be called earlier in that method. \n\nWhat changed was the _create_lrouter_port() that receives the router object instead of the ID, it was suppose to be private but it\u0027s being called on the db sync script. Also, with your suggestion to reuse the router object from a list in the db sync script I think we are good. Avoiding another select in the db is always positive I think.\n\nAnd this method can remain generic enough and could be re-used when we implement network availability zones for example.\n\n[0] https://review.opendev.org/#/c/727791/10/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py@1392","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if not opt.startswith(constants.CMS_OPT_AVAILABILITY_ZONES):"},{"line_number":538,"context_line":"            continue"},{"line_number":539,"context_line":"        try:"},{"line_number":540,"context_line":"            values \u003d opt.split(\u0027\u003d\u0027)[1]"},{"line_number":541,"context_line":"        except IndexError:"},{"line_number":542,"context_line":"            LOG.error("},{"line_number":543,"context_line":"                \u0027Malformed %(cms)s \"%(az)s\" found on Chassis %(ch)s. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_43811ec3","line":540,"updated":"2020-06-22 18:57:54.000000000","message":"stupid nit: theoretically we could have availability-zones-ate-my-baby\u003d :p though not sure it is worth doing a gobal availability-zone regex and matching here.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if not opt.startswith(constants.CMS_OPT_AVAILABILITY_ZONES):"},{"line_number":538,"context_line":"            continue"},{"line_number":539,"context_line":"        try:"},{"line_number":540,"context_line":"            values \u003d opt.split(\u0027\u003d\u0027)[1]"},{"line_number":541,"context_line":"        except IndexError:"},{"line_number":542,"context_line":"            LOG.error("},{"line_number":543,"context_line":"                \u0027Malformed %(cms)s \"%(az)s\" found on Chassis %(ch)s. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_ab028809","line":540,"in_reply_to":"bf51134e_43811ec3","updated":"2020-06-23 09:02:37.000000000","message":"lol yeah, I can come up with a regex here so I don\u0027t need to this split()\u0027s strip()\u0027s and what not.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"418fd1780d3f445f8de299ea7846e10bd158a153","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        if not opt.startswith(constants.CMS_OPT_AVAILABILITY_ZONES):"},{"line_number":538,"context_line":"            continue"},{"line_number":539,"context_line":"        try:"},{"line_number":540,"context_line":"            values \u003d opt.split(\u0027\u003d\u0027)[1]"},{"line_number":541,"context_line":"        except IndexError:"},{"line_number":542,"context_line":"            LOG.error("},{"line_number":543,"context_line":"                \u0027Malformed %(cms)s \"%(az)s\" found on Chassis %(ch)s. \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_8d59958f","line":540,"in_reply_to":"bf51134e_ab028809","updated":"2020-06-23 12:29:42.000000000","message":"Actually I just need to get rid of that startswith on L537 and compare if the opt is equal the constant instead of startswith()","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3e98370ff81b5a2c3e919a6d114b4aca1d5bc737","unresolved":false,"context_lines":[{"line_number":524,"context_line":""},{"line_number":525,"context_line":"def get_az_hints(resource):"},{"line_number":526,"context_line":"    \"\"\"Return the availability zone hints from a given resource.\"\"\""},{"line_number":527,"context_line":"    return (resource.get(az_def.AZ_HINTS) or CONF.default_availability_zones)"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def get_chassis_availability_zones(chassis):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf51134e_f698c7c0","line":527,"updated":"2020-06-24 13:32:44.000000000","message":"nit (not for this patch, for a follow-up one): this is already implemented in AZLeastRoutersScheduler.\n\nI think we can implement this method in \"l3_agent_scheduler\" as a standalone method to be used both in AZLeastRoutersScheduler and OVN code.","commit_id":"d669dff1dcf0fbc2dc7ea0d2e0c88f244a1add4b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c4da4940a8da82368207321cb5a7340bc121337d","unresolved":false,"context_lines":[{"line_number":524,"context_line":""},{"line_number":525,"context_line":"def get_az_hints(resource):"},{"line_number":526,"context_line":"    \"\"\"Return the availability zone hints from a given resource.\"\"\""},{"line_number":527,"context_line":"    return (resource.get(az_def.AZ_HINTS) or CONF.default_availability_zones)"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"def get_chassis_availability_zones(chassis):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf51134e_5666d3c2","line":527,"in_reply_to":"bf51134e_f698c7c0","updated":"2020-06-24 13:39:37.000000000","message":"Thanks for pointing it out, I can work on a separated patch to do it ++","commit_id":"d669dff1dcf0fbc2dc7ea0d2e0c88f244a1add4b"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"ecd1f160e774c7c6bf464d538f70b0cca6623a7c","unresolved":false,"context_lines":[{"line_number":1157,"context_line":"                az \u003d azs.get(azone, {})"},{"line_number":1158,"context_line":"                # NOTE(lucasagomes): Return \"available\" if at least one"},{"line_number":1159,"context_line":"                # Chassis is alive"},{"line_number":1160,"context_line":"                state \u003d (\u0027available\u0027 if az.get(\u0027state\u0027, agent[\u0027alive\u0027]) else"},{"line_number":1161,"context_line":"                         \u0027unavailable\u0027)"},{"line_number":1162,"context_line":"                azs[azone] \u003d {\u0027name\u0027: azone, \u0027resource\u0027: \u0027router\u0027,"},{"line_number":1163,"context_line":"                              \u0027state\u0027: state, \u0027tenant_id\u0027: context.tenant_id}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_dcb12846","line":1160,"range":{"start_line":1160,"start_character":56,"end_line":1160,"end_character":70},"updated":"2020-05-21 16:24:18.000000000","message":"This is good, we\u0027re not scheduling gateway ports right now based on the agent status though.\n\nPerhaps a follow up but either we skip it here and then craft a patch to take the agent liveness into account when scheduling or then we go ahead with this and follow-up later for normal scheduling (no AZ aware). Same would go for external ports I believe.","commit_id":"e2842147b7404d97802152ea2719ba9e4b59bd20"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b0d5a69c8d19436a4fbed3dca314b6b5d56138ee","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        # Override availability zone methods"},{"line_number":267,"context_line":"        self.patch_plugin_merge(\"get_availability_zones\","},{"line_number":268,"context_line":"                                get_availability_zones)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        # Now IDL connections can be safely used."},{"line_number":271,"context_line":"        self._post_fork_event.set()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_20c20a35","line":268,"updated":"2020-06-02 10:33:19.000000000","message":"question: this is a L3 plugin extension, that means this functionality will be/should be provided by \"OVNL3RouterPlugin\". Shouldn\u0027t \"OVNL3RouterPlugin\" inherit \"AvailabilityZonePluginBase\" and implement both \"get_availability_zones\" and \"validate_availability_zones\"?","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"22ee483e5ce2e52e7760a8f108ceb6ba83b25350","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        # Override availability zone methods"},{"line_number":267,"context_line":"        self.patch_plugin_merge(\"get_availability_zones\","},{"line_number":268,"context_line":"                                get_availability_zones)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        # Now IDL connections can be safely used."},{"line_number":271,"context_line":"        self._post_fork_event.set()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_3bd7df4d","line":268,"in_reply_to":"ff570b3c_20c20a35","updated":"2020-06-02 11:16:21.000000000","message":"That\u0027s a very valid point!\n\nI implement this feature here because on the previous patch-set I was reusing the information from the OVN \"agents\" to list these availability zones, I later changed it cause the agent API in OVN still problematic. As you pointed out, since this patch is about the router availability zone it seems like a layer violation doing it in the mech driver. I will experiment with moving the code to the L3 plugin. Thanks","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e5b5a32c97d5fbbde7bf7fdb74bdedb8ec3143a9","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        # Override availability zone methods"},{"line_number":267,"context_line":"        self.patch_plugin_merge(\"get_availability_zones\","},{"line_number":268,"context_line":"                                get_availability_zones)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        # Now IDL connections can be safely used."},{"line_number":271,"context_line":"        self._post_fork_event.set()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_6356c9d0","line":268,"in_reply_to":"ff570b3c_3bd7df4d","updated":"2020-06-02 13:36:44.000000000","message":"Ok apparently just inheriting from \"AvailabilityZonePluginBase\" in OVNL3RotuerPlugin is not enough. I\u0027ve tested inheriting it and moving the methods there but no dice, I suspect it\u0027s because all the agent related stuff is being done here in the mech driver in the OVN case and that\u0027s where the API requests [0] are coming thru.\n\nI also think in the future we may want to have the AZs related to agents for OVN as well, e.g do not schedule a router port on chassis that are not online (the \"alive\" attribute of the agent). That\u0027s how I originally coded it and the reason why the method is here in the first place but, I removed it recently because the agent API in OVN is not very reliable and we are having a few problems with it.\n\nI will submit a new patch-set fixing the problems you pointed out in this review and leave a comment about the get_availability_zones() method here.\n\n[0] openstack availability zone list","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b0d5a69c8d19436a4fbed3dca314b6b5d56138ee","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"            for azone in azones:"},{"line_number":1171,"context_line":"                azs[azone] \u003d {\u0027name\u0027: azone, \u0027resource\u0027: \u0027router\u0027,"},{"line_number":1172,"context_line":"                              \u0027state\u0027: \u0027available\u0027,"},{"line_number":1173,"context_line":"                              \u0027tenant_id\u0027: context.tenant_id}"},{"line_number":1174,"context_line":"        return azs"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_e0949246","line":1173,"range":{"start_line":1173,"start_character":30,"end_line":1173,"end_character":60},"updated":"2020-06-02 10:33:19.000000000","message":"Please, use \"project_id\", we need to remove any mention to \"tenant_id\"","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"22ee483e5ce2e52e7760a8f108ceb6ba83b25350","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"            for azone in azones:"},{"line_number":1171,"context_line":"                azs[azone] \u003d {\u0027name\u0027: azone, \u0027resource\u0027: \u0027router\u0027,"},{"line_number":1172,"context_line":"                              \u0027state\u0027: \u0027available\u0027,"},{"line_number":1173,"context_line":"                              \u0027tenant_id\u0027: context.tenant_id}"},{"line_number":1174,"context_line":"        return azs"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ff570b3c_bbc2cf83","line":1173,"range":{"start_line":1173,"start_character":30,"end_line":1173,"end_character":60},"in_reply_to":"ff570b3c_e0949246","updated":"2020-06-02 11:16:21.000000000","message":"++","commit_id":"9995dde0f14ba207fc7b76affcf941d6464a976e"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        self.patch_plugin_choose(\"delete_agent\", delete_agent)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        # Override availability zone methods"},{"line_number":274,"context_line":"        self.patch_plugin_merge(\"get_availability_zones\","},{"line_number":275,"context_line":"                                get_availability_zones)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        # Now IDL connections can be safely used."}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_03c9e624","line":274,"updated":"2020-06-22 18:57:54.000000000","message":"Oh wow, it was generally useful. :p If we do it enough, maybe we can simulate just being our own non-ml2 plugin. :D","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        self.patch_plugin_choose(\"delete_agent\", delete_agent)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        # Override availability zone methods"},{"line_number":274,"context_line":"        self.patch_plugin_merge(\"get_availability_zones\","},{"line_number":275,"context_line":"                                get_availability_zones)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        # Now IDL connections can be safely used."}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_c61a516d","line":274,"in_reply_to":"bf51134e_03c9e624","updated":"2020-06-23 09:02:37.000000000","message":"++ it was the easiest way I found to setup this hook on the driver :D","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":1188,"context_line":"    def list_availability_zones(self, context, filters\u003dNone):"},{"line_number":1189,"context_line":"        \"\"\"List all availability zones from gateway chassis.\"\"\""},{"line_number":1190,"context_line":"        azs \u003d {}"},{"line_number":1191,"context_line":"        # TODO(lucasagomes): In the future, once the agents API in OVN"},{"line_number":1192,"context_line":"        # gets more stable we should consider getting the information from"},{"line_number":1193,"context_line":"        # the availability zones from the agents API itself. That would"},{"line_number":1194,"context_line":"        # allow us to do things like: Do not schedule router ports on"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_c3fb6e44","line":1191,"updated":"2020-06-22 18:57:54.000000000","message":"It isn\u0027t addressing stability, but I do have something to at least clean up some of the agent code/make it a little more OO. Early stages, but: https://review.opendev.org/#/c/737106/","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":1188,"context_line":"    def list_availability_zones(self, context, filters\u003dNone):"},{"line_number":1189,"context_line":"        \"\"\"List all availability zones from gateway chassis.\"\"\""},{"line_number":1190,"context_line":"        azs \u003d {}"},{"line_number":1191,"context_line":"        # TODO(lucasagomes): In the future, once the agents API in OVN"},{"line_number":1192,"context_line":"        # gets more stable we should consider getting the information from"},{"line_number":1193,"context_line":"        # the availability zones from the agents API itself. That would"},{"line_number":1194,"context_line":"        # allow us to do things like: Do not schedule router ports on"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_e62e7590","line":1191,"in_reply_to":"bf51134e_c3fb6e44","updated":"2020-06-23 09:02:37.000000000","message":"Nice I will take a look!","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            candidates \u003d [ch for ch in candidates"},{"line_number":1296,"context_line":"                          for az in availability_zone_hints"},{"line_number":1297,"context_line":"                          if az in utils.get_chassis_availability_zones("},{"line_number":1298,"context_line":"                              self._sb_idl.lookup(\u0027Chassis\u0027, ch, None))]"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        if not cms_bmaps:"},{"line_number":1301,"context_line":"            LOG.debug(\"No eligible chassis with external connectivity\""}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_347c1e71","line":1298,"range":{"start_line":1298,"start_character":65,"end_line":1298,"end_character":69},"updated":"2020-06-22 18:57:54.000000000","message":"I don\u0027t think defaulting to None will help since get_chassis_availability_zones() should throw an AttributeError trying to do None.external_ids.get(...).","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            candidates \u003d [ch for ch in candidates"},{"line_number":1296,"context_line":"                          for az in availability_zone_hints"},{"line_number":1297,"context_line":"                          if az in utils.get_chassis_availability_zones("},{"line_number":1298,"context_line":"                              self._sb_idl.lookup(\u0027Chassis\u0027, ch, None))]"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        if not cms_bmaps:"},{"line_number":1301,"context_line":"            LOG.debug(\"No eligible chassis with external connectivity\""}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_c648915d","line":1298,"range":{"start_line":1298,"start_character":65,"end_line":1298,"end_character":69},"in_reply_to":"bf51134e_347c1e71","updated":"2020-06-23 09:02:37.000000000","message":"The get_chassis_availability_zones() method will return an empty list if there\u0027s no chassis (None): https://review.opendev.org/#/c/727791/10/neutron/common/ovn/utils.py@534\n\nThat\u0027s why it won\u0027t fail here.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"bf53f6066af3cca262efda5c44bc42831bb4ff54","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"            candidates \u003d [ch for ch in candidates"},{"line_number":1296,"context_line":"                          for az in availability_zone_hints"},{"line_number":1297,"context_line":"                          if az in utils.get_chassis_availability_zones("},{"line_number":1298,"context_line":"                              self._sb_idl.lookup(\u0027Chassis\u0027, ch, None))]"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        if not cms_bmaps:"},{"line_number":1301,"context_line":"            LOG.debug(\"No eligible chassis with external connectivity\""}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_78a15d46","line":1298,"range":{"start_line":1298,"start_character":65,"end_line":1298,"end_character":69},"in_reply_to":"bf51134e_c648915d","updated":"2020-06-23 13:35:09.000000000","message":"lol, somehow I looked at the utils.get_ovn_cms_options() instead of get_chassis_avilability_zones(). :p","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                try:"},{"line_number":478,"context_line":"                    LOG.warning(\"Creating the router port %s in OVN NB DB\","},{"line_number":479,"context_line":"                                rrport[\u0027id\u0027])"},{"line_number":480,"context_line":"                    router \u003d self.l3_plugin.get_router("},{"line_number":481,"context_line":"                        ctx, rrport[\u0027device_id\u0027])"},{"line_number":482,"context_line":"                    self._ovn_client._create_lrouter_port("},{"line_number":483,"context_line":"                        ctx, router, rrport)"},{"line_number":484,"context_line":"                except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_d405e212","line":481,"range":{"start_line":480,"start_character":20,"end_line":481,"end_character":49},"updated":"2020-06-22 18:59:27.000000000","message":"Would it be better/faster to get router obj from \ndb_routers[rrport[\u0027device_id\u0027]] ? If so, we could avoid an extra call to self.l3_plugin.get_router()","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                try:"},{"line_number":478,"context_line":"                    LOG.warning(\"Creating the router port %s in OVN NB DB\","},{"line_number":479,"context_line":"                                rrport[\u0027id\u0027])"},{"line_number":480,"context_line":"                    router \u003d self.l3_plugin.get_router("},{"line_number":481,"context_line":"                        ctx, rrport[\u0027device_id\u0027])"},{"line_number":482,"context_line":"                    self._ovn_client._create_lrouter_port("},{"line_number":483,"context_line":"                        ctx, router, rrport)"},{"line_number":484,"context_line":"                except RuntimeError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_46a3e100","line":481,"range":{"start_line":480,"start_character":20,"end_line":481,"end_character":49},"in_reply_to":"bf51134e_d405e212","updated":"2020-06-23 09:02:37.000000000","message":"oh that\u0027s an excellent point, it definitely would. I will test it. Thanks","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/services/ovn_l3/plugin.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\""},{"line_number":323,"context_line":"        context \u003d n_context.get_admin_context()"},{"line_number":324,"context_line":"        if not self._plugin_driver.list_availability_zones(context):"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        lrp \u003d self._ovn.get_lrouter_port(lrp_name)"},{"line_number":328,"context_line":"        router \u003d self.get_router("}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_f438e6a0","line":325,"updated":"2020-06-22 18:57:54.000000000","message":"Should this be:\n\n return []\n\n?","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        \"\"\""},{"line_number":323,"context_line":"        context \u003d n_context.get_admin_context()"},{"line_number":324,"context_line":"        if not self._plugin_driver.list_availability_zones(context):"},{"line_number":325,"context_line":"            return"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        lrp \u003d self._ovn.get_lrouter_port(lrp_name)"},{"line_number":328,"context_line":"        router \u003d self.get_router("}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_66ad45e8","line":325,"in_reply_to":"bf51134e_f438e6a0","updated":"2020-06-23 09:02:37.000000000","message":"++","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        if not lr:"},{"line_number":450,"context_line":"            return []"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        return list(filter(None, lr.external_ids.get("},{"line_number":453,"context_line":"            ovn_const.OVN_ROUTER_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027)))"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def validate_availability_zones(self, context, resource_type,"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_74233657","line":452,"updated":"2020-06-22 18:57:54.000000000","message":"nit:\nCould be list comprehension:\n\n return [az for az in lr.external_ids.get(...).split(\u0027,\u0027) if az]\n\nthough I\u0027m not sure I agree with the style guide \"use list comprehensions instead of more \"functional\"-style methods\" thing.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        if not lr:"},{"line_number":450,"context_line":"            return []"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        return list(filter(None, lr.external_ids.get("},{"line_number":453,"context_line":"            ovn_const.OVN_ROUTER_AZ_HINTS_EXT_ID_KEY, \u0027\u0027).split(\u0027,\u0027)))"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    def validate_availability_zones(self, context, resource_type,"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_66db857b","line":452,"in_reply_to":"bf51134e_74233657","updated":"2020-06-23 09:02:37.000000000","message":"I can do that, tho I will need to also use strip() get rid of unwanted white spaces (string manipulation--). For example, if someone did \"availability-zones\u003daz1:  :az2 :az3\"\n\nOnly strip() is not enough to get rid of those undesired white spaces.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        if not availability_zones or resource_type !\u003d \u0027router\u0027:"},{"line_number":459,"context_line":"            return"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        azs \u003d [az[\u0027name\u0027] for az in"},{"line_number":462,"context_line":"               self._plugin_driver.list_availability_zones(context).values()]"},{"line_number":463,"context_line":"        diff \u003d set(availability_zones) - set(azs)"},{"line_number":464,"context_line":"        if diff:"},{"line_number":465,"context_line":"            raise az_exc.AvailabilityZoneNotFound("}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_295a0b82","line":462,"range":{"start_line":461,"start_character":8,"end_line":462,"end_character":77},"updated":"2020-06-22 18:59:27.000000000","message":"I think you can use { } instead of [ ] for the comprehension to give you a set. That way you do not need to convert it to a set later on.\n\n\u003e\u003e\u003e a \u003d { x for x in [1,2,3]}\n\u003e\u003e\u003e a\n{1, 2, 3}\n\u003e\u003e\u003e type(a)\n\u003cclass \u0027set\u0027\u003e\n\u003e\u003e\u003e","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"0d2e56de4968d0df0b6948079534d56796727d68","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        if not availability_zones or resource_type !\u003d \u0027router\u0027:"},{"line_number":459,"context_line":"            return"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        azs \u003d [az[\u0027name\u0027] for az in"},{"line_number":462,"context_line":"               self._plugin_driver.list_availability_zones(context).values()]"},{"line_number":463,"context_line":"        diff \u003d set(availability_zones) - set(azs)"},{"line_number":464,"context_line":"        if diff:"},{"line_number":465,"context_line":"            raise az_exc.AvailabilityZoneNotFound("}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_b4ee6eea","line":462,"range":{"start_line":461,"start_character":14,"end_line":462,"end_character":77},"updated":"2020-06-22 18:57:54.000000000","message":"can do set comprehension to avoid creating list and converting to set in next line.","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        if not availability_zones or resource_type !\u003d \u0027router\u0027:"},{"line_number":459,"context_line":"            return"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        azs \u003d [az[\u0027name\u0027] for az in"},{"line_number":462,"context_line":"               self._plugin_driver.list_availability_zones(context).values()]"},{"line_number":463,"context_line":"        diff \u003d set(availability_zones) - set(azs)"},{"line_number":464,"context_line":"        if diff:"},{"line_number":465,"context_line":"            raise az_exc.AvailabilityZoneNotFound("}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_c6e4113f","line":462,"range":{"start_line":461,"start_character":8,"end_line":462,"end_character":77},"in_reply_to":"bf51134e_295a0b82","updated":"2020-06-23 09:02:37.000000000","message":"++ thanks guys!","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/tests/unit/common/ovn/test_utils.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        chassis \u003d fakes.FakeOvsdbRow.create_one_ovsdb_row(attrs\u003d{"},{"line_number":77,"context_line":"            \u0027external_ids\u0027: {"},{"line_number":78,"context_line":"                \u0027ovn-cms-options\u0027:"},{"line_number":79,"context_line":"                \u0027enable-chassis-as-gw,availability-zones\u003daz0:az1 :az2\u0027}})"},{"line_number":80,"context_line":"        self.assertEqual("},{"line_number":81,"context_line":"            [\u0027az0\u0027, \u0027az1\u0027, \u0027az2\u0027],"},{"line_number":82,"context_line":"            utils.get_chassis_availability_zones(chassis))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_d434c295","line":79,"range":{"start_line":79,"start_character":57,"end_line":79,"end_character":70},"updated":"2020-06-22 18:59:27.000000000","message":"I know the code already handles this properly, but how about testing cases when colons have nothing in between? Like:\n::  :","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        chassis \u003d fakes.FakeOvsdbRow.create_one_ovsdb_row(attrs\u003d{"},{"line_number":77,"context_line":"            \u0027external_ids\u0027: {"},{"line_number":78,"context_line":"                \u0027ovn-cms-options\u0027:"},{"line_number":79,"context_line":"                \u0027enable-chassis-as-gw,availability-zones\u003daz0:az1 :az2\u0027}})"},{"line_number":80,"context_line":"        self.assertEqual("},{"line_number":81,"context_line":"            [\u0027az0\u0027, \u0027az1\u0027, \u0027az2\u0027],"},{"line_number":82,"context_line":"            utils.get_chassis_availability_zones(chassis))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_a6e11d2d","line":79,"range":{"start_line":79,"start_character":57,"end_line":79,"end_character":70},"in_reply_to":"bf51134e_d434c295","updated":"2020-06-23 09:02:37.000000000","message":"++ will add","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        # will be deleted from the OVN db"},{"line_number":431,"context_line":"        l3_plugin.get_routers \u003d mock.Mock()"},{"line_number":432,"context_line":"        l3_plugin.get_routers.return_value \u003d self.routers"},{"line_number":433,"context_line":"        l3_plugin.get_router \u003d mock.Mock()"},{"line_number":434,"context_line":"        l3_plugin.get_router.side_effect \u003d self.routers"},{"line_number":435,"context_line":"        l3_plugin._get_sync_interfaces \u003d mock.Mock()"},{"line_number":436,"context_line":"        l3_plugin._get_sync_interfaces.return_value \u003d ("},{"line_number":437,"context_line":"            self.get_sync_router_ports)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_34209e9b","line":434,"range":{"start_line":433,"start_character":8,"end_line":434,"end_character":55},"updated":"2020-06-22 18:59:27.000000000","message":"nit: this may not be needed, depending on what you think of suggestion on ovn_db_sync.py","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        # will be deleted from the OVN db"},{"line_number":431,"context_line":"        l3_plugin.get_routers \u003d mock.Mock()"},{"line_number":432,"context_line":"        l3_plugin.get_routers.return_value \u003d self.routers"},{"line_number":433,"context_line":"        l3_plugin.get_router \u003d mock.Mock()"},{"line_number":434,"context_line":"        l3_plugin.get_router.side_effect \u003d self.routers"},{"line_number":435,"context_line":"        l3_plugin._get_sync_interfaces \u003d mock.Mock()"},{"line_number":436,"context_line":"        l3_plugin._get_sync_interfaces.return_value \u003d ("},{"line_number":437,"context_line":"            self.get_sync_router_ports)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_46cac1a0","line":434,"range":{"start_line":433,"start_character":8,"end_line":434,"end_character":55},"in_reply_to":"bf51134e_34209e9b","updated":"2020-06-23 09:02:37.000000000","message":"++ good point yeah I will try that change on the db script and remove this as well","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"}],"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"07038d4b6c87da890cf0edc6f69ceb2805ffa997","unresolved":false,"context_lines":[{"line_number":62,"context_line":"OVN_PROFILE \u003d ovn_const.OVN_PORT_BINDING_PROFILE"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def create_fake_chassis(az_list, ch_as_gw\u003dTrue):"},{"line_number":66,"context_line":"    cms_opts \u003d \"%s\u003d%s\" % (ovn_const.CMS_OPT_AVAILABILITY_ZONES,"},{"line_number":67,"context_line":"                          \u0027:\u0027.join(az_list))"},{"line_number":68,"context_line":"    if ch_as_gw:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff570b3c_29cc8b87","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":23},"updated":"2020-06-04 08:02:17.000000000","message":"Move it to ./neutron/tests/unit/fake_resources.py","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"220cc80d557e33895f236715aed4d3bbcc4f4c18","unresolved":false,"context_lines":[{"line_number":62,"context_line":"OVN_PROFILE \u003d ovn_const.OVN_PORT_BINDING_PROFILE"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def create_fake_chassis(az_list, ch_as_gw\u003dTrue):"},{"line_number":66,"context_line":"    cms_opts \u003d \"%s\u003d%s\" % (ovn_const.CMS_OPT_AVAILABILITY_ZONES,"},{"line_number":67,"context_line":"                          \u0027:\u0027.join(az_list))"},{"line_number":68,"context_line":"    if ch_as_gw:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff570b3c_67750764","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":23},"in_reply_to":"ff570b3c_29cc8b87","updated":"2020-06-04 12:19:09.000000000","message":"++ will do","commit_id":"b463dd6572db99f10955362cf288a864d90f3467"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"378fe58ac4ec5e36ffce4bba5a59004820dcb733","unresolved":false,"context_lines":[{"line_number":1700,"context_line":"                                       chassis_as_gw\u003dTrue)"},{"line_number":1701,"context_line":"        ch2 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az2\u0027], chassis_as_gw\u003dTrue)"},{"line_number":1702,"context_line":"        ch3 \u003d fakes.FakeChassis.create(az_list\u003d[], chassis_as_gw\u003dTrue)"},{"line_number":1703,"context_line":"        ch4 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az0\u0027], chassis_as_gw\u003dTrue)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":"        # Fake ovsdbapp lookup"},{"line_number":1706,"context_line":"        def fake_lookup(table, chassis_name, default):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_14ae3a97","line":1703,"range":{"start_line":1703,"start_character":74,"end_line":1703,"end_character":75},"updated":"2020-06-22 18:59:27.000000000","message":"would it be good to add ch5 where azs would be usable, except it has chassis_as_gw\u003dFalse so it is skipped as well?","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"80ae86f4789f51e390bf85c7764ae158fb6ccc85","unresolved":false,"context_lines":[{"line_number":1700,"context_line":"                                       chassis_as_gw\u003dTrue)"},{"line_number":1701,"context_line":"        ch2 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az2\u0027], chassis_as_gw\u003dTrue)"},{"line_number":1702,"context_line":"        ch3 \u003d fakes.FakeChassis.create(az_list\u003d[], chassis_as_gw\u003dTrue)"},{"line_number":1703,"context_line":"        ch4 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az0\u0027], chassis_as_gw\u003dTrue)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":"        # Fake ovsdbapp lookup"},{"line_number":1706,"context_line":"        def fake_lookup(table, chassis_name, default):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_a6babd06","line":1703,"range":{"start_line":1703,"start_character":74,"end_line":1703,"end_character":75},"in_reply_to":"bf51134e_14ae3a97","updated":"2020-06-23 09:02:37.000000000","message":"sure ++","commit_id":"2ccbd3eaadba6317ea841daa23938b4fbd1099ef"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"f5846784d93179ca82e0fc6c2cd4423486635741","unresolved":false,"context_lines":[{"line_number":1701,"context_line":"        ch2 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az2\u0027], chassis_as_gw\u003dTrue)"},{"line_number":1702,"context_line":"        ch3 \u003d fakes.FakeChassis.create(az_list\u003d[], chassis_as_gw\u003dTrue)"},{"line_number":1703,"context_line":"        ch4 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az0\u0027], chassis_as_gw\u003dTrue)"},{"line_number":1704,"context_line":"        ch5 \u003d fakes.FakeChassis.create(az_list\u003d[\u0027az2\u0027], chassis_as_gw\u003dFalse)"},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"        # Fake ovsdbapp lookup"},{"line_number":1707,"context_line":"        def fake_lookup(table, chassis_name, default):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf51134e_ff042c1a","line":1704,"updated":"2020-06-23 19:26:53.000000000","message":"pep8: F841 local variable \u0027ch5\u0027 is assigned to but never used","commit_id":"31d24d347dbfd9d17efa0ade05dd2298dab951f9"}]}
