)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dfd9aad4f0b88a9d00e46d8d8a01b910c0763a62","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Numan Siddique \u003cnusiddiq@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-07 17:55:10 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Support address scopes in subnetpools"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch supports the following"},{"line_number":10,"context_line":" - create a subnetpool with address scope"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba3cc151_0df58beb","line":7,"updated":"2015-07-08 21:52:06.000000000","message":"nit:  I think of it the other way around (subnetpools in address scopes) but I see what you mean.  Suggestion: \"Support subnetpool association to an address scope.","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"de6d1d35c9ea1b74a8c4efbebad5ba7d6ae88d8b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Numan Siddique \u003cnusiddiq@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-07 17:55:10 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Support address scopes in subnetpools"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch supports the following"},{"line_number":10,"context_line":" - create a subnetpool with address scope"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba3cc151_d2f3a971","line":7,"in_reply_to":"ba3cc151_0df58beb","updated":"2015-07-09 05:24:07.000000000","message":"Sure.","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"}],"neutron/api/v2/attributes.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7d03e3ebc6a0644cff783e0fc465e765f43f3025","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                          \u0027convert_to\u0027: convert_to_int,"},{"line_number":853,"context_line":"                          \u0027is_visible\u0027: True},"},{"line_number":854,"context_line":"        \u0027address_scope_id\u0027: {\u0027allow_post\u0027: True,"},{"line_number":855,"context_line":"                             \u0027allow_put\u0027: False,"},{"line_number":856,"context_line":"                             \u0027default\u0027: ATTR_NOT_SPECIFIED,"},{"line_number":857,"context_line":"                             \u0027is_visible\u0027: True},"},{"line_number":858,"context_line":"        SHARED: {\u0027allow_post\u0027: True,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_91bc74dd","line":855,"updated":"2015-07-01 17:30:00.000000000","message":"Should allow PUT on this. Moving an existing subnet pool into an address scope is definitely an important use case to support.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"}],"neutron/common/exceptions.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"68eb64328b2b1e448f81071258d29900dd279aae","unresolved":false,"context_lines":[{"line_number":456,"context_line":""},{"line_number":457,"context_line":"class IllegalSubnetPoolAssociationToAddressScope(BadRequest):"},{"line_number":458,"context_line":"    message \u003d _(\"Illegal subnetpool association: subnetpool %(subnetpool_id)s \""},{"line_number":459,"context_line":"                \" cannot be associated with address scope\""},{"line_number":460,"context_line":"                \" %(address_scope_id)s\")"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_0f725011","line":459,"updated":"2015-08-06 17:59:03.000000000","message":"nit: there was a trailing space on the previous line already","commit_id":"bde7838d047d68cbc4aa3b301f236136ac1c17fc"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"68eb64328b2b1e448f81071258d29900dd279aae","unresolved":false,"context_lines":[{"line_number":457,"context_line":"class IllegalSubnetPoolAssociationToAddressScope(BadRequest):"},{"line_number":458,"context_line":"    message \u003d _(\"Illegal subnetpool association: subnetpool %(subnetpool_id)s \""},{"line_number":459,"context_line":"                \" cannot be associated with address scope\""},{"line_number":460,"context_line":"                \" %(address_scope_id)s\")"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"class IllegalSubnetPoolUpdate(BadRequest):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_2fdf0cda","line":460,"updated":"2015-08-06 17:59:03.000000000","message":"nit: to be consistent this space should be on the previous line\n\nI would not hold up this change for either, just do in a follow-on.","commit_id":"bde7838d047d68cbc4aa3b301f236136ac1c17fc"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"733a8c39f6003d7e08bb28156bfe89e18fb9c7d2","unresolved":false,"context_lines":[{"line_number":457,"context_line":"class IllegalSubnetPoolAssociationToAddressScope(BadRequest):"},{"line_number":458,"context_line":"    message \u003d _(\"Illegal subnetpool association: subnetpool %(subnetpool_id)s \""},{"line_number":459,"context_line":"                \" cannot be associated with address scope\""},{"line_number":460,"context_line":"                \" %(address_scope_id)s\")"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"class IllegalSubnetPoolUpdate(BadRequest):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a4dcd0f_62c9abab","line":460,"in_reply_to":"1a4dcd0f_2fdf0cda","updated":"2015-08-06 18:15:26.000000000","message":"Sure. I will do that.\nThanks","commit_id":"bde7838d047d68cbc4aa3b301f236136ac1c17fc"}],"neutron/db/address_scope_db.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"4dfea5227fc1661246f44dac8034154e6f02b167","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                          filters\u003dfilters)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_address_scope(self, context, id):"},{"line_number":103,"context_line":"        if self._get_subnetpools_by_address_scope_id(context, id):"},{"line_number":104,"context_line":"            raise ext_address_scope.AddressScopeInUse(address_scope_id\u003did)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_09eeeaec","line":103,"updated":"2015-07-08 16:44:36.000000000","message":"Should we do this check inside the transaction?  Looks like a potential race condition (albeit one with a small probability).  A subnet pool could theoretically be created between this call and the start of the delete transaction.  This is likely a very low probability scenario, but it does seem to exist. This call requires a DB query anyway, so I\u0027m not sure this is really a fail-fast scenario. Any reason to not move this check inside the delete transaction?","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"2d3598c93be2e3d16c2144e622edd896396f1c19","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                          filters\u003dfilters)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def delete_address_scope(self, context, id):"},{"line_number":103,"context_line":"        if self._get_subnetpools_by_address_scope_id(context, id):"},{"line_number":104,"context_line":"            raise ext_address_scope.AddressScopeInUse(address_scope_id\u003did)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_6731d659","line":103,"in_reply_to":"ba3cc151_09eeeaec","updated":"2015-07-08 20:02:15.000000000","message":"I never thought of it as I don\u0027t have much experience with db programming. \nI will move it inside the transaction\nThanks","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"97f90c6a2b08ee6194d8a978ccd827e93317811c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            raise ext_address_scope.AddressScopeNotFound(address_scope_id\u003did)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def is_address_scope_associable(self, context, id):"},{"line_number":55,"context_line":"        \"\"\"Check if address scope can be associated by the tenant."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        Address scope is associable if the context is admin or"},{"line_number":58,"context_line":"        the address scope belongs to the tenant"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_8e6aa319","line":55,"updated":"2015-07-11 04:14:32.000000000","message":"nit: to-\u003ewith","commit_id":"4c11444832f596cb3246ecd5f69bc537f6699cc2"}],"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"4696969d133d7088f3ee3c944300654fa1bb5a9b","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # NOTE(tidwellr): see note in _get_all_subnets()"},{"line_number":161,"context_line":"        return context.session.query(models_v2.SubnetPool).all()"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _get_subnetpools_by_addrscope_id(self, context, addrscope_id):"},{"line_number":164,"context_line":"        # NOTE(vikram.choudhary): see note in _get_all_subnets()"},{"line_number":165,"context_line":"        subnetpool_qry \u003d context.session.query(models_v2.SubnetPool)"},{"line_number":166,"context_line":"        return subnetpool_qry.filter_by(address_scope_id\u003daddrscope_id).all()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_89dbec4e","line":163,"updated":"2015-07-01 17:46:18.000000000","message":"I think its better to have \u0027address_scope_id\u0027 as function param.\nSame for the other places as well.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"4696969d133d7088f3ee3c944300654fa1bb5a9b","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _get_subnetpools_by_addrscope_id(self, context, addrscope_id):"},{"line_number":164,"context_line":"        # NOTE(vikram.choudhary): see note in _get_all_subnets()"},{"line_number":165,"context_line":"        subnetpool_qry \u003d context.session.query(models_v2.SubnetPool)"},{"line_number":166,"context_line":"        return subnetpool_qry.filter_by(address_scope_id\u003daddrscope_id).all()"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _get_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_e9c15855","line":165,"updated":"2015-07-01 17:46:18.000000000","message":"how about subnetpool_query","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7d03e3ebc6a0644cff783e0fc465e765f43f3025","unresolved":false,"context_lines":[{"line_number":706,"context_line":"                         \u0027max_prefixlen\u0027: sp_reader.max_prefixlen,"},{"line_number":707,"context_line":"                         \u0027shared\u0027: sp_reader.shared,"},{"line_number":708,"context_line":"                         \u0027default_quota\u0027: sp_reader.default_quota,"},{"line_number":709,"context_line":"                         \u0027address_scope_id\u0027: sp_reader.address_scope_id}"},{"line_number":710,"context_line":"            subnetpool \u003d models_v2.SubnetPool(**pool_args)"},{"line_number":711,"context_line":"            context.session.add(subnetpool)"},{"line_number":712,"context_line":"            for prefix in sp_reader.prefixes:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_37b0f889","line":709,"updated":"2015-07-01 17:30:00.000000000","message":"We also need to handle address_scope_id in update_subnetpool() and check for overlapping prefixes in the address scope supplied by the user.  As written, this doesn\u0027t allow a subnetpool to move between address scopes.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dfd9aad4f0b88a9d00e46d8d8a01b910c0763a62","unresolved":false,"context_lines":[{"line_number":652,"context_line":"    def _validate_address_scope_id(self, context, address_scope_id,"},{"line_number":653,"context_line":"                                   subnetpool_id, sp_prefixes):"},{"line_number":654,"context_line":"        if address_scope_id is None or ("},{"line_number":655,"context_line":"                address_scope_id is attributes.ATTR_NOT_SPECIFIED):"},{"line_number":656,"context_line":"            return"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        # check if address_scope_id exists or not"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_cd7a4324","line":655,"updated":"2015-07-08 21:52:06.000000000","message":"* if not attributes.is_attr_set(address_scope_id):\n      return","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"de6d1d35c9ea1b74a8c4efbebad5ba7d6ae88d8b","unresolved":false,"context_lines":[{"line_number":652,"context_line":"    def _validate_address_scope_id(self, context, address_scope_id,"},{"line_number":653,"context_line":"                                   subnetpool_id, sp_prefixes):"},{"line_number":654,"context_line":"        if address_scope_id is None or ("},{"line_number":655,"context_line":"                address_scope_id is attributes.ATTR_NOT_SPECIFIED):"},{"line_number":656,"context_line":"            return"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        # check if address_scope_id exists or not"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_f2fa6d42","line":655,"in_reply_to":"ba3cc151_cd7a4324","updated":"2015-07-09 05:24:07.000000000","message":"Done","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dfd9aad4f0b88a9d00e46d8d8a01b910c0763a62","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        else:"},{"line_number":741,"context_line":"            update[key] \u003d orig[key]"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":744,"context_line":"        \"\"\"Update a subnetpool\"\"\""},{"line_number":745,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":746,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_252743b7","line":743,"updated":"2015-07-08 21:52:06.000000000","message":"In the spec, I had said that we would only allow a tenant to update a subnetpool associated with an address scope if the tenant is the owner of both objects or the tenant is admin.","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"de6d1d35c9ea1b74a8c4efbebad5ba7d6ae88d8b","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        else:"},{"line_number":741,"context_line":"            update[key] \u003d orig[key]"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":744,"context_line":"        \"\"\"Update a subnetpool\"\"\""},{"line_number":745,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":746,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_d2c169e5","line":743,"in_reply_to":"ba3cc151_252743b7","updated":"2015-07-09 05:24:07.000000000","message":"I think this is working as mentioned by you. If you see L659 above, the function _get_address_scope() will throw AddressScopeNotFound exception if the address scope id either doesn\u0027t exist or doesn\u0027t belong to the tenant.\nI tested this scenario and it is working as expected.\nI will also add an API test to cover this scenario.","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"68c3e87008038e98af22634b8d14fad22c698e44","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        else:"},{"line_number":741,"context_line":"            update[key] \u003d orig[key]"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":744,"context_line":"        \"\"\"Update a subnetpool\"\"\""},{"line_number":745,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":746,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_c7fbad7a","line":743,"in_reply_to":"ba3cc151_d2c169e5","updated":"2015-07-10 04:40:37.000000000","message":"Okay, I see that.  Thanks for the explanation.\n\nOne problem I see is that an AddressScopeNotFound error when attempting to update subnet pool will make it difficult and confusing to the end user.  It would be better to produce an error which helps explain why the subnet pool cannot be updated.\n\nAnother problem that is that shared address scopes will be found by the query [1].\n\n [1] https://github.com/openstack/neutron/blob/95efdd1c3b/neutron/db/common_db_mixin.py#L103","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dfd9aad4f0b88a9d00e46d8d8a01b910c0763a62","unresolved":false,"context_lines":[{"line_number":749,"context_line":"            updated \u003d self._updated_subnetpool_dict(orig_sp, new_sp)"},{"line_number":750,"context_line":"            updated[\u0027tenant_id\u0027] \u003d orig_sp.tenant_id"},{"line_number":751,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"},{"line_number":752,"context_line":"            if reader.address_scope_id !\u003d orig_sp.address_scope_id:"},{"line_number":753,"context_line":"                self._validate_address_scope_id("},{"line_number":754,"context_line":"                    context, reader.address_scope_id, id, reader.prefixes)"},{"line_number":755,"context_line":"            orig_sp.update(self._filter_non_model_columns("}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_ed086782","line":752,"updated":"2015-07-08 21:52:06.000000000","message":"I think we might need to run this check even if the address_scope is not changed.  Imagine that you\u0027re trying to update the subnetpool to add prefixes that collide with another pool in the address scope?","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"de6d1d35c9ea1b74a8c4efbebad5ba7d6ae88d8b","unresolved":false,"context_lines":[{"line_number":749,"context_line":"            updated \u003d self._updated_subnetpool_dict(orig_sp, new_sp)"},{"line_number":750,"context_line":"            updated[\u0027tenant_id\u0027] \u003d orig_sp.tenant_id"},{"line_number":751,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"},{"line_number":752,"context_line":"            if reader.address_scope_id !\u003d orig_sp.address_scope_id:"},{"line_number":753,"context_line":"                self._validate_address_scope_id("},{"line_number":754,"context_line":"                    context, reader.address_scope_id, id, reader.prefixes)"},{"line_number":755,"context_line":"            orig_sp.update(self._filter_non_model_columns("}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_52aeb92e","line":752,"in_reply_to":"ba3cc151_ed086782","updated":"2015-07-09 05:24:07.000000000","message":"Agree. I will update it accordingly.","commit_id":"ec713c90a9103b563244423cfa3f58adaa23bdd0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9353cabd71c6bd9f9794c7c8ca7e2fb017354135","unresolved":false,"context_lines":[{"line_number":739,"context_line":"        else:"},{"line_number":740,"context_line":"            update[key] \u003d orig[key]"},{"line_number":741,"context_line":""},{"line_number":742,"context_line":"    def update_subnetpool(self, context, id, subnetpool):"},{"line_number":743,"context_line":"        \"\"\"Update a subnetpool\"\"\""},{"line_number":744,"context_line":"        new_sp \u003d subnetpool[\u0027subnetpool\u0027]"},{"line_number":745,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_c7096d86","line":742,"updated":"2015-07-10 04:42:52.000000000","message":"See comments on PS3","commit_id":"95efdd1c3baf60d5baccc9530d577d6fb87dc470"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9353cabd71c6bd9f9794c7c8ca7e2fb017354135","unresolved":false,"context_lines":[{"line_number":751,"context_line":"            self._validate_address_scope_id(context, reader.address_scope_id,"},{"line_number":752,"context_line":"                                            id, reader.prefixes)"},{"line_number":753,"context_line":"            orig_sp.update(self._filter_non_model_columns("},{"line_number":754,"context_line":"                reader.subnetpool, models_v2.SubnetPool))"},{"line_number":755,"context_line":"            self._update_subnetpool_prefixes(context,"},{"line_number":756,"context_line":"                                             reader.prefixes,"},{"line_number":757,"context_line":"                                             id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_873da52e","line":754,"updated":"2015-07-10 04:42:52.000000000","message":"Avoid changing unrelated things in the patch set even if it does look wrong.  Please revert these changes.","commit_id":"95efdd1c3baf60d5baccc9530d577d6fb87dc470"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"97f90c6a2b08ee6194d8a978ccd827e93317811c","unresolved":false,"context_lines":[{"line_number":664,"context_line":"        if not attributes.is_attr_set(address_scope_id):"},{"line_number":665,"context_line":"            return"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"        if not self.is_address_scope_associable(context, address_scope_id):"},{"line_number":668,"context_line":"            raise n_exc.IllegalSubnetPoolAssociationToAddressScope("},{"line_number":669,"context_line":"                subnetpool_id\u003dsubnetpool_id, address_scope_id\u003daddress_scope_id)"},{"line_number":670,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_eec6cf15","line":667,"updated":"2015-07-11 04:14:32.000000000","message":"How about calling \" _check_subnetpool_update_allowed\" here as well? To me this code does exactly the same as \" _check_subnetpool_update_allowed\".","commit_id":"4c11444832f596cb3246ecd5f69bc537f6699cc2"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"bd990b48710d852be4f4fe8c0cc16794e6d80079","unresolved":false,"context_lines":[{"line_number":664,"context_line":"        if not attributes.is_attr_set(address_scope_id):"},{"line_number":665,"context_line":"            return"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"        if not self.is_address_scope_associable(context, address_scope_id):"},{"line_number":668,"context_line":"            raise n_exc.IllegalSubnetPoolAssociationToAddressScope("},{"line_number":669,"context_line":"                subnetpool_id\u003dsubnetpool_id, address_scope_id\u003daddress_scope_id)"},{"line_number":670,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_f7169b54","line":667,"in_reply_to":"9a41bdd9_eec6cf15","updated":"2015-07-12 00:50:14.000000000","message":"_check_subnetpool_update_allowed() raises IllegalSubnetPoolUpdate exception where as here IllegalSubnetPoolAssociationToAddressScope is raised.\nAlthough we can have just one exception may be IllegalSubnetPoolUpdate with different reason text.\n\nNot sure which one is better. I tend to go with the former.","commit_id":"4c11444832f596cb3246ecd5f69bc537f6699cc2"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"bd990b48710d852be4f4fe8c0cc16794e6d80079","unresolved":false,"context_lines":[{"line_number":687,"context_line":"        by the tenant, then the subnetpool cannot be updated."},{"line_number":688,"context_line":"        \"\"\""},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"        if not self.is_address_scope_associable(context, address_scope_id):"},{"line_number":691,"context_line":"            msg \u003d _(\"subnetpool %(subnetpool_id)s cannot be updated when\""},{"line_number":692,"context_line":"                    \" associated with shared address scope \""},{"line_number":693,"context_line":"                    \"%(address_scope_id)s\") % {"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_92139d5c","line":690,"updated":"2015-07-12 00:50:14.000000000","message":"I am not happy with the function name \"is_address_scope_associable\".\nI am thinking of naming it to \"is_address_scope_owned_by_tenant\".\nAny other better name from the reviewers would be helpful :).\n\nThe function is_address_scope_associable() raises AddressScopeNotFound exception if either \n -  the address scope id doesn\u0027t exist or\n - doesn\u0027t belong to this tenant and is not shared.\nIt would return true if the address scope belongs to the tenant or if the user is admin, False if it is a shared address scope.","commit_id":"4c11444832f596cb3246ecd5f69bc537f6699cc2"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"97f90c6a2b08ee6194d8a978ccd827e93317811c","unresolved":false,"context_lines":[{"line_number":775,"context_line":"            updated[\u0027tenant_id\u0027] \u003d orig_sp.tenant_id"},{"line_number":776,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"},{"line_number":777,"context_line":"            if orig_sp.address_scope_id:"},{"line_number":778,"context_line":"                self._check_subnetpool_update_allowed(context, id,"},{"line_number":779,"context_line":"                                                      orig_sp.address_scope_id)"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"            self._validate_address_scope_id(context, reader.address_scope_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_8eff0334","line":778,"updated":"2015-07-11 04:14:32.000000000","message":"How about having this validation inside \"_validate_address_scope_id\". IMHO, let\u0027s try to club all the address scope validation inside a single function. This will good w.r.t. maintainability.","commit_id":"4c11444832f596cb3246ecd5f69bc537f6699cc2"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"bd990b48710d852be4f4fe8c0cc16794e6d80079","unresolved":false,"context_lines":[{"line_number":775,"context_line":"            updated[\u0027tenant_id\u0027] \u003d orig_sp.tenant_id"},{"line_number":776,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"},{"line_number":777,"context_line":"            if orig_sp.address_scope_id:"},{"line_number":778,"context_line":"                self._check_subnetpool_update_allowed(context, id,"},{"line_number":779,"context_line":"                                                      orig_sp.address_scope_id)"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"            self._validate_address_scope_id(context, reader.address_scope_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_772ccbab","line":778,"in_reply_to":"9a41bdd9_8eff0334","updated":"2015-07-12 00:50:14.000000000","message":"the idea of calling _check_subnetpool_update_allowed() is to check if the subnetpool can be updated or not before updating the subnetpool.\n\nAs per the bp, subnetpool cannot be updated by the tenant if the subnetpool is associated to a shared address scope not owned by this tenant.\n\nHence I thought of having two separate functions. One to check if the subnetpool can be updated or not and the other to validate the address scope id if provided in the  update json.","commit_id":"4c11444832f596cb3246ecd5f69bc537f6699cc2"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"ba4c276fc7a288127a20011fb9c14f7b2bcf995b","unresolved":false,"context_lines":[{"line_number":777,"context_line":"            updated[\u0027tenant_id\u0027] \u003d orig_sp.tenant_id"},{"line_number":778,"context_line":"            reader \u003d subnet_alloc.SubnetPoolReader(updated)"},{"line_number":779,"context_line":"            if orig_sp.address_scope_id:"},{"line_number":780,"context_line":"                self._check_subnetpool_update_allowed(context, id,"},{"line_number":781,"context_line":"                                                      orig_sp.address_scope_id)"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"            self._validate_address_scope_id(context, reader.address_scope_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_32797194","line":780,"updated":"2015-07-12 01:16:57.000000000","message":"@Vikram - please see my comment in p6. If you still have concerns please let me know.","commit_id":"3c18abeeaefe86602738afd3157f3152e27d0dad"}],"neutron/db/migration/alembic_migrations/versions/HEADS":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"5b6db2151b4376fc8839af9ea3f8248f8686bc8e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"30018084ec99"},{"line_number":2,"context_line":"52c5312f6baf"},{"line_number":3,"context_line":"kilo"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"9a41bdd9_a6d0def8","side":"PARENT","line":2,"updated":"2015-07-16 22:07:15.000000000","message":"Is this correct?  I\u0027m not too familiar with the recent DB migration changes that merged, I\u0027ve been seeing this done differently in different reviews. Do we swap out the old migration head with the new one, do we put the new one on top, dow we do what was done here (remove old head and put new head on top), or does it matter? Can we just double-check this?","commit_id":"ed8a828370571607bddf2cb08121821eb9999bf3"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"e3249ccdea31a5044e5e4e90fd56310fe3d6ef31","unresolved":false,"context_lines":[{"line_number":1,"context_line":"30018084ec99"},{"line_number":2,"context_line":"52c5312f6baf"},{"line_number":3,"context_line":"kilo"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"3a50d1a3_ace14f00","side":"PARENT","line":2,"in_reply_to":"9a41bdd9_2a09e331","updated":"2015-07-21 13:04:46.000000000","message":"As Carl mentioned, it has to be in sorted order, else \"neutron-db-manage check_migration\" would throw an error.","commit_id":"ed8a828370571607bddf2cb08121821eb9999bf3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d68218c6965848705d2dec7c9a30518b529e1968","unresolved":false,"context_lines":[{"line_number":1,"context_line":"30018084ec99"},{"line_number":2,"context_line":"52c5312f6baf"},{"line_number":3,"context_line":"kilo"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"9a41bdd9_f347811b","side":"PARENT","line":2,"in_reply_to":"9a41bdd9_a6d0def8","updated":"2015-07-17 00:05:58.000000000","message":"Looks like they\u0027re in sorted order.  So, what is changed here is appropriate I think.","commit_id":"ed8a828370571607bddf2cb08121821eb9999bf3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"68867fbe0289b015754f1e5876467ceb53226a31","unresolved":false,"context_lines":[{"line_number":1,"context_line":"30018084ec99"},{"line_number":2,"context_line":"52c5312f6baf"},{"line_number":3,"context_line":"kilo"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"9a41bdd9_2a09e331","side":"PARENT","line":2,"in_reply_to":"9a41bdd9_a6d0def8","updated":"2015-07-17 06:43:14.000000000","message":"This is OK, order here does not matter.","commit_id":"ed8a828370571607bddf2cb08121821eb9999bf3"}],"neutron/db/models_v2.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7d03e3ebc6a0644cff783e0fc465e765f43f3025","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    max_prefixlen \u003d sa.Column(sa.Integer, nullable\u003dFalse)"},{"line_number":241,"context_line":"    shared \u003d sa.Column(sa.Boolean, nullable\u003dFalse)"},{"line_number":242,"context_line":"    default_quota \u003d sa.Column(sa.Integer, nullable\u003dTrue)"},{"line_number":243,"context_line":"    address_scope_id \u003d sa.Column(sa.String(36), nullable\u003dFalse)"},{"line_number":244,"context_line":"    prefixes \u003d orm.relationship(SubnetPoolPrefix,"},{"line_number":245,"context_line":"                                backref\u003d\u0027subnetpools\u0027,"},{"line_number":246,"context_line":"                                cascade\u003d\u0027all, delete, delete-orphan\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_91b8f4c9","line":243,"updated":"2015-07-01 17:30:00.000000000","message":"should be nullable\u003dTrue on address_scope_id","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"}],"neutron/ipam/subnet_alloc.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"787b7aa1a8c21e4ada4aea9f91c08f9325e5d629","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        self.address_scope_id \u003d id"},{"line_number":311,"context_line":"        if id is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":312,"context_line":"            self.address_scope_id \u003d None"},{"line_number":313,"context_line":"        self._sp_helper.validate_address_scope(self.address_scope_id)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _compact_subnetpool_prefix_list(self, prefix_list):"},{"line_number":316,"context_line":"        \"\"\"Compact any overlapping prefixes in prefix_list and return the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_910794c9","line":313,"updated":"2015-07-01 16:56:02.000000000","message":"Should only validate if address_scope_id is not None.  Let me see...  Would this do it?\n\n  self.address_scope_id \u003d subnetpool.get(\u0027address_scope_id\u0027, None)\n  if self.address_scope_id:\n      self._sp_helper.validate_address_scope(self.address_scope_id)\n\nDo you think we need ATTR_NOT_SPECIFIED?  If it isn\u0027t specified, the default is None.  If it is specified as None, that is still okay.  I think this works for both the create and update cases.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"4696969d133d7088f3ee3c944300654fa1bb5a9b","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        self.address_scope_id \u003d id"},{"line_number":311,"context_line":"        if id is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":312,"context_line":"            self.address_scope_id \u003d None"},{"line_number":313,"context_line":"        self._sp_helper.validate_address_scope(self.address_scope_id)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def _compact_subnetpool_prefix_list(self, prefix_list):"},{"line_number":316,"context_line":"        \"\"\"Compact any overlapping prefixes in prefix_list and return the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_09e4bca9","line":313,"in_reply_to":"ba3cc151_910794c9","updated":"2015-07-01 17:46:18.000000000","message":"I think if \u0027address_scope_id\u0027 is set to ATTR_NOT_SPECIFIED, then\nself.address_scope_id will be True\n\nI would suggest\n\nid \u003d subnetpool.get(\u0027address_scope_id\u0027)\nif id and id is not attributes.ATTR_NOT_SPECIFIED:\n     self.address_scope_id \u003d id\n     self._sp_helper.validate_address_scope(self.address_scope_id)\nelse:\n    self.address_scope_id \u003d None","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7d03e3ebc6a0644cff783e0fc465e765f43f3025","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                                             base_prefix_type\u003d\u0027max_prefixlen\u0027,"},{"line_number":374,"context_line":"                                             base_prefixlen\u003dmax_prefixlen)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def validate_address_scope(self, addrscope_id):"},{"line_number":377,"context_line":"        if addrscope_id is not attributes.ATTR_NOT_SPECIFIED:"},{"line_number":378,"context_line":"            has_unique_prefix \u003d True"},{"line_number":379,"context_line":"            sp_lst \u003d db_base_plugin_common._get_subnetpools_by_addrscope_id("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_770f6088","line":376,"updated":"2015-07-01 17:30:00.000000000","message":"This class really exists to perform just basic, surface validations of the a request just to ensure that it is well-formed.  The IPAM sub-system shouldn\u0027t be burdened with knowing anything about address scopes other than to simply pass an address_scope_id around.  Its job is simply allocate/de-allocate IP addresses and prefixes.  From an IPAM perspective, subnetpools exist only to facilitate allocation of prefixes.  Address scopes really have no impact on IPAM in my estimation.  With this in mind, I don\u0027t believe this kind of validation belongs anywhere in the IPAM modules.\n\nIt also looks like you have to call back on the plugin to read the list of subnetpools.  Having anything in the IPAM subsystem calling back on the plugin is a no-no, we have been working hard over the last 2 cycles to untangle IPAM from the DB plugin and this is in a way undoing some of that work.\n\nEnough with the rant, let\u0027s move this validation somewhere else. Doing it in the plugin feels like a better way to go.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"787b7aa1a8c21e4ada4aea9f91c08f9325e5d629","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def validate_address_scope(self, addrscope_id):"},{"line_number":377,"context_line":"        if addrscope_id is not attributes.ATTR_NOT_SPECIFIED:"},{"line_number":378,"context_line":"            has_unique_prefix \u003d True"},{"line_number":379,"context_line":"            sp_lst \u003d db_base_plugin_common._get_subnetpools_by_addrscope_id("},{"line_number":380,"context_line":"                                            self._context, addrscope_id)"},{"line_number":381,"context_line":"            for sp in sp_lst:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_5607c217","line":378,"updated":"2015-07-01 16:56:02.000000000","message":"You should be able to get rid of this boolean.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"787b7aa1a8c21e4ada4aea9f91c08f9325e5d629","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        if addrscope_id is not attributes.ATTR_NOT_SPECIFIED:"},{"line_number":378,"context_line":"            has_unique_prefix \u003d True"},{"line_number":379,"context_line":"            sp_lst \u003d db_base_plugin_common._get_subnetpools_by_addrscope_id("},{"line_number":380,"context_line":"                                            self._context, addrscope_id)"},{"line_number":381,"context_line":"            for sp in sp_lst:"},{"line_number":382,"context_line":"                # TODO(Vikram): Subnetpools must have unique prefixes."},{"line_number":383,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_51aeec81","line":380,"updated":"2015-07-01 16:56:02.000000000","message":"This query should filter out the current subnetpool id (self.id) because it will exist on an update.  Alternatively, the for loop on L381 should skip the current pool.  Either way is fine with me.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"787b7aa1a8c21e4ada4aea9f91c08f9325e5d629","unresolved":false,"context_lines":[{"line_number":379,"context_line":"            sp_lst \u003d db_base_plugin_common._get_subnetpools_by_addrscope_id("},{"line_number":380,"context_line":"                                            self._context, addrscope_id)"},{"line_number":381,"context_line":"            for sp in sp_lst:"},{"line_number":382,"context_line":"                # TODO(Vikram): Subnetpools must have unique prefixes."},{"line_number":383,"context_line":"                pass"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"            if not has_unique_prefix:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_76cd26b6","line":382,"updated":"2015-07-01 16:56:02.000000000","message":"Hi Vikram, thank you for pointing out this todo to me.  It helps to know where you are seeking feedback.  I can see you\u0027re after the right thing.\n\nAt this point, self.prefixes has a list of prefixes (in string cidr format) proposed for this subnet pool.  sp.prefixes and self.prefixes should be converted to IPSets and the code should simply raise the exception if the intersection of the two is non-empty.  I think that should do it, right?","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"787b7aa1a8c21e4ada4aea9f91c08f9325e5d629","unresolved":false,"context_lines":[{"line_number":383,"context_line":"                pass"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"            if not has_unique_prefix:"},{"line_number":386,"context_line":"                raise n_exc.AddressScopePrefixUniquessError()"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def wildcard(self, ip_version):"},{"line_number":389,"context_line":"        return self._PREFIX_VERSION_INFO[ip_version][\u0027wildcard\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_56a34200","line":386,"updated":"2015-07-01 16:56:02.000000000","message":"Just raise this whenever you would set has_unique_prefix \u003d False and you won\u0027t need has_unique_prefix at all.","commit_id":"157d655448f5db4ea548daa9ff38f695ca09cdbd"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"a488b683e8755ddea7ec4b7e75dc24828e2e3bf2","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def _read_address_scope(self, subnetpool):"},{"line_number":308,"context_line":"        self.address_scope_id \u003d subnetpool.get(\u0027address_scope_id\u0027,"},{"line_number":309,"context_line":"                                               attributes.ATTR_NOT_SPECIFIED)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _compact_subnetpool_prefix_list(self, prefix_list):"},{"line_number":312,"context_line":"        \"\"\"Compact any overlapping prefixes in prefix_list and return the"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_8771257a","line":309,"updated":"2015-07-04 03:58:44.000000000","message":"How about setting \"self.address_scope_id\" to None if ATTR_NOT_SPECIFIED?","commit_id":"a5e3f564775fd020a9e15e8b48516c3eb76a1164"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"2294949ddaa793fd77267d29706957541c4ff97a","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def _read_address_scope(self, subnetpool):"},{"line_number":308,"context_line":"        self.address_scope_id \u003d subnetpool.get(\u0027address_scope_id\u0027,"},{"line_number":309,"context_line":"                                               attributes.ATTR_NOT_SPECIFIED)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _compact_subnetpool_prefix_list(self, prefix_list):"},{"line_number":312,"context_line":"        \"\"\"Compact any overlapping prefixes in prefix_list and return the"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_71737716","line":309,"in_reply_to":"ba3cc151_3bedd025","updated":"2015-07-05 06:03:31.000000000","message":"+1, you are correct. In these lines, I feel we got to implement \"no-address-scope\" option as well. Currently, we have not implemented such a CLI via https://review.openstack.org/#/c/196472/.","commit_id":"a5e3f564775fd020a9e15e8b48516c3eb76a1164"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"0c53596f7367991c1b957606c988793100859c1f","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def _read_address_scope(self, subnetpool):"},{"line_number":308,"context_line":"        self.address_scope_id \u003d subnetpool.get(\u0027address_scope_id\u0027,"},{"line_number":309,"context_line":"                                               attributes.ATTR_NOT_SPECIFIED)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _compact_subnetpool_prefix_list(self, prefix_list):"},{"line_number":312,"context_line":"        \"\"\"Compact any overlapping prefixes in prefix_list and return the"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_3bedd025","line":309,"in_reply_to":"ba3cc151_8771257a","updated":"2015-07-04 16:28:59.000000000","message":"I thought about it, but I wanted to support disassociating the subnetpool from the address scope when the user specifies { ..\"address_scope_id\": None} in the subnetpool update. \n\nIf self.address_scope_id is set to None, then it will not be possible to distinguish if the user has set address_scope_id to None or not specified this attribute.","commit_id":"a5e3f564775fd020a9e15e8b48516c3eb76a1164"}],"neutron/tests/api/test_subnetpools.py":[{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"ba4c276fc7a288127a20011fb9c14f7b2bcf995b","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        self.addCleanup(self.client.delete_subnet, subnet_v6[\u0027id\u0027])"},{"line_number":339,"context_line":"        pool_values_v4 \u003d {\u0027prefixes\u0027: [\u0027192.168.0.0/16\u0027],"},{"line_number":340,"context_line":"                          \u0027min_prefixlen\u0027: 21,"},{"line_number":341,"context_line":"                          \u0027max_prefixlen\u0027: 32}"},{"line_number":342,"context_line":"        pool_name_v4, pool_id_v4 \u003d self._create_subnetpool(self.client,"},{"line_number":343,"context_line":"                                                  pool_values\u003dpool_values_v4)"},{"line_number":344,"context_line":"        subnet_v4 \u003d self.client.create_subnet("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_7248595c","line":341,"updated":"2015-07-12 01:16:57.000000000","message":"pool_id_v4 is not added to cleanup because of which it doesn\u0027t get deleted at the end of the test.\n\nIs it a concern ? If so can this addressed in this patch or a separate one.\nOr better to leave AS IS","commit_id":"3c18abeeaefe86602738afd3157f3152e27d0dad"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"53c83efe5a99d4bbef1d890ce46216c54266929c","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        self.addCleanup(self.client.delete_subnet, subnet_v6[\u0027id\u0027])"},{"line_number":339,"context_line":"        pool_values_v4 \u003d {\u0027prefixes\u0027: [\u0027192.168.0.0/16\u0027],"},{"line_number":340,"context_line":"                          \u0027min_prefixlen\u0027: 21,"},{"line_number":341,"context_line":"                          \u0027max_prefixlen\u0027: 32}"},{"line_number":342,"context_line":"        pool_name_v4, pool_id_v4 \u003d self._create_subnetpool(self.client,"},{"line_number":343,"context_line":"                                                  pool_values\u003dpool_values_v4)"},{"line_number":344,"context_line":"        subnet_v4 \u003d self.client.create_subnet("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_16237857","line":341,"in_reply_to":"9a41bdd9_7248595c","updated":"2015-07-14 20:43:18.000000000","message":"Probably not a good thing, so yes it\u0027s a concern :) File a bug and fix in another patch though.","commit_id":"3c18abeeaefe86602738afd3157f3152e27d0dad"}],"neutron/tests/unit/extensions/test_address_scope.py":[{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"d446840e1a518283ef579198485190d8c7ddefb3","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.assertEqual(0, len(mortal_res[\u0027address_scopes\u0027]))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestSubnetPoolsWithAddressScopes(AddressScopeTestCase):"},{"line_number":244,"context_line":"    def setUp(self):"},{"line_number":245,"context_line":"        plugin \u003d DB_PLUGIN_KLASS"},{"line_number":246,"context_line":"        ext_mgr \u003d AddressScopeTestExtensionManager()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_468fa6cc","line":243,"updated":"2015-07-03 18:01:24.000000000","message":"I am not sure if this is the right place for these test cases.\nI personally feel this is the right place.\nComments please.","commit_id":"a5e3f564775fd020a9e15e8b48516c3eb76a1164"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"a488b683e8755ddea7ec4b7e75dc24828e2e3bf2","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self.assertEqual(0, len(mortal_res[\u0027address_scopes\u0027]))"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"class TestSubnetPoolsWithAddressScopes(AddressScopeTestCase):"},{"line_number":244,"context_line":"    def setUp(self):"},{"line_number":245,"context_line":"        plugin \u003d DB_PLUGIN_KLASS"},{"line_number":246,"context_line":"        ext_mgr \u003d AddressScopeTestExtensionManager()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_a76ea994","line":243,"in_reply_to":"ba3cc151_468fa6cc","updated":"2015-07-04 03:58:44.000000000","message":"+1","commit_id":"a5e3f564775fd020a9e15e8b48516c3eb76a1164"},{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"d446840e1a518283ef579198485190d8c7ddefb3","unresolved":false,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_create_subnetpool_with_address_scope_with_prefix_intersect(self):"},{"line_number":276,"context_line":"        with self.address_scope(name\u003d\u0027foo-address-scope\u0027) as addr_scope:"},{"line_number":277,"context_line":"            address_scope_id \u003d addr_scope[\u0027address_scope\u0027][\u0027id\u0027]"},{"line_number":278,"context_line":"            subnet \u003d netaddr.IPNetwork(\u002710.10.10.0/24\u0027)"},{"line_number":279,"context_line":"            expected \u003d {\u0027address_scope_id\u0027: address_scope_id}"},{"line_number":280,"context_line":"            self._test_create_subnetpool([subnet.cidr], expected\u003dexpected,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_86acce36","line":277,"updated":"2015-07-03 18:01:24.000000000","message":"I think there can be a helper function as I now see that the similar code is repeated.","commit_id":"a5e3f564775fd020a9e15e8b48516c3eb76a1164"}]}
