)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e86a11b6c86703a55a7d6ed687aa0cd7dd8ed5ff","unresolved":false,"context_lines":[{"line_number":10,"context_line":"subnetpool. Adoption of a subnet is done by passing the ID"},{"line_number":11,"context_line":"of the hosting network and the address family (ip_version)"},{"line_number":12,"context_line":"which causes all subnets in the specified address family"},{"line_number":13,"context_line":"on the given network to be adopted by the subnet pool. This"},{"line_number":14,"context_line":"continues to work within the constraints on subnet pool"},{"line_number":15,"context_line":"membership of subnets on the same network. This also ensures"},{"line_number":16,"context_line":"prefix uniqueness across an address scope before comitting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_2f19b822","line":13,"updated":"2016-08-05 23:32:37.000000000","message":"and the subnetpool ID too, right?","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3b8cd9faace626d1db7414561421007312835673","unresolved":false,"context_lines":[{"line_number":10,"context_line":"subnetpool. Adoption of a subnet is done by passing the ID"},{"line_number":11,"context_line":"of the hosting network and the address family (ip_version)"},{"line_number":12,"context_line":"which causes all subnets in the specified address family"},{"line_number":13,"context_line":"on the given network to be adopted by the subnet pool. This"},{"line_number":14,"context_line":"continues to work within the constraints on subnet pool"},{"line_number":15,"context_line":"membership of subnets on the same network. This also ensures"},{"line_number":16,"context_line":"prefix uniqueness across an address scope before comitting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_7201d304","line":13,"in_reply_to":"bacf61ea_0fdf94d6","updated":"2016-08-06 00:04:18.000000000","message":"no, when looking at the request you pass the subnetpool id, here you say you mention just the network_info param.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3b8cd9faace626d1db7414561421007312835673","unresolved":false,"context_lines":[{"line_number":10,"context_line":"subnetpool. Adoption of a subnet is done by passing the ID"},{"line_number":11,"context_line":"of the hosting network and the address family (ip_version)"},{"line_number":12,"context_line":"which causes all subnets in the specified address family"},{"line_number":13,"context_line":"on the given network to be adopted by the subnet pool. This"},{"line_number":14,"context_line":"continues to work within the constraints on subnet pool"},{"line_number":15,"context_line":"membership of subnets on the same network. This also ensures"},{"line_number":16,"context_line":"prefix uniqueness across an address scope before comitting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_ef0e8039","line":13,"in_reply_to":"bacf61ea_0fdf94d6","updated":"2016-08-06 00:04:18.000000000","message":"no, when looking at the request you pass the subnetpool id, here you say you mention just the network_info param.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"857dfe86ff5945411287ec799c62859edc2c217a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"subnetpool. Adoption of a subnet is done by passing the ID"},{"line_number":11,"context_line":"of the hosting network and the address family (ip_version)"},{"line_number":12,"context_line":"which causes all subnets in the specified address family"},{"line_number":13,"context_line":"on the given network to be adopted by the subnet pool. This"},{"line_number":14,"context_line":"continues to work within the constraints on subnet pool"},{"line_number":15,"context_line":"membership of subnets on the same network. This also ensures"},{"line_number":16,"context_line":"prefix uniqueness across an address scope before comitting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_0fdf94d6","line":13,"in_reply_to":"bacf61ea_2f19b822","updated":"2016-08-05 23:50:06.000000000","message":"I\u0027m not sure I understand the question. Maybe you\u0027re thinking we can simply make subnetpool_id an updateable attribute on the subnet. Unfortunately it\u0027s more complex than that because all subnets of the same address family on any given network must belong to the same subnetpool. Even if we relaxed that to enforce the same address scope, we still need to onboard those subnets together in one transaction to maintain the guarantees of address scopes.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e86a11b6c86703a55a7d6ed687aa0cd7dd8ed5ff","unresolved":false,"context_lines":[{"line_number":17,"context_line":"adoption of subnets."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I5d3c07beb7f109142d2e3633e69f86ca39edc450"},{"line_number":20,"context_line":"Implements: blueprint subnetpool-adoption"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_8fb544ee","line":20,"updated":"2016-08-05 23:32:37.000000000","message":"If this is the only patch you intend to post to address the server side feature, it needs a release note.\n\nWhat about the CLI binding? Is that in the works? Or do you let users script this against the API?","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"857dfe86ff5945411287ec799c62859edc2c217a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"adoption of subnets."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I5d3c07beb7f109142d2e3633e69f86ca39edc450"},{"line_number":20,"context_line":"Implements: blueprint subnetpool-adoption"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bacf61ea_af58088b","line":20,"in_reply_to":"bacf61ea_8fb544ee","updated":"2016-08-05 23:50:06.000000000","message":"Yes we need a CLI, so this should be partially-implements. This is the only server-side patch we need. I will add the release note before taking off the WIP tag (which I forgot to apply).","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c728447f849941169440ae5a31e3896b3aeb3419","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Depends-On: Ib925028a84a86d0707ed24d5edb62bdf552db1e6"},{"line_number":20,"context_line":"NOTE: The modification in _create_subnetpool is a temp change."},{"line_number":21,"context_line":"We are looking at other method to improvise the test cases."},{"line_number":22,"context_line":"TO-DO: API REF impact"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I5d3c07beb7f109142d2e3633e69f86ca39edc450"},{"line_number":25,"context_line":"Partially-Implements: blueprint subnet-onboard"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"3f4b6375_28ea11d7","line":22,"updated":"2017-10-26 08:45:11.000000000","message":"I think You should use APIImpact","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"055ad19d7f77d8bbbe99bcaca10a458ef93575ca","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Depends-On: Ib925028a84a86d0707ed24d5edb62bdf552db1e6"},{"line_number":20,"context_line":"NOTE: The modification in _create_subnetpool is a temp change."},{"line_number":21,"context_line":"We are looking at other method to improvise the test cases."},{"line_number":22,"context_line":"TO-DO: API REF impact"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: I5d3c07beb7f109142d2e3633e69f86ca39edc450"},{"line_number":25,"context_line":"Partially-Implements: blueprint subnet-onboard"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"3f4b6375_78b7b43b","line":22,"in_reply_to":"3f4b6375_28ea11d7","updated":"2017-10-26 10:27:34.000000000","message":"I think that would be the change in the API REF","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"}],"neutron/conf/policies/subnetpool.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                       base.RULE_ADMIN_OR_OWNER,"},{"line_number":46,"context_line":"                       description\u003d\u0027Access rule for deleting subnetpool\u0027),"},{"line_number":47,"context_line":"    policy.RuleDefault(\u0027onboard_network_subnets\u0027,"},{"line_number":48,"context_line":"                       \u0027rule:admin_or_owner or rule:shared_subnetpools\u0027,"},{"line_number":49,"context_line":"                       description\u003d\u0027Access rule for onboarding subnets\u0027)"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_f16289d8","line":48,"updated":"2019-01-04 10:34:12.000000000","message":"You can use constants and functions from https://github.com/openstack/neutron/blob/master/neutron/conf/policies/base.py here","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"3898e3d3b98936adfe365fa52ad9379d920a0c0d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                       base.RULE_ADMIN_OR_OWNER,"},{"line_number":46,"context_line":"                       description\u003d\u0027Access rule for deleting subnetpool\u0027),"},{"line_number":47,"context_line":"    policy.RuleDefault(\u0027onboard_network_subnets\u0027,"},{"line_number":48,"context_line":"                       \u0027rule:admin_or_owner or rule:shared_subnetpools\u0027,"},{"line_number":49,"context_line":"                       description\u003d\u0027Access rule for onboarding subnets\u0027)"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_17ad4a9a","line":48,"range":{"start_line":48,"start_character":23,"end_line":48,"end_character":71},"updated":"2019-02-12 16:43:12.000000000","message":"Should be:\n\n        base.policy_or(\u0027rule:admin_or_owner\u0027,\n                       \u0027rule:shared_subnetpools\u0027),","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                       base.RULE_ADMIN_OR_OWNER,"},{"line_number":46,"context_line":"                       description\u003d\u0027Access rule for deleting subnetpool\u0027),"},{"line_number":47,"context_line":"    policy.RuleDefault(\u0027onboard_network_subnets\u0027,"},{"line_number":48,"context_line":"                       \u0027rule:admin_or_owner or rule:shared_subnetpools\u0027,"},{"line_number":49,"context_line":"                       description\u003d\u0027Access rule for onboarding subnets\u0027)"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_ba28e3e1","line":48,"range":{"start_line":48,"start_character":23,"end_line":48,"end_character":71},"in_reply_to":"9fdfeff1_17ad4a9a","updated":"2019-02-12 17:34:11.000000000","message":"Done","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e86a11b6c86703a55a7d6ed687aa0cd7dd8ed5ff","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1099,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1100,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1101,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1102,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1103,"context_line":"            if not network_id or not ip_version:"},{"line_number":1104,"context_line":"                raise subnetpool_adoption.InvalidAdoptionRequest()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_6fbc50dc","line":1101,"updated":"2016-08-05 23:32:37.000000000","message":"have you considered doing one subnet at the time rather than the whole network?","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"64edce69da093fc44360ed2e5aa130032822c1ac","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1099,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1100,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1101,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1102,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1103,"context_line":"            if not network_id or not ip_version:"},{"line_number":1104,"context_line":"                raise subnetpool_adoption.InvalidAdoptionRequest()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_af0ac876","line":1101,"in_reply_to":"bacf61ea_6fbc50dc","updated":"2016-08-05 23:43:55.000000000","message":"Yes, and what makes it so complex is that you can\u0027t go one subnet at a time. All subnets on a network in the same address family must belong to the same subnetpool. We are unable to support a transient state where some subnets have been onboarded and other haven\u0027t. It must be a bulk operation that onboards every subnet in the given address family at the same time. If we could go one subnet at a time I would simply make subnetpool_id on the subnet updateable and be done with it. Unforntunately it\u0027s not that simple.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"0256f4015be9cead32c25bcd3ccf097b734e49e9","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1099,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1100,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1101,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1102,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1103,"context_line":"            if not network_id or not ip_version:"},{"line_number":1104,"context_line":"                raise subnetpool_adoption.InvalidAdoptionRequest()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_d2935fa1","line":1101,"in_reply_to":"bacf61ea_729d53bb","updated":"2016-08-06 00:07:43.000000000","message":"How is not atomic? The idea is to update all the relevant subnetpool_id\u0027s inside a single transaction. See the TODO at L1108. I\u0027m looking for a way to synchronize across all affected subnetpools so that this is atomic.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"789681d6f30decece011c444659c403385c176e1","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1099,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1100,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1101,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1102,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1103,"context_line":"            if not network_id or not ip_version:"},{"line_number":1104,"context_line":"                raise subnetpool_adoption.InvalidAdoptionRequest()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_92f447f1","line":1101,"in_reply_to":"bacf61ea_729d53bb","updated":"2016-08-06 00:08:48.000000000","message":"To add more: do you expect only the data to change or is there any backend activity that must occur for the onboarding to complete? For instance you mention about doing address scope updates, what does that entail? What if that fails partially? How are you going to recover?","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"506c56a7c1f146f136a13cdd9cf6e4284bfcd65b","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1099,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1100,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1101,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1102,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1103,"context_line":"            if not network_id or not ip_version:"},{"line_number":1104,"context_line":"                raise subnetpool_adoption.InvalidAdoptionRequest()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_08482ab2","line":1101,"in_reply_to":"bacf61ea_92f447f1","updated":"2016-08-06 03:20:09.000000000","message":"Let me clarify. The IPAM aspects have to be atomic. We can\u0027t allow overlapping prefixes in an address scope. That means we need to lock the subnetpools associated with the address scope by finding a way to update the timestamp or something (see L1108). We also need to do the same thing when moving an address scope into a subnetpool, that way we guarantee CIDR uniqueness across the address scope (not included in this patch yet). As far as enforcing subnetpool or address scope membership on a network, maybe we can relax the constraints on that with some caveats.\n\nAs far as the backend activity is concerned, see:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1050\n\nhttps://github.com/openstack/neutron/blob/6a7ce01dacd4cd75e62e140136b63b6f71067418/neutron/db/l3_db.py#L1680\n\nhttps://github.com/openstack/neutron/blob/6a7ce01dacd4cd75e62e140136b63b6f71067418/neutron/db/l3_db.py#L1841\n\nThis is what we do when a subnetpool moves between address scopes. This is the same process we want to go through when we move subnets into a subnetpool. The result of onboarding can be treated the same way a subnetpool moving between address scopes is treated. This does result in a cast, which means messages directed at the affected agents could get dropped. However, this is an issue that affects address scopes in general and is not behavior introduced by onboarding. Should a message fail to get to an agent, the symptom would be that any workloads serviced by that agent would be at the mercy of the router configuration. This means that the override of the enable_snat property of the router would not kick in. This doesn\u0027t have to be catastrophic, especially if someone is using BGP and they set enable_snat to false. However, it could be icky to troubleshoot. We can always recommend running with enable_snat\u003dFalse on your routers in cases where you really are serious about routing your tenant networks. That way the only concern you have is maintaining data integrity server-side.\n\nIn the case of a subnet create being interleaved with onboarding, that remains an open question. I need to investigate how the L3 agent would react to subnets in different address scopes on the same network. On the server-side, the worst case scenario is that you would need to onboard the network subnets again or remove a subnet. You wouldn\u0027t be able to add any subnets to the network in this state, but I\u0027m not convinced that is a show-stopper. the workaround is to get all your subnets onboarded. Nothing will stop you from running the bulk onboard operation to clear things up. This is something to pay attention to, I imagine there are a number of users laying down multiple subnets on networks, especially on external networks.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"53e5ce77c1cce1cca574202a21c705749a9d5313","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1099,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1100,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1101,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1102,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1103,"context_line":"            if not network_id or not ip_version:"},{"line_number":1104,"context_line":"                raise subnetpool_adoption.InvalidAdoptionRequest()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_729d53bb","line":1101,"in_reply_to":"bacf61ea_af0ac876","updated":"2016-08-06 00:05:14.000000000","message":"but the operation won\u0027t be atomic anyway. I don\u0027t understand.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"06de857198bb35d1995ee5a3562a48e90eec805a","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"                    subnet.update()"},{"line_number":1137,"context_line":""},{"line_number":1138,"context_line":"            return subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1139,"context_line":"                                                        id\u003dsubnetpool_id)"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"},{"line_number":1142,"context_line":"        if (device_owner and"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_1fa3d750","line":1139,"updated":"2016-07-28 15:42:38.000000000","message":"At this point we should generate a registry notification for the address scope update. Not here, but perhaps we can override this method on the ML2 plugin and emit the notification there.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":1099,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":1100,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1101,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1102,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1103,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1104,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1105,"context_line":"            addr_scope_obj \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_10366603","line":1102,"updated":"2016-08-26 04:11:17.000000000","message":"I\u0027ll be honest. I haven\u0027t trained my brain to read OVO code very well yet. It took long enough to train it to read sqlalchemy code and now we have a whole new abstraction on top of it. Yay!","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":1109,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1110,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1111,"context_line":"            if not network_id or not ip_version:"},{"line_number":1112,"context_line":"                raise subnet_onboard.InvalidOnboardRequest()"},{"line_number":1113,"context_line":""},{"line_number":1114,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1115,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_535c7825","line":1112,"updated":"2016-08-26 04:11:17.000000000","message":"This probably should be done with a validator instead of in code.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":1109,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1110,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1111,"context_line":"            if not network_id or not ip_version:"},{"line_number":1112,"context_line":"                raise subnet_onboard.InvalidOnboardRequest()"},{"line_number":1113,"context_line":""},{"line_number":1114,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1115,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_321e4e70","line":1112,"in_reply_to":"fa7ab95a_535c7825","updated":"2016-12-06 20:37:53.000000000","message":"Done","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"},{"line_number":1124,"context_line":"                    prefix_set.add(prefix)"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"            subnets_to_onboard \u003d subnet_obj.Subnet.get_objects("},{"line_number":1127,"context_line":"                                                        context,"},{"line_number":1128,"context_line":"                                                        network_id\u003dnetwork_id,"},{"line_number":1129,"context_line":"                                                        ip_version\u003dip_version)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_5381d849","line":1126,"updated":"2016-08-26 04:11:17.000000000","message":"We should probably run some query to be sure that the network_id is from a valid network. Right now, I think if I specify a bogus network_id this method will successfully do nothing. I\u0027d rather it raised a network not found error.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"52c9bc60ae747e5b024f822614c4671cf9cbf7d1","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"},{"line_number":1124,"context_line":"                    prefix_set.add(prefix)"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"            subnets_to_onboard \u003d subnet_obj.Subnet.get_objects("},{"line_number":1127,"context_line":"                                                        context,"},{"line_number":1128,"context_line":"                                                        network_id\u003dnetwork_id,"},{"line_number":1129,"context_line":"                                                        ip_version\u003dip_version)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_cc035e72","line":1126,"in_reply_to":"fa7ab95a_5381d849","updated":"2016-09-06 21:00:02.000000000","message":"Right, this will just quietly turn into a no-op with no feedback.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"},{"line_number":1124,"context_line":"                    prefix_set.add(prefix)"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"            subnets_to_onboard \u003d subnet_obj.Subnet.get_objects("},{"line_number":1127,"context_line":"                                                        context,"},{"line_number":1128,"context_line":"                                                        network_id\u003dnetwork_id,"},{"line_number":1129,"context_line":"                                                        ip_version\u003dip_version)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_ad3da32c","line":1126,"in_reply_to":"fa7ab95a_cc035e72","updated":"2016-12-06 20:37:53.000000000","message":"Done","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"                                                        ip_version\u003dip_version)"},{"line_number":1130,"context_line":""},{"line_number":1131,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1132,"context_line":"                if subnet[\u0027cidr\u0027] in prefix_set:"},{"line_number":1133,"context_line":"                    if address_scope_id:"},{"line_number":1134,"context_line":"                        args \u003d {\u0027cidr\u0027: subnet[\u0027cidr\u0027],"},{"line_number":1135,"context_line":"                                \u0027address_scope_id\u0027: address_scope_id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_f3cf4cb1","line":1132,"range":{"start_line":1132,"start_character":19,"end_line":1132,"end_character":47},"updated":"2016-08-26 04:11:17.000000000","message":"I don\u0027t think this check is quick right. Doesn\u0027t this check to see if the subnet cidr is wholly contained in the prefix set. But, what if it is partially overlapped. For example, Say we\u0027re trying to onboard 10.0.0.0/24 but 10.0.0.128/25 is already contained in the prefix_set. I think this check would say that its not in and then it would try to bring it in. I\u0027m not exactly sure what would happen then but it won\u0027t be anything good.\n\nI think we need a proper set intersection. And, we need a test that includes something like this.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"                                                        ip_version\u003dip_version)"},{"line_number":1130,"context_line":""},{"line_number":1131,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1132,"context_line":"                if subnet[\u0027cidr\u0027] in prefix_set:"},{"line_number":1133,"context_line":"                    if address_scope_id:"},{"line_number":1134,"context_line":"                        args \u003d {\u0027cidr\u0027: subnet[\u0027cidr\u0027],"},{"line_number":1135,"context_line":"                                \u0027address_scope_id\u0027: address_scope_id}"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_70e0b429","line":1132,"range":{"start_line":1132,"start_character":19,"end_line":1132,"end_character":47},"in_reply_to":"fa7ab95a_f3cf4cb1","updated":"2016-12-06 20:37:53.000000000","message":"Set intersection: Done \n* Note: After changing the test to use the following new values, the tests passed with or without the set intersection change.\n\nTest for 10.0.0.0/24 on boarding 10.0.0.128/25: Done","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"                        msg \u003d _(\u0027%(cidr)s conflicts with prefixes in subnet \u0027"},{"line_number":1142,"context_line":"                                \u0027pool %(subnetpool_id)s\u0027) % args"},{"line_number":1143,"context_line":"                    raise n_exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1144,"context_line":"                else:"},{"line_number":1145,"context_line":"                    pool_prefix \u003d subnetpool_obj.SubnetPoolPrefix("},{"line_number":1146,"context_line":"                                      context\u003dcontext,"},{"line_number":1147,"context_line":"                                      subnetpool_id\u003dsubnetpool_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_73f97cc8","line":1144,"range":{"start_line":1144,"start_character":16,"end_line":1144,"end_character":21},"updated":"2016-08-26 04:11:17.000000000","message":"nit: I\u0027d rather not see this else. Not only is in not necessary but I don\u0027t like seeing the happy path at the same level of indentation as the exceptional path. I\u0027d rather this be unindented 4 spaces.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"                        msg \u003d _(\u0027%(cidr)s conflicts with prefixes in subnet \u0027"},{"line_number":1142,"context_line":"                                \u0027pool %(subnetpool_id)s\u0027) % args"},{"line_number":1143,"context_line":"                    raise n_exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1144,"context_line":"                else:"},{"line_number":1145,"context_line":"                    pool_prefix \u003d subnetpool_obj.SubnetPoolPrefix("},{"line_number":1146,"context_line":"                                      context\u003dcontext,"},{"line_number":1147,"context_line":"                                      subnetpool_id\u003dsubnetpool_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_18d6d327","line":1144,"range":{"start_line":1144,"start_character":16,"end_line":1144,"end_character":21},"in_reply_to":"fa7ab95a_73f97cc8","updated":"2016-12-06 20:37:53.000000000","message":"Done","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8cfd0f29a4ad52d5a849620c74510fe1dc428049","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1210,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1211,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1212,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1213,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1214,"context_line":"            if address_scope_id:"},{"line_number":1215,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_61cdba83","line":1212,"range":{"start_line":1212,"start_character":31,"end_line":1212,"end_character":61},"updated":"2017-07-06 10:50:21.000000000","message":"this is an object so it should be subnetpool.address_scope_id","commit_id":"99c868bfb7006fe0638e2ee6c476c5a06f77f592"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"0209422ef9c3a8c2c67a833e5e770b30b7e800ac","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1210,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1211,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1212,"context_line":"            address_scope_id \u003d subnetpool[\u0027address_scope_id\u0027]"},{"line_number":1213,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1214,"context_line":"            if address_scope_id:"},{"line_number":1215,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("}],"source_content_type":"text/x-python","patch_set":13,"id":"1f1a1f67_e430710a","line":1212,"range":{"start_line":1212,"start_character":31,"end_line":1212,"end_character":61},"in_reply_to":"3f1d235d_61cdba83","updated":"2017-07-12 20:56:24.000000000","message":"Done","commit_id":"99c868bfb7006fe0638e2ee6c476c5a06f77f592"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8cfd0f29a4ad52d5a849620c74510fe1dc428049","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"                                      context,"},{"line_number":1230,"context_line":"                                      address_scope_id\u003daddress_scope_id)"},{"line_number":1231,"context_line":"                for sp in subnetpool_list:"},{"line_number":1232,"context_line":"                    for prefix in sp[\u0027prefixes\u0027]:"},{"line_number":1233,"context_line":"                        prefix_set.add(prefix)"},{"line_number":1234,"context_line":"            else:"},{"line_number":1235,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_21c34259","line":1232,"range":{"start_line":1232,"start_character":34,"end_line":1232,"end_character":48},"updated":"2017-07-06 10:50:21.000000000","message":"ditto","commit_id":"99c868bfb7006fe0638e2ee6c476c5a06f77f592"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"0209422ef9c3a8c2c67a833e5e770b30b7e800ac","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"                                      context,"},{"line_number":1230,"context_line":"                                      address_scope_id\u003daddress_scope_id)"},{"line_number":1231,"context_line":"                for sp in subnetpool_list:"},{"line_number":1232,"context_line":"                    for prefix in sp[\u0027prefixes\u0027]:"},{"line_number":1233,"context_line":"                        prefix_set.add(prefix)"},{"line_number":1234,"context_line":"            else:"},{"line_number":1235,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1f1a1f67_a7083b28","line":1232,"range":{"start_line":1232,"start_character":34,"end_line":1232,"end_character":48},"in_reply_to":"3f1d235d_21c34259","updated":"2017-07-12 20:56:24.000000000","message":"Done","commit_id":"99c868bfb7006fe0638e2ee6c476c5a06f77f592"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8cfd0f29a4ad52d5a849620c74510fe1dc428049","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                    for prefix in sp[\u0027prefixes\u0027]:"},{"line_number":1233,"context_line":"                        prefix_set.add(prefix)"},{"line_number":1234,"context_line":"            else:"},{"line_number":1235,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"},{"line_number":1236,"context_line":"                    prefix_set.add(prefix)"},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"            subnets_to_onboard \u003d subnet_obj.Subnet.get_objects("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_c1a92e90","line":1235,"range":{"start_line":1235,"start_character":30,"end_line":1235,"end_character":52},"updated":"2017-07-06 10:50:21.000000000","message":"ditto","commit_id":"99c868bfb7006fe0638e2ee6c476c5a06f77f592"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"0209422ef9c3a8c2c67a833e5e770b30b7e800ac","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                    for prefix in sp[\u0027prefixes\u0027]:"},{"line_number":1233,"context_line":"                        prefix_set.add(prefix)"},{"line_number":1234,"context_line":"            else:"},{"line_number":1235,"context_line":"                for prefix in subnetpool[\u0027prefixes\u0027]:"},{"line_number":1236,"context_line":"                    prefix_set.add(prefix)"},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"            subnets_to_onboard \u003d subnet_obj.Subnet.get_objects("}],"source_content_type":"text/x-python","patch_set":13,"id":"1f1a1f67_870d3f39","line":1235,"range":{"start_line":1235,"start_character":30,"end_line":1235,"end_character":52},"in_reply_to":"3f1d235d_c1a92e90","updated":"2017-07-12 20:56:24.000000000","message":"Done","commit_id":"99c868bfb7006fe0638e2ee6c476c5a06f77f592"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f4455aed242e5e6cdc64dbc77ed0d0b8653fd0da","unresolved":false,"context_lines":[{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":1203,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1204,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1205,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1206,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1207,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_599b8271","line":1204,"range":{"start_line":1204,"start_character":13,"end_line":1204,"end_character":56},"updated":"2017-07-24 21:01:02.000000000","message":"Shouldn\u0027t we use enginefacade here:\n\ndb_api.context_manager.writer.using(context)\n\nlike in L1131 above?","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"11c4d3b70ac1940a2074b44ce1bdc7e95cf48fba","unresolved":false,"context_lines":[{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":1203,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1204,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1205,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1206,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1207,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":16,"id":"df3967d1_7f859659","line":1204,"range":{"start_line":1204,"start_character":13,"end_line":1204,"end_character":56},"in_reply_to":"ff346bd7_599b8271","updated":"2017-08-03 20:11:05.000000000","message":"Done","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c728447f849941169440ae5a31e3896b3aeb3419","unresolved":false,"context_lines":[{"line_number":1213,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1214,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1215,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1216,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1217,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1218,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1219,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f4b6375_88e905e7","line":1216,"updated":"2017-10-26 08:45:11.000000000","message":"nit: please fix indentation","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"055ad19d7f77d8bbbe99bcaca10a458ef93575ca","unresolved":false,"context_lines":[{"line_number":1213,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1214,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1215,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1216,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1217,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1218,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1219,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f4b6375_78be94ff","line":1216,"in_reply_to":"3f4b6375_88e905e7","updated":"2017-10-26 10:27:34.000000000","message":"Checked on local, works fine :)","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c728447f849941169440ae5a31e3896b3aeb3419","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1219,"context_line":"            if address_scope_id:"},{"line_number":1220,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1221,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1222,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1223,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1224,"context_line":"            if not (validators.is_attr_set(network_id) and"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f4b6375_68e4890d","line":1221,"updated":"2017-10-26 08:45:11.000000000","message":"nit: is this indentation proper for pep8?","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"055ad19d7f77d8bbbe99bcaca10a458ef93575ca","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1219,"context_line":"            if address_scope_id:"},{"line_number":1220,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1221,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1222,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1223,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1224,"context_line":"            if not (validators.is_attr_set(network_id) and"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f4b6375_58b99812","line":1221,"in_reply_to":"3f4b6375_68e4890d","updated":"2017-10-26 10:27:34.000000000","message":"Checked on local, works fine :)","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c728447f849941169440ae5a31e3896b3aeb3419","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1228,"context_line":""},{"line_number":1229,"context_line":"            if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1230,"context_line":"                raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f4b6375_48ef8de8","line":1230,"updated":"2017-10-26 08:45:11.000000000","message":"maybe You could move those checks on top of this method? than if one of them will fail, it will not do unnecesary things like getting SubnetPool object or getting AddressScope object","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"055ad19d7f77d8bbbe99bcaca10a458ef93575ca","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1228,"context_line":""},{"line_number":1229,"context_line":"            if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1230,"context_line":"                raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f4b6375_383a5c98","line":1230,"in_reply_to":"3f4b6375_48ef8de8","updated":"2017-10-26 10:27:34.000000000","message":"Checked on local, works fine :)","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"45c7312f99df9d3747b7e65e57c34ddb404c7728","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1228,"context_line":""},{"line_number":1229,"context_line":"            if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1230,"context_line":"                raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":23,"id":"1f485f77_6f357cf7","line":1230,"in_reply_to":"3f4b6375_48ef8de8","updated":"2017-11-09 15:53:15.000000000","message":"I agree with Slawek here, we should verify the passed in args  before retrieving any other participants for this operation to reduce the number of operation in the event these raises are hit.","commit_id":"85bedb45cd42efb4f97d45ca0f06b1289ee2cfa5"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"57872a214ab3a55b9b549dcc12b119fc83b5d2ef","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"            if address_scope_id:"},{"line_number":1220,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1221,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1222,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1223,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1224,"context_line":"            if not (validators.is_attr_set(network_id) and"},{"line_number":1225,"context_line":"                    validators.is_attr_set(ip_version)):"},{"line_number":1226,"context_line":"                msg \u003d _(\"Both network_id and ip_version must be specified.\")"},{"line_number":1227,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1228,"context_line":""},{"line_number":1229,"context_line":"            if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1230,"context_line":"                raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1f485f77_b8c61316","line":1230,"range":{"start_line":1222,"start_character":0,"end_line":1230,"end_character":60},"updated":"2017-11-10 02:53:57.000000000","message":"not cover Slawek and Trevor\u0027s comment here. It\u0027s better to move the check before forward process. :)","commit_id":"0f568529cacff62bf79595b7e9700bde6fa9788c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"73c13e8084d9e77f8290f421f57bbe1862f56387","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"            if address_scope_id:"},{"line_number":1220,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1221,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1222,"context_line":"            network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1223,"context_line":"            ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1224,"context_line":"            if not (validators.is_attr_set(network_id) and"},{"line_number":1225,"context_line":"                    validators.is_attr_set(ip_version)):"},{"line_number":1226,"context_line":"                msg \u003d _(\"Both network_id and ip_version must be specified.\")"},{"line_number":1227,"context_line":"                raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1228,"context_line":""},{"line_number":1229,"context_line":"            if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1230,"context_line":"                raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff82abbf_cc34b0e1","line":1230,"range":{"start_line":1222,"start_character":0,"end_line":1230,"end_character":60},"in_reply_to":"1f485f77_b8c61316","updated":"2017-11-20 10:18:10.000000000","message":"Done","commit_id":"0f568529cacff62bf79595b7e9700bde6fa9788c"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"57872a214ab3a55b9b549dcc12b119fc83b5d2ef","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"                if addr_scope_obj:"},{"line_number":1272,"context_line":"                    addr_scope_obj.update()"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1275,"context_line":"                                                              id\u003dsubnetpool_id)"},{"line_number":1276,"context_line":"            subnetpool.update()"},{"line_number":1277,"context_line":"            return subnetpool"},{"line_number":1278,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1f485f77_38558351","line":1275,"range":{"start_line":1274,"start_character":0,"end_line":1275,"end_character":79},"updated":"2017-11-10 02:53:57.000000000","message":"This subnetpool already get in L1215.","commit_id":"0f568529cacff62bf79595b7e9700bde6fa9788c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"73c13e8084d9e77f8290f421f57bbe1862f56387","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"                if addr_scope_obj:"},{"line_number":1272,"context_line":"                    addr_scope_obj.update()"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1275,"context_line":"                                                              id\u003dsubnetpool_id)"},{"line_number":1276,"context_line":"            subnetpool.update()"},{"line_number":1277,"context_line":"            return subnetpool"},{"line_number":1278,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ff82abbf_ecb41438","line":1275,"range":{"start_line":1274,"start_character":0,"end_line":1275,"end_character":79},"in_reply_to":"1f485f77_38558351","updated":"2017-11-20 10:18:10.000000000","message":"oops !","commit_id":"0f568529cacff62bf79595b7e9700bde6fa9788c"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"f6aa8e101e23663821a52cea07771fbb06410fef","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1228,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1229,"context_line":"            if address_scope_id:"},{"line_number":1230,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1231,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_c605bd12","line":1230,"updated":"2017-11-28 02:41:36.000000000","message":"Why are we reading the address scope here? Is this for handling concurrent updates to the address scope? That makes sense to me. I was just curious if there was any other reason for doing so.","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"802dc419faca135ebce980835bc62e5b5f889667","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1228,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1229,"context_line":"            if address_scope_id:"},{"line_number":1230,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1231,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7f96bb07_a9a5a4a0","line":1230,"in_reply_to":"ff82abbf_c605bd12","updated":"2018-01-19 05:54:24.000000000","message":"It is for concurrent updates and to","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"802dc419faca135ebce980835bc62e5b5f889667","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1228,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1229,"context_line":"            if address_scope_id:"},{"line_number":1230,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1231,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1232,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1233,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7f96bb07_c9cd9066","line":1230,"in_reply_to":"ff82abbf_c605bd12","updated":"2018-01-19 05:54:24.000000000","message":"We are just making sure that the addr_scope_obj is present already. That makes the assumption that if there are concurrent updates, then this would allow some level of safegaurd","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"69dee6e3584b19be3ebb392f7f9a7176cf2fea33","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                        args \u003d {\u0027cidr\u0027: subnet.cidr,"},{"line_number":1253,"context_line":"                                \u0027address_scope_id\u0027: address_scope_id}"},{"line_number":1254,"context_line":"                        msg \u003d _(\u0027%(cidr)s conflicts with prefixes in address \u0027"},{"line_number":1255,"context_line":"                                \u0027scope %(address_scope_id)s\u0027) % args"},{"line_number":1256,"context_line":"                    else:"},{"line_number":1257,"context_line":"                        args \u003d {\u0027cidr\u0027: subnet.cidr,"},{"line_number":1258,"context_line":"                                \u0027subnetpool_id\u0027: subnetpool_id}"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_63af037d","line":1255,"updated":"2017-11-28 02:02:34.000000000","message":"Maybe there\u0027s nothing we can do within the scope of this patch, but it would be a nice to touch to point out which subnet pool is carrying the overlapping prefix. In addition, another nice touch for users would be an API for dumping all prefixes across all subnet pools in an address scope.","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"802dc419faca135ebce980835bc62e5b5f889667","unresolved":false,"context_lines":[{"line_number":1252,"context_line":"                        args \u003d {\u0027cidr\u0027: subnet.cidr,"},{"line_number":1253,"context_line":"                                \u0027address_scope_id\u0027: address_scope_id}"},{"line_number":1254,"context_line":"                        msg \u003d _(\u0027%(cidr)s conflicts with prefixes in address \u0027"},{"line_number":1255,"context_line":"                                \u0027scope %(address_scope_id)s\u0027) % args"},{"line_number":1256,"context_line":"                    else:"},{"line_number":1257,"context_line":"                        args \u003d {\u0027cidr\u0027: subnet.cidr,"},{"line_number":1258,"context_line":"                                \u0027subnetpool_id\u0027: subnetpool_id}"}],"source_content_type":"text/x-python","patch_set":25,"id":"7f96bb07_69947c37","line":1255,"in_reply_to":"ff82abbf_63af037d","updated":"2018-01-19 05:54:24.000000000","message":"Maybe we can take care of it in the future","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"f6aa8e101e23663821a52cea07771fbb06410fef","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"                pool_prefix.create()"},{"line_number":1270,"context_line":"                subnet.update()"},{"line_number":1271,"context_line":"                if addr_scope_obj:"},{"line_number":1272,"context_line":"                    addr_scope_obj.update()"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            subnetpool.update()"},{"line_number":1275,"context_line":"            return subnetpool"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_2614a943","line":1272,"updated":"2017-11-28 02:41:36.000000000","message":"Again, I assume this is for handling concurrent updates to the address scope?","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"802dc419faca135ebce980835bc62e5b5f889667","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"                pool_prefix.create()"},{"line_number":1270,"context_line":"                subnet.update()"},{"line_number":1271,"context_line":"                if addr_scope_obj:"},{"line_number":1272,"context_line":"                    addr_scope_obj.update()"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            subnetpool.update()"},{"line_number":1275,"context_line":"            return subnetpool"}],"source_content_type":"text/x-python","patch_set":25,"id":"7f96bb07_89c30838","line":1272,"in_reply_to":"ff82abbf_2614a943","updated":"2018-01-19 05:54:24.000000000","message":"Same","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"69dee6e3584b19be3ebb392f7f9a7176cf2fea33","unresolved":false,"context_lines":[{"line_number":1272,"context_line":"                    addr_scope_obj.update()"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            subnetpool.update()"},{"line_number":1275,"context_line":"            return subnetpool"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"},{"line_number":1278,"context_line":"        if (device_owner and"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff82abbf_4393df5b","line":1275,"updated":"2017-11-28 02:02:34.000000000","message":"Do we need to send a message to the appropriate routers to update address scope state on routers with ports on the onboarded subnets?","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"802dc419faca135ebce980835bc62e5b5f889667","unresolved":false,"context_lines":[{"line_number":1272,"context_line":"                    addr_scope_obj.update()"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            subnetpool.update()"},{"line_number":1275,"context_line":"            return subnetpool"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"},{"line_number":1278,"context_line":"        if (device_owner and"}],"source_content_type":"text/x-python","patch_set":25,"id":"7f96bb07_49df400c","line":1275,"in_reply_to":"ff82abbf_4393df5b","updated":"2018-01-19 05:54:24.000000000","message":"Not sure","commit_id":"141ff4b50ea012403667bbc884b5273aa9bcffa8"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3598764a99165087ecb601f886b96805ab5d3652","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"                if addr_scope_obj:"},{"line_number":1309,"context_line":"                    addr_scope_obj.update()"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"            subnetpool.update()"},{"line_number":1312,"context_line":"            return subnetpool"},{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"}],"source_content_type":"text/x-python","patch_set":29,"id":"5f7c97a3_513f8e85","line":1311,"updated":"2018-07-13 17:59:52.000000000","message":"As I mentioned in patch set 25, I believe we\u0027ll need to send an update to any affected routers. Without that, I doubt the affected routers will begin forwarding traffic in accordance with the address scope semantics. It\u0027s worth investigating, I\u0027m not entirely sure if the change in address scope would ever propagate to the appropriate routers. I\u0027m thinking there\u0027s more to this than just onboarding a subnet server-side, I think there is an RPC update of some sort that needs to go out to the appropriate L3 agents.","commit_id":"bae45372d4dd1cc671f386bdcf2746d01bc5eb40"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3eb8b524c269b385c1838f3215784a51315cb971","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"                if addr_scope_obj:"},{"line_number":1314,"context_line":"                    addr_scope_obj.update()"},{"line_number":1315,"context_line":""},{"line_number":1316,"context_line":"            subnetpool.update()"},{"line_number":1317,"context_line":"            return subnetpool"},{"line_number":1318,"context_line":""},{"line_number":1319,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"}],"source_content_type":"text/x-python","patch_set":30,"id":"3f79a3b5_575bfc84","line":1316,"updated":"2018-09-26 18:55:44.000000000","message":"OK, did a little research and finally found what I was looking for. When a subnet is adopted into a subnet pool that participates in an address scope, we need to update the appropriate routers. It looks like sending a AFTER_UPDATE for with SUBNETPOOL_ADDRESS_SCOPE may have the desired effect. [1] is an example of how moving a subnet pool into an address scope is handled. [2] is where the notification of address scope change is handled.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L1208\n\n[2] https://github.com/openstack/neutron/blob/f88cb5276dc8d31b484772f31160fc1071a28541/neutron/db/l3_db.py#L1890","commit_id":"3a90c7e3e5eb50ddb170f47d61b9d818e58b1852"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"b2aa056eccdabf0517434b51b418f9af9f3a9bee","unresolved":false,"context_lines":[{"line_number":1304,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1305,"context_line":"        if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1306,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1307,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1308,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1309,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1310,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":35,"id":"3f79a3b5_189357b2","line":1307,"range":{"start_line":1307,"start_character":8,"end_line":1307,"end_character":57},"updated":"2019-02-05 23:51:26.000000000","message":"This is the old engine facade which is going to be removed. Is it possible to use the new engine facade instead?\n\n  with db_api.CONTEXT_WRITER.using(context):","commit_id":"31ce5d674ab47f60df339805cafebd8e89462886"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"1671e291f8c51df7480f412a1749ae110d656475","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1268,"context_line":"        if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f79a3b5_cb707ddb","line":1270,"range":{"start_line":1270,"start_character":8,"end_line":1270,"end_character":56},"updated":"2018-12-19 17:05:16.000000000","message":"should probably be \"with db_api.CONTEXT_WRITER.using(context)\"","commit_id":"1bceb983c4ad5f8d21bb16779364748dd419621b"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"61c9200eb54a6368f75eb8c9da5af97bd998dd45","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1268,"context_line":"        if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":38,"id":"3f79a3b5_e2af96c5","line":1270,"range":{"start_line":1270,"start_character":13,"end_line":1270,"end_character":49},"updated":"2018-12-19 20:51:30.000000000","message":"context.session.begin(subtransactions\u003dTrue) seems to make the unit test failures go away, investigating.....","commit_id":"4a2ce99cd95e9ab6d71950e44bbe97fe95935c3f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1155,"context_line":""},{"line_number":1156,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1157,"context_line":"    def create_subnetpool(self, context, subnetpool):"},{"line_number":1158,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1159,"context_line":"            sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1160,"context_line":"            sp_reader \u003d subnet_alloc.SubnetPoolReader(sp)"},{"line_number":1161,"context_line":"            if sp_reader.is_default:"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_31aed1e7","line":1158,"updated":"2019-01-04 10:34:12.000000000","message":"is this change related to this patch?","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1258,"context_line":"            subnetpool.delete()"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":1261,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1262,"context_line":"        network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1263,"context_line":"        ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1264,"context_line":"        if not (validators.is_attr_set(network_id) and"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_f11a8915","line":1261,"updated":"2019-01-04 10:34:12.000000000","message":"What about plugins which don\u0027t support subnet_onboard API extension? Shouldn\u0027t You check here if this extension is enabled and do all of this only in such case?","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1258,"context_line":"            subnetpool.delete()"},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    @db_base_plugin_common.convert_result_to_dict"},{"line_number":1261,"context_line":"    def onboard_network_subnets(self, context, subnetpool_id, network_info):"},{"line_number":1262,"context_line":"        network_id \u003d network_info.get(\u0027network_id\u0027)"},{"line_number":1263,"context_line":"        ip_version \u003d network_info.get(\u0027ip_version\u0027)"},{"line_number":1264,"context_line":"        if not (validators.is_attr_set(network_id) and"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_dd18b382","line":1261,"in_reply_to":"ffd0ebdf_f11a8915","updated":"2019-01-04 17:11:01.000000000","message":"Good catch. Normally when working in this module that\u0027s not much of concern since we\u0027re dealing with the core extensions that every plugin should support, but this could be a special case.\n\nHowever, I wonder if this could ever be invoked unless the plugin actually implements the extension. If the plugin extends NeutronDbPluginV2 it inherits this method for free, but it wouldn\u0027t get invoked unless the plugin exposes the extension. So do we actually need to check? It seems to me that if the plugin doesn\u0027t actually expose the extension this is effectively dead code.","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1268,"context_line":"        if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_f1b7e939","line":1270,"updated":"2019-01-04 10:34:12.000000000","message":"I\u0027m not db expert but why You are not using new engine facade here?","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1268,"context_line":"        if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_fdc6d716","line":1270,"in_reply_to":"ffd0ebdf_f1b7e939","updated":"2019-01-04 17:11:01.000000000","message":"See my comments in","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"            raise exc.InvalidInput(error_message\u003dmsg)"},{"line_number":1268,"context_line":"        if not network_obj.Network.objects_exist(context, id\u003dnetwork_id):"},{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_3dfd3f3a","line":1270,"in_reply_to":"ffd0ebdf_f1b7e939","updated":"2019-01-04 17:11:01.000000000","message":"See my comments in PS38. The new engine facade is causing problems here. I\u0027m not sure why, but the tests seem to indicate updates to subnetpool_id on the onboarded subnets aren\u0027t persisting. I reverted back to the legacy engine to debug.","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1274,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1275,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_f1904998","line":1272,"updated":"2019-01-04 10:34:12.000000000","message":"shouldn\u0027t You raise SubnetpoolNotFound here if it will not be found?","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"            raise exc.NetworkNotFound(net_id\u003dnetwork_id)"},{"line_number":1270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1271,"context_line":"            subnetpool \u003d subnetpool_obj.SubnetPool.get_object(context,"},{"line_number":1272,"context_line":"                                                             id\u003dsubnetpool_id)"},{"line_number":1273,"context_line":"            address_scope_id \u003d subnetpool.address_scope_id"},{"line_number":1274,"context_line":"            addr_scope_obj \u003d None"},{"line_number":1275,"context_line":"            if address_scope_id:"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_5d04c317","line":1272,"in_reply_to":"ffd0ebdf_f1904998","updated":"2019-01-04 17:11:01.000000000","message":"Good catch.","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1275,"context_line":"            if address_scope_id:"},{"line_number":1276,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1277,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1278,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1279,"context_line":"            if address_scope_id:"},{"line_number":1280,"context_line":"                subnetpool_list \u003d subnetpool_obj.SubnetPool.get_objects("},{"line_number":1281,"context_line":"                                      context,"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_31dc9173","line":1278,"updated":"2019-01-04 10:34:12.000000000","message":"nit: if You move this above L1275 You can use only one \"if...else\" block","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1275,"context_line":"            if address_scope_id:"},{"line_number":1276,"context_line":"                addr_scope_obj \u003d address_scope_obj.AddressScope.get_object("},{"line_number":1277,"context_line":"                                     context, id\u003daddress_scope_id)"},{"line_number":1278,"context_line":"            prefix_set \u003d netaddr.IPSet()"},{"line_number":1279,"context_line":"            if address_scope_id:"},{"line_number":1280,"context_line":"                subnetpool_list \u003d subnetpool_obj.SubnetPool.get_objects("},{"line_number":1281,"context_line":"                                      context,"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_e80db337","line":1278,"in_reply_to":"ffd0ebdf_31dc9173","updated":"2019-01-04 17:11:01.000000000","message":"Will do","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                                \u0027pool %(subnetpool_id)s\u0027) % args"},{"line_number":1307,"context_line":"                    raise n_exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":""},{"line_number":1309,"context_line":"                pool_prefix \u003d subnetpool_obj.SubnetPoolPrefix("},{"line_number":1310,"context_line":"                                  context\u003dcontext,"},{"line_number":1311,"context_line":"                                  subnetpool_id\u003dsubnetpool_id,"},{"line_number":1312,"context_line":"                                  cidr\u003dsubnet.cidr)"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_11514dd9","line":1309,"updated":"2019-01-04 10:34:12.000000000","message":"shouldn\u0027t You maybe do it in separate loop? Now You will update all subnets until first IlegalSubnetPoolUpdate will be raised. So it may happen that some subnets will be updated and some not.","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                                \u0027pool %(subnetpool_id)s\u0027) % args"},{"line_number":1307,"context_line":"                    raise n_exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":""},{"line_number":1309,"context_line":"                pool_prefix \u003d subnetpool_obj.SubnetPoolPrefix("},{"line_number":1310,"context_line":"                                  context\u003dcontext,"},{"line_number":1311,"context_line":"                                  subnetpool_id\u003dsubnetpool_id,"},{"line_number":1312,"context_line":"                                  cidr\u003dsubnet.cidr)"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_6847834d","line":1309,"in_reply_to":"ffd0ebdf_11514dd9","updated":"2019-01-04 17:11:01.000000000","message":"I\u0027m not an expert in the DB constructs and OVO, but won\u0027t the transaction be rolled back entirely if an exception is raised here?","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"75c12c3922610e5e78fb1cfff215307f9809a3b6","unresolved":false,"context_lines":[{"line_number":1322,"context_line":"            # Notify all affected routers of any address scope changes"},{"line_number":1323,"context_line":"            kwargs \u003d {\u0027context\u0027: context, \u0027subnetpool_id\u0027: subnetpool.id}"},{"line_number":1324,"context_line":"            registry.notify(resources.SUBNETPOOL_ADDRESS_SCOPE,"},{"line_number":1325,"context_line":"                            events.AFTER_UPDATE,"},{"line_number":1326,"context_line":"                            self.onboard_network_subnets,"},{"line_number":1327,"context_line":"                            **kwargs)"},{"line_number":1328,"context_line":"            return subnetpool"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_f10129b1","line":1325,"updated":"2019-01-04 10:34:12.000000000","message":"I think that this event is BEFORE_UPDATE as there wasn\u0027t commit to db yet","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4ba413a2d05321f5988770ed3a3367fe6920386d","unresolved":false,"context_lines":[{"line_number":1322,"context_line":"            # Notify all affected routers of any address scope changes"},{"line_number":1323,"context_line":"            kwargs \u003d {\u0027context\u0027: context, \u0027subnetpool_id\u0027: subnetpool.id}"},{"line_number":1324,"context_line":"            registry.notify(resources.SUBNETPOOL_ADDRESS_SCOPE,"},{"line_number":1325,"context_line":"                            events.AFTER_UPDATE,"},{"line_number":1326,"context_line":"                            self.onboard_network_subnets,"},{"line_number":1327,"context_line":"                            **kwargs)"},{"line_number":1328,"context_line":"            return subnetpool"}],"source_content_type":"text/x-python","patch_set":39,"id":"ffd0ebdf_c8b54ff0","line":1325,"in_reply_to":"ffd0ebdf_f10129b1","updated":"2019-01-04 17:11:01.000000000","message":"It looks like I\u0027ve goofed on the indentation. This actually does need to be AFTER_UPDATE, we need to emit the proper RPC notifications to agents to update address scope information. That should only be done with information committed to the DB. L1323-1328 should be done outside of this block so they aren\u0027t part of the transaction.","commit_id":"659ccacc0277526f4afb5949fb70272539d4b6ee"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"fe340745ae11677663fc21577b28a2c93a773bb8","unresolved":false,"context_lines":[{"line_number":1159,"context_line":""},{"line_number":1160,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1161,"context_line":"    def create_subnetpool(self, context, subnetpool):"},{"line_number":1162,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1163,"context_line":"            sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1164,"context_line":"            sp_reader \u003d subnet_alloc.SubnetPoolReader(sp)"},{"line_number":1165,"context_line":"            if sp_reader.is_default:"}],"source_content_type":"text/x-python","patch_set":41,"id":"9fdfeff1_88d53d1e","line":1162,"range":{"start_line":1162,"start_character":8,"end_line":1162,"end_character":50},"updated":"2019-02-01 22:44:17.000000000","message":"This is an artifact of me fighting with the DB engine facade. See L1302","commit_id":"e50dee372dff6d3fb684d79772c9cd668a5e04b7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"fe340745ae11677663fc21577b28a2c93a773bb8","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1192,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1195,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1196,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1197,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":41,"id":"9fdfeff1_e8e969e2","line":1194,"updated":"2019-02-01 22:44:17.000000000","message":"See comment a L1302","commit_id":"e50dee372dff6d3fb684d79772c9cd668a5e04b7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"fe340745ae11677663fc21577b28a2c93a773bb8","unresolved":false,"context_lines":[{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1303,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"}],"source_content_type":"text/x-python","patch_set":41,"id":"9fdfeff1_48b435f2","line":1302,"range":{"start_line":1302,"start_character":8,"end_line":1302,"end_character":50},"updated":"2019-02-01 22:44:17.000000000","message":"This is giving me a lot of trouble, I\u0027m not sure if it\u0027s just a quirk the unit test environment but the subnet pool prefix updates don\u0027t actually commit unless I do with context.session.begin(subtransactions\u003dTrue): here and at L1162 in update_subnetpool(). I use the legacy facade everything seems to work as expected.","commit_id":"e50dee372dff6d3fb684d79772c9cd668a5e04b7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7236725cab9a2fb45733ad8638a61f38fdfa1df6","unresolved":false,"context_lines":[{"line_number":1112,"context_line":"                subnetpool_id\u003dsubnetpool_id, address_scope_id\u003daddress_scope_id,"},{"line_number":1113,"context_line":"                ip_version\u003das_ip_version)"},{"line_number":1114,"context_line":""},{"line_number":1115,"context_line":"        self._validate_address_scope_prefixes(context, address_scope_id,"},{"line_number":1116,"context_line":"                                              subnetpool_id, sp_prefixes)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def _validate_address_scope_prefixes(self, context, address_scope_id,"},{"line_number":1119,"context_line":"                                         subnetpool_id, new_prefixes):"},{"line_number":1120,"context_line":"        subnetpools \u003d subnetpool_obj.SubnetPool.get_objects("},{"line_number":1121,"context_line":"            context, address_scope_id\u003daddress_scope_id)"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"9fdfeff1_8c5e96e7","line":1119,"range":{"start_line":1115,"start_character":0,"end_line":1119,"end_character":70},"updated":"2019-02-04 21:20:03.000000000","message":"This is an artifact from a previous patch set. It looks nice IMO, but unnecessary to include in this patch.","commit_id":"1f7696d784d9c20d088e3282784f78983d2bdec1"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"b2aa056eccdabf0517434b51b418f9af9f3a9bee","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"        self._validate_address_scope_prefixes(context, address_scope_id,"},{"line_number":1116,"context_line":"                                              subnetpool_id, sp_prefixes)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def _validate_address_scope_prefixes(self, context, address_scope_id,"},{"line_number":1119,"context_line":"                                         subnetpool_id, new_prefixes):"},{"line_number":1120,"context_line":"        subnetpools \u003d subnetpool_obj.SubnetPool.get_objects("},{"line_number":1121,"context_line":"            context, address_scope_id\u003daddress_scope_id)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_fa825952","line":1118,"range":{"start_line":1118,"start_character":8,"end_line":1118,"end_character":40},"updated":"2019-02-05 23:51:26.000000000","message":"nit: This method is split out but I couldn\u0027t find it is used in anywhere else.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"21148559b937e418de242fdd1072627a70f8141c","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"        self._validate_address_scope_prefixes(context, address_scope_id,"},{"line_number":1116,"context_line":"                                              subnetpool_id, sp_prefixes)"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def _validate_address_scope_prefixes(self, context, address_scope_id,"},{"line_number":1119,"context_line":"                                         subnetpool_id, new_prefixes):"},{"line_number":1120,"context_line":"        subnetpools \u003d subnetpool_obj.SubnetPool.get_objects("},{"line_number":1121,"context_line":"            context, address_scope_id\u003daddress_scope_id)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_de618013","line":1118,"range":{"start_line":1118,"start_character":8,"end_line":1118,"end_character":40},"in_reply_to":"9fdfeff1_fa825952","updated":"2019-02-06 14:49:26.000000000","message":"See my comment in PS 45. This is an artifact of refactoring, I forgot to undo this for this patch set.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"b2aa056eccdabf0517434b51b418f9af9f3a9bee","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1190,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":1193,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1194,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1195,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_5a184574","line":1192,"range":{"start_line":1192,"start_character":20,"end_line":1192,"end_character":42},"updated":"2019-02-05 23:51:26.000000000","message":"Do you intend to switch back to the old enginefacade here? or it is a rebase issue?","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"21148559b937e418de242fdd1072627a70f8141c","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1190,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":1193,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1194,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1195,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_de60a038","line":1192,"range":{"start_line":1192,"start_character":20,"end_line":1192,"end_character":42},"in_reply_to":"9fdfeff1_5a184574","updated":"2019-02-06 14:49:26.000000000","message":"This is intentional. The new engine facade has been exhibiting some odd behavior. Specifically, the updates to the subnet pool prefix list do not persist. I\u0027ve been struggling with this over the last several patch sets. See PS 41. When the legacy facade is used everything behaves as expected.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"b2aa056eccdabf0517434b51b418f9af9f3a9bee","unresolved":false,"context_lines":[{"line_number":1295,"context_line":""},{"line_number":1296,"context_line":"        new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":1299,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_1a7abd87","line":1298,"range":{"start_line":1298,"start_character":20,"end_line":1298,"end_character":42},"updated":"2019-02-05 23:51:26.000000000","message":"Suggest using the new enginefacade in here. See https://blueprints.launchpad.net/neutron/+spec/enginefacade-switch .","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"21148559b937e418de242fdd1072627a70f8141c","unresolved":false,"context_lines":[{"line_number":1295,"context_line":""},{"line_number":1296,"context_line":"        new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":1299,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_9e5a1881","line":1298,"range":{"start_line":1298,"start_character":20,"end_line":1298,"end_character":42},"in_reply_to":"9fdfeff1_1a7abd87","updated":"2019-02-06 14:49:26.000000000","message":"See the comment at L1192 and my comments in PS 41.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"6d4d3d27cfe697558afb7204654af3df528f850a","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":48,"id":"9fdfeff1_1c4b8687","line":1187,"range":{"start_line":1187,"start_character":8,"end_line":1187,"end_character":50},"updated":"2019-02-06 23:09:13.000000000","message":"See L1310","commit_id":"55b04b86fbbde604a25eb12acdc14d00fbcab2ba"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"6d4d3d27cfe697558afb7204654af3df528f850a","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"9fdfeff1_5c7fceaa","line":1310,"range":{"start_line":1310,"start_character":8,"end_line":1310,"end_character":50},"updated":"2019-02-06 23:09:13.000000000","message":"See https://review.openstack.org/#/c/635253/2/neutron/db/db_base_plugin_v2.py. Using the new DB engine facade introduces some very odd behavior, requiring reading subnetpool prefixes after an update to be done AFTER onboard_network_subnets() returns. Reading a new subnetpool never yields the updated prefix list. I have tested this down to the sqlalchemy model, there appears to be a transaction boundary or something on the session. This not only breaks unit tests, but is problematic if we ever have to read the subnetpool on a subnetpool update.","commit_id":"55b04b86fbbde604a25eb12acdc14d00fbcab2ba"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"93779572a00adfafb54811449648be57566df9dd","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"9fdfeff1_847dcf6f","line":1310,"range":{"start_line":1310,"start_character":8,"end_line":1310,"end_character":50},"in_reply_to":"9fdfeff1_5c7fceaa","updated":"2019-02-07 21:36:42.000000000","message":"It now looks like a misuse of the DB constructs. It looks like if I use \n\n\"db_api.CONTEXT_WRITER.using(context.session):\"\n\ninstead of\n\n\"db_api.CONTEXT_WRITER.using(context):\"\n\nI get the behavior I\u0027m looking for. I\u0027m sure this is obvious to others, but I\u0027ve been away from the db_api constructs in neutron-lib and am just now immersing myself in how to use them. Rookie mistake I guess....","commit_id":"55b04b86fbbde604a25eb12acdc14d00fbcab2ba"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"d7dc134f0bdc3bd24d2b7c877c2af074ff60ad24","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"        if subnetpool.address_scope_id:"},{"line_number":1279,"context_line":"            # Notify all affected routers of any address scope changes"},{"line_number":1280,"context_line":"            kwargs \u003d {\u0027subnetpool_id\u0027: subnetpool_id}"},{"line_number":1281,"context_line":"            registry.notify(resources.SUBNETPOOL_ADDRESS_SCOPE,"},{"line_number":1282,"context_line":"                            events.AFTER_UPDATE,"},{"line_number":1283,"context_line":"                            self.onboard_network_subnets,"},{"line_number":1284,"context_line":"                            context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_17ba2a6d","line":1281,"range":{"start_line":1281,"start_character":21,"end_line":1281,"end_character":27},"updated":"2019-02-12 16:53:11.000000000","message":"The payload has changed. I guess we need to change it as below (UNTESTED):\n\n            registry.publish(resources.SUBNETPOOL_ADDRESS_SCOPE,\n                             events.AFTER_UPDATE,\n                             self.onboard_network_subnets,\n                             payload\u003devents.DBEventPayload(\n                                 context, resource_id\u003dsubnetpool_id))","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"        if subnetpool.address_scope_id:"},{"line_number":1279,"context_line":"            # Notify all affected routers of any address scope changes"},{"line_number":1280,"context_line":"            kwargs \u003d {\u0027subnetpool_id\u0027: subnetpool_id}"},{"line_number":1281,"context_line":"            registry.notify(resources.SUBNETPOOL_ADDRESS_SCOPE,"},{"line_number":1282,"context_line":"                            events.AFTER_UPDATE,"},{"line_number":1283,"context_line":"                            self.onboard_network_subnets,"},{"line_number":1284,"context_line":"                            context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_7ad7dbef","line":1281,"range":{"start_line":1281,"start_character":21,"end_line":1281,"end_character":27},"in_reply_to":"9fdfeff1_17ba2a6d","updated":"2019-02-12 17:34:11.000000000","message":"Thanks for pointing that out, I didn\u0027t follow that closely enough to see that it merged.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"3898e3d3b98936adfe365fa52ad9379d920a0c0d","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"        for subnet in subnets_to_onboard:"},{"line_number":1288,"context_line":"            onboard_info[subnet.id] \u003d subnet.cidr"},{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"        return onboard_info"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _onboard_network_subnets(self, context, subnets_to_onboard,"},{"line_number":1293,"context_line":"                                 subnetpool):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_b73f9e23","line":1290,"range":{"start_line":1290,"start_character":15,"end_line":1290,"end_character":27},"updated":"2019-02-12 16:43:12.000000000","message":"For consistency with the style of other API response, suggest to change this to something like below:\n\n  [\n      {\"cidr\": subnet.cidr, \"id\": subnet.id},\n      ...\n  ]\n\nor\n\n  {\n      \"subnets\" [\n          {\"cidr\": subnet.cidr, \"id\": subnet.id},\n          ...\n      ]\n  }","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"        for subnet in subnets_to_onboard:"},{"line_number":1288,"context_line":"            onboard_info[subnet.id] \u003d subnet.cidr"},{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"        return onboard_info"},{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"    def _onboard_network_subnets(self, context, subnets_to_onboard,"},{"line_number":1293,"context_line":"                                 subnetpool):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_9ad4ffea","line":1290,"range":{"start_line":1290,"start_character":15,"end_line":1290,"end_character":27},"in_reply_to":"9fdfeff1_b73f9e23","updated":"2019-02-12 17:34:11.000000000","message":"Will do.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"be5566d303c17c4a1b8fa2f869c62e0a45120007","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                                                subnetpool_id\u003dsubnetpool.id)])"},{"line_number":1298,"context_line":"        prefixes_to_add \u003d []"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        for subnet in subnets_to_onboard:"},{"line_number":1301,"context_line":"            to_onboard_ipset \u003d netaddr.IPSet([subnet.cidr])"},{"line_number":1302,"context_line":"            if to_onboard_ipset \u0026 allocated_prefix_set:"},{"line_number":1303,"context_line":"                args \u003d {\u0027cidr\u0027: subnet.cidr,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_d4e4a00f","line":1300,"range":{"start_line":1300,"start_character":12,"end_line":1300,"end_character":18},"updated":"2019-02-12 16:05:46.000000000","message":"Perhaps we can skip the subnets that already onboard? In particular, how about adding a check for the \u0027subnetpool_id\u0027 attribute and skip if it is not None?","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                                                subnetpool_id\u003dsubnetpool.id)])"},{"line_number":1298,"context_line":"        prefixes_to_add \u003d []"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        for subnet in subnets_to_onboard:"},{"line_number":1301,"context_line":"            to_onboard_ipset \u003d netaddr.IPSet([subnet.cidr])"},{"line_number":1302,"context_line":"            if to_onboard_ipset \u0026 allocated_prefix_set:"},{"line_number":1303,"context_line":"                args \u003d {\u0027cidr\u0027: subnet.cidr,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_dac92759","line":1300,"range":{"start_line":1300,"start_character":12,"end_line":1300,"end_character":18},"in_reply_to":"9fdfeff1_d4e4a00f","updated":"2019-02-12 17:34:11.000000000","message":"There is nothing to skip. The guarantee with subnet pools is that all subnets of the same family (IPv4/6), on the same network, must all be allocated from the same subnet pool. Either all subnets will be onboarding from the same pool (ie moving between pools), or they all are onboarding into a subnet pool at the same time. We will never have a case where some subnets on a network of the same address family have different subnetpool_id\u0027s. This is already enforced at the time a subnet is created. This is why we onboard subnets in bulk using the network to group them together rather than allowing them to be onboarded individually.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c7c442f205db46f72156d6c1ad9dec3456ba4393","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                                                subnetpool_id\u003dsubnetpool.id)])"},{"line_number":1298,"context_line":"        prefixes_to_add \u003d []"},{"line_number":1299,"context_line":""},{"line_number":1300,"context_line":"        for subnet in subnets_to_onboard:"},{"line_number":1301,"context_line":"            to_onboard_ipset \u003d netaddr.IPSet([subnet.cidr])"},{"line_number":1302,"context_line":"            if to_onboard_ipset \u0026 allocated_prefix_set:"},{"line_number":1303,"context_line":"                args \u003d {\u0027cidr\u0027: subnet.cidr,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_a73c2ce1","line":1300,"range":{"start_line":1300,"start_character":12,"end_line":1300,"end_character":18},"in_reply_to":"9fdfeff1_dac92759","updated":"2019-02-14 00:12:29.000000000","message":"I see.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"be5566d303c17c4a1b8fa2f869c62e0a45120007","unresolved":false,"context_lines":[{"line_number":1302,"context_line":"            if to_onboard_ipset \u0026 allocated_prefix_set:"},{"line_number":1303,"context_line":"                args \u003d {\u0027cidr\u0027: subnet.cidr,"},{"line_number":1304,"context_line":"                        \u0027subnetpool_id\u0027: subnetpool.id}"},{"line_number":1305,"context_line":"                msg \u003d _(\u0027%(cidr)s conflicts with allocated prefixes in \u0027"},{"line_number":1306,"context_line":"                        \u0027subnet pool %(subnetpool_id)s\u0027) % args"},{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_d4a02093","line":1305,"range":{"start_line":1305,"start_character":27,"end_line":1305,"end_character":31},"updated":"2019-02-12 16:05:46.000000000","message":"nit: better to print the ID of the subnet as well.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1302,"context_line":"            if to_onboard_ipset \u0026 allocated_prefix_set:"},{"line_number":1303,"context_line":"                args \u003d {\u0027cidr\u0027: subnet.cidr,"},{"line_number":1304,"context_line":"                        \u0027subnetpool_id\u0027: subnetpool.id}"},{"line_number":1305,"context_line":"                msg \u003d _(\u0027%(cidr)s conflicts with allocated prefixes in \u0027"},{"line_number":1306,"context_line":"                        \u0027subnet pool %(subnetpool_id)s\u0027) % args"},{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_faa74bbb","line":1305,"range":{"start_line":1305,"start_character":27,"end_line":1305,"end_character":31},"in_reply_to":"9fdfeff1_d4a02093","updated":"2019-02-12 17:34:11.000000000","message":"Good catch","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":21798,"name":"Bernard Cafarelli","email":"bcafarel@redhat.com","username":"bcafarel"},"change_message_id":"00001641cb9c69829d2edf9ae5ac1f7c6484e4cc","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_fc58b031","line":1310,"range":{"start_line":1310,"start_character":8,"end_line":1310,"end_character":58},"updated":"2019-02-12 12:07:02.000000000","message":"Strange that it works with session indeed, my (limited) knowledge was to use context too here...","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c7c442f205db46f72156d6c1ad9dec3456ba4393","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_470ea03b","line":1310,"range":{"start_line":1310,"start_character":8,"end_line":1310,"end_character":58},"in_reply_to":"9fdfeff1_5ac457f5","updated":"2019-02-14 00:12:29.000000000","message":"I have no idea about that. I leave it to other reviewers to comment on it.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1307,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1308,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1309,"context_line":""},{"line_number":1310,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_5ac457f5","line":1310,"range":{"start_line":1310,"start_character":8,"end_line":1310,"end_character":58},"in_reply_to":"9fdfeff1_fc58b031","updated":"2019-02-12 17:34:11.000000000","message":"The behavior between CONTEXT_WRITER.using(context.session) and CONTEXT_WRITER.using(context) is quite different. It makes me wonder if there are places we should be using CONTEXT_WRITER.using(context.session), it\u0027s very strange.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"451c2b2f4102316b05913df9d08dab84b6caff90","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"},{"line_number":1315,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1316,"context_line":"                subnet.update_fields({\u0027subnetpool_id\u0027: subnetpool.id},"},{"line_number":1317,"context_line":"                                     reset_changes\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_1711ca04","line":1314,"range":{"start_line":1314,"start_character":17,"end_line":1314,"end_character":34},"updated":"2019-02-12 16:29:10.000000000","message":"Not sure why we need to update the prefixes of subnetpool. I think the subnetpool prefixes should be static and shouldn\u0027t be changed after onboarding the subnet?","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"},{"line_number":1315,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1316,"context_line":"                subnet.update_fields({\u0027subnetpool_id\u0027: subnetpool.id},"},{"line_number":1317,"context_line":"                                     reset_changes\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_3aa2b3af","line":1314,"range":{"start_line":1314,"start_character":17,"end_line":1314,"end_character":34},"in_reply_to":"9fdfeff1_1711ca04","updated":"2019-02-12 17:34:11.000000000","message":"We have to adopt the CIDR of the onboarded subnet into the prefix list as well for consistency reasons. Otherwise you have \"zombie\" prefixes participating in the subnet pool which will cause problems when trying to enforce CIDR uniqueness across address scopes. The onboarded CIDR must be in the prefix list otherwise it won\u0027t be seen by the address scope, and we will lose the guarantees of prefix uniqueness across the address scope.\n\nOnboarding a subnet is composed of 2 operations:\n1. Add the CIDR to the pool prefix list if it is not a subnet of an existing prefix in the list.\n2. Change the subnetpool_id of the subnet.","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c7c442f205db46f72156d6c1ad9dec3456ba4393","unresolved":false,"context_lines":[{"line_number":1311,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1312,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"},{"line_number":1315,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1316,"context_line":"                subnet.update_fields({\u0027subnetpool_id\u0027: subnetpool.id},"},{"line_number":1317,"context_line":"                                     reset_changes\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_c2ffdefe","line":1314,"range":{"start_line":1314,"start_character":17,"end_line":1314,"end_character":34},"in_reply_to":"9fdfeff1_3aa2b3af","updated":"2019-02-14 00:12:29.000000000","message":"ACK","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"451c2b2f4102316b05913df9d08dab84b6caff90","unresolved":false,"context_lines":[{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"},{"line_number":1315,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1316,"context_line":"                subnet.update_fields({\u0027subnetpool_id\u0027: subnetpool.id},"},{"line_number":1317,"context_line":"                                     reset_changes\u003dTrue)"},{"line_number":1318,"context_line":"                subnet.update()"},{"line_number":1319,"context_line":""},{"line_number":1320,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_372f2e40","line":1317,"range":{"start_line":1316,"start_character":16,"end_line":1317,"end_character":56},"updated":"2019-02-12 16:29:10.000000000","message":"I guess you can do this instead:\n\n    subnet.subnetpool_id \u003d subnetpool.id\n    subnet.update()","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"778e35cb04f34c6c86381ae8af716f2c25237357","unresolved":false,"context_lines":[{"line_number":1313,"context_line":""},{"line_number":1314,"context_line":"            self.update_subnetpool(context, subnetpool.id, sp_update_req)"},{"line_number":1315,"context_line":"            for subnet in subnets_to_onboard:"},{"line_number":1316,"context_line":"                subnet.update_fields({\u0027subnetpool_id\u0027: subnetpool.id},"},{"line_number":1317,"context_line":"                                     reset_changes\u003dTrue)"},{"line_number":1318,"context_line":"                subnet.update()"},{"line_number":1319,"context_line":""},{"line_number":1320,"context_line":"    def _check_mac_addr_update(self, context, port, new_mac, device_owner):"}],"source_content_type":"text/x-python","patch_set":49,"id":"9fdfeff1_da928757","line":1317,"range":{"start_line":1316,"start_character":16,"end_line":1317,"end_character":56},"in_reply_to":"9fdfeff1_372f2e40","updated":"2019-02-12 17:34:11.000000000","message":"True, that reads much nicer","commit_id":"781140f00dd26bc44deea9dfb32ec547136116f0"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8c3ffa8bd4ed0ec064e4a4267990dd66c30a54eb","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_e30688ce","line":1187,"updated":"2019-02-15 08:51:45.000000000","message":"I really wonder why it has to be like that. There is no any other single place where session is passed as argument to using() method.\nAlso, looking at https://github.com/openstack/oslo.db/blob/c49c96ff74190b9f1b1504eaa8a7ef66b8ae333f/oslo_db/sqlalchemy/enginefacade.py#L975 it looks like it should be context object instead of session.\nI know that it works for You here but I would like to know why it works like that and what other consequences it may have in future :)","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"dee3d92f2bd36380978ae25b0045518118e4dba2","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_e8f4135d","line":1187,"in_reply_to":"9fdfeff1_221a3cc5","updated":"2019-02-15 22:54:31.000000000","message":"See PS53, I\u0027m passing context now and you should see the test failures I\u0027m talking about on that patch set.","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"40f179c29fd08cfd4db906da351d399a00fb5cb4","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_221a3cc5","line":1187,"in_reply_to":"9fdfeff1_42a420a6","updated":"2019-02-15 21:00:58.000000000","message":"are these tests that don\u0027t work newly added?  are there tests against the previous version of the code that is calling upon using(context)?   generally, a test that wants to exercise a DB function should be setting up the context before it calls  into the business methods, so that when you get into here, context.session should already exist and be that session you\u0027re using.   the CONTEXT_WRITER.using(context) should be a pass through in the context of a unit test.","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"a5875c794f83b3d4808e076cd61129a636329b77","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_d618d6d3","line":1187,"in_reply_to":"9fdfeff1_c6110d5f","updated":"2019-02-15 17:57:43.000000000","message":"it\u0027s supposed to be a context, sending context.session is wrong.   if the former way is failing, we need to determine why that is.","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d11f19da064931db8dc1257ef8ecfaeeb138f31d","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_42a420a6","line":1187,"in_reply_to":"9fdfeff1_d618d6d3","updated":"2019-02-15 20:53:16.000000000","message":"What I see is that I am unable to read my writes until onboard_network_subnets() returns. I have refactored onboard_network_subnets() such that isn\u0027t necessary to generate a return value at L1287. This was giving me problems in previous patch sets where I was trying to read my updates before returning, which actually isn\u0027t necessary. I have not seen this behavior before which concerns me, and I haven\u0027t used the new enginefacade until now, but maybe I\u0027ve been doing this all wrong in the past.\n\nIt\u0027s now more of a problem with the unit tests (which admittedly may be have problems) where I am unable to assert anything about the subnetpool, its prefixes, or the onboarded subnets because the updates simply can\u0027t be read.","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7cb187968a8ca6acfa93c8705b4b14f671058435","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":1185,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":1186,"context_line":""},{"line_number":1187,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1188,"context_line":"            orig_sp \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1189,"context_line":"            updated \u003d _update_subnetpool_dict(orig_sp, new_sp)"},{"line_number":1190,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_c6110d5f","line":1187,"in_reply_to":"9fdfeff1_e30688ce","updated":"2019-02-15 14:55:06.000000000","message":"This is totally reasonable, and I\u0027m bothered by this as well. I could really use some help from someone who understands the enginefacade better than I do.","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8c3ffa8bd4ed0ec064e4a4267990dd66c30a54eb","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1310,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1313,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1314,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1315,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_63237857","line":1312,"updated":"2019-02-15 08:51:45.000000000","message":"and same question here","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"a5875c794f83b3d4808e076cd61129a636329b77","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"                raise exc.IllegalSubnetPoolUpdate(reason\u003dmsg)"},{"line_number":1310,"context_line":"            prefixes_to_add.append(subnet.cidr)"},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"        with db_api.CONTEXT_WRITER.using(context.session):"},{"line_number":1313,"context_line":"            new_sp_prefixes \u003d subnetpool.prefixes + prefixes_to_add"},{"line_number":1314,"context_line":"            sp_update_req \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: new_sp_prefixes}}"},{"line_number":1315,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_161adec4","line":1312,"in_reply_to":"9fdfeff1_63237857","updated":"2019-02-15 17:57:43.000000000","message":"needs to be context","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"}],"neutron/db/migration/alembic_migrations/versions/newton/expand/3bbbc9c019a8_address_scope_hash.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.add_column("},{"line_number":34,"context_line":"        \u0027address_scopes\u0027,"},{"line_number":35,"context_line":"        sa.Column(\u0027hash\u0027, sa.String(36), nullable\u003dFalse, server_default\u003d\u0027\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_509e2e57","line":35,"updated":"2016-08-26 04:11:17.000000000","message":"Should we go straight for adding a revision to this table and use that similarly to how network has a revision and subnets revises it? It would be inconsistent with how subnets and subnetpools are related. So, maybe we could follow up later with a migration to change them both.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.add_column("},{"line_number":34,"context_line":"        \u0027address_scopes\u0027,"},{"line_number":35,"context_line":"        sa.Column(\u0027hash\u0027, sa.String(36), nullable\u003dFalse, server_default\u003d\u0027\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_1807b382","line":35,"in_reply_to":"fa7ab95a_509e2e57","updated":"2016-12-06 20:37:53.000000000","message":"Not sure what to do about revisions at this point.. going to leave it the same for now.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"}],"neutron/db/migration/alembic_migrations/versions/pike/expand/3bbbc9c019a8_address_scope_hash.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"c1abb588fb917034b12e4cf4978bf516a3a017c3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# revision identifiers, used by Alembic."},{"line_number":25,"context_line":"revision \u003d \u00273bbbc9c019a8\u0027"},{"line_number":26,"context_line":"down_revision \u003d \u002762c781cb6192\u0027"},{"line_number":27,"context_line":"depends_on \u003d (\u002752c5312f6baf\u0027,)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from alembic import op"},{"line_number":30,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_62731517","line":27,"range":{"start_line":27,"start_character":13,"end_line":27,"end_character":30},"updated":"2017-05-30 18:53:15.000000000","message":"I\u0027m not sure if this is needed. I don\u0027t see any other alembic_migrations in the repo with a depends_on tag that invokes the op.add_column() to table address_scopes.\n\nI think depends_on should only be used when the upgrade is referencing a column that has been added to a table.","commit_id":"2f6eb5714984f280558826c23a2d76f0c5c33e01"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"10e59ef4b582ff80746dd969a6ac84a4a6c7cd72","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# revision identifiers, used by Alembic."},{"line_number":25,"context_line":"revision \u003d \u00273bbbc9c019a8\u0027"},{"line_number":26,"context_line":"down_revision \u003d \u002762c781cb6192\u0027"},{"line_number":27,"context_line":"depends_on \u003d (\u002752c5312f6baf\u0027,)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from alembic import op"},{"line_number":30,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_3395e333","line":27,"range":{"start_line":27,"start_character":13,"end_line":27,"end_character":30},"in_reply_to":"df140735_62731517","updated":"2017-10-08 06:53:10.000000000","message":"I added it because it seems that the dependent Liberty Migration didnt work.\nBut now it seems you are right, the problem is somewhere else.","commit_id":"2f6eb5714984f280558826c23a2d76f0c5c33e01"}],"neutron/extensions/subnet_onboard.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        plural_mappings \u003d resource_helper.build_plural_mappings("},{"line_number":54,"context_line":"            {}, attr.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":55,"context_line":"        attr.PLURALS.update(plural_mappings)"},{"line_number":56,"context_line":"        action_map \u003d {\u0027subnetpool\u0027: {\u0027onboard_network_subnets\u0027: \u0027PUT\u0027}}"},{"line_number":57,"context_line":"        return resource_helper.build_resource_info("},{"line_number":58,"context_line":"            plural_mappings,"},{"line_number":59,"context_line":"            {\u0027subnetpools\u0027: attr.RESOURCE_ATTRIBUTE_MAP[\u0027subnetpools\u0027]},"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_d0d87e20","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":70},"updated":"2016-08-26 04:11:17.000000000","message":"I kind of like having a constant up above with this just to be consistent with how other extensions are done. Also, I expected a little more detail from this. I inferred from L28 and the code changes from neutron/db/db_base_plugin_v2.py what attributes should be included (network_id and ip_version) but it is difficult to tell from reading this extension file, how the API should be used.\n\nI think we need a validator instead of validating in code and probably a few other attributes that we\u0027re accustomed to seeing in an extended attributes dict constant.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        plural_mappings \u003d resource_helper.build_plural_mappings("},{"line_number":54,"context_line":"            {}, attr.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":55,"context_line":"        attr.PLURALS.update(plural_mappings)"},{"line_number":56,"context_line":"        action_map \u003d {\u0027subnetpool\u0027: {\u0027onboard_network_subnets\u0027: \u0027PUT\u0027}}"},{"line_number":57,"context_line":"        return resource_helper.build_resource_info("},{"line_number":58,"context_line":"            plural_mappings,"},{"line_number":59,"context_line":"            {\u0027subnetpools\u0027: attr.RESOURCE_ATTRIBUTE_MAP[\u0027subnetpools\u0027]},"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_764eec3b","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":70},"in_reply_to":"fa7ab95a_d0d87e20","updated":"2016-12-06 20:37:53.000000000","message":"Done. I followed the example from ExtraDhcpOpts https://github.com/openstack/neutron/blob/master/neutron/extensions/extra_dhcp_opt.py","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"52c9bc60ae747e5b024f822614c4671cf9cbf7d1","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        plural_mappings \u003d resource_helper.build_plural_mappings("},{"line_number":54,"context_line":"            {}, attr.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":55,"context_line":"        attr.PLURALS.update(plural_mappings)"},{"line_number":56,"context_line":"        action_map \u003d {\u0027subnetpool\u0027: {\u0027onboard_network_subnets\u0027: \u0027PUT\u0027}}"},{"line_number":57,"context_line":"        return resource_helper.build_resource_info("},{"line_number":58,"context_line":"            plural_mappings,"},{"line_number":59,"context_line":"            {\u0027subnetpools\u0027: attr.RESOURCE_ATTRIBUTE_MAP[\u0027subnetpools\u0027]},"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_ec3ae2cc","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":70},"in_reply_to":"fa7ab95a_d0d87e20","updated":"2016-09-06 21:00:02.000000000","message":"Not sure how to add validators on subresources, it may not be possible.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"8cfd373b09a6eb9c310849a74055dd7e21c0252f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (c) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_74ff9267","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2017-07-23 08:20:46.000000000","message":"Should we update this ?","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"37c702fc76f8de220b986b6973b0a07a2198c01d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# (c) Copyright 2016 Hewlett Packard Enterprise Development LP"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_c9344e4d","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"in_reply_to":"ff346bd7_74ff9267","updated":"2017-07-24 13:47:16.000000000","message":"yeah updating the year may not be a bad idea.","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"8cfd373b09a6eb9c310849a74055dd7e21c0252f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"class Subnet_onboard(extensions.ExtensionDescriptor):"},{"line_number":84,"context_line":"    \"\"\"API extension for subnet onboard.\"\"\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_940af687","line":83,"range":{"start_line":83,"start_character":32,"end_line":83,"end_character":51},"updated":"2017-07-23 08:20:46.000000000","message":"Should we use ExtensionDescriptor or the APIExtensionDescriptor defined in the same file ?","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7842208fb669aa8c5c9d0aafa368c9953954b39f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"class Subnet_onboard(extensions.ExtensionDescriptor):"},{"line_number":84,"context_line":"    \"\"\"API extension for subnet onboard.\"\"\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_9f88b81f","line":83,"range":{"start_line":83,"start_character":32,"end_line":83,"end_character":51},"in_reply_to":"ff346bd7_8903e642","updated":"2017-07-24 14:31:45.000000000","message":"I agree, but then I think that we should push a patch for neutron-lib and keep the extension utilizing the definition here.\n\nIf its ok, can I push a patch in neutron-lib?","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"37c702fc76f8de220b986b6973b0a07a2198c01d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"}"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"class Subnet_onboard(extensions.ExtensionDescriptor):"},{"line_number":84,"context_line":"    \"\"\"API extension for subnet onboard.\"\"\""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_8903e642","line":83,"range":{"start_line":83,"start_character":32,"end_line":83,"end_character":51},"in_reply_to":"ff346bd7_940af687","updated":"2017-07-24 13:47:16.000000000","message":"We should probably treat neutron-lib with the respect it deserves by moving the api-def into there and then changing this to APIExtensionDescriptor.\n\n\"Concrete implementations of API extensions should first provide\n    an API definition in neutron_lib.api.definitions\"","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ec90c2bb27db0c503212791f8007cb8f38652a21","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    api_definition \u003d subnet_onboard_def"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @classmethod"},{"line_number":33,"context_line":"    def get_name(cls):"},{"line_number":34,"context_line":"        return subnet_onboard_def.NAME"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f515b1d_751b79c9","line":33,"updated":"2017-10-09 13:14:22.000000000","message":"you don\u0027t need all these methods, they are already done for you in APIExtensionDescriptor assuming you\u0027ve setup api_definition properly for the class.","commit_id":"616d53b9b9d614cc7abe6762577a3b515a06dbc4"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"e33c672ee8d045f88c4b4786914fa88793aa6fdb","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    api_definition \u003d subnet_onboard_def"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @classmethod"},{"line_number":33,"context_line":"    def get_name(cls):"},{"line_number":34,"context_line":"        return subnet_onboard_def.NAME"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f4b6375_3053a819","line":33,"in_reply_to":"7f515b1d_751b79c9","updated":"2017-10-25 21:36:58.000000000","message":"Done","commit_id":"616d53b9b9d614cc7abe6762577a3b515a06dbc4"}],"neutron/extensions/subnetpool_adoption.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e86a11b6c86703a55a7d6ed687aa0cd7dd8ed5ff","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.plugins.common import constants as plugin_const"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class InvalidAdoptionRequest(n_exc.BadRequest):"},{"line_number":28,"context_line":"    message \u003d _(\"Both network_id and ip_version must be specified.\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_4f318ca1","line":27,"updated":"2016-08-05 23:32:37.000000000","message":"have you considered adding this as a service plugin instead? It would insert rather nicely rather nicely without having to touch ml2 and db_base_plugin. The plugin can be added as a default one [1] if you want to run it by default as it should be able to work with any core plugin, so long as the required extension is loaded.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/plugins/common/constants.py#L42","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"64edce69da093fc44360ed2e5aa130032822c1ac","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.plugins.common import constants as plugin_const"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class InvalidAdoptionRequest(n_exc.BadRequest):"},{"line_number":28,"context_line":"    message \u003d _(\"Both network_id and ip_version must be specified.\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_afe5a8dc","line":27,"in_reply_to":"bacf61ea_4f318ca1","updated":"2016-08-05 23:43:55.000000000","message":"I think the footprint of this is pretty minimal, exposing it via ML2 and db_base_plugin doesn\u0027t strike me as a bad thing.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3b8cd9faace626d1db7414561421007312835673","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.plugins.common import constants as plugin_const"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class InvalidAdoptionRequest(n_exc.BadRequest):"},{"line_number":28,"context_line":"    message \u003d _(\"Both network_id and ip_version must be specified.\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_0f003401","line":27,"in_reply_to":"bacf61ea_afe5a8dc","updated":"2016-08-06 00:04:18.000000000","message":"Have you ever heard of the butterfly effect? Even the smallest effect can have catastrophic repercussions! :)","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"edd992e529e623bfaba38cfc15a728eebf75937e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        plural_mappings \u003d resource_helper.build_plural_mappings("},{"line_number":54,"context_line":"            {}, attr.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":55,"context_line":"        attr.PLURALS.update(plural_mappings)"},{"line_number":56,"context_line":"        action_map \u003d {\u0027subnetpool\u0027: {\u0027adopt_network_subnets\u0027: \u0027PUT\u0027}}"},{"line_number":57,"context_line":"        return resource_helper.build_resource_info(plural_mappings,"},{"line_number":58,"context_line":"                                                   attr.RESOURCE_ATTRIBUTE_MAP,"},{"line_number":59,"context_line":"                                                   plugin_const.CORE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_a8591e90","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":69},"updated":"2016-08-01 20:01:08.000000000","message":"This is usually defined above as a module local constant called like EXTENDED_ATTRIBUTES or something.","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"edd992e529e623bfaba38cfc15a728eebf75937e","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def get_extended_resources(self, version):"},{"line_number":66,"context_line":"        if version \u003d\u003d \"2.0\":"},{"line_number":67,"context_line":"            return {}"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            return {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_68ca861c","line":67,"range":{"start_line":67,"start_character":12,"end_line":67,"end_character":21},"updated":"2016-08-01 20:01:08.000000000","message":"This should be returning something non-empty like the EXTENDED_ATTRIBUTES thing above. Could this be part of the problem you\u0027re trying to track down?","commit_id":"66fc0aad7df176dd3b94d78764de874fe04cff4a"}],"neutron/objects/address_scope.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_db import exception as db_exc"},{"line_number":18,"context_line":"from oslo_versionedobjects import fields as obj_fields"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.db import api as db_api"},{"line_number":22,"context_line":"from neutron.db.models import address_scope as models"},{"line_number":23,"context_line":"from neutron.objects import base"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_f02ae2e6","line":20,"updated":"2016-08-26 04:11:17.000000000","message":"nit: too many spaces, I think. This shouldn\u0027t add another one.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_db import exception as db_exc"},{"line_number":18,"context_line":"from oslo_versionedobjects import fields as obj_fields"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron.db import api as db_api"},{"line_number":22,"context_line":"from neutron.db.models import address_scope as models"},{"line_number":23,"context_line":"from neutron.objects import base"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b6ac048d","line":20,"in_reply_to":"fa7ab95a_f02ae2e6","updated":"2016-12-06 20:37:53.000000000","message":"Done","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        with db_api.autonested_transaction(self.obj_context.session):"},{"line_number":55,"context_line":"            query \u003d self._context.session.query(self.db_model).filter_by("},{"line_number":56,"context_line":"                        id\u003dself.id)"},{"line_number":57,"context_line":"            count \u003d query.update({\u0027hash\u0027: self.hash})"},{"line_number":58,"context_line":"            print count"},{"line_number":59,"context_line":"            print query"},{"line_number":60,"context_line":"            if not count:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_300c4a94","line":57,"range":{"start_line":57,"start_character":26,"end_line":57,"end_character":32},"updated":"2016-08-26 04:11:17.000000000","message":"I think @Kevin is trying to discourage using updates like this because it interferes with the ability to get certain event callbacks from sqlalchemy. That might be another vote for adding a revision to address scope and let his magic do the dirty work for you. But, this might be okay for a while in this context. I\u0027m not really sure.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        with db_api.autonested_transaction(self.obj_context.session):"},{"line_number":55,"context_line":"            query \u003d self._context.session.query(self.db_model).filter_by("},{"line_number":56,"context_line":"                        id\u003dself.id)"},{"line_number":57,"context_line":"            count \u003d query.update({\u0027hash\u0027: self.hash})"},{"line_number":58,"context_line":"            print count"},{"line_number":59,"context_line":"            print query"},{"line_number":60,"context_line":"            if not count:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_9693885a","line":57,"range":{"start_line":57,"start_character":26,"end_line":57,"end_character":32},"in_reply_to":"fa7ab95a_0cad46e9","updated":"2016-12-06 20:37:53.000000000","message":"Going to leave as is...","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"52c9bc60ae747e5b024f822614c4671cf9cbf7d1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        with db_api.autonested_transaction(self.obj_context.session):"},{"line_number":55,"context_line":"            query \u003d self._context.session.query(self.db_model).filter_by("},{"line_number":56,"context_line":"                        id\u003dself.id)"},{"line_number":57,"context_line":"            count \u003d query.update({\u0027hash\u0027: self.hash})"},{"line_number":58,"context_line":"            print count"},{"line_number":59,"context_line":"            print query"},{"line_number":60,"context_line":"            if not count:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa7ab95a_0cad46e9","line":57,"range":{"start_line":57,"start_character":26,"end_line":57,"end_character":32},"in_reply_to":"fa7ab95a_300c4a94","updated":"2016-09-06 21:00:02.000000000","message":"I don\u0027t like this at all. In fact, I really would like to avoid touching the object altogether. Maybe we employ some of that callbacks magic instead.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"8645817863fc1f7b06bc471cb20c6d98ce5cddd8","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if updates:"},{"line_number":47,"context_line":"            with db_api.autonested_transaction(self.obj_context.session):"},{"line_number":48,"context_line":"                #if \u0027hash\u0027 in updates:"},{"line_number":49,"context_line":"                    #self._lock_address_scope()"},{"line_number":50,"context_line":"                super(AddressScope, self).update()"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"df140735_3676d571","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":17},"updated":"2017-06-06 06:42:20.000000000","message":"note: need to confirm if this is not required","commit_id":"f16d8db8f3f559fc8745393fdf565c0165e813c6"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"f3ea628df27825ab6452b00c417d19182275b050","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                                    \"filter-validation\","},{"line_number":175,"context_line":"                                    \"port-mac-address-regenerate\","},{"line_number":176,"context_line":"                                    \"binding-extended\","},{"line_number":177,"context_line":"                                    \"subnet_onboard\"]"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    # List of agent types for which all binding_failed ports should try to be"},{"line_number":180,"context_line":"    # rebound when agent revive"}],"source_content_type":"text/x-python","patch_set":36,"id":"3f79a3b5_1402d7b9","line":177,"range":{"start_line":177,"start_character":37,"end_line":177,"end_character":51},"updated":"2018-12-10 14:16:25.000000000","message":"Nit: it might be cleaner to just import the subnet_onboard API definition from neutron-lib and use its ALIAS.","commit_id":"7b38ece284f562a78ce62e694ff0418264f5cd9d"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"242770c0912dd862e92f99d030b41618791f3eb1","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                                    \"filter-validation\","},{"line_number":175,"context_line":"                                    \"port-mac-address-regenerate\","},{"line_number":176,"context_line":"                                    \"binding-extended\","},{"line_number":177,"context_line":"                                    \"subnet_onboard\"]"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    # List of agent types for which all binding_failed ports should try to be"},{"line_number":180,"context_line":"    # rebound when agent revive"}],"source_content_type":"text/x-python","patch_set":38,"id":"3f79a3b5_4e20fb4a","line":177,"range":{"start_line":177,"start_character":37,"end_line":177,"end_character":51},"updated":"2018-12-19 17:23:04.000000000","message":"In a previous patch set it was suggested to use a constant from the subnetpool API definition.","commit_id":"4a2ce99cd95e9ab6d71950e44bbe97fe95935c3f"}],"neutron/tests/etc/policy.json":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ec3ff3abc5ef4b123fb410e0caffa9b6ad0316d0","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \"update_subnetpool\": \"rule:admin_or_owner\","},{"line_number":32,"context_line":"    \"update_subnetpool:is_default\": \"rule:admin_only\","},{"line_number":33,"context_line":"    \"delete_subnetpool\": \"rule:admin_or_owner\","},{"line_number":34,"context_line":"    \"adopt_network_subnets\": \"rule:admin_or_owner or rule:shared_subnetpools\","},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"create_address_scope\": \"\","},{"line_number":37,"context_line":"    \"create_address_scope:shared\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":4,"id":"fa7ab95a_d01ddebe","line":34,"range":{"start_line":34,"start_character":5,"end_line":34,"end_character":26},"updated":"2016-08-26 04:11:17.000000000","message":"I\u0027m sure you know this but this file has to be the same as the other policy.json. Why do we need them both? I honestly don\u0027t know.","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"57cb811c19df72034e0e83219fda83287aad458d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \"update_subnetpool\": \"rule:admin_or_owner\","},{"line_number":32,"context_line":"    \"update_subnetpool:is_default\": \"rule:admin_only\","},{"line_number":33,"context_line":"    \"delete_subnetpool\": \"rule:admin_or_owner\","},{"line_number":34,"context_line":"    \"adopt_network_subnets\": \"rule:admin_or_owner or rule:shared_subnetpools\","},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"create_address_scope\": \"\","},{"line_number":37,"context_line":"    \"create_address_scope:shared\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":4,"id":"3a71b18c_36af147e","line":34,"range":{"start_line":34,"start_character":5,"end_line":34,"end_character":26},"in_reply_to":"fa7ab95a_d01ddebe","updated":"2016-12-06 20:37:53.000000000","message":"Done","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"52c9bc60ae747e5b024f822614c4671cf9cbf7d1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    \"update_subnetpool\": \"rule:admin_or_owner\","},{"line_number":32,"context_line":"    \"update_subnetpool:is_default\": \"rule:admin_only\","},{"line_number":33,"context_line":"    \"delete_subnetpool\": \"rule:admin_or_owner\","},{"line_number":34,"context_line":"    \"adopt_network_subnets\": \"rule:admin_or_owner or rule:shared_subnetpools\","},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"create_address_scope\": \"\","},{"line_number":37,"context_line":"    \"create_address_scope:shared\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":4,"id":"fa7ab95a_6cd09254","line":34,"range":{"start_line":34,"start_character":5,"end_line":34,"end_character":26},"in_reply_to":"fa7ab95a_d01ddebe","updated":"2016-09-06 21:00:02.000000000","message":"Oops, I must have not done a git add on the test policy.json. That would be why this passed pep8 locally :).","commit_id":"ac8456440c8b3f3de9a178d572fa2aebe3b6743f"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"e33c672ee8d045f88c4b4786914fa88793aa6fdb","unresolved":false,"context_lines":[{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def _create_subnetpool(self, fmt, prefixes,"},{"line_number":372,"context_line":"                           expected_res_status\u003dNone, admin\u003dFalse, **kwargs):"},{"line_number":373,"context_line":"        subnetpool \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: prefixes, \u0027subnets\u0027: None}}"},{"line_number":374,"context_line":"        for k, v in kwargs.items():"},{"line_number":375,"context_line":"            subnetpool[\u0027subnetpool\u0027][k] \u003d str(v)"},{"line_number":376,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_03b4e5cf","line":373,"range":{"start_line":373,"start_character":59,"end_line":373,"end_character":74},"updated":"2017-10-25 21:36:58.000000000","message":"this works with your change to the api def, I can\u0027t pass the tests without this. why is this a temporary change?","commit_id":"d34b45210ed9ff0911d5c343d2f6592ba39b3600"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"055ad19d7f77d8bbbe99bcaca10a458ef93575ca","unresolved":false,"context_lines":[{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def _create_subnetpool(self, fmt, prefixes,"},{"line_number":372,"context_line":"                           expected_res_status\u003dNone, admin\u003dFalse, **kwargs):"},{"line_number":373,"context_line":"        subnetpool \u003d {\u0027subnetpool\u0027: {\u0027prefixes\u0027: prefixes, \u0027subnets\u0027: None}}"},{"line_number":374,"context_line":"        for k, v in kwargs.items():"},{"line_number":375,"context_line":"            subnetpool[\u0027subnetpool\u0027][k] \u003d str(v)"},{"line_number":376,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_f8a3a4fe","line":373,"range":{"start_line":373,"start_character":59,"end_line":373,"end_character":74},"in_reply_to":"3f4b6375_03b4e5cf","updated":"2017-10-26 10:27:34.000000000","message":"Temporary ? :)","commit_id":"d34b45210ed9ff0911d5c343d2f6592ba39b3600"}],"neutron/tests/unit/extensions/test_subnet_onboard.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f4455aed242e5e6cdc64dbc77ed0d0b8653fd0da","unresolved":false,"context_lines":[{"line_number":24,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class SubnetOnboardTests(test_plugin.Ml2PluginV2TestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @contextlib.contextmanager"},{"line_number":30,"context_line":"    def address_scope(self, ip_version, prefixes\u003dNone, shared\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ff346bd7_f934764c","line":27,"updated":"2017-07-24 21:01:02.000000000","message":"Why not a test case for the InvalidOnboardRequest exception?","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"11c4d3b70ac1940a2074b44ce1bdc7e95cf48fba","unresolved":false,"context_lines":[{"line_number":24,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class SubnetOnboardTests(test_plugin.Ml2PluginV2TestCase):"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @contextlib.contextmanager"},{"line_number":30,"context_line":"    def address_scope(self, ip_version, prefixes\u003dNone, shared\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":16,"id":"df3967d1_5fa1b2f7","line":27,"in_reply_to":"ff346bd7_f934764c","updated":"2017-08-03 20:11:05.000000000","message":"Done, plus the NetworkNotFound exception.","commit_id":"9c0c78b4d1790f312f988f793ad0e2851c64cf94"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"0cd01cb78f6391d1874f65387ca4dd20ef73de3a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                self.context, subnetpool[\u0027id\u0027],"},{"line_number":65,"context_line":"                {\u0027network_id\u0027: subnet_to_onboard[\u0027network_id\u0027],"},{"line_number":66,"context_line":"                 \u0027ip_version\u0027: self.ip_version})"},{"line_number":67,"context_line":"            subnetpool \u003d self.driver.get_subnetpool(self.context,"},{"line_number":68,"context_line":"                                                    subnetpool[\u0027id\u0027])"},{"line_number":69,"context_line":"            onboarded_subnet \u003d self.driver.get_subnet(self.context,"},{"line_number":70,"context_line":"                                                      subnet_to_onboard[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":40,"id":"9fdfeff1_1f10aa56","line":67,"updated":"2019-02-01 15:24:46.000000000","message":"I am seeing intermittent failures both in the check jobs and locally related to this call. When using the new DB engine facade, the onboarded doesn\u0027t always show up in the prefix list even though all the debugging in onboard_network_subnets indicates it was actually onboarded. We should the onboarded subnet in the prefix list (see L75), but I see random cases where we don\u0027t see the onboarded prefix and I can confirm onboard_network_subnets handled the subnet correctly.","commit_id":"27fe77e1f6ac39898a0bbc01b7b21abe09cca864"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"647726c39af0c852c4d6b84d982be97412a6f67c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _test_onboard_subnet(self, subnetpool, cidr_to_onboard):"},{"line_number":59,"context_line":"        with self.subnet(cidr\u003dcidr_to_onboard,"},{"line_number":60,"context_line":"                         ip_version\u003dself.ip_version) as subnet_to_onboard:"},{"line_number":61,"context_line":"            subnet_to_onboard \u003d subnet_to_onboard[\u0027subnet\u0027]"},{"line_number":62,"context_line":"            self.driver.onboard_network_subnets("},{"line_number":63,"context_line":"                self.context, subnetpool[\u0027id\u0027],"},{"line_number":64,"context_line":"                {\u0027network_id\u0027: subnet_to_onboard[\u0027network_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_5ae28531","line":61,"updated":"2019-02-06 00:05:06.000000000","message":"Two suggestions:\n\n* Suggest adding an assertion to ensure that \u0027subnet_to_onboard\u0027 doesn\u0027t have \u0027subnetpool_id\u0027 before onboarding this subnet.\n* Suggest adding another assertion to ensure that \u0027onboarded_prefix\u0027 is not in \u0027subnetpool_prefixes\u0027 before the onboarding.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"590eac21d2a51baf5d4a133e8e66ff98e0e1dea6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _test_onboard_subnet(self, subnetpool, cidr_to_onboard):"},{"line_number":59,"context_line":"        with self.subnet(cidr\u003dcidr_to_onboard,"},{"line_number":60,"context_line":"                         ip_version\u003dself.ip_version) as subnet_to_onboard:"},{"line_number":61,"context_line":"            subnet_to_onboard \u003d subnet_to_onboard[\u0027subnet\u0027]"},{"line_number":62,"context_line":"            self.driver.onboard_network_subnets("},{"line_number":63,"context_line":"                self.context, subnetpool[\u0027id\u0027],"},{"line_number":64,"context_line":"                {\u0027network_id\u0027: subnet_to_onboard[\u0027network_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_b9b5b6cf","line":61,"in_reply_to":"9fdfeff1_3e8e8cd0","updated":"2019-02-06 15:15:33.000000000","message":"Now that I\u0027m thinking about this and getting into refactoring some tests, it has occurred to me that a subnet may actually belong to another subnet pool and onboarding can be used to move subnets between pools (and by extension address scopes). \n\nA subnet may actually have a subnetpool_id when it is onboarded and that\u0027s OK, the key is to make sure it changes and that the subnet\u0027s CIDR becomes a part of the prefix list of the target subnet pool after onboarding. In this case, the subnet pool that the subnet is being moved out of would simply see the prefix released back to the pool, the behavior is just like that of a subnet delete (if address scopes are different between original and target pools, otherwise address scope prefix uniqueness constraints should block the onboard).\n\nYou\u0027ve got me thinking about other corner cases to test, which is great. I don\u0027t think these 2 specific assertions you mention are valid since the requirements for onboarding are a little more involved. Clearly there are a few more test cases I\u0027ve overlooked.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"21148559b937e418de242fdd1072627a70f8141c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def _test_onboard_subnet(self, subnetpool, cidr_to_onboard):"},{"line_number":59,"context_line":"        with self.subnet(cidr\u003dcidr_to_onboard,"},{"line_number":60,"context_line":"                         ip_version\u003dself.ip_version) as subnet_to_onboard:"},{"line_number":61,"context_line":"            subnet_to_onboard \u003d subnet_to_onboard[\u0027subnet\u0027]"},{"line_number":62,"context_line":"            self.driver.onboard_network_subnets("},{"line_number":63,"context_line":"                self.context, subnetpool[\u0027id\u0027],"},{"line_number":64,"context_line":"                {\u0027network_id\u0027: subnet_to_onboard[\u0027network_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_3e8e8cd0","line":61,"in_reply_to":"9fdfeff1_5ae28531","updated":"2019-02-06 14:49:26.000000000","message":"- This is a good suggestion, and in fact there should probably also be a test that asserts the behavior when the subnets to onboard are already in the subnet pool.\n\n- There are actually cases where the prefix to onboard overlaps with a prefix in subnetpool_prefixes. In those cases we don\u0027t want to block the onboard, we just want to simply allocate the prefix and update the subnetpool_id of the onboarded subnet. So, that assertion won\u0027t always hold.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"647726c39af0c852c4d6b84d982be97412a6f67c","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                              self._test_onboard_subnet_non_existing_network,"},{"line_number":149,"context_line":"                              subnetpool, self.cidr_to_onboard)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def _cidr_matches_subnetpool_prefixes(self, cidr, prefixes):"},{"line_number":152,"context_line":"        pool_ip_set \u003d netaddr.IPSet("},{"line_number":153,"context_line":"                iterable\u003d[netaddr.IPNetwork(x) for x in prefixes])"},{"line_number":154,"context_line":"        return netaddr.IPNetwork(cidr) in pool_ip_set"}],"source_content_type":"text/x-python","patch_set":46,"id":"9fdfeff1_1a095ddc","line":151,"range":{"start_line":151,"start_character":8,"end_line":151,"end_character":41},"updated":"2019-02-06 00:05:06.000000000","message":"It looks this method is never used.","commit_id":"105a38394d318c82147270a6eb056793d4a912fa"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c7c442f205db46f72156d6c1ad9dec3456ba4393","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                self._test_onboard_cidr(subnetpool[\u0027id\u0027], self.cidr_to_onboard)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_onboard_subnet_overlapping_cidr_no_address_scope(self):"},{"line_number":73,"context_line":"        with self.subnetpool(self.ip_version,"},{"line_number":74,"context_line":"                             prefixes\u003dself.subnetpool_prefixes) as subnetpool:"},{"line_number":75,"context_line":"            with self.subnet(cidr\u003dself.overlapping_cidr,"},{"line_number":76,"context_line":"                             subnetpool_id\u003dsubnetpool[\u0027id\u0027],"},{"line_number":77,"context_line":"                             ip_version\u003dself.ip_version):"},{"line_number":78,"context_line":"                self.assertRaises(exc.IllegalSubnetPoolUpdate,"}],"source_content_type":"text/x-python","patch_set":51,"id":"9fdfeff1_e289c274","line":75,"range":{"start_line":73,"start_character":0,"end_line":75,"end_character":16},"updated":"2019-02-14 00:12:29.000000000","message":"super nit: you can combine two \u0027with\u0027 into one.","commit_id":"42aa99391abf295e28d0b4df18343b33ec552e7e"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3c8fa85ca43de9bd8f107bf2e10e1c04a209ba08","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                self._test_onboard_cidr(subnetpool[\u0027id\u0027], self.cidr_to_onboard)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_onboard_subnet_overlapping_cidr_no_address_scope(self):"},{"line_number":73,"context_line":"        with self.subnetpool(self.ip_version,"},{"line_number":74,"context_line":"                             prefixes\u003dself.subnetpool_prefixes) as subnetpool:"},{"line_number":75,"context_line":"            with self.subnet(cidr\u003dself.overlapping_cidr,"},{"line_number":76,"context_line":"                             subnetpool_id\u003dsubnetpool[\u0027id\u0027],"},{"line_number":77,"context_line":"                             ip_version\u003dself.ip_version):"},{"line_number":78,"context_line":"                self.assertRaises(exc.IllegalSubnetPoolUpdate,"}],"source_content_type":"text/x-python","patch_set":51,"id":"9fdfeff1_d9891075","line":75,"range":{"start_line":73,"start_character":0,"end_line":75,"end_character":16},"in_reply_to":"9fdfeff1_e289c274","updated":"2019-02-14 02:27:08.000000000","message":"ACK","commit_id":"42aa99391abf295e28d0b4df18343b33ec552e7e"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"c7c442f205db46f72156d6c1ad9dec3456ba4393","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                subnet_to_onboard[\u0027network_id\u0027],"},{"line_number":232,"context_line":"                subnetpool_id)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _cidr_matches_subnetpool_prefixes(self, cidr, prefixes):"},{"line_number":235,"context_line":"        pool_ip_set \u003d netaddr.IPSet("},{"line_number":236,"context_line":"                iterable\u003d[netaddr.IPNetwork(x) for x in prefixes])"},{"line_number":237,"context_line":"        return netaddr.IPNetwork(cidr) in pool_ip_set"}],"source_content_type":"text/x-python","patch_set":51,"id":"9fdfeff1_e2c1c255","line":234,"range":{"start_line":234,"start_character":8,"end_line":234,"end_character":41},"updated":"2019-02-14 00:12:29.000000000","message":"This looks this method is never used.","commit_id":"42aa99391abf295e28d0b4df18343b33ec552e7e"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3c8fa85ca43de9bd8f107bf2e10e1c04a209ba08","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                subnet_to_onboard[\u0027network_id\u0027],"},{"line_number":232,"context_line":"                subnetpool_id)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _cidr_matches_subnetpool_prefixes(self, cidr, prefixes):"},{"line_number":235,"context_line":"        pool_ip_set \u003d netaddr.IPSet("},{"line_number":236,"context_line":"                iterable\u003d[netaddr.IPNetwork(x) for x in prefixes])"},{"line_number":237,"context_line":"        return netaddr.IPNetwork(cidr) in pool_ip_set"}],"source_content_type":"text/x-python","patch_set":51,"id":"9fdfeff1_39985cbe","line":234,"range":{"start_line":234,"start_character":8,"end_line":234,"end_character":41},"in_reply_to":"9fdfeff1_e2c1c255","updated":"2019-02-14 02:27:08.000000000","message":"Yeah, good catch. Another artifact of refactoring.","commit_id":"42aa99391abf295e28d0b4df18343b33ec552e7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8c3ffa8bd4ed0ec064e4a4267990dd66c30a54eb","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import contextlib"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import netaddr"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron_lib import exceptions as exc"},{"line_number":22,"context_line":"from oslo_utils import uuidutils"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_03c14c54","line":19,"updated":"2019-02-15 08:51:45.000000000","message":"this should be moved to section below as it\u0027s 3rd party lib","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7cb187968a8ca6acfa93c8705b4b14f671058435","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import contextlib"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import netaddr"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from neutron_lib import exceptions as exc"},{"line_number":22,"context_line":"from oslo_utils import uuidutils"}],"source_content_type":"text/x-python","patch_set":52,"id":"9fdfeff1_a60ac922","line":19,"in_reply_to":"9fdfeff1_03c14c54","updated":"2019-02-15 14:55:06.000000000","message":"Done","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"80e4838e902e6157d91b3fe28d96fb06f6c9f888","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        scope_data \u003d {\u0027tenant_id\u0027: tenant_id, \u0027ip_version\u0027: ip_version,"},{"line_number":41,"context_line":"                      \u0027shared\u0027: shared, \u0027name\u0027: name + \u0027-scope\u0027}"},{"line_number":42,"context_line":"        with db_api.CONTEXT_WRITER.using(self.context):"},{"line_number":43,"context_line":"            yield self.driver.create_address_scope("},{"line_number":44,"context_line":"                self.context,"},{"line_number":45,"context_line":"                {\u0027address_scope\u0027: scope_data})"}],"source_content_type":"text/x-python","patch_set":57,"id":"9fdfeff1_530d063c","line":42,"updated":"2019-02-27 07:26:47.000000000","message":"so this is the \"hack\" which makes it working with \"context\" instead of \"context.session\" in update_subnetpool, right?","commit_id":"da66de80333c2351aa96d8b2068b936925006f6d"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"9cc78ed7987fe5a4b60a97bfa02a358f71422455","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        scope_data \u003d {\u0027tenant_id\u0027: tenant_id, \u0027ip_version\u0027: ip_version,"},{"line_number":41,"context_line":"                      \u0027shared\u0027: shared, \u0027name\u0027: name + \u0027-scope\u0027}"},{"line_number":42,"context_line":"        with db_api.CONTEXT_WRITER.using(self.context):"},{"line_number":43,"context_line":"            yield self.driver.create_address_scope("},{"line_number":44,"context_line":"                self.context,"},{"line_number":45,"context_line":"                {\u0027address_scope\u0027: scope_data})"}],"source_content_type":"text/x-python","patch_set":57,"id":"9fdfeff1_56409435","line":42,"in_reply_to":"9fdfeff1_530d063c","updated":"2019-02-27 07:31:44.000000000","message":"this is to ensure enginefacade creates the session rather than an ad-hoc session being created at: https://github.com/openstack/neutron-lib/blob/master/neutron_lib/context.py#L157     when other code which uses only enginefacade is invoked within this block, it has no way of getting at that L157 session, so you get different parts of the code using two different sessions /transactions.","commit_id":"da66de80333c2351aa96d8b2068b936925006f6d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"005a63277cfbe1832c0e83ca350f584129ad6853","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        scope_data \u003d {\u0027tenant_id\u0027: tenant_id, \u0027ip_version\u0027: ip_version,"},{"line_number":41,"context_line":"                      \u0027shared\u0027: shared, \u0027name\u0027: name + \u0027-scope\u0027}"},{"line_number":42,"context_line":"        with db_api.CONTEXT_WRITER.using(self.context):"},{"line_number":43,"context_line":"            yield self.driver.create_address_scope("},{"line_number":44,"context_line":"                self.context,"},{"line_number":45,"context_line":"                {\u0027address_scope\u0027: scope_data})"}],"source_content_type":"text/x-python","patch_set":57,"id":"9fdfeff1_56973491","line":42,"in_reply_to":"9fdfeff1_56409435","updated":"2019-02-27 07:34:49.000000000","message":"yes, that\u0027s what I though. Thx for explanation :)","commit_id":"da66de80333c2351aa96d8b2068b936925006f6d"}],"releasenotes/notes/subnet-onboard-e4d09fa403a1053e.yaml":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"242770c0912dd862e92f99d030b41618791f3eb1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Subnets can now be moved into a subnet pool."},{"line_number":4,"context_line":"  - Subnets can now be created with a default prefix length using POST or PUT to the subnetpools resource."}],"source_content_type":"text/x-yaml","patch_set":38,"id":"3f79a3b5_cef2cbe1","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":106},"updated":"2018-12-19 17:23:04.000000000","message":"Yikes, this isn\u0027t true :)","commit_id":"4a2ce99cd95e9ab6d71950e44bbe97fe95935c3f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8c3ffa8bd4ed0ec064e4a4267990dd66c30a54eb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Existing subnets can now be moved into a subnet pool, and by extension"},{"line_number":4,"context_line":"    can be moved into address scopes they were not initially participating in."}],"source_content_type":"text/x-yaml","patch_set":52,"id":"9fdfeff1_63d13823","line":4,"updated":"2019-02-15 08:51:45.000000000","message":"IMO this is one of the biggest new features in current release so it\u0027s worth to add \"prelude\" section for it :)","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7cb187968a8ca6acfa93c8705b4b14f671058435","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Existing subnets can now be moved into a subnet pool, and by extension"},{"line_number":4,"context_line":"    can be moved into address scopes they were not initially participating in."}],"source_content_type":"text/x-yaml","patch_set":52,"id":"9fdfeff1_66006103","line":4,"in_reply_to":"9fdfeff1_63d13823","updated":"2019-02-15 14:55:06.000000000","message":"Done","commit_id":"6d92987901d43ee6c4c85cfe4cf71f56abb0a1d4"}]}
