)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fd582927e60498b392b121fe1e2a61ff28a2236","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor db_base_plugin_v2.py to use new IPAM"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Rebased on Reference IPAM driver and enabled pluggable_ipam"},{"line_number":10,"context_line":"to execute all tests in CI using new IPAM."},{"line_number":11,"context_line":"Most likely will cause a lot of tests to fail, but will help to"},{"line_number":12,"context_line":"identify missed parts."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"1a6ced46_e325130b","line":9,"updated":"2015-03-23 13:36:33.000000000","message":"imo, this paragraph could/should be removed","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor and decompose db_base_plugin_v2.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactoring step before Pluggable IPAM can be applied."},{"line_number":10,"context_line":"db_base_plugin_v2 is decomposed into several files:"},{"line_number":11,"context_line":"- db_base_plugin_common - contains getters and common"},{"line_number":12,"context_line":"methods used by db_base_plugin and ipam backends."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":89,"id":"fa32b979_2fffa7ab","line":9,"updated":"2015-06-29 23:52:08.000000000","message":"This commit message is a bit out of date.  Much of this was done in previous patches, I think.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor and decompose db_base_plugin_v2.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactoring step before Pluggable IPAM can be applied."},{"line_number":10,"context_line":"db_base_plugin_v2 is decomposed into several files:"},{"line_number":11,"context_line":"- db_base_plugin_common - contains getters and common"},{"line_number":12,"context_line":"methods used by db_base_plugin and ipam backends."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":89,"id":"ba3cc151_8ee0a7ce","line":9,"in_reply_to":"ba3cc151_b2e8e8e3","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor and decompose db_base_plugin_v2.py"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactoring step before Pluggable IPAM can be applied."},{"line_number":10,"context_line":"db_base_plugin_v2 is decomposed into several files:"},{"line_number":11,"context_line":"- db_base_plugin_common - contains getters and common"},{"line_number":12,"context_line":"methods used by db_base_plugin and ipam backends."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":89,"id":"ba3cc151_b2e8e8e3","line":9,"in_reply_to":"fa32b979_2fffa7ab","updated":"2015-06-30 11:29:27.000000000","message":"right, will update to contain more about specific changes done in this patchset","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"}],"etc/neutron.conf":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":73,"context_line":"# (BoolOpt) Switch between new pluggable IPAM implementation and old one"},{"line_number":74,"context_line":"# from db_base_plugin_v2. By default old implementation is used."},{"line_number":75,"context_line":"#"},{"line_number":76,"context_line":"# use_pluggable_ipam \u003d False"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"# (ListOpt) List of service plugin entrypoints to be loaded from the"},{"line_number":79,"context_line":"# neutron.service_plugins namespace. See setup.cfg for the entrypoint names of"}],"source_content_type":"text/plain","patch_set":59,"id":"1aca2d91_251fbe60","line":76,"updated":"2015-05-07 23:32:12.000000000","message":"Note:  It is a bit odd that the driver config is in the patch that precedes this one.  I\u0027m not sure if I can suggest how to do it better though.","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":73,"context_line":"# (BoolOpt) Switch between new pluggable IPAM implementation and old one"},{"line_number":74,"context_line":"# from db_base_plugin_v2. By default old implementation is used."},{"line_number":75,"context_line":"#"},{"line_number":76,"context_line":"# use_pluggable_ipam \u003d False"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"# (ListOpt) List of service plugin entrypoints to be loaded from the"},{"line_number":79,"context_line":"# neutron.service_plugins namespace. See setup.cfg for the entrypoint names of"}],"source_content_type":"text/plain","patch_set":59,"id":"7ad8896b_37063a21","line":76,"in_reply_to":"1aca2d91_251fbe60","updated":"2015-05-11 17:51:34.000000000","message":"Carl, as for me this is ok.\nDriver loaded introduces only mechanizm to load driver with option \u0027ipam_driver\u0027 without it\u0027s usage.\nAnd usage comes in next patch, it gives good separation code separation.","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":70,"context_line":"#"},{"line_number":71,"context_line":"# ipam_driver \u003d neutrondb_ipam"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"# (BoolOpt) Switch between new pluggable IPAM implementation and old one"},{"line_number":74,"context_line":"# from db_base_plugin_v2. By default old implementation is used."},{"line_number":75,"context_line":"#"},{"line_number":76,"context_line":"# use_pluggable_ipam \u003d False"}],"source_content_type":"text/plain","patch_set":63,"id":"9a0c5dc1_cb27e9b4","line":73,"updated":"2015-05-13 22:00:37.000000000","message":"Just a thought.  Could you set ipam_driver to None instead of adding a new option?","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3c7d86ff6114511959fd4ea5961c3bb9933291b2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"#"},{"line_number":71,"context_line":"# ipam_driver \u003d neutrondb_ipam"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"# (BoolOpt) Switch between new pluggable IPAM implementation and old one"},{"line_number":74,"context_line":"# from db_base_plugin_v2. By default old implementation is used."},{"line_number":75,"context_line":"#"},{"line_number":76,"context_line":"# use_pluggable_ipam \u003d False"}],"source_content_type":"text/plain","patch_set":63,"id":"7a016987_c1b4c1d2","line":73,"in_reply_to":"9a0c5dc1_cb27e9b4","updated":"2015-05-14 09:42:52.000000000","message":"make sense to me","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"}],"neutron/db/backend_mixin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":"from oslo_db import exception as db_exc"},{"line_number":19,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_6f736ae8","line":16,"updated":"2015-05-13 22:00:37.000000000","message":"nit:  I think there is supposed to be a space after this first import to separate system imports from the others below.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DbBasePluginMixin(common_db_mixin.CommonDbMixin):"},{"line_number":34,"context_line":"    \"\"\"Mixin contains common code used by db_base_plugin and both backends."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    Methods are moved from db_base_plugin into this mixing only in case"}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_6bf7ddf5","line":33,"updated":"2015-05-13 22:00:37.000000000","message":"Should ipam be in the name here?","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b19b8dc0d852708966fe4ae58d5a64d46d9a8bb3","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DbBasePluginMixin(common_db_mixin.CommonDbMixin):"},{"line_number":34,"context_line":"    \"\"\"Mixin contains common code used by db_base_plugin and both backends."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    Methods are moved from db_base_plugin into this mixing only in case"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_63f18acd","line":33,"in_reply_to":"7a016987_adaf7e93","updated":"2015-05-14 12:57:48.000000000","message":"After thinking a bit I plan to pull out IPAM related code from this class, and make it just common method storage.\nIn this case it make sense to rename DbBasePluginMixin -\u003e DbBasePluginCommon.\nAll more complex IPAM related code will go to IpamBackendMIxin.\nAnd yeah, need separate file for this class.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"48e949859195a0bd5c1c82f4692531c6cb7332f3","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DbBasePluginMixin(common_db_mixin.CommonDbMixin):"},{"line_number":34,"context_line":"    \"\"\"Mixin contains common code used by db_base_plugin and both backends."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    Methods are moved from db_base_plugin into this mixing only in case"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_adaf7e93","line":33,"in_reply_to":"9a0c5dc1_6bf7ddf5","updated":"2015-05-14 06:01:52.000000000","message":"How about IpamDbPluginMixin?\n\nPlease see my name change proposal below comment in BackendMixin class.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"55012546e941b88351130b567bbb0db5a3d19216","unresolved":false,"context_lines":[{"line_number":33,"context_line":"class DbBasePluginMixin(common_db_mixin.CommonDbMixin):"},{"line_number":34,"context_line":"    \"\"\"Mixin contains common code used by db_base_plugin and both backends."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    Methods are moved from db_base_plugin into this mixing only in case"},{"line_number":37,"context_line":"    if they are used by both backends as well as db_base_plugin."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    TODO(pbondar): I would consider making this separation rule more clear"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_fb11b3b0","line":36,"updated":"2015-05-14 05:20:34.000000000","message":"*mixin","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @staticmethod"},{"line_number":45,"context_line":"    def _delete_ip_allocation(context, network_id, subnet_id, ip_address):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # Delete the IP address from the IPAllocate table"},{"line_number":48,"context_line":"        LOG.debug(\"Delete allocated IP %(ip_address)s \""}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_2bcb2574","line":45,"updated":"2015-05-13 22:00:37.000000000","message":"I wonder if we should further divide this patch in to a refactoring patch that moves things around and creates the new mixin, etc and then follow on with adding the new backends.  Sometimes with really large patches, that can speed up merging because it provides a check point where one patch can merge and allow attention to shift to the next one.\n\nIt can also help reviews because reviews to know that one patch is focused solely on refactoring while another focuses solely on adding code.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        )"},{"line_number":73,"context_line":"        context.session.add(allocated)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def get_subnets(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":76,"context_line":"                    sorts\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":77,"context_line":"                    page_reverse\u003dFalse):"},{"line_number":78,"context_line":"        marker_obj \u003d self._get_marker_obj(context, \u0027subnet\u0027, limit, marker)"}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_8b59f100","line":75,"updated":"2015-05-13 22:00:37.000000000","message":"I guess this is kind of a mixed bag of methods.  The IPAM related stuff sort of drags in methods that have to do with subnets and ports.  They aren\u0027t all directly IPAM related but they do appear in here because they are associated with the backend IPAM.\n\nStill, I like this better than the inheritance hierarchy in PS59.  I may have to give this some more thought...","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                        subnet_cidr\u003dsubnet_cidr)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"class BackendMixin(DbBasePluginMixin):"},{"line_number":230,"context_line":"    \"\"\"Contains only methods which are common for both backends."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    Methods which are used by db_base_plugin too goes to DbBasePluginMixin."}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_ab0955df","line":229,"updated":"2015-05-13 22:00:37.000000000","message":"Again, should IPAM be in the name?\n\nAlso, consider another new file.  I won\u0027t insist.  Afterall, Python doesn\u0027t require a new file for each class like Java does.  I know some Python developers will accuse me of bringing my Java experience to Python.  ;)","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b19b8dc0d852708966fe4ae58d5a64d46d9a8bb3","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                        subnet_cidr\u003dsubnet_cidr)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"class BackendMixin(DbBasePluginMixin):"},{"line_number":230,"context_line":"    \"\"\"Contains only methods which are common for both backends."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    Methods which are used by db_base_plugin too goes to DbBasePluginMixin."}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_0363f6b2","line":229,"in_reply_to":"7a016987_edbe96d3","updated":"2015-05-14 12:57:48.000000000","message":"Hosung, your naming looks good to me.\nBut I would change IpamDbPluginMixin to DbBasePluginCommon because I plan to make it not  IPAM aware, just store there various getters and helper methods, that needed by IpamBackendMixin and db_base_plugin.\nAnd all IPAM related code will go to IpamBackendMixin (like  _validate_allocation_pools method)","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"48e949859195a0bd5c1c82f4692531c6cb7332f3","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                        subnet_cidr\u003dsubnet_cidr)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"class BackendMixin(DbBasePluginMixin):"},{"line_number":230,"context_line":"    \"\"\"Contains only methods which are common for both backends."},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    Methods which are used by db_base_plugin too goes to DbBasePluginMixin."}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_edbe96d3","line":229,"in_reply_to":"9a0c5dc1_ab0955df","updated":"2015-05-14 06:01:52.000000000","message":"Currently this is what we have:\n\n        DbBasePluginMixin\n               |                                                                                                                                           \n           BackendMixin\n         /            \\\n  IpamBackend    NonIpamBackend\n\n\nWe could change something like this:\n\n           IpamDbPluginMixin\n                   |                                                                                                                                           \n            IpamBackendMixin\n            /               \\\n IpamPluggableBackend   IpamNonPluggableBackend\n\n\nWhat do you think?","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"}],"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"c16f8c500a8d2e29f1bdd71884d34e1a6b69a990","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Infoblox Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":64,"id":"7a016987_8fb94431","line":1,"updated":"2015-05-14 15:37:41.000000000","message":"Most of this was copied from another file that was (c) OpenStack Foundation 2012. We probably should include both copyrights here.\n\nYou should check the other files for similar copyrights.","commit_id":"411cc163e2d453509758da62153749d0beef665c"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"2aaa56b816a220b4cf6fff28044f9f63e20cbd3c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Infoblox Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":64,"id":"7a016987_35995720","line":1,"in_reply_to":"7a016987_1807cb1d","updated":"2015-05-15 15:12:43.000000000","message":"Sure. But what I actually meant was go through the files in this patch and make sure all the copyrights are correct.","commit_id":"411cc163e2d453509758da62153749d0beef665c"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"b483a35bd533869ba9c45cde692c8c0193127e70","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Infoblox Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":64,"id":"7a016987_5bc052e0","line":1,"in_reply_to":"7a016987_35995720","updated":"2015-05-18 20:27:57.000000000","message":"Done","commit_id":"411cc163e2d453509758da62153749d0beef665c"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"6506006faf5af8cc5c9c0158f3a91a170ea80b56","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Infoblox Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":64,"id":"7a016987_1807cb1d","line":1,"in_reply_to":"7a016987_8fb94431","updated":"2015-05-15 00:38:48.000000000","message":"I see that a similar example from tools/install_venv_common.py\n\n  # Copyright 2013 OpenStack Foundation\n  # Copyright 2013 IBM Corp.\n\nI guess we can include both as below.\n\n  # Copyright (c) 2012 OpenStack Foundation\n  # Copyright (c) 2015 Infoblox Inc,","commit_id":"411cc163e2d453509758da62153749d0beef665c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5b69ca1e429806ff577d9943712a0f958647e08c","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    def _gateway_ip_to_db(gateway_ip):"},{"line_number":81,"context_line":"        if gateway_ip:"},{"line_number":82,"context_line":"            return str(gateway_ip)"},{"line_number":83,"context_line":"        else:"},{"line_number":84,"context_line":"            return None"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_394040a5","line":83,"updated":"2015-06-02 20:24:35.000000000","message":"nit:  These two lines can be left out.  Python will, by default, return None.","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"26906894df15a6fb99e6ab2222304008678b4707","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                \u0027cidr\u0027: str(detail.subnet_cidr),"},{"line_number":265,"context_line":"                \u0027subnetpool_id\u0027: subnetpool_id,"},{"line_number":266,"context_line":"                \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":267,"context_line":"                \u0027gateway_ip\u0027: self._gateway_ip_to_db(detail.gateway_ip),"},{"line_number":268,"context_line":"                \u0027shared\u0027: shared}"},{"line_number":269,"context_line":"        if subnet[\u0027ip_version\u0027] \u003d\u003d 6 and subnet[\u0027enable_dhcp\u0027]:"},{"line_number":270,"context_line":"            if attributes.is_attr_set(subnet[\u0027ipv6_ra_mode\u0027]):"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_efbabfe0","line":267,"updated":"2015-06-03 09:59:32.000000000","message":"Currently allocating ipam subnet happens before calling _make_subnet_args,\nand on ipam_allocation gateway_ip should be already set.\nSo _gateway_ip_str call is moved into make_subnet_request.\nLater gateway_ip is passed into SubnetRequest, then used here as detail.gateway_ip.\n\nThis is long chain, but this way we make sure that the same gateway_ip is used for ipam_subnet and neutron_subnet.\n\nAnd yes, I\u0027ll split this code into two more parts (just moving methods and changed methods) to make it easier to review","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5b69ca1e429806ff577d9943712a0f958647e08c","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                \u0027cidr\u0027: str(detail.subnet_cidr),"},{"line_number":265,"context_line":"                \u0027subnetpool_id\u0027: subnetpool_id,"},{"line_number":266,"context_line":"                \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":267,"context_line":"                \u0027gateway_ip\u0027: self._gateway_ip_to_db(detail.gateway_ip),"},{"line_number":268,"context_line":"                \u0027shared\u0027: shared}"},{"line_number":269,"context_line":"        if subnet[\u0027ip_version\u0027] \u003d\u003d 6 and subnet[\u0027enable_dhcp\u0027]:"},{"line_number":270,"context_line":"            if attributes.is_attr_set(subnet[\u0027ipv6_ra_mode\u0027]):"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_74835fcd","line":267,"updated":"2015-06-02 20:24:35.000000000","message":"I\u0027m not sure why this changed.  This used to call _gateway_ip_str (below) which would use network + 1 as the gateway_ip if it was not specified.  Is that behavior preserved?  This patch would be easier to review if you could tell me that these methods were simply moved from their old locations and not changed like this.","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"bdc280fcdfe0b3cf8e5013cecae1c0c0906d2532","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @staticmethod"},{"line_number":48,"context_line":"    def _delete_ip_allocation(context, network_id, subnet_id, ip_address):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        # Delete the IP address from the IPAllocate table"},{"line_number":51,"context_line":"        LOG.debug(\"Delete allocated IP %(ip_address)s \""},{"line_number":52,"context_line":"                  \"(%(network_id)s/%(subnet_id)s)\","}],"source_content_type":"text/x-python","patch_set":83,"id":"fa32b979_1f855c58","line":49,"updated":"2015-06-25 22:57:33.000000000","message":"This method and the _store_ip_allocation method should be in the in the ipam_non_pluggable_backend, I would expect.","commit_id":"80d5000f5469dd5cc158ffb17bc06d36f8a58668"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"b6fc379fff29763804fd1b3ffce178e1145fc81e","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @staticmethod"},{"line_number":48,"context_line":"    def _delete_ip_allocation(context, network_id, subnet_id, ip_address):"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        # Delete the IP address from the IPAllocate table"},{"line_number":51,"context_line":"        LOG.debug(\"Delete allocated IP %(ip_address)s \""},{"line_number":52,"context_line":"                  \"(%(network_id)s/%(subnet_id)s)\","}],"source_content_type":"text/x-python","patch_set":83,"id":"fa32b979_dd413c65","line":49,"in_reply_to":"fa32b979_1f855c58","updated":"2015-06-26 00:29:12.000000000","message":"Nevermind. I see they are still needed of course for both IPAM backends. My mistake. I will restore them.","commit_id":"80d5000f5469dd5cc158ffb17bc06d36f8a58668"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                \u0027cidr\u0027: str(detail.subnet_cidr),"},{"line_number":254,"context_line":"                \u0027subnetpool_id\u0027: subnetpool_id,"},{"line_number":255,"context_line":"                \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":256,"context_line":"                \u0027gateway_ip\u0027: self._gateway_ip_to_db(detail.gateway_ip),"},{"line_number":257,"context_line":"                \u0027shared\u0027: shared}"},{"line_number":258,"context_line":"        if subnet[\u0027ip_version\u0027] \u003d\u003d 6 and subnet[\u0027enable_dhcp\u0027]:"},{"line_number":259,"context_line":"            if attributes.is_attr_set(subnet[\u0027ipv6_ra_mode\u0027]):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_5979a0fb","line":256,"updated":"2015-06-29 23:52:08.000000000","message":"nit:  I think I\u0027d just inline this instead of adding this _gateway_ip_to_db method.  I\u0027m not sure the method name helps me really understand what it does and I think it would just read better inline.\n\n  gateway \u003d str(detail.gateway_ip) if detail.gateway_ip else None","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                \u0027cidr\u0027: str(detail.subnet_cidr),"},{"line_number":254,"context_line":"                \u0027subnetpool_id\u0027: subnetpool_id,"},{"line_number":255,"context_line":"                \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":256,"context_line":"                \u0027gateway_ip\u0027: self._gateway_ip_to_db(detail.gateway_ip),"},{"line_number":257,"context_line":"                \u0027shared\u0027: shared}"},{"line_number":258,"context_line":"        if subnet[\u0027ip_version\u0027] \u003d\u003d 6 and subnet[\u0027enable_dhcp\u0027]:"},{"line_number":259,"context_line":"            if attributes.is_attr_set(subnet[\u0027ipv6_ra_mode\u0027]):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_0e4337b3","line":256,"in_reply_to":"ba3cc151_5979a0fb","updated":"2015-07-02 13:32:57.000000000","message":"moved to predessor patch and fixed there","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                 \u0027ip_address\u0027: ip[\"ip_address\"]}"},{"line_number":269,"context_line":"                for ip in ips]"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def _gateway_ip_str(self, subnet, cidr_net):"},{"line_number":272,"context_line":"        if subnet.get(\u0027gateway_ip\u0027) is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":273,"context_line":"            return str(netaddr.IPNetwork(cidr_net).network + 1)"},{"line_number":274,"context_line":"        return subnet.get(\u0027gateway_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":89,"id":"fa32b979_cf02bb72","line":271,"updated":"2015-06-29 23:52:08.000000000","message":"This could be relocated to neutron/db/ipam_non_pluggable_backend.py now since it is no longer used here and its method signature has sort of changed (it expects a cidr string now instead of a netaddr object.)","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                 \u0027ip_address\u0027: ip[\"ip_address\"]}"},{"line_number":269,"context_line":"                for ip in ips]"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def _gateway_ip_str(self, subnet, cidr_net):"},{"line_number":272,"context_line":"        if subnet.get(\u0027gateway_ip\u0027) is attributes.ATTR_NOT_SPECIFIED:"},{"line_number":273,"context_line":"            return str(netaddr.IPNetwork(cidr_net).network + 1)"},{"line_number":274,"context_line":"        return subnet.get(\u0027gateway_ip\u0027)"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_0e581787","line":271,"in_reply_to":"fa32b979_cf02bb72","updated":"2015-07-02 13:32:57.000000000","message":"moved to neutron/db/ipam_backend_mixin.py since is planned to be used by pluggable backend too.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"43c3f2d768b5618d45bbb74fdf1fd574d1d39284","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            ipam_subnet \u003d ipam_driver.get_subnet(cidr)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"            if \u0027ip_address\u0027 in fixed:"},{"line_number":468,"context_line":"                ip_request \u003d ipam.SpecificAddressRequest("},{"line_number":469,"context_line":"                    fixed[\u0027ip_address\u0027],"},{"line_number":470,"context_line":"                    mac_address)"},{"line_number":471,"context_line":"                ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_67ffb334","line":468,"updated":"2015-02-12 16:17:10.000000000","message":"This isn\u0027t quite the right approach. The DB plugin should be ignorant of how to construct a request. Instead, we need a factory method in the SubnetRequest base class to construct these.\n\nThink of each \"ip_address\" in this list as not an actual IP, but instead as a string that specifies the type of request:\n\n * A string that looks like an actual IP address translates to a SpecificAddressRequest;\n * A string that is blank translates to an AnyAddressRequest;\n * A string with anything else can be treated as specifying a particular class dynamically.\n\nThe third point enables extension of the address request types simply by adding a new request subclass - without any changes to the DB plugin code (of course the driver has to support it). For example, see comments on line 287 of [1]. In this case, we could specify \"EUI64\". Then, the factory method simply looks to see if there is a class neutron.ipam.EUI64AddressRequest; if so, it instantiates it, passing in the inputs for it to handle. \n\nIn the actual driver code, each type will need to be handled as appropriate for the driver, though in the specific case of EUI64AddressRequest, it can simply check isinstance(request, neutron.ipam.AutoGenAddressRequest) and if so call a \"generate\" method on that, and then treat it as a SpecificAddressRequest.\n\nDoing this in this way will allow *drivers* to create new types of address requests, and not have to change DB plugin to enable the use of those requests.\n\n\n[1] https://review.openstack.org/#/c/150485/4/neutron/ipam/drivers/neutrondb_ipam.py","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"31ec663fe36ba584a4aa142493b658f6aff56ca1","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            ipam_subnet \u003d ipam_driver.get_subnet(cidr)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"            if \u0027ip_address\u0027 in fixed:"},{"line_number":468,"context_line":"                ip_request \u003d ipam.SpecificAddressRequest("},{"line_number":469,"context_line":"                    fixed[\u0027ip_address\u0027],"},{"line_number":470,"context_line":"                    mac_address)"},{"line_number":471,"context_line":"                ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_5ab413d4","line":468,"in_reply_to":"da86d52c_1c67fcb8","updated":"2015-02-13 15:40:29.000000000","message":"Looks like this part make me think about Driver specific request:\n\u003eDoing this in this way will allow *drivers* to create new types of address requests\u003c\nSlightly misread original idea.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"e4e005f5b925403ddea2ebc0999ebe9e96ddb3a3","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            ipam_subnet \u003d ipam_driver.get_subnet(cidr)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"            if \u0027ip_address\u0027 in fixed:"},{"line_number":468,"context_line":"                ip_request \u003d ipam.SpecificAddressRequest("},{"line_number":469,"context_line":"                    fixed[\u0027ip_address\u0027],"},{"line_number":470,"context_line":"                    mac_address)"},{"line_number":471,"context_line":"                ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_1c67fcb8","line":468,"in_reply_to":"da86d52c_26bf4fac","updated":"2015-02-13 14:31:07.000000000","message":"Actually, I think the way I have described it, it is not driver specific, because the code simply looks for a new class following particular naming conventions, and loads it if it is there (giving an error if not).\n\nThat said, it\u0027s not a bad idea to do both - have a base method that works most of the time but allow a driver to override it. The problem is, the request itself doesn\u0027t really know anything about the driver or even the subnet pool. So, I would be hesitant to change that.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0e2a0b480f560f3db87cb65dc94599bb2807d6bd","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            ipam_subnet \u003d ipam_driver.get_subnet(cidr)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"            if \u0027ip_address\u0027 in fixed:"},{"line_number":468,"context_line":"                ip_request \u003d ipam.SpecificAddressRequest("},{"line_number":469,"context_line":"                    fixed[\u0027ip_address\u0027],"},{"line_number":470,"context_line":"                    mac_address)"},{"line_number":471,"context_line":"                ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_26bf4fac","line":468,"in_reply_to":"da86d52c_67ffb334","updated":"2015-02-13 13:54:50.000000000","message":"Hi John,\nMake sense to me.\nTo be able to introduce new types of Request classes factory method should be driver specific so has to be defined in driver base class(now it is neutron.ipam.driver.pool).\nSince it leads to interface change, I would suggest to discuss interface details in wider team, probably in Carl\u0027s \u0027External IPAM Interface\u0027 review.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f6f652f2b8294b84cc15a71b99def5d027be16d6","unresolved":false,"context_lines":[{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        fixed_configured \u003d p[\u0027fixed_ips\u0027] is not attributes.ATTR_NOT_SPECIFIED"},{"line_number":561,"context_line":"        if fixed_configured:"},{"line_number":562,"context_line":"            configured_ips \u003d self._test_fixed_ips_for_port(context,"},{"line_number":563,"context_line":"                                                           p[\"network_id\"],"},{"line_number":564,"context_line":"                                                           p[\u0027fixed_ips\u0027],"},{"line_number":565,"context_line":"                                                           p[\u0027device_owner\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_b0c6ac14","line":562,"updated":"2015-02-17 15:54:02.000000000","message":"if is_ipam do you need this check here? Should the driver check if the IPs to allocate are OK?","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"34caa3b7a2ed8db0acbea144c42c7ee0679a854b","unresolved":false,"context_lines":[{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        fixed_configured \u003d p[\u0027fixed_ips\u0027] is not attributes.ATTR_NOT_SPECIFIED"},{"line_number":561,"context_line":"        if fixed_configured:"},{"line_number":562,"context_line":"            configured_ips \u003d self._test_fixed_ips_for_port(context,"},{"line_number":563,"context_line":"                                                           p[\"network_id\"],"},{"line_number":564,"context_line":"                                                           p[\u0027fixed_ips\u0027],"},{"line_number":565,"context_line":"                                                           p[\u0027device_owner\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_3f7aa6f1","line":562,"in_reply_to":"da86d52c_b0c6ac14","updated":"2015-02-23 16:29:36.000000000","message":"yes, now that will happen on driver side, reworked this part.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"f0f175af015a361533292b005b7cb5c53c117556","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        else:"},{"line_number":570,"context_line":"            filter \u003d {\u0027network_id\u0027: [p[\u0027network_id\u0027]]}"},{"line_number":571,"context_line":"            subnets \u003d self.get_subnets(context, filters\u003dfilter)"},{"line_number":572,"context_line":"            if is_ipam():"},{"line_number":573,"context_line":"                subnets_for_allocation \u003d []"},{"line_number":574,"context_line":"                for subnet in subnets:"},{"line_number":575,"context_line":"                    subnets_for_allocation.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_2838e7d3","line":572,"updated":"2015-02-13 22:37:52.000000000","message":"Could you explain the reasoning behind using is_ipam() and what it does? Lots of nested conditionals here and this method (which was big to begin with) is a little too big.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"2bfb695951490b9f10cbf56a4d3d6ab1f4643025","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        else:"},{"line_number":570,"context_line":"            filter \u003d {\u0027network_id\u0027: [p[\u0027network_id\u0027]]}"},{"line_number":571,"context_line":"            subnets \u003d self.get_subnets(context, filters\u003dfilter)"},{"line_number":572,"context_line":"            if is_ipam():"},{"line_number":573,"context_line":"                subnets_for_allocation \u003d []"},{"line_number":574,"context_line":"                for subnet in subnets:"},{"line_number":575,"context_line":"                    subnets_for_allocation.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_becd7188","line":572,"in_reply_to":"da86d52c_04cd79b7","updated":"2015-02-23 14:24:43.000000000","message":"Agree, that is much more clear way, implementing it.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"9996ca7e9db7e5e362ab21d62a775e565589d56e","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        else:"},{"line_number":570,"context_line":"            filter \u003d {\u0027network_id\u0027: [p[\u0027network_id\u0027]]}"},{"line_number":571,"context_line":"            subnets \u003d self.get_subnets(context, filters\u003dfilter)"},{"line_number":572,"context_line":"            if is_ipam():"},{"line_number":573,"context_line":"                subnets_for_allocation \u003d []"},{"line_number":574,"context_line":"                for subnet in subnets:"},{"line_number":575,"context_line":"                    subnets_for_allocation.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_9482b2c6","line":572,"in_reply_to":"da86d52c_2838e7d3","updated":"2015-02-16 10:13:21.000000000","message":"is_ipam() is a switch between new IPAM implementation and old baked in db_base IPAM.\nInstead of using a lot of \u0027if is_ipam\u0027, I\u0027ll implement IPAM counterpart methods and will switch between them on startup.\n\nif CONF.enable_ipam_drivers:\n    self._allocate_ips_for_port \u003d self._allocate_ips_for_port_ipam\n\nSo the will be unchanged method _allocate_ips_for_port() and new one updated to use IPAM driver _allocate_ips_for_port_ipam()","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"34caa3b7a2ed8db0acbea144c42c7ee0679a854b","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        else:"},{"line_number":570,"context_line":"            filter \u003d {\u0027network_id\u0027: [p[\u0027network_id\u0027]]}"},{"line_number":571,"context_line":"            subnets \u003d self.get_subnets(context, filters\u003dfilter)"},{"line_number":572,"context_line":"            if is_ipam():"},{"line_number":573,"context_line":"                subnets_for_allocation \u003d []"},{"line_number":574,"context_line":"                for subnet in subnets:"},{"line_number":575,"context_line":"                    subnets_for_allocation.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_7f36de53","line":572,"in_reply_to":"da86d52c_9482b2c6","updated":"2015-02-23 16:29:36.000000000","message":"Done","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f6f652f2b8294b84cc15a71b99def5d027be16d6","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        else:"},{"line_number":570,"context_line":"            filter \u003d {\u0027network_id\u0027: [p[\u0027network_id\u0027]]}"},{"line_number":571,"context_line":"            subnets \u003d self.get_subnets(context, filters\u003dfilter)"},{"line_number":572,"context_line":"            if is_ipam():"},{"line_number":573,"context_line":"                subnets_for_allocation \u003d []"},{"line_number":574,"context_line":"                for subnet in subnets:"},{"line_number":575,"context_line":"                    subnets_for_allocation.append({\u0027subnet_id\u0027: subnet[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_04cd79b7","line":572,"in_reply_to":"da86d52c_9482b2c6","updated":"2015-02-17 15:54:02.000000000","message":"It would be probably more clear if you create another method like you did for _allocate_fixed_ips . You can use the same decorator.  _allocate_fixed_ips is called by _allocate_ips_for_port so you need to decorate only the first method in the call.\nSomething like\n\n@call_ipam_if_enabled(_allocate_ips_for_port_ipam)\ndef _allocate_ips_for_port(self, context, port):\n\nthen in :\n\ndef _allocate_ips_for_port_ipam(_allocate_ips_for_port_ipam)\n    [....]\n    self._allocate_ips_ipam(...)\n\nYou don\u0027t need to decorate _allocate_fixed_ips anymore .\n\nIt would be easier to follow I think if you completely split the 2 code path from the beginning.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"f0f175af015a361533292b005b7cb5c53c117556","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"                                                     first_ip\u003dpool[\u0027start\u0027],"},{"line_number":1159,"context_line":"                                                     last_ip\u003dpool[\u0027end\u0027])"},{"line_number":1160,"context_line":"                context.session.add(ip_pool)"},{"line_number":1161,"context_line":"                if not is_ipam():"},{"line_number":1162,"context_line":"                    ip_range \u003d models_v2.IPAvailabilityRange("},{"line_number":1163,"context_line":"                        ipallocationpool\u003dip_pool,"},{"line_number":1164,"context_line":"                        first_ip\u003dpool[\u0027start\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_281e270e","line":1161,"updated":"2015-02-13 22:37:52.000000000","message":"This method is also getting rather large. At a minimum let\u0027s consider some utils or helper class(es).","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f6f652f2b8294b84cc15a71b99def5d027be16d6","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"    # Used to override ipam.Driver in unit tests"},{"line_number":1183,"context_line":"    def _get_ipam_driver(self, subnet_pool):"},{"line_number":1184,"context_line":"        return ipam.Driver.get_instance(subnet_pool)"},{"line_number":1185,"context_line":""},{"line_number":1186,"context_line":"    def _update_subnet_dns_nameservers(self, context, id, s):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_04b739f6","line":1183,"updated":"2015-02-17 15:54:02.000000000","message":"In the test you can use a mock patch to mock the driver, you don\u0027t need a getter.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"34caa3b7a2ed8db0acbea144c42c7ee0679a854b","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"    # Used to override ipam.Driver in unit tests"},{"line_number":1183,"context_line":"    def _get_ipam_driver(self, subnet_pool):"},{"line_number":1184,"context_line":"        return ipam.Driver.get_instance(subnet_pool)"},{"line_number":1185,"context_line":""},{"line_number":1186,"context_line":"    def _update_subnet_dns_nameservers(self, context, id, s):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_df68aa23","line":1183,"in_reply_to":"da86d52c_04b739f6","updated":"2015-02-23 16:29:36.000000000","message":"Done","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"43c3f2d768b5618d45bbb74fdf1fd574d1d39284","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1311,"context_line":"            subnet \u003d self._get_subnet(context, id)"},{"line_number":1312,"context_line":"            if is_ipam():"},{"line_number":1313,"context_line":"                # Note(pbondar); Call to IPAM should not be performed inside of"},{"line_number":1314,"context_line":"                # transaction, but do not see yet a good way to get cidr"},{"line_number":1315,"context_line":"                # in this method outside db transaction."},{"line_number":1316,"context_line":"                # Would it be better to pass subnet_id to remove_subnet?"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_e26391ae","line":1313,"updated":"2015-02-12 16:17:10.000000000","message":"I think this is another instance of defining the right pattern and the responsibility. In [1] this is discussed in the comments around line 221. It\u0027s not yet decided but when it is that will guide this an similar methods.\n\n[1] https://review.openstack.org/#/c/134339/18/neutron/ipam/ipam.py,unified","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"f0f175af015a361533292b005b7cb5c53c117556","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1311,"context_line":"            subnet \u003d self._get_subnet(context, id)"},{"line_number":1312,"context_line":"            if is_ipam():"},{"line_number":1313,"context_line":"                # Note(pbondar); Call to IPAM should not be performed inside of"},{"line_number":1314,"context_line":"                # transaction, but do not see yet a good way to get cidr"},{"line_number":1315,"context_line":"                # in this method outside db transaction."},{"line_number":1316,"context_line":"                # Would it be better to pass subnet_id to remove_subnet?"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_881553e7","line":1313,"in_reply_to":"da86d52c_e26391ae","updated":"2015-02-13 22:37:52.000000000","message":"+1","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0e2a0b480f560f3db87cb65dc94599bb2807d6bd","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1311,"context_line":"            subnet \u003d self._get_subnet(context, id)"},{"line_number":1312,"context_line":"            if is_ipam():"},{"line_number":1313,"context_line":"                # Note(pbondar); Call to IPAM should not be performed inside of"},{"line_number":1314,"context_line":"                # transaction, but do not see yet a good way to get cidr"},{"line_number":1315,"context_line":"                # in this method outside db transaction."},{"line_number":1316,"context_line":"                # Would it be better to pass subnet_id to remove_subnet?"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_86e63baf","line":1313,"in_reply_to":"da86d52c_e26391ae","updated":"2015-02-13 13:54:50.000000000","message":"Thanks, will keep track on it.","commit_id":"bb2546e22ccaed7995955b5809f4c3475ba2c1fe"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"09b05f4064f995c9f893865739e04562efb18285","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_e0663fba","line":87,"updated":"2015-02-25 19:02:54.000000000","message":"What if someone wants to allocate from a subnet pool when pluggable IPAM is enabled? I think this will break subnet allocation unless create_subnet_ipam() has logic for handling subnet pools embedded in it.","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"31b14879f0f4f4927298184523b3bcd2ec8c575a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_577b2fbd","line":87,"in_reply_to":"ba7be1f8_2170520a","updated":"2015-02-26 12:51:16.000000000","message":"So context.subnetpool_id or None should be passed into ipam.driver.Pool.get_instance, right?","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"bd4d6b202d59733a90231357f953389cceb9870c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_99ff63aa","line":87,"in_reply_to":"ba7be1f8_379f82b6","updated":"2015-02-27 13:47:11.000000000","message":"Currently I use subnet_pool_id if available in context,\nif it is not there None will be passed to ipam driver on load (like in previous patches)\n\nsubnet_pool_id \u003d None\nif hasattr(context, \u0027subnetpool_id\u0027):\n    subnet_pool_id \u003d context.subnetpool_id\n\nSo the code should work even if subnetpool is not included in Kilo","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"c68da469a430b959e4cb2de2cbddd3f5288a1ca6","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_2170520a","line":87,"in_reply_to":"ba7be1f8_383de7c4","updated":"2015-02-25 23:35:41.000000000","message":"After some discussion, I\u0027m convinced this is OK.","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"ed27181f632e8b0b1c88b110911be8ea38f69966","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_383de7c4","line":87,"in_reply_to":"ba7be1f8_40b62b8b","updated":"2015-02-25 21:56:36.000000000","message":"Ok, based on an IRC discussion with Ryan, my understanding is that the way this should work is that in the create_subnet call there may be a subnetpool_id in the context as it may be a parameter from the API. The dbbase plugin should use that subnetpool_id (or the implicit tenant subnetpool_id if not present) to instantiate the driver.\n\nThe reference driver may not support that in Kilo, as it may be more scope than can be completed. But the framework should support it so other drivers can utilize pools (and the reference driver could be expanded to support pools at a later time).","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3ba1f972075056ca54d27850435bf94e9ea30800","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_379f82b6","line":87,"in_reply_to":"ba7be1f8_577b2fbd","updated":"2015-02-26 21:12:58.000000000","message":"@John I think you hit the head on the nail.\n\nI certainly hope that we get pools support in to the reference driver by Kilo.  We\u0027re trying very hard to make it happen.  However, there will be a period of time where it is not supported.  You should proceed anyway and not wait on it.","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"0ea7e841bf0f3f51a9c612fb41965f999503874d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                         self.nova_notifier.record_port_status_changed)"},{"line_number":85,"context_line":"        # Switch to use new IPAM routines"},{"line_number":86,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":87,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":88,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":89,"context_line":"            self.create_port \u003d self.create_port_ipam"},{"line_number":90,"context_line":"            self.update_port \u003d self.update_port_ipam"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_40b62b8b","line":87,"in_reply_to":"ba7be1f8_e0663fba","updated":"2015-02-25 19:18:00.000000000","message":"Actually there is an IPAM driver per pool. The issue is below in several places where ipam.driver.Pool.get_instance is called without a subnet pool object, rather than here. Where will this SubnetPool object come from, has the create_subnet definition been changed as part of the subnet-allocation blueprint? If not how does this get passed in?","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"09b05f4064f995c9f893865739e04562efb18285","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        \"\"\"Allocate set of ips using over IPAM."},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"            If any single ip allocation fails, tries to deallocate all"},{"line_number":474,"context_line":"            allocated ip addresses."},{"line_number":475,"context_line":"        \"\"\""},{"line_number":476,"context_line":"        allocated \u003d []"},{"line_number":477,"context_line":"        ipam_driver \u003d ipam.driver.Pool.get_instance(None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_60f6cffa","line":474,"updated":"2015-02-25 19:02:54.000000000","message":"It might be nice if driver.Subnet supported a bulk allocate/de-allocate","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"31b14879f0f4f4927298184523b3bcd2ec8c575a","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        \"\"\"Allocate set of ips using over IPAM."},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"            If any single ip allocation fails, tries to deallocate all"},{"line_number":474,"context_line":"            allocated ip addresses."},{"line_number":475,"context_line":"        \"\"\""},{"line_number":476,"context_line":"        allocated \u003d []"},{"line_number":477,"context_line":"        ipam_driver \u003d ipam.driver.Pool.get_instance(None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_f2d0b120","line":474,"in_reply_to":"ba7be1f8_60f6cffa","updated":"2015-02-26 12:51:16.000000000","message":"It is better to be discussed on interface review, but yeah, make sense to me.","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"09b05f4064f995c9f893865739e04562efb18285","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                allocated.append({\u0027ip_address\u0027: allocated_ip,"},{"line_number":486,"context_line":"                                  \u0027subnet_cidr\u0027: ip[\u0027subnet_cidr\u0027],"},{"line_number":487,"context_line":"                                  \u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]})"},{"line_number":488,"context_line":"        except Exception:"},{"line_number":489,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":490,"context_line":"                LOG.error(_LE(\"An exception occurred during IP allocation. \""},{"line_number":491,"context_line":"                              \"Reverting allocation\"))"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_ddbe84ad","line":488,"updated":"2015-02-25 19:02:54.000000000","message":"Is there a more specific exception that can be expected?","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"31b14879f0f4f4927298184523b3bcd2ec8c575a","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                allocated.append({\u0027ip_address\u0027: allocated_ip,"},{"line_number":486,"context_line":"                                  \u0027subnet_cidr\u0027: ip[\u0027subnet_cidr\u0027],"},{"line_number":487,"context_line":"                                  \u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]})"},{"line_number":488,"context_line":"        except Exception:"},{"line_number":489,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":490,"context_line":"                LOG.error(_LE(\"An exception occurred during IP allocation. \""},{"line_number":491,"context_line":"                              \"Reverting allocation\"))"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_123d452b","line":488,"in_reply_to":"ba7be1f8_ddbe84ad","updated":"2015-02-26 12:51:16.000000000","message":"There could be wide range of exceptions, and on all of them revert operation should be done.\nSince we reraise original exception after revert operation is done, I dont see big issue in it.","commit_id":"10c6fdfff84e1e36fe5d393d35ed25cee372d873"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # And turning off error for this module by"},{"line_number":91,"context_line":"        # \u0027# pylint: disable\u003dmethod-hidden\u0027 still does not affect descendants"},{"line_number":92,"context_line":"        # So considering switching back to use decorator for _ipam methods"},{"line_number":93,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":94,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":95,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":96,"context_line":"            self.create_port \u003d self.create_port_ipam"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_1c73cc4e","line":93,"updated":"2015-03-04 00:14:02.000000000","message":"My thoughts on this monkey patching:  Normally, I think would be reluctant to accept this sort of thing.  However, given where we are in the cycle, I think that it would be better to leave the existing code untouched and add the pluggable IPAM via a monkey patch strategy like this *for the Kilo release only* in order to mitigate risk.  We should look to replace the old code soon in Liberty so that we don\u0027t have to maintain these two code streams.\n\nOn the other hand, having two divergent streams for any amount of time adds some risk.  How can we be sure we don\u0027t open ourselves up to regressions while we have these two implementations?","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b043cfd03ecf5691be9cf48f67956b3b7d702216","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # And turning off error for this module by"},{"line_number":91,"context_line":"        # \u0027# pylint: disable\u003dmethod-hidden\u0027 still does not affect descendants"},{"line_number":92,"context_line":"        # So considering switching back to use decorator for _ipam methods"},{"line_number":93,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":94,"context_line":"            self.create_subnet \u003d self.create_subnet_ipam"},{"line_number":95,"context_line":"            self.update_subnet \u003d self.update_subnet_ipam"},{"line_number":96,"context_line":"            self.create_port \u003d self.create_port_ipam"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5fc7a112","line":93,"in_reply_to":"ba7be1f8_1c73cc4e","updated":"2015-03-04 14:38:46.000000000","message":"Originally I planned to use this approach only during development cycle and do full switch to _ipam methods before final commit.\nDoing full switch is just renaming  create_subnet_ipam-\u003ecreate_subnet and removing old non-ipam methods.\nIf there are enough confidence in new IPAM reference driver + refactored db_base, then full switch can be done in one day.\nSo I think it is still possible to deliver full switch for Kilo, and a backup plan is to leave monkeypatching *for the Kilo release only*.\n\nI think the is no way to guaranty that two different streams are fully workable unless full bunch of tests is executed for two cases when cfg.CONF.use_pluggable_ipam is enabled and disabled.\nAnd it will double the load on the test center, which is not acceptable I guess.\nAlso IPAM behavior can be slightly different (another error messages on failure, probably something else), so some of the existing UT may require changes to work correctly with IPAM routines.\n\nSome compromise in testing is to run limited list of UT classes with redefined cfg.CONF.use_pluggable_ipam.\nFor example create new test class inherited from neutron.tests.unit.test_db_plugin.TestPortsV2, override cfg.CONF.use_pluggable_ipam in init and run existing tests.\nSo with small amount of changes related UT can be executed for non IPAM and IPAM cases.\nThis approach for UT becomes possible once reference driver is ready.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                LOG.error(_LE(\"An exception occurred during IP deallocation.\""},{"line_number":487,"context_line":"                              \"Reverting deallocation\"))"},{"line_number":488,"context_line":"                if revert_on_fail:"},{"line_number":489,"context_line":"                    self._ipam_allocate_ips(ipam_driver, deallocated,"},{"line_number":490,"context_line":"                                            revert_on_fail\u003dFalse)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"        return deallocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_7c95a831","line":489,"updated":"2015-03-04 00:14:02.000000000","message":"Is there any way we could end up ping-ponging between allocate and deallocate and never reach the end?  We could refactor to ensure that we never go more than two calls deep by using two methods:  one method with the lower level logic and the other method which calls it wrapped in the revert logic.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"efa7a6ed55e7e20263cc797a678eedcd61e852a4","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                LOG.error(_LE(\"An exception occurred during IP deallocation.\""},{"line_number":487,"context_line":"                              \"Reverting deallocation\"))"},{"line_number":488,"context_line":"                if revert_on_fail:"},{"line_number":489,"context_line":"                    self._ipam_allocate_ips(ipam_driver, deallocated,"},{"line_number":490,"context_line":"                                            revert_on_fail\u003dFalse)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"        return deallocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_c6f4b789","line":489,"in_reply_to":"9a80dd14_9601123c","updated":"2015-03-04 12:21:05.000000000","message":"Correction: are *not* performed\n\nSo revert_on_fail\u003dFalse prevents ping-pong between allocate and deallocate","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                LOG.error(_LE(\"An exception occurred during IP deallocation.\""},{"line_number":487,"context_line":"                              \"Reverting deallocation\"))"},{"line_number":488,"context_line":"                if revert_on_fail:"},{"line_number":489,"context_line":"                    self._ipam_allocate_ips(ipam_driver, deallocated,"},{"line_number":490,"context_line":"                                            revert_on_fail\u003dFalse)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"        return deallocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ad3a3734","line":489,"in_reply_to":"9a80dd14_c6f4b789","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":486,"context_line":"                LOG.error(_LE(\"An exception occurred during IP deallocation.\""},{"line_number":487,"context_line":"                              \"Reverting deallocation\"))"},{"line_number":488,"context_line":"                if revert_on_fail:"},{"line_number":489,"context_line":"                    self._ipam_allocate_ips(ipam_driver, deallocated,"},{"line_number":490,"context_line":"                                            revert_on_fail\u003dFalse)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"        return deallocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_9601123c","line":489,"in_reply_to":"ba7be1f8_7c95a831","updated":"2015-03-04 09:57:35.000000000","message":"revert_on_fail\u003dFalse is passed to ensure that rollback actions are performed on failure.\nThe same logic applies for _ipam_allocate_ips.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        try:"},{"line_number":503,"context_line":"            for ip in ips:"},{"line_number":504,"context_line":"                fixed_ip \u003d ip[\u0027ip_address\u0027] if \u0027ip_address\u0027 in ip else \u0027\u0027"},{"line_number":505,"context_line":"                ip_request \u003d ipam.AddressRequestFactory(fixed_ip)"},{"line_number":506,"context_line":"                ipam_subnet \u003d ipam_driver.get_subnet(ip[\u0027subnet_cidr\u0027])"},{"line_number":507,"context_line":"                allocated_ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_9cfb3c7a","line":504,"updated":"2015-03-04 00:14:02.000000000","message":"nit:  Would prefer to use None here rather than an empty string.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        try:"},{"line_number":503,"context_line":"            for ip in ips:"},{"line_number":504,"context_line":"                fixed_ip \u003d ip[\u0027ip_address\u0027] if \u0027ip_address\u0027 in ip else \u0027\u0027"},{"line_number":505,"context_line":"                ip_request \u003d ipam.AddressRequestFactory(fixed_ip)"},{"line_number":506,"context_line":"                ipam_subnet \u003d ipam_driver.get_subnet(ip[\u0027subnet_cidr\u0027])"},{"line_number":507,"context_line":"                allocated_ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ed3b4f36","line":504,"in_reply_to":"9a80dd14_d6fb8a45","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        try:"},{"line_number":503,"context_line":"            for ip in ips:"},{"line_number":504,"context_line":"                fixed_ip \u003d ip[\u0027ip_address\u0027] if \u0027ip_address\u0027 in ip else \u0027\u0027"},{"line_number":505,"context_line":"                ip_request \u003d ipam.AddressRequestFactory(fixed_ip)"},{"line_number":506,"context_line":"                ipam_subnet \u003d ipam_driver.get_subnet(ip[\u0027subnet_cidr\u0027])"},{"line_number":507,"context_line":"                allocated_ip \u003d ipam_subnet.allocate(ip_request)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_d6fb8a45","line":504,"in_reply_to":"ba7be1f8_9cfb3c7a","updated":"2015-03-04 09:57:35.000000000","message":"Ok","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                LOG.error(_LE(\"An exception occurred during IP allocation. \""},{"line_number":514,"context_line":"                              \"Reverting allocation\"))"},{"line_number":515,"context_line":"                if revert_on_fail:"},{"line_number":516,"context_line":"                    self._ipam_deallocate_ips(ipam_driver, allocated,"},{"line_number":517,"context_line":"                                              revert_on_fail\u003dFalse)"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        return allocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_9c96dc3c","line":516,"updated":"2015-03-04 00:14:02.000000000","message":"ditto (L489)","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                LOG.error(_LE(\"An exception occurred during IP allocation. \""},{"line_number":514,"context_line":"                              \"Reverting allocation\"))"},{"line_number":515,"context_line":"                if revert_on_fail:"},{"line_number":516,"context_line":"                    self._ipam_deallocate_ips(ipam_driver, allocated,"},{"line_number":517,"context_line":"                                              revert_on_fail\u003dFalse)"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        return allocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0d4983d0","line":516,"in_reply_to":"9a80dd14_968832c8","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                LOG.error(_LE(\"An exception occurred during IP allocation. \""},{"line_number":514,"context_line":"                              \"Reverting allocation\"))"},{"line_number":515,"context_line":"                if revert_on_fail:"},{"line_number":516,"context_line":"                    self._ipam_deallocate_ips(ipam_driver, allocated,"},{"line_number":517,"context_line":"                                              revert_on_fail\u003dFalse)"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        return allocated"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_968832c8","line":516,"in_reply_to":"ba7be1f8_9c96dc3c","updated":"2015-03-04 09:57:35.000000000","message":"revert_on_fail\u003dFalse prevents endless ping-pong between allocate and deallocate","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        for ip in ips:"},{"line_number":526,"context_line":"            if \u0027subnet_cidr\u0027 not in ip:"},{"line_number":527,"context_line":"                subnet \u003d self._get_subnet(context, ip[\u0027subnet_id\u0027])"},{"line_number":528,"context_line":"                ip[\u0027subnet_cidr\u0027] \u003d netaddr.IPNetwork(subnet[\u0027cidr\u0027])"},{"line_number":529,"context_line":"        return ips"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _get_ipam_driver(self, context):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_f737f1e0","line":528,"updated":"2015-03-04 00:14:02.000000000","message":"It may not be necessary to convert this to an IPNetwork here.  The driver should accept anything *convertible* to an IPNetwork which implies that it will attempt to convert it.  But, it isn\u0027t a big deal.  You may have other reasons to want to do this here.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        for ip in ips:"},{"line_number":526,"context_line":"            if \u0027subnet_cidr\u0027 not in ip:"},{"line_number":527,"context_line":"                subnet \u003d self._get_subnet(context, ip[\u0027subnet_id\u0027])"},{"line_number":528,"context_line":"                ip[\u0027subnet_cidr\u0027] \u003d netaddr.IPNetwork(subnet[\u0027cidr\u0027])"},{"line_number":529,"context_line":"        return ips"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _get_ipam_driver(self, context):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2d4647c0","line":528,"in_reply_to":"9a80dd14_bc2275ff","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":525,"context_line":"        for ip in ips:"},{"line_number":526,"context_line":"            if \u0027subnet_cidr\u0027 not in ip:"},{"line_number":527,"context_line":"                subnet \u003d self._get_subnet(context, ip[\u0027subnet_id\u0027])"},{"line_number":528,"context_line":"                ip[\u0027subnet_cidr\u0027] \u003d netaddr.IPNetwork(subnet[\u0027cidr\u0027])"},{"line_number":529,"context_line":"        return ips"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def _get_ipam_driver(self, context):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_bc2275ff","line":528,"in_reply_to":"ba7be1f8_f737f1e0","updated":"2015-03-04 09:57:35.000000000","message":"Don\u0027t know why but I thought that SpecificSubnetRequest requires IPNetwork type to be passed in.\nChecked SpecificSubnetRequest implementation, and it is converted to IPNetwork type inside, so I\u0027ll remove netaddr.IPNetwork conversion here.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":545,"context_line":"            msg \u003d _(\u0027Exceeded maximim amount of fixed ips per port\u0027)"},{"line_number":546,"context_line":"            raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        # Remove all of the intersecting elements"},{"line_number":549,"context_line":"        for original_ip in original_ips[:]:"},{"line_number":550,"context_line":"            for new_ip in new_ips[:]:"},{"line_number":551,"context_line":"                if (\u0027ip_address\u0027 in new_ip and"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_57bd1d67","line":548,"updated":"2015-03-04 00:14:02.000000000","message":"I\u0027d see use sets for clarity?  It doesn\u0027t look like it will take much change to use sets here.  The easiest would be to wrap the arguments passed to it with set(...).  However, you might want to do that in this method to keep from putting the onus on the caller.\n\nDoesn\u0027t this read much better?  It is easier on reviewers.\n\n prev_ips \u003d original_ips \u0026 new_ips\n original_ips -\u003d prev_ips\n new_ips -\u003d prev_ips\n\nSets can be passed to _ipam_allocate/deallocate since they\u0027re iterable.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"efa7a6ed55e7e20263cc797a678eedcd61e852a4","unresolved":false,"context_lines":[{"line_number":545,"context_line":"            msg \u003d _(\u0027Exceeded maximim amount of fixed ips per port\u0027)"},{"line_number":546,"context_line":"            raise n_exc.InvalidInput(error_message\u003dmsg)"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"        # Remove all of the intersecting elements"},{"line_number":549,"context_line":"        for original_ip in original_ips[:]:"},{"line_number":550,"context_line":"            for new_ip in new_ips[:]:"},{"line_number":551,"context_line":"                if (\u0027ip_address\u0027 in new_ip and"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_7f58eafa","line":548,"in_reply_to":"ba7be1f8_57bd1d67","updated":"2015-03-04 12:21:05.000000000","message":"original_ips and new_ips are list of hashes with \u0027subnet_id\u0027, \u0027ip_address\u0027 , so they can\u0027t be converted to sets directly.\n\n\u003e\u003e\u003e a \u003d set([{\u0027subnet_id\u0027: u\u00277e3e2d88-11fe-4b83-bb08-4e39658f187a\u0027, \u0027ip_address\u0027: u\u002710.0.0.2\u0027}])\n\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: unhashable type: \u0027dict\n\nAlso \u0027ip_address\u0027 may not present in new_ips hash, so converting \u0027new_ips\u0027 to set of unique ips becomes very tricky task.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":975,"context_line":"        return self._fields(res, fields)"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":"    def _make_fixed_ip_dict(self, ips):"},{"line_number":978,"context_line":"        ips_dict \u003d []"},{"line_number":979,"context_line":"        for ip in ips:"},{"line_number":980,"context_line":"            ips_dict.append({"},{"line_number":981,"context_line":"                \u0027subnet_id\u0027: ip[\"subnet_id\"],"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5cd179cc","line":978,"updated":"2015-03-04 09:57:35.000000000","message":"Sure, I\u0027ll improve this part","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":975,"context_line":"        return self._fields(res, fields)"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":"    def _make_fixed_ip_dict(self, ips):"},{"line_number":978,"context_line":"        ips_dict \u003d []"},{"line_number":979,"context_line":"        for ip in ips:"},{"line_number":980,"context_line":"            ips_dict.append({"},{"line_number":981,"context_line":"                \u0027subnet_id\u0027: ip[\"subnet_id\"],"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_0f50e930","line":978,"updated":"2015-03-04 00:14:02.000000000","message":"This is a list, not a dict.\n\nnit:  This could use a list comprehension.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":975,"context_line":"        return self._fields(res, fields)"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":"    def _make_fixed_ip_dict(self, ips):"},{"line_number":978,"context_line":"        ips_dict \u003d []"},{"line_number":979,"context_line":"        for ip in ips:"},{"line_number":980,"context_line":"            ips_dict.append({"},{"line_number":981,"context_line":"                \u0027subnet_id\u0027: ip[\"subnet_id\"],"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ad1157ae","line":978,"in_reply_to":"9a80dd14_5cd179cc","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"    def create_subnet_ipam(self, context, subnet):"},{"line_number":1178,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1179,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1180,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_1a7ae587","line":1180,"updated":"2015-03-04 00:14:02.000000000","message":"I don\u0027t think this works.\n\n \u003e\u003e\u003e \u0027%s/%s\u0027 % (str(netaddr.IPNetwork(\u002710.0.0.1/24\u0027)), 24)\n \u002710.0.0.1/24/24\u0027\n\nThis should do it:\n\n subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d str(net)","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"    def create_subnet_ipam(self, context, subnet):"},{"line_number":1178,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1179,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1180,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_cd25ab0b","line":1180,"in_reply_to":"9a80dd14_69f3dc0a","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"efa7a6ed55e7e20263cc797a678eedcd61e852a4","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"    def create_subnet_ipam(self, context, subnet):"},{"line_number":1178,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1179,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1180,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_69f3dc0a","line":1180,"in_reply_to":"9a80dd14_bc8515af","updated":"2015-03-04 12:21:05.000000000","message":"There is a difference in using:\n\n\u0027%s/%s\u0027 % (net.network, net.prefixlen)\n\nand \n\nstr(net)\n\n\u0027.network\u0027 leaves only network part of address,\nwhile str(net) returns unchanged address in the network\n\n\u003e\u003e\u003e print str(netaddr.IPNetwork(\u0027192.168.1.15/8\u0027).network)\n\n192.0.0.0\n\n\u003e\u003e\u003e print str(netaddr.IPNetwork(\u0027192.168.1.15/8\u0027))\n\n192.168.1.15/8\n\nSo looks like this is the reason why it is used in original create_subnet().\nTo preserv orignal behavior using str(net.cidr) should be ok\n\n\u003e\u003e\u003e print str(netaddr.IPNetwork(\u0027192.168.1.15/8\u0027).cidr)\n\n192.0.0.0/8","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"    def create_subnet_ipam(self, context, subnet):"},{"line_number":1178,"context_line":"        net \u003d netaddr.IPNetwork(subnet[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":1179,"context_line":"        # turn the CIDR into a proper subnet"},{"line_number":1180,"context_line":"        subnet[\u0027subnet\u0027][\u0027cidr\u0027] \u003d \u0027%s/%s\u0027 % (net.network, net.prefixlen)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_bc8515af","line":1180,"in_reply_to":"ba7be1f8_1a7ae587","updated":"2015-03-04 09:57:35.000000000","message":"Actually it turns into:\n\n\u003e\u003e\u003e \u0027%s/%s\u0027 % (str(netaddr.IPNetwork(\u002710.0.0.1/24\u0027).network), 24)\n\n\u002710.0.0.0/24\u0027\n\nBut agree using str(net) is much more clear way to do it.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":"        ipam_driver \u003d self._get_ipam_driver(context)"},{"line_number":1201,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1202,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1203,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1204,"context_line":"            net,"},{"line_number":1205,"context_line":"            tenant_id\u003dtenant_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_fad2715a","line":1202,"updated":"2015-03-04 00:14:02.000000000","message":"nit:  This wasn\u0027t as easy for me to parse as it could have been.  How about this:\n\n ip_range_pool \u003d [netaddr.IPRange(p[\u0027start\u0027], p[\u0027end\u0027])\n                  for p in s[\u0027allocation_pools\u0027]]","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":"        ipam_driver \u003d self._get_ipam_driver(context)"},{"line_number":1201,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1202,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1203,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1204,"context_line":"            net,"},{"line_number":1205,"context_line":"            tenant_id\u003dtenant_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ed226f00","line":1202,"in_reply_to":"9a80dd14_1c63811b","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":"        ipam_driver \u003d self._get_ipam_driver(context)"},{"line_number":1201,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1202,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1203,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1204,"context_line":"            net,"},{"line_number":1205,"context_line":"            tenant_id\u003dtenant_id,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_1c63811b","line":1202,"in_reply_to":"ba7be1f8_fad2715a","updated":"2015-03-04 09:57:35.000000000","message":"Sure, I\u0027ll update it","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"            subnet_id\u003did).delete()"},{"line_number":1386,"context_line":"        new_pools \u003d [models_v2.IPAllocationPool("},{"line_number":1387,"context_line":"            first_ip\u003dp[\u0027start\u0027], last_ip\u003dp[\u0027end\u0027],"},{"line_number":1388,"context_line":"            subnet_id\u003did) for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1389,"context_line":"        context.session.add_all(new_pools)"},{"line_number":1390,"context_line":"        #Gather new pools for result:"},{"line_number":1391,"context_line":"        result_pools \u003d [{\u0027start\u0027: pool[\u0027start\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_9a6a5518","line":1388,"updated":"2015-03-04 00:14:02.000000000","message":"formatting suggestion:\n\n new_pools \u003d [models_v2.IPAllocationPool(first_ip\u003dp[\u0027start\u0027],\n                                         last_ip\u003dp[\u0027end\u0027],\n                                         subnet_id\u003did)\n              for p in s[\u0027allocation_pools\u0027]]","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"            subnet_id\u003did).delete()"},{"line_number":1386,"context_line":"        new_pools \u003d [models_v2.IPAllocationPool("},{"line_number":1387,"context_line":"            first_ip\u003dp[\u0027start\u0027], last_ip\u003dp[\u0027end\u0027],"},{"line_number":1388,"context_line":"            subnet_id\u003did) for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1389,"context_line":"        context.session.add_all(new_pools)"},{"line_number":1390,"context_line":"        #Gather new pools for result:"},{"line_number":1391,"context_line":"        result_pools \u003d [{\u0027start\u0027: pool[\u0027start\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0d20a3f6","line":1388,"in_reply_to":"9a80dd14_1c31c10b","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":1385,"context_line":"            subnet_id\u003did).delete()"},{"line_number":1386,"context_line":"        new_pools \u003d [models_v2.IPAllocationPool("},{"line_number":1387,"context_line":"            first_ip\u003dp[\u0027start\u0027], last_ip\u003dp[\u0027end\u0027],"},{"line_number":1388,"context_line":"            subnet_id\u003did) for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1389,"context_line":"        context.session.add_all(new_pools)"},{"line_number":1390,"context_line":"        #Gather new pools for result:"},{"line_number":1391,"context_line":"        result_pools \u003d [{\u0027start\u0027: pool[\u0027start\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_1c31c10b","line":1388,"in_reply_to":"ba7be1f8_9a6a5518","updated":"2015-03-04 09:57:35.000000000","message":"Looks good to me, update accordingly","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":1412,"context_line":"    def _ipam_update_allocation_pools(self, ipam_driver, id, cidr,"},{"line_number":1413,"context_line":"                                     allocation_pools):"},{"line_number":1414,"context_line":"        self._validate_allocation_pools(allocation_pools,"},{"line_number":1415,"context_line":"                                        cidr)"},{"line_number":1416,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1417,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in allocation_pools]"},{"line_number":1418,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_ba7f19aa","line":1415,"updated":"2015-03-04 00:14:02.000000000","message":"nit: No need to wrap this line.","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":1412,"context_line":"    def _ipam_update_allocation_pools(self, ipam_driver, id, cidr,"},{"line_number":1413,"context_line":"                                     allocation_pools):"},{"line_number":1414,"context_line":"        self._validate_allocation_pools(allocation_pools,"},{"line_number":1415,"context_line":"                                        cidr)"},{"line_number":1416,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1417,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in allocation_pools]"},{"line_number":1418,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_8d83b3cb","line":1415,"in_reply_to":"ba7be1f8_ba7f19aa","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":1414,"context_line":"        self._validate_allocation_pools(allocation_pools,"},{"line_number":1415,"context_line":"                                        cidr)"},{"line_number":1416,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1417,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in allocation_pools]"},{"line_number":1418,"context_line":""},{"line_number":1419,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1420,"context_line":"            netaddr.IPNetwork(cidr),"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_daa3ed40","line":1417,"updated":"2015-03-04 00:14:02.000000000","message":"ditto (L1202)","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":1414,"context_line":"        self._validate_allocation_pools(allocation_pools,"},{"line_number":1415,"context_line":"                                        cidr)"},{"line_number":1416,"context_line":"        ip_range_pool \u003d [netaddr.IPRange("},{"line_number":1417,"context_line":"            p[\u0027start\u0027], p[\u0027end\u0027]) for p in allocation_pools]"},{"line_number":1418,"context_line":""},{"line_number":1419,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1420,"context_line":"            netaddr.IPNetwork(cidr),"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0d77c303","line":1417,"in_reply_to":"ba7be1f8_daa3ed40","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0c468f6d488326b01cb717732c922d342f9d04c0","unresolved":false,"context_lines":[{"line_number":1792,"context_line":"            changed_ips \u003d True"},{"line_number":1793,"context_line":"            port \u003d self._get_port(context, id)"},{"line_number":1794,"context_line":"            original \u003d self._make_port_dict(port, process_extensions\u003dFalse)"},{"line_number":1795,"context_line":"            added_ips, prev_ips, removed_ips \u003d self._update_ips_for_port_ipam("},{"line_number":1796,"context_line":"                context, original[\"fixed_ips\"], p[\u0027fixed_ips\u0027])"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba7be1f8_b2b667f7","line":1795,"updated":"2015-03-04 00:14:02.000000000","message":"These may not be set (i.e. if \u0027fixed_ips\u0027 not in p).  I see that you use \"changed_ips\" boolean to guard against referring to them if they aren\u0027t set but I wonder if there is a better pattern to use for long-term maintainability.  in some cases, simply initializing them to an empty list may be sufficient (e.g. \"for ip in []\" ends up being a no-op.)","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"86e7f1963adf19b83a5946610dca1e9d566f7ce6","unresolved":false,"context_lines":[{"line_number":1792,"context_line":"            changed_ips \u003d True"},{"line_number":1793,"context_line":"            port \u003d self._get_port(context, id)"},{"line_number":1794,"context_line":"            original \u003d self._make_port_dict(port, process_extensions\u003dFalse)"},{"line_number":1795,"context_line":"            added_ips, prev_ips, removed_ips \u003d self._update_ips_for_port_ipam("},{"line_number":1796,"context_line":"                context, original[\"fixed_ips\"], p[\u0027fixed_ips\u0027])"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ed50af60","line":1795,"in_reply_to":"9a80dd14_b0c37989","updated":"2015-03-04 15:19:05.000000000","message":"Done","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"110a5006ae6739f8f1ad95ab2fcfa010ae1f8a30","unresolved":false,"context_lines":[{"line_number":1792,"context_line":"            changed_ips \u003d True"},{"line_number":1793,"context_line":"            port \u003d self._get_port(context, id)"},{"line_number":1794,"context_line":"            original \u003d self._make_port_dict(port, process_extensions\u003dFalse)"},{"line_number":1795,"context_line":"            added_ips, prev_ips, removed_ips \u003d self._update_ips_for_port_ipam("},{"line_number":1796,"context_line":"                context, original[\"fixed_ips\"], p[\u0027fixed_ips\u0027])"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_b0c37989","line":1795,"in_reply_to":"ba7be1f8_b2b667f7","updated":"2015-03-04 09:57:35.000000000","message":"Initializing them with empty list make sense to me","commit_id":"d672e10b96ddd86681ae212fe38d3f343db15869"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"83b864f8c87383dbb52edd0898d21cc136860462","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        ipam_driver \u003d self._get_ipam_driver(context)"},{"line_number":1200,"context_line":"        ip_range_pool \u003d [netaddr.IPRange(p[\u0027start\u0027], p[\u0027end\u0027])"},{"line_number":1201,"context_line":"                         for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1202,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1203,"context_line":"            subnet[\u0027subnet\u0027][\u0027cidr\u0027],"},{"line_number":1204,"context_line":"            tenant_id\u003dtenant_id,"},{"line_number":1205,"context_line":"            subnet_id\u003dsubnet_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_d020a0f9","line":1202,"updated":"2015-03-05 15:51:27.000000000","message":"Need to use the factory here, similar to addresses. Otherwise \"AnySubnet\" will never happen!","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3947b8f15d01f888b604c7f350d5e853ae4bde8e","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        ipam_driver \u003d self._get_ipam_driver(context)"},{"line_number":1200,"context_line":"        ip_range_pool \u003d [netaddr.IPRange(p[\u0027start\u0027], p[\u0027end\u0027])"},{"line_number":1201,"context_line":"                         for p in s[\u0027allocation_pools\u0027]]"},{"line_number":1202,"context_line":"        subnet_request \u003d ipam.SpecificSubnetRequest("},{"line_number":1203,"context_line":"            subnet[\u0027subnet\u0027][\u0027cidr\u0027],"},{"line_number":1204,"context_line":"            tenant_id\u003dtenant_id,"},{"line_number":1205,"context_line":"            subnet_id\u003dsubnet_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_0aa48e06","line":1202,"in_reply_to":"9a80dd14_d020a0f9","updated":"2015-03-06 15:58:20.000000000","message":"Done","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c7fbbc17514d95d5c7b6d20f0b38ab4b9b3b23f8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"# otherwise alternative implementation for IPAM is called"},{"line_number":64,"context_line":"# *for the Kilo release only*"},{"line_number":65,"context_line":"def call_ipam_if_enabled(ipam_func):"},{"line_number":66,"context_line":"    def wrapper(original_func):"},{"line_number":67,"context_line":"        def call_func(*args, **kwargs):"},{"line_number":68,"context_line":"            if cfg.CONF.use_pluggable_ipam:"},{"line_number":69,"context_line":"                return ipam_func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_80c31e37","line":66,"updated":"2015-03-18 16:19:04.000000000","message":"use:\n\n  @functools.wraps(original_func)\n  def call_func(...):\n    ...","commit_id":"a60df95c0bf4a4a304a02d1044f889b9ed8fab78"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"c7fbbc17514d95d5c7b6d20f0b38ab4b9b3b23f8","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            network_id\u003dnetwork_id,"},{"line_number":159,"context_line":"            ip_address\u003dip_address,"},{"line_number":160,"context_line":"            subnet_id\u003dsubnet_id).delete()"},{"line_number":161,"context_line":"        LOG.warn(\"### COUNT DEL:%s\", count)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    @staticmethod"},{"line_number":164,"context_line":"    def _store_ip_allocation(context, ip_address, network_id, subnet_id,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a80dd14_80da3e15","line":161,"updated":"2015-03-18 16:19:04.000000000","message":"please set label:Workflow to -1","commit_id":"a60df95c0bf4a4a304a02d1044f889b9ed8fab78"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"3fd582927e60498b392b121fe1e2a61ff28a2236","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            network_id\u003dnetwork_id,"},{"line_number":171,"context_line":"            ip_address\u003dip_address,"},{"line_number":172,"context_line":"            subnet_id\u003dsubnet_id).delete()"},{"line_number":173,"context_line":"        LOG.warn(\"### COUNT DEL:%s\", count)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @staticmethod"},{"line_number":176,"context_line":"    def _store_ip_allocation(context, ip_address, network_id, subnet_id,"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_03514f62","line":173,"updated":"2015-03-23 13:36:33.000000000","message":"WIP missing?","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"348fb0878ff8cdaadb2244b574d363557e183137","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            network_id\u003dnetwork_id,"},{"line_number":171,"context_line":"            ip_address\u003dip_address,"},{"line_number":172,"context_line":"            subnet_id\u003dsubnet_id).delete()"},{"line_number":173,"context_line":"        LOG.warn(\"### COUNT DEL:%s\", count)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @staticmethod"},{"line_number":176,"context_line":"    def _store_ip_allocation(context, ip_address, network_id, subnet_id,"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_e301933a","line":173,"in_reply_to":"1a6ced46_03514f62","updated":"2015-03-23 13:37:42.000000000","message":"oups, sorry","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d29333c4a8ae6c5887a8045af878a5b609efa7eb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"# If it is not set original functions gets called,"},{"line_number":67,"context_line":"# otherwise alternative implementation for IPAM is called"},{"line_number":68,"context_line":"# *for the Kilo release only*"},{"line_number":69,"context_line":"def call_ipam_if_enabled(ipam_func):"},{"line_number":70,"context_line":"    def wrapper(original_func):"},{"line_number":71,"context_line":"        def call_func(*args, **kwargs):"},{"line_number":72,"context_line":"            if cfg.CONF.use_pluggable_ipam:"}],"source_content_type":"text/x-python","patch_set":38,"id":"9aa53dc9_bae3cf32","line":69,"updated":"2015-04-08 19:50:03.000000000","message":"it would be more efficient to do:\n\n  def call_ipam_if_enabled(ipam_func):\n    def wrapper(original_func):\n        return ipam_func if cfg.CONF.use_pluggable_ipam original_func\n\n\nBUT, imho, we should avoid monkey patching when possible. Typically we could replace the pattern:\n\n  class NeutronDbPluginV2(...):\n\n    @call_ipam_if_enabled(method_ipam):\n    def method(...):\n       # IMPLEMENTATION\n\nby:\n\n  class NonIpamBackend(...):\n\n    def method(self, plugin, *args, **kwargs):\n       # IMPLEMENTATION\n\n  class IpamBackend(...):\n\n    def method(self, plugin, *args, **kwargs):\n       # IMPLEMENTATION\n\n\n  class NeutronDbPluginV2(...):\n\n     def __init__(...):\n       if cfg.CONF.use_pluggable_ipam:\n         self._backend \u003d IpamBackend(self, ???)\n       else\n         self._backend \u003d NonIpamBackend(self, ???)\n\n     def method(*args, **kwargs):\n        return self._backend.method(*args, **kwargs)","commit_id":"f899758ded062cea6db4f969a203a9082997af78"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3c95ce3e40ef92e29955e1d9161ea9f78b6beb8a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"# If it is not set original functions gets called,"},{"line_number":67,"context_line":"# otherwise alternative implementation for IPAM is called"},{"line_number":68,"context_line":"# *for the Kilo release only*"},{"line_number":69,"context_line":"def call_ipam_if_enabled(ipam_func):"},{"line_number":70,"context_line":"    def wrapper(original_func):"},{"line_number":71,"context_line":"        def call_func(*args, **kwargs):"},{"line_number":72,"context_line":"            if cfg.CONF.use_pluggable_ipam:"}],"source_content_type":"text/x-python","patch_set":38,"id":"9aa53dc9_800f5d87","line":69,"in_reply_to":"9aa53dc9_bae3cf32","updated":"2015-04-09 15:13:14.000000000","message":"Updated code in this way (IpamBackend/NonIpamBackend), but observed some new UT failures in test_securitygroup, investigating with them now.","commit_id":"f899758ded062cea6db4f969a203a9082997af78"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"011881c7fc6e0caef79951fa7be5f22c8d94e6b7","unresolved":false,"context_lines":[{"line_number":1578,"context_line":"                                         subnet[\u0027network_id\u0027])"},{"line_number":1579,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":1580,"context_line":""},{"line_number":1581,"context_line":"    def _create_subnet_from_implicit_pool(self, context, subnet):"},{"line_number":1582,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1583,"context_line":"        self._validate_subnet(context, s)"},{"line_number":1584,"context_line":"        subnet_request \u003d self._make_subnet_request(s)"}],"source_content_type":"text/x-python","patch_set":38,"id":"9aa53dc9_dfab251c","line":1581,"updated":"2015-04-08 19:20:12.000000000","message":"My thinking was that this method would become obsolete once we were using the IPAM framework.  I would suggest that create_subnet_from_implicit_pool() and create_subnet_from_pool() be collapsed together now.  I initially created separate methods to highlight the implicit pool vs. regular pools and to simplify things for Kilo. I\u0027d suggest we now collapse these 2 methods back into create_subnet() as the only difference between them is whether they set subnetpool_id or not.","commit_id":"f899758ded062cea6db4f969a203a9082997af78"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8a543d06b1e00ef0fe660dd51d0dcf3cfd8fcf6d","unresolved":false,"context_lines":[{"line_number":1578,"context_line":"                                         subnet[\u0027network_id\u0027])"},{"line_number":1579,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":1580,"context_line":""},{"line_number":1581,"context_line":"    def _create_subnet_from_implicit_pool(self, context, subnet):"},{"line_number":1582,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1583,"context_line":"        self._validate_subnet(context, s)"},{"line_number":1584,"context_line":"        subnet_request \u003d self._make_subnet_request(s)"}],"source_content_type":"text/x-python","patch_set":38,"id":"9aa53dc9_3bcd72b7","line":1581,"in_reply_to":"9aa53dc9_dfab251c","updated":"2015-04-09 08:45:22.000000000","message":"Make sence to me, I\u0027ll collaps them into single method then.","commit_id":"f899758ded062cea6db4f969a203a9082997af78"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d29333c4a8ae6c5887a8045af878a5b609efa7eb","unresolved":false,"context_lines":[{"line_number":1793,"context_line":"        The change however will not be realized until the client renew the"},{"line_number":1794,"context_line":"        dns lease or we support gratuitous DHCP offers"},{"line_number":1795,"context_line":"        \"\"\""},{"line_number":1796,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1797,"context_line":"        changed_host_routes \u003d False"},{"line_number":1798,"context_line":"        changed_dns \u003d False"},{"line_number":1799,"context_line":"        changed_allocation_pools \u003d False"}],"source_content_type":"text/x-python","patch_set":38,"id":"9aa53dc9_da1b331a","line":1796,"updated":"2015-04-08 19:50:03.000000000","message":"imo, it\u0027s a bad practice to use 1-character variable names outside of list/dict comprehension","commit_id":"f899758ded062cea6db4f969a203a9082997af78"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8a543d06b1e00ef0fe660dd51d0dcf3cfd8fcf6d","unresolved":false,"context_lines":[{"line_number":1793,"context_line":"        The change however will not be realized until the client renew the"},{"line_number":1794,"context_line":"        dns lease or we support gratuitous DHCP offers"},{"line_number":1795,"context_line":"        \"\"\""},{"line_number":1796,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1797,"context_line":"        changed_host_routes \u003d False"},{"line_number":1798,"context_line":"        changed_dns \u003d False"},{"line_number":1799,"context_line":"        changed_allocation_pools \u003d False"}],"source_content_type":"text/x-python","patch_set":38,"id":"9aa53dc9_bbf74258","line":1796,"in_reply_to":"9aa53dc9_da1b331a","updated":"2015-04-09 08:45:22.000000000","message":"As I see it is common practice in this file to use 1-character variable name for subnet or port. Examples: update_subnet, create_port, update_port.\n\nIt was a counterpart method for \u0027def update_subnet\u0027, so it was done in the same way with minimum additional change. But now I am considering doing more deep re-factoring here to reduce code duplication between update_subnet_ipam()/update_subnet() and other counterpart methods.","commit_id":"f899758ded062cea6db4f969a203a9082997af78"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"            req \u003d self._make_subnet_request(s, subnetpool)"},{"line_number":1085,"context_line":"            ipam_driver \u003d self._get_ipam_driver(context, subnetpool\u003dsubnetpool)"},{"line_number":1086,"context_line":"            ipam_subnet \u003d ipam_driver.allocate_subnet(req)"},{"line_number":1087,"context_line":"            subnet_request \u003d ipam_subnet.get_details()"},{"line_number":1088,"context_line":"            subnet \u003d self._save_subnet(context,"},{"line_number":1089,"context_line":"                                       network,"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_874b8c2b","line":1086,"updated":"2015-04-10 17:32:16.000000000","message":"Looks like we\u0027re calling the driver from within a transaction here. I\u0027m not sure we want to be doing this as it could result in long-running transactions for any number of reasons (ie calling off to a remote IPAM service). It should be safe to allocate using the driver first, then open a transaction and save the subnet info.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"e0d47d23bbd5d7ff5eb2402560950df130423276","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"            req \u003d self._make_subnet_request(s, subnetpool)"},{"line_number":1085,"context_line":"            ipam_driver \u003d self._get_ipam_driver(context, subnetpool\u003dsubnetpool)"},{"line_number":1086,"context_line":"            ipam_subnet \u003d ipam_driver.allocate_subnet(req)"},{"line_number":1087,"context_line":"            subnet_request \u003d ipam_subnet.get_details()"},{"line_number":1088,"context_line":"            subnet \u003d self._save_subnet(context,"},{"line_number":1089,"context_line":"                                       network,"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_ebc43d41","line":1086,"in_reply_to":"7aaa499b_874b8c2b","updated":"2015-04-13 10:08:41.000000000","message":"It is impossible to achieve transaction separation for IPAM call and main db transaction while refactoring on db_base_plugin level, because each plugin wraps up create_subnet, create_port calls into upper level transaction [1]. To achieve transaction separation we have to refactor on plugin level (i.e. refactor each plugin), John B. is trying this way right now under alternate refactoring[2] to see win/amount of effort needed. \n\n[1] neutron/plugins/ml2/plugin.py: line 939, def _create_port_db()\n\n[2] https://review.openstack.org/#/c/172443/","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"42b976dcab1e153fa874355e1c7dc7f65656e0c5","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"            req \u003d self._make_subnet_request(s, subnetpool)"},{"line_number":1085,"context_line":"            ipam_driver \u003d self._get_ipam_driver(context, subnetpool\u003dsubnetpool)"},{"line_number":1086,"context_line":"            ipam_subnet \u003d ipam_driver.allocate_subnet(req)"},{"line_number":1087,"context_line":"            subnet_request \u003d ipam_subnet.get_details()"},{"line_number":1088,"context_line":"            subnet \u003d self._save_subnet(context,"},{"line_number":1089,"context_line":"                                       network,"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_ff1aa96d","line":1086,"in_reply_to":"7aaa499b_ebc43d41","updated":"2015-04-13 17:26:33.000000000","message":"Thanks for the explanation","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"            self._validate_subnet_cidr(context, network, s[\u0027cidr\u0027])"},{"line_number":1114,"context_line":"            if cfg.CONF.use_pluggable_ipam:"},{"line_number":1115,"context_line":"                ipam_driver \u003d self._get_ipam_driver(context)"},{"line_number":1116,"context_line":"                ipam_subnet \u003d ipam_driver.allocate_subnet(subnet_request)"},{"line_number":1117,"context_line":"                subnet_request \u003d ipam_subnet.get_details()"},{"line_number":1118,"context_line":""},{"line_number":1119,"context_line":"            subnet \u003d self._save_subnet(context,"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_c725145d","line":1116,"updated":"2015-04-10 17:32:16.000000000","message":"Again, calling driver within a transaction here. Comments about collapsing _create_subnet_from_implicit_pool() and _create_subnet_from_pool() still stand as well.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"                    raise n_exc.SubnetInUse(subnet_id\u003did)"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"            context.session.delete(subnet)"},{"line_number":1306,"context_line":"            self._ipam_delete_subnet(context, id)"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":1309,"context_line":"        subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_479fc45f","line":1306,"updated":"2015-04-10 17:32:16.000000000","message":"Not every subnet delete can be intercepted here.  Subnet deletes can cascade on network delete. This means you can\u0027t be guaranteed that the IPAM driver will be invoked every time a subnet is deleted from Neutron. In lieu of a better suggestion, I\u0027m thinking we need to break that cascade because it will lead to situations where the subnet allocation won\u0027t be released when it should be.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"e0d47d23bbd5d7ff5eb2402560950df130423276","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"                    raise n_exc.SubnetInUse(subnet_id\u003did)"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"            context.session.delete(subnet)"},{"line_number":1306,"context_line":"            self._ipam_delete_subnet(context, id)"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":1309,"context_line":"        subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_cb1d01bf","line":1306,"in_reply_to":"7aaa499b_479fc45f","updated":"2015-04-13 10:08:41.000000000","message":"As I see delete_network code, it calls delete_subnet for each subnet.\n\ndef delete_network(self, context, id):\n...\n   subnets \u003d self._get_subnets_by_network(context, id)\n   for subnet in subnets:\n       self.delete_subnet(context, subnet[\u0027id\u0027])\n\nProbably you mean some other code, please, point me to the code lines in this case.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"42b976dcab1e153fa874355e1c7dc7f65656e0c5","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"                    raise n_exc.SubnetInUse(subnet_id\u003did)"},{"line_number":1304,"context_line":""},{"line_number":1305,"context_line":"            context.session.delete(subnet)"},{"line_number":1306,"context_line":"            self._ipam_delete_subnet(context, id)"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":1309,"context_line":"        subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_440af027","line":1306,"in_reply_to":"7aaa499b_cb1d01bf","updated":"2015-04-13 17:26:33.000000000","message":"Yes, you\u0027re correct. My memory is a little foggy, however I recall pulling my hair out with subnet allocation as allocations were being left dangling because it did not appear delete_subnet() was being invoked directly, and yet the subnet was being deleted. It caused us to store allocations differently to account for that. At the time I suspected subnets were cascading on network delete, but that was not the case. I must say I\u0027ve forgotten what exactly the issue was. I leave this comment as more of a cautionary tale then :)","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":14258,"name":"Ryan Tidwell","email":"rktidwell85@gmail.com","username":"tidwellr"},"change_message_id":"20f7ed34c4451828cbd68ec0a6eb48051590e56c","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                                         subnet[\u0027network_id\u0027])"},{"line_number":1124,"context_line":"        return [self._make_subnet_dict(subnet), ipam_subnet]"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"    def _create_subnet_from_implicit_pool(self, context, subnet):"},{"line_number":1127,"context_line":"        ipam_subnet \u003d None"},{"line_number":1128,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1129,"context_line":"        self._validate_subnet(context, s)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7ad32947_e7e11a00","line":1126,"updated":"2015-04-27 20:03:20.000000000","message":"Suggestion to collapse _create_subnet_from_pool() and _create_subnet_from_implicit_pool() still stands","commit_id":"041a9133ddeb6ea3c9dcd8c184a0237cb2d29866"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0a01d165c3ed41509199aac0071641c3457dbed8","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                                         subnet[\u0027network_id\u0027])"},{"line_number":1124,"context_line":"        return [self._make_subnet_dict(subnet), ipam_subnet]"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"    def _create_subnet_from_implicit_pool(self, context, subnet):"},{"line_number":1127,"context_line":"        ipam_subnet \u003d None"},{"line_number":1128,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1129,"context_line":"        self._validate_subnet(context, s)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7ad32947_752b5b83","line":1126,"in_reply_to":"7ad32947_1a21014e","updated":"2015-04-28 13:24:31.000000000","message":"Collapsed _create_subnet_from_pool() and _create_subnet_from_implicit_pool() into one method _create_subnet() in rev 51","commit_id":"041a9133ddeb6ea3c9dcd8c184a0237cb2d29866"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"48193da2507033606989807aa83c4f27ba072537","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                                         subnet[\u0027network_id\u0027])"},{"line_number":1124,"context_line":"        return [self._make_subnet_dict(subnet), ipam_subnet]"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"    def _create_subnet_from_implicit_pool(self, context, subnet):"},{"line_number":1127,"context_line":"        ipam_subnet \u003d None"},{"line_number":1128,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":1129,"context_line":"        self._validate_subnet(context, s)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7ad32947_1a21014e","line":1126,"in_reply_to":"7ad32947_e7e11a00","updated":"2015-04-28 08:42:25.000000000","message":"Agree, still in my todo list.","commit_id":"041a9133ddeb6ea3c9dcd8c184a0237cb2d29866"},{"author":{"_account_id":14258,"name":"Ryan Tidwell","email":"rktidwell85@gmail.com","username":"tidwellr"},"change_message_id":"20f7ed34c4451828cbd68ec0a6eb48051590e56c","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":1191,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":1192,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":1193,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"}],"source_content_type":"text/x-python","patch_set":50,"id":"7ad32947_27a6f2c1","line":1192,"updated":"2015-04-27 20:03:20.000000000","message":"_create_subnet_from_pool() is also wrapped with these wrappers. Do we need to wrap at both methods? if so, what about _create_subnet_from_implicit_pool()?","commit_id":"041a9133ddeb6ea3c9dcd8c184a0237cb2d29866"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"48193da2507033606989807aa83c4f27ba072537","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":1191,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":1192,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":1193,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"}],"source_content_type":"text/x-python","patch_set":50,"id":"7ad32947_9a0511c4","line":1192,"in_reply_to":"7ad32947_27a6f2c1","updated":"2015-04-28 08:42:25.000000000","message":"I think we need to use wrappers only on top level i.e. create_port(). I was going  to remove wrapper from _create_subnet_from_pool(), but looks like forgot about it. Thanks for the catch.","commit_id":"041a9133ddeb6ea3c9dcd8c184a0237cb2d29866"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0a01d165c3ed41509199aac0071641c3457dbed8","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":1191,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":1192,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":1193,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"}],"source_content_type":"text/x-python","patch_set":50,"id":"7ad32947_153b07d3","line":1192,"in_reply_to":"7ad32947_9a0511c4","updated":"2015-04-28 13:24:31.000000000","message":"Done","commit_id":"041a9133ddeb6ea3c9dcd8c184a0237cb2d29866"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    __native_sorting_support \u003d True"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def __init__(self):"},{"line_number":80,"context_line":"        self._set_backend()"},{"line_number":81,"context_line":"        if cfg.CONF.notify_nova_on_port_status_changes:"},{"line_number":82,"context_line":"            from neutron.notifiers import nova"},{"line_number":83,"context_line":"            # NOTE(arosen) These event listeners are here to hook into when"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_857212ac","line":80,"updated":"2015-05-07 23:32:12.000000000","message":"backend doesn\u0027t strike me as the right name given the context here.  It doesn\u0027t say IPAM.  How about something like this:\n\n  self.set_ipam_backend()","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    __native_sorting_support \u003d True"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def __init__(self):"},{"line_number":80,"context_line":"        self._set_backend()"},{"line_number":81,"context_line":"        if cfg.CONF.notify_nova_on_port_status_changes:"},{"line_number":82,"context_line":"            from neutron.notifiers import nova"},{"line_number":83,"context_line":"            # NOTE(arosen) These event listeners are here to hook into when"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_17033e11","line":80,"in_reply_to":"1aca2d91_857212ac","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _set_backend(self):"},{"line_number":94,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":95,"context_line":"            self._backend \u003d IpamBackend()"},{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_a5a62e0e","line":95,"updated":"2015-05-07 23:32:12.000000000","message":"Similar comment to L80.  _backend doesn\u0027t seem right.  How about:\n\n  self.ipam \u003d IpamBackend()","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _set_backend(self):"},{"line_number":94,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":95,"context_line":"            self._backend \u003d IpamBackend()"},{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_a20d4639","line":95,"in_reply_to":"1aca2d91_14ce245a","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0bcc70d1f58b4b9e892e97976c4d24ee822d1703","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _set_backend(self):"},{"line_number":94,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":95,"context_line":"            self._backend \u003d IpamBackend()"},{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_14ce245a","line":95,"in_reply_to":"1aca2d91_a5a62e0e","updated":"2015-05-08 11:55:04.000000000","message":"agree","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _save_allocation_pools(self, *args, **kwargs):"},{"line_number":100,"context_line":"        return self._backend._save_allocation_pools(*args, **kwargs)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _allocate_ips_for_port(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_c5780a92","line":99,"updated":"2015-05-07 23:32:12.000000000","message":"These look like pretty thin wrappers.  What is their purpose given that we have self._backend.  Part of me thinks that I\u0027d rather see this:\n\n  self.ipam.save_allocation_pools(...)\n\nThan the following (and have to trace in through this extra layer of indirection)\n\n  self._save_allocation_pools(...)","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _save_allocation_pools(self, *args, **kwargs):"},{"line_number":100,"context_line":"        return self._backend._save_allocation_pools(*args, **kwargs)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _allocate_ips_for_port(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_62107e4f","line":99,"in_reply_to":"1aca2d91_b42c1003","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0bcc70d1f58b4b9e892e97976c4d24ee822d1703","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _save_allocation_pools(self, *args, **kwargs):"},{"line_number":100,"context_line":"        return self._backend._save_allocation_pools(*args, **kwargs)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _allocate_ips_for_port(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_b42c1003","line":99,"in_reply_to":"1aca2d91_c5780a92","updated":"2015-05-08 11:55:04.000000000","message":"make sense, will do","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            self._backend \u003d NonIpamBackend()"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _save_allocation_pools(self, *args, **kwargs):"},{"line_number":100,"context_line":"        return self._backend._save_allocation_pools(*args, **kwargs)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _allocate_ips_for_port(self, *args, **kwargs):"},{"line_number":103,"context_line":"        return self._backend._allocate_ips_for_port(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_05b6023d","line":100,"updated":"2015-05-07 23:32:12.000000000","message":"I\u0027m not sure these methods should begin with an underscore.  It feels like that are public methods on the IpamBackend and NonIpamBackend classes.","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                return True"},{"line_number":427,"context_line":"        return False"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def _get_ipam_driver(self, context, subnetpool\u003dNone):"},{"line_number":430,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":431,"context_line":"            return ipam_base.Pool.get_instance(subnetpool, context)"},{"line_number":432,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_e538a6a2","line":429,"updated":"2015-05-07 23:32:12.000000000","message":"_get_ipam_subnetpool_driver or something?","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                return True"},{"line_number":427,"context_line":"        return False"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def _get_ipam_driver(self, context, subnetpool\u003dNone):"},{"line_number":430,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":431,"context_line":"            return ipam_base.Pool.get_instance(subnetpool, context)"},{"line_number":432,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_223156ed","line":429,"in_reply_to":"1aca2d91_74e8b8b4","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0bcc70d1f58b4b9e892e97976c4d24ee822d1703","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                return True"},{"line_number":427,"context_line":"        return False"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def _get_ipam_driver(self, context, subnetpool\u003dNone):"},{"line_number":430,"context_line":"        if cfg.CONF.use_pluggable_ipam:"},{"line_number":431,"context_line":"            return ipam_base.Pool.get_instance(subnetpool, context)"},{"line_number":432,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_74e8b8b4","line":429,"in_reply_to":"1aca2d91_e538a6a2","updated":"2015-05-08 11:55:04.000000000","message":"will do","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"                if tenant_id !\u003d router[\u0027tenant_id\u0027]:"},{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_25057ebb","line":1705,"updated":"2015-05-07 23:32:12.000000000","message":"Should we create new files for each of the new backends?","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0bcc70d1f58b4b9e892e97976c4d24ee822d1703","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"                if tenant_id !\u003d router[\u0027tenant_id\u0027]:"},{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_f4c5e83b","line":1705,"in_reply_to":"1aca2d91_25057ebb","updated":"2015-05-08 11:55:04.000000000","message":"will do","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":1702,"context_line":"                if tenant_id !\u003d router[\u0027tenant_id\u0027]:"},{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_024d3a72","line":1705,"in_reply_to":"1aca2d91_f4c5e83b","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"},{"line_number":1709,"context_line":"        # Skip init parent class because leads to endless recursion"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_e589c627","line":1706,"updated":"2015-05-07 23:32:12.000000000","message":"At first glance, it seems very odd to me that this inherits from NeutronDbPluginV2.  Given the current relationships, I think these are both true:\n\n  \"IpamBackend is a NeutronDbPluginV2\"\n  \"NonIpamBackend is a NeutronDbPluginV2\"\n  \"NeutronDbPluginV2 has an IpamBackend or a NonIpamBackend)\"\n\nWhat is the reason for this?  What needs to be refactored to get rid of this cycle.","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"},{"line_number":1709,"context_line":"        # Skip init parent class because leads to endless recursion"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_62651ee0","line":1706,"in_reply_to":"1aca2d91_34cc8069","updated":"2015-05-11 17:51:34.000000000","message":"Separated ipam and non_ipam implementation into different files. Common code for both implementation was moved into BackendMixin. Inheritance looks next:\n- BackendMixin \u003c- IpamBackend\n- BackendMixin \u003c- NonIpamBackend\n- BackendMixin \u003c- NeutronDbPluginV2\n- NeutronDbPluginV2 has IpamBackend or NonIpamBackend","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0bcc70d1f58b4b9e892e97976c4d24ee822d1703","unresolved":false,"context_lines":[{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"},{"line_number":1709,"context_line":"        # Skip init parent class because leads to endless recursion"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_34cc8069","line":1706,"in_reply_to":"1aca2d91_e589c627","updated":"2015-05-08 11:55:04.000000000","message":"Reason why it was done this way \"IpamBackend is a NeutronDbPluginV2\" is that both IpamBackend and NonIpamBackend call some common methods from NeutronDbPluginV2.\nI need to go back and review if it possible to move this common methods into something like IpamBackendMixin.\nSo in this case it will look like:\n\"IpamBackend is a IpamBackendMixin\"\n\"NonIpamBackend is a IpamBackendMixin\"\n\"NeutronDbPluginV2 has an IpamBackend or a NonIpamBackend\"","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"79fe5874552febf4150b0abfd919591164bb2d34","unresolved":false,"context_lines":[{"line_number":1703,"context_line":"                    raise n_exc.DeviceIDNotOwnedByTenant(device_id\u003ddevice_id)"},{"line_number":1704,"context_line":""},{"line_number":1705,"context_line":""},{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"},{"line_number":1709,"context_line":"        # Skip init parent class because leads to endless recursion"}],"source_content_type":"text/x-python","patch_set":59,"id":"9a0c5dc1_eb8ced80","line":1706,"in_reply_to":"7ad8896b_62651ee0","updated":"2015-05-13 21:59:18.000000000","message":"Your proposal looks like a more sensible inheritance relationship.","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"},{"line_number":1709,"context_line":"        # Skip init parent class because leads to endless recursion"},{"line_number":1710,"context_line":"        pass"},{"line_number":1711,"context_line":""},{"line_number":1712,"context_line":"    def _ipam_deallocate_ips(self, ipam_driver, ips, revert_on_fail\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_65cc966a","line":1709,"updated":"2015-05-07 23:32:12.000000000","message":"This is a consequence of my comment on L1706.  To me, this looks like a work-around for the real problem.  I guess your answer on L1706 will help us know how to proceed.","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":1706,"context_line":"class IpamBackend(NeutronDbPluginV2):"},{"line_number":1707,"context_line":""},{"line_number":1708,"context_line":"    def __init__(cls):"},{"line_number":1709,"context_line":"        # Skip init parent class because leads to endless recursion"},{"line_number":1710,"context_line":"        pass"},{"line_number":1711,"context_line":""},{"line_number":1712,"context_line":"    def _ipam_deallocate_ips(self, ipam_driver, ips, revert_on_fail\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_c2561206","line":1709,"in_reply_to":"1aca2d91_65cc966a","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ebed36b5b87f9a9eae54b34f2d1a3bc79122721e","unresolved":false,"context_lines":[{"line_number":2174,"context_line":"                                  ip_address)"},{"line_number":2175,"context_line":""},{"line_number":2176,"context_line":""},{"line_number":2177,"context_line":"class NonIpamBackend(NeutronDbPluginV2):"},{"line_number":2178,"context_line":""},{"line_number":2179,"context_line":"    def __init__(cls):"},{"line_number":2180,"context_line":"        # Skip init parent class because leads to endless recursion"}],"source_content_type":"text/x-python","patch_set":59,"id":"1aca2d91_855c52ee","line":2177,"updated":"2015-05-07 23:32:12.000000000","message":"And another file for this one?","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f1b40773db1e4b20e2cda1f82893d64f63190a87","unresolved":false,"context_lines":[{"line_number":2174,"context_line":"                                  ip_address)"},{"line_number":2175,"context_line":""},{"line_number":2176,"context_line":""},{"line_number":2177,"context_line":"class NonIpamBackend(NeutronDbPluginV2):"},{"line_number":2178,"context_line":""},{"line_number":2179,"context_line":"    def __init__(cls):"},{"line_number":2180,"context_line":"        # Skip init parent class because leads to endless recursion"}],"source_content_type":"text/x-python","patch_set":59,"id":"7ad8896b_225f1610","line":2177,"in_reply_to":"1aca2d91_855c52ee","updated":"2015-05-11 17:51:34.000000000","message":"Done","commit_id":"807bfec8b555e1c225422a3429512679f38c5bc9"},{"author":{"_account_id":14258,"name":"Ryan Tidwell","email":"rktidwell85@gmail.com","username":"tidwellr"},"change_message_id":"0df9bcb3b17f236df2c4a269e7a04118bc58e5f9","unresolved":false,"context_lines":[{"line_number":577,"context_line":"            network \u003d self._get_network(context, s[\"network_id\"])"},{"line_number":578,"context_line":"            if subnetpool_id:"},{"line_number":579,"context_line":"                subnetpool \u003d self._get_subnetpool(context, subnetpool_id)"},{"line_number":580,"context_line":"                self._validate_ip_version_with_subnetpool(s, subnetpool)"},{"line_number":581,"context_line":"            subnet_request \u003d self.ipam.make_subnet_request(s, subnetpool)"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"            if use_driver:"}],"source_content_type":"text/x-python","patch_set":71,"id":"7a016987_970c7d43","line":580,"updated":"2015-05-27 21:13:36.000000000","message":"Perhaps we can move this method to a place where it can be called from ipam.make_subnet_request()?","commit_id":"4b552060212b42e25372a57cf2ac6b396e6af260"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"3e0552f5a3813ac3e198c2765cdafea267b97d73","unresolved":false,"context_lines":[{"line_number":577,"context_line":"            network \u003d self._get_network(context, s[\"network_id\"])"},{"line_number":578,"context_line":"            if subnetpool_id:"},{"line_number":579,"context_line":"                subnetpool \u003d self._get_subnetpool(context, subnetpool_id)"},{"line_number":580,"context_line":"                self._validate_ip_version_with_subnetpool(s, subnetpool)"},{"line_number":581,"context_line":"            subnet_request \u003d self.ipam.make_subnet_request(s, subnetpool)"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"            if use_driver:"}],"source_content_type":"text/x-python","patch_set":71,"id":"7a016987_68359ed9","line":580,"in_reply_to":"7a016987_970c7d43","updated":"2015-05-27 23:49:38.000000000","message":"Yes, that seems better approach.\nI will make that change.","commit_id":"4b552060212b42e25372a57cf2ac6b396e6af260"},{"author":{"_account_id":14258,"name":"Ryan Tidwell","email":"rktidwell85@gmail.com","username":"tidwellr"},"change_message_id":"0df9bcb3b17f236df2c4a269e7a04118bc58e5f9","unresolved":false,"context_lines":[{"line_number":583,"context_line":"            if use_driver:"},{"line_number":584,"context_line":"                ipam_driver \u003d self._get_ipam_subnetpool_driver(context,"},{"line_number":585,"context_line":"                                                               subnetpool)"},{"line_number":586,"context_line":"                ipam_subnet \u003d ipam_driver.allocate_subnet(subnet_request)"},{"line_number":587,"context_line":"                subnet_request \u003d ipam_subnet.get_details()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"            subnet \u003d self._save_subnet(context,"}],"source_content_type":"text/x-python","patch_set":71,"id":"7a016987_d20e83e4","line":586,"updated":"2015-05-27 21:13:36.000000000","message":"I\u0027m thinking that this operation should have a way to roll back. There are some calls that are made after this that could raise exceptions and could leave the subnet in an allocated state, even if it\u0027s not associated with a Neutron subnet. This probably works if the allocation is handled within the current transaction, but I don\u0027t think we can make that assumption.","commit_id":"4b552060212b42e25372a57cf2ac6b396e6af260"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"3e0552f5a3813ac3e198c2765cdafea267b97d73","unresolved":false,"context_lines":[{"line_number":583,"context_line":"            if use_driver:"},{"line_number":584,"context_line":"                ipam_driver \u003d self._get_ipam_subnetpool_driver(context,"},{"line_number":585,"context_line":"                                                               subnetpool)"},{"line_number":586,"context_line":"                ipam_subnet \u003d ipam_driver.allocate_subnet(subnet_request)"},{"line_number":587,"context_line":"                subnet_request \u003d ipam_subnet.get_details()"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"            subnet \u003d self._save_subnet(context,"}],"source_content_type":"text/x-python","patch_set":71,"id":"7a016987_785b2df7","line":586,"in_reply_to":"7a016987_d20e83e4","updated":"2015-05-27 23:49:38.000000000","message":"I see your point. \n\nIn that case, I shall put the code outside transaction into try...catch block and delete subnet I created when an exception occurs then re-raise the exception.","commit_id":"4b552060212b42e25372a57cf2ac6b396e6af260"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"bf679ca295ee0b0c26260b885ef09478b0de645a","unresolved":false,"context_lines":[{"line_number":565,"context_line":""},{"line_number":566,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":567,"context_line":"            network \u003d self._get_network(context, s[\"network_id\"])"},{"line_number":568,"context_line":"            if subnetpool_id:"},{"line_number":569,"context_line":"                subnetpool \u003d self._get_subnetpool(context, subnetpool_id)"},{"line_number":570,"context_line":"            subnet_request \u003d self.ipam.make_subnet_request(s, subnetpool)"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"7a016987_16a74c0c","line":568,"updated":"2015-05-28 15:52:06.000000000","message":"If the params of make_subnet_request are changed to take the context, network and subnetpool_id, then all of this (568-576) can move into make_subnet_request.\n\nIt will then return subnet_request, ipam_subnet\n\nThen on line 587, it would change to \"if ipam_subnet:\" which means that use_driver flag is no longer needed in this routine. \n\nThis localizes all the knowledge of pluggable vs. non-pluggable into the IPAM code rather than having it bleed out here.","commit_id":"7273a4eb3b714017703a9ac9e9136847bbebdd30"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"dbb161e9ae829ce952230f6f7f5f10e01df468fc","unresolved":false,"context_lines":[{"line_number":565,"context_line":""},{"line_number":566,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":567,"context_line":"            network \u003d self._get_network(context, s[\"network_id\"])"},{"line_number":568,"context_line":"            if subnetpool_id:"},{"line_number":569,"context_line":"                subnetpool \u003d self._get_subnetpool(context, subnetpool_id)"},{"line_number":570,"context_line":"            subnet_request \u003d self.ipam.make_subnet_request(s, subnetpool)"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"7a016987_7c4b0188","line":568,"in_reply_to":"7a016987_16a74c0c","updated":"2015-05-28 16:47:19.000000000","message":"Yes, I agree.\nThat would make the interface clearer.","commit_id":"7273a4eb3b714017703a9ac9e9136847bbebdd30"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5b69ca1e429806ff577d9943712a0f958647e08c","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _validate_port_for_update(self, context, db_port, new_port, new_mac):"},{"line_number":104,"context_line":"        changed_owner \u003d \u0027device_owner\u0027 in new_port"},{"line_number":105,"context_line":"        current_owner \u003d new_port.get(\u0027device_owner\u0027) or \\"},{"line_number":106,"context_line":"            db_port[\u0027device_owner\u0027]"},{"line_number":107,"context_line":"        changed_device_id \u003d new_port.get(\u0027device_id\u0027) !\u003d db_port[\u0027device_id\u0027]"},{"line_number":108,"context_line":"        current_device_id \u003d new_port.get(\u0027device_id\u0027) or db_port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_0fcc1288","line":105,"updated":"2015-06-02 20:24:35.000000000","message":"Policy is to not use \\ to continue a line:\n\n  current_owner \u003d (new_port.get(\u0027device_owner\u0027) or\n                   db_port[\u0027device_owner\u0027])","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"26906894df15a6fb99e6ab2222304008678b4707","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _validate_port_for_update(self, context, db_port, new_port, new_mac):"},{"line_number":104,"context_line":"        changed_owner \u003d \u0027device_owner\u0027 in new_port"},{"line_number":105,"context_line":"        current_owner \u003d new_port.get(\u0027device_owner\u0027) or \\"},{"line_number":106,"context_line":"            db_port[\u0027device_owner\u0027]"},{"line_number":107,"context_line":"        changed_device_id \u003d new_port.get(\u0027device_id\u0027) !\u003d db_port[\u0027device_id\u0027]"},{"line_number":108,"context_line":"        current_device_id \u003d new_port.get(\u0027device_id\u0027) or db_port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_e4d3065e","line":105,"in_reply_to":"5afe65bd_0fcc1288","updated":"2015-06-03 09:59:32.000000000","message":"will fix","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8dca67ff7970396d73cabc9e251bb6ab1d6dbe04","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _validate_port_for_update(self, context, db_port, new_port, new_mac):"},{"line_number":104,"context_line":"        changed_owner \u003d \u0027device_owner\u0027 in new_port"},{"line_number":105,"context_line":"        current_owner \u003d new_port.get(\u0027device_owner\u0027) or \\"},{"line_number":106,"context_line":"            db_port[\u0027device_owner\u0027]"},{"line_number":107,"context_line":"        changed_device_id \u003d new_port.get(\u0027device_id\u0027) !\u003d db_port[\u0027device_id\u0027]"},{"line_number":108,"context_line":"        current_device_id \u003d new_port.get(\u0027device_id\u0027) or db_port[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_00903ceb","line":105,"in_reply_to":"5afe65bd_e4d3065e","updated":"2015-06-04 11:36:04.000000000","message":"Done","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"2cce5e1757f4faf4821773044809d3fa20ee53d9","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        _LE(\"An exception occurred during subnet creation.\""},{"line_number":579,"context_line":"                            \"Reverting subnet allocation.\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                    # Note(pbondar): Discussion required:"},{"line_number":582,"context_line":"                    # At this point IPAM Subnet is not associated with neutron"},{"line_number":583,"context_line":"                    # subnet, so it could not be found by neutron subnet_id."},{"line_number":584,"context_line":"                    # But Pool interface expects to get subnet_id into"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_8317d6a2","line":581,"updated":"2015-06-02 13:12:19.000000000","message":"Need some discussion here.\nWorkarounds I see for mentioned issue are:\n\n1) Update Pool interface to expect ipam_subnet_id instead of neutron_subnet_id for remove_subnet [1].\nAlso \u0027id\u0027 property has to be added to Subnet interface in [1], so deletion will look like:\nPool.remove_subnet(ipam_subnet.id)\n\n2) Alternative way is to add new remove methods for Subnet interface. So ipam subnet instance could remove itself:\nipam_subnet.remove()\n\nAs I see interface has to be updated in any cases. Any ideas about better solution?\n\n[1] neutron/ipam/driver.py: line 88","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"bdf3fa6885a0732c80556fc55d4f861b687d6926","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        _LE(\"An exception occurred during subnet creation.\""},{"line_number":579,"context_line":"                            \"Reverting subnet allocation.\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                    # Note(pbondar): Discussion required:"},{"line_number":582,"context_line":"                    # At this point IPAM Subnet is not associated with neutron"},{"line_number":583,"context_line":"                    # subnet, so it could not be found by neutron subnet_id."},{"line_number":584,"context_line":"                    # But Pool interface expects to get subnet_id into"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_21035e0f","line":581,"in_reply_to":"5afe65bd_16cc3388","updated":"2015-06-03 00:05:19.000000000","message":"I think it was only added because the FK constraint made it necessary. With that gone, it should not be needed anymore.","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"26906894df15a6fb99e6ab2222304008678b4707","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        _LE(\"An exception occurred during subnet creation.\""},{"line_number":579,"context_line":"                            \"Reverting subnet allocation.\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                    # Note(pbondar): Discussion required:"},{"line_number":582,"context_line":"                    # At this point IPAM Subnet is not associated with neutron"},{"line_number":583,"context_line":"                    # subnet, so it could not be found by neutron subnet_id."},{"line_number":584,"context_line":"                    # But Pool interface expects to get subnet_id into"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_64e39606","line":581,"in_reply_to":"5afe65bd_21035e0f","updated":"2015-06-03 09:59:32.000000000","message":"I\u0027ll test solution where neutron subnet_id is set on creating ipam subnet.\nAnd assotiate step is not needed in this case.\nSince FK is removed this way looks workable so far.","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8dca67ff7970396d73cabc9e251bb6ab1d6dbe04","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        _LE(\"An exception occurred during subnet creation.\""},{"line_number":579,"context_line":"                            \"Reverting subnet allocation.\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                    # Note(pbondar): Discussion required:"},{"line_number":582,"context_line":"                    # At this point IPAM Subnet is not associated with neutron"},{"line_number":583,"context_line":"                    # subnet, so it could not be found by neutron subnet_id."},{"line_number":584,"context_line":"                    # But Pool interface expects to get subnet_id into"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_c0990421","line":581,"in_reply_to":"5afe65bd_64e39606","updated":"2015-06-04 11:36:04.000000000","message":"Removed assiociation step, and it works fine now, because FK is removed.\nMajor part of remove assiociation step is included into [1]\n\n[1] https://review.openstack.org/#/c/183099/","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"21f9ce9fd0148ed5ce3bd8a2ace1ec9dd53f1229","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        _LE(\"An exception occurred during subnet creation.\""},{"line_number":579,"context_line":"                            \"Reverting subnet allocation.\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                    # Note(pbondar): Discussion required:"},{"line_number":582,"context_line":"                    # At this point IPAM Subnet is not associated with neutron"},{"line_number":583,"context_line":"                    # subnet, so it could not be found by neutron subnet_id."},{"line_number":584,"context_line":"                    # But Pool interface expects to get subnet_id into"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_f15f660c","line":581,"in_reply_to":"5afe65bd_8317d6a2","updated":"2015-06-02 17:40:44.000000000","message":"The subnet ID is created in make_subnet_request. So, even if the save fails, we have the ID. That is, we do not need the associate_neutron_subnet call any more at all, I think it can just be removed. \n\nAt one point there was a FK constraint from ipam_subnet to neutron subnet but I thought we got rid of that. It shouldn\u0027t exist because the reference driver should work as if it were external.","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5b69ca1e429806ff577d9943712a0f958647e08c","unresolved":false,"context_lines":[{"line_number":578,"context_line":"                        _LE(\"An exception occurred during subnet creation.\""},{"line_number":579,"context_line":"                            \"Reverting subnet allocation.\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"                    # Note(pbondar): Discussion required:"},{"line_number":582,"context_line":"                    # At this point IPAM Subnet is not associated with neutron"},{"line_number":583,"context_line":"                    # subnet, so it could not be found by neutron subnet_id."},{"line_number":584,"context_line":"                    # But Pool interface expects to get subnet_id into"}],"source_content_type":"text/x-python","patch_set":75,"id":"5afe65bd_16cc3388","line":581,"in_reply_to":"5afe65bd_f15f660c","updated":"2015-06-02 20:24:35.000000000","message":"@John I wondered about the associate_neutron_subnet call when it was first introduced.  But, I\u0027m not sure that we can just remove it.  As far as I can tell, the call to associate_neutron_subnet on L570 is the only way the ref impl makes the association.  So, is there another way for the ref impl to make the association?\n\nIt seems like the ref impl could be refactored to pull the subnet id from the SubnetRequest and associate it when it is allocated.  That would make sense to me.  This must have been something about the API that wasn\u0027t completely understood when writing the ref impl.  Am I missing something or would this be an easy refactor?  I could throw a patch up to test it unless one of you wants to do it.  Ping me and we can talk about this change more.\n\nThe foreign key constraint was removed.  I know some wanted to keep it in there for convenience but I think it would\u0027ve caused external systems problems down the road (e.g. no call to external IPAM in certain cases because DB took care of deletion).","commit_id":"271d7b6eca22162c01e7e95c011838392fd6ddd3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":444,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":445,"context_line":"    def _create_subnet_from_pool(self, context, subnet, subnetpool_id):"},{"line_number":446,"context_line":"        s \u003d subnet[\u0027subnet\u0027]"},{"line_number":447,"context_line":"        self._validate_pools_with_subnetpool(s)"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":450,"context_line":"            subnetpool \u003d self._get_subnetpool(context, subnetpool_id)"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_6e94d58a","side":"PARENT","line":447,"updated":"2015-06-29 23:52:08.000000000","message":"Looks like the old code didn\u0027t run _validate_subnet when creating a subnet from a pool.  I wonder if that was an oversight or if there is something that I\u0027m missing here.\n\nSee L529 in the new code side.","commit_id":"e120bad02841ed54ed071d82bffc47671f612137"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        # internal ports on the network with addresses for this subnet."},{"line_number":462,"context_line":"        if ipv6_utils.is_auto_address_subnet(subnet):"},{"line_number":463,"context_line":"            self.ipam.add_auto_addrs_on_network_ports(context, subnet,"},{"line_number":464,"context_line":"                                                      ipam_subnet)"},{"line_number":465,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def _get_subnetpool_id(self, subnet):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_f12be480","line":464,"updated":"2015-06-29 23:52:08.000000000","message":"It doesn\u0027t make sense in the context of this patch why ipam_subnet is passed here.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        # internal ports on the network with addresses for this subnet."},{"line_number":462,"context_line":"        if ipv6_utils.is_auto_address_subnet(subnet):"},{"line_number":463,"context_line":"            self.ipam.add_auto_addrs_on_network_ports(context, subnet,"},{"line_number":464,"context_line":"                                                      ipam_subnet)"},{"line_number":465,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def _get_subnetpool_id(self, subnet):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_2e539b6c","line":464,"in_reply_to":"ba3cc151_52307c9e","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        # internal ports on the network with addresses for this subnet."},{"line_number":462,"context_line":"        if ipv6_utils.is_auto_address_subnet(subnet):"},{"line_number":463,"context_line":"            self.ipam.add_auto_addrs_on_network_ports(context, subnet,"},{"line_number":464,"context_line":"                                                      ipam_subnet)"},{"line_number":465,"context_line":"        return self._make_subnet_dict(subnet)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def _get_subnetpool_id(self, subnet):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_52307c9e","line":464,"in_reply_to":"ba3cc151_f12be480","updated":"2015-06-30 11:29:27.000000000","message":"will move ipam_subnet changes to next patch","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b2d715749d183ef241c4e0f91179799d0c3355d2","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            return cfg.CONF.default_ipv4_subnet_pool"},{"line_number":498,"context_line":"        return cfg.CONF.default_ipv6_subnet_pool"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":501,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":502,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":503,"context_line":"    def create_subnet(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_7b730681","line":500,"updated":"2015-06-30 19:08:40.000000000","message":"This shouldn\u0027t be needed anymore. Deadlocks are retried at the API layer as of 4e77442d529d9803ff90de905b846af940eaf382. Do you have code that throws RetryRequests? If so, I would rather it be added in the API stuff. The issue with trying to do it here is that a plugin could start a transaction before calling super().create_subnet to land here. The wrap_db_retry decorator shouldn\u0027t be used inside of a transaction because an exception cancels the whole thing.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            return cfg.CONF.default_ipv4_subnet_pool"},{"line_number":498,"context_line":"        return cfg.CONF.default_ipv6_subnet_pool"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":501,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":502,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":503,"context_line":"    def create_subnet(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_ce4d4fc5","line":500,"in_reply_to":"ba3cc151_7096a7f1","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"28464be469e0af46ff018c0511846084c7dda74b","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            return cfg.CONF.default_ipv4_subnet_pool"},{"line_number":498,"context_line":"        return cfg.CONF.default_ipv6_subnet_pool"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":501,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":502,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":503,"context_line":"    def create_subnet(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_7096a7f1","line":500,"in_reply_to":"ba3cc151_7b730681","updated":"2015-07-01 09:17:06.000000000","message":"Thanks, got it, will remove wrappers from here.\nWrappers were added a while ago, when deadlocks were observed in tempest tests, but now looks like not needed any more.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                msg \u003d _(\u0027A cidr must be specified in the absence of a \u0027"},{"line_number":527,"context_line":"                        \u0027subnet pool\u0027)"},{"line_number":528,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027subnets\u0027, msg\u003dmsg)"},{"line_number":529,"context_line":"            self._validate_subnet(context, s)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        return self._create_subnet(context, subnet, subnetpool_id)"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_ae25fdab","line":529,"updated":"2015-06-29 23:52:08.000000000","message":"This does a lot of validation that we don\u0027t get done if we have a subnetpool_id.  Was that the case in the old code?  (see L447 in the old code side)  So, it looks like this patch did not introduce this but I don\u0027t want \n\nFor example, _validate_subnet checks gateway_ip, the prefix length, dns_nameservers, host_routes, ipv6_ra_mode, etc.\n\nMaybe @Ryan could pipe in here.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"f2053e82b8aba9f92f8ed0a7970a63ef2d1b1750","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                msg \u003d _(\u0027A cidr must be specified in the absence of a \u0027"},{"line_number":527,"context_line":"                        \u0027subnet pool\u0027)"},{"line_number":528,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027subnets\u0027, msg\u003dmsg)"},{"line_number":529,"context_line":"            self._validate_subnet(context, s)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        return self._create_subnet(context, subnet, subnetpool_id)"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_b39b0772","line":529,"in_reply_to":"ba3cc151_28047d15","updated":"2015-06-30 13:51:02.000000000","message":"_validate_subnet is expected to validate user input, as I see it raises only InvalidInput errors, so I would vote for validating user input before any preallocation using ipam(if possible).\n\nProbably it have sense to update _validate_subnet to validate user input in case if subnetpool_id is passed (ommit some existing checks and add some new).\n\nOr _validate_subnet can be splitted into smaller parts that validate particular item in subnet dict, and only needed set of validation to be called for subnetpool and non-subnetpoll cases","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":14258,"name":"Ryan Tidwell","email":"rktidwell85@gmail.com","username":"tidwellr"},"change_message_id":"c11d30de23e9c89044725f7dad070ba304610a40","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                msg \u003d _(\u0027A cidr must be specified in the absence of a \u0027"},{"line_number":527,"context_line":"                        \u0027subnet pool\u0027)"},{"line_number":528,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027subnets\u0027, msg\u003dmsg)"},{"line_number":529,"context_line":"            self._validate_subnet(context, s)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        return self._create_subnet(context, subnet, subnetpool_id)"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_28047d15","line":529,"in_reply_to":"ba3cc151_ae25fdab","updated":"2015-06-30 03:33:28.000000000","message":"Looking back over the review from the original Kilo patch, I do think this is an oversight.  I\u0027m thinking we should probably validate gateway_ip, dns_nameservers, host_routes, and ipv6_ra_mode in all cases.  I need to try this out with a Kilo build, but there may be some bugs lurking.  The trick is you need to fill in the subnet dict with cidr, ip_version, etc. before validating since _validate_subnet requires some fields to be set or else it fails.  This means you\u0027d have to allocate the CIDR from ipam, fill out the subnet dict, validate, then persist the subnet.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7829f1f9eeb394b1cfd839f72cdfc23382f98d94","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                msg \u003d _(\u0027A cidr must be specified in the absence of a \u0027"},{"line_number":527,"context_line":"                        \u0027subnet pool\u0027)"},{"line_number":528,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027subnets\u0027, msg\u003dmsg)"},{"line_number":529,"context_line":"            self._validate_subnet(context, s)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"        return self._create_subnet(context, subnet, subnetpool_id)"},{"line_number":532,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_092863e1","line":529,"in_reply_to":"ba3cc151_b39b0772","updated":"2015-07-01 04:17:18.000000000","message":"I filed a bug:  https://bugs.launchpad.net/neutron/+bug/1470337","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b2d715749d183ef241c4e0f91179799d0c3355d2","unresolved":false,"context_lines":[{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":591,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":592,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":593,"context_line":"    def delete_subnet(self, context, id):"},{"line_number":594,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":595,"context_line":"            subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_9b6e0a95","line":592,"updated":"2015-06-30 19:08:40.000000000","message":"ditto","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":589,"context_line":""},{"line_number":590,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":591,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":592,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":593,"context_line":"    def delete_subnet(self, context, id):"},{"line_number":594,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":595,"context_line":"            subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_ee4853b5","line":592,"in_reply_to":"ba3cc151_9b6e0a95","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b2d715749d183ef241c4e0f91179799d0c3355d2","unresolved":false,"context_lines":[{"line_number":808,"context_line":""},{"line_number":809,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":810,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":811,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":812,"context_line":"    def create_port(self, context, port):"},{"line_number":813,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":814,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_3b6d7e98","line":811,"updated":"2015-06-30 19:08:40.000000000","message":"ditto","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":808,"context_line":""},{"line_number":809,"context_line":"    @oslo_db_api.wrap_db_retry(max_retries\u003ddb_api.MAX_RETRIES,"},{"line_number":810,"context_line":"                               retry_on_request\u003dTrue,"},{"line_number":811,"context_line":"                               retry_on_deadlock\u003dTrue)"},{"line_number":812,"context_line":"    def create_port(self, context, port):"},{"line_number":813,"context_line":"        p \u003d port[\u0027port\u0027]"},{"line_number":814,"context_line":"        port_id \u003d p.get(\u0027id\u0027) or uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_8ecae719","line":811,"in_reply_to":"ba3cc151_3b6d7e98","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dd71556e8c4432fecb3a7720e1f7412b507ffd26","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    raise n_exc.SubnetInUse(subnet_id\u003did)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"            context.session.delete(subnet)"},{"line_number":634,"context_line":"            self.ipam.delete_subnet(context, id)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":637,"context_line":"        subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":96,"id":"ba3cc151_84b6583c","line":634,"updated":"2015-07-08 19:25:02.000000000","message":"This is a important addition in this patch (given that the built in implementation relies on foreign key constraints to do this deletion.  Could it be tested somewhere?","commit_id":"09f71281122875bbed5cd5fe46d849d9f4f4d295"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8e5035387bfe8ebfbdd31652025bdfacc830e6b4","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                    raise n_exc.SubnetInUse(subnet_id\u003did)"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"            context.session.delete(subnet)"},{"line_number":634,"context_line":"            self.ipam.delete_subnet(context, id)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":637,"context_line":"        subnet \u003d self._get_subnet(context, id)"}],"source_content_type":"text/x-python","patch_set":96,"id":"ba3cc151_fe7556f9","line":634,"in_reply_to":"ba3cc151_84b6583c","updated":"2015-07-09 07:32:39.000000000","message":"self.ipam.delete_subnet is no op for non-pluggable ipam implementation, but needed for pluggable ipam backend.\nSo I\u0027ll remove it from this patch and will add with pluggable ipam backend, where it is tested properly.","commit_id":"09f71281122875bbed5cd5fe46d849d9f4f4d295"}],"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"bdc280fcdfe0b3cf8e5013cecae1c0c0906d2532","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        \"\"\""},{"line_number":46,"context_line":"        pass"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def ipam_delete_subnet(self, context, ipam_subnet):"},{"line_number":49,"context_line":"        pass"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _validate_pools_with_subnetpool(self, subnet):"}],"source_content_type":"text/x-python","patch_set":83,"id":"fa32b979_7f110853","line":48,"updated":"2015-06-25 22:57:33.000000000","message":"I think this should just be named delete_subnet. Or delete_ipam_subnet if we want to indicate it is an ipam_subnet.","commit_id":"80d5000f5469dd5cc158ffb17bc06d36f8a58668"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                     dns_nameservers,"},{"line_number":375,"context_line":"                     host_routes,"},{"line_number":376,"context_line":"                     allocation_pools):"},{"line_number":377,"context_line":"        allocation_pools \u003d self._prepare_allocation_pools(context,"},{"line_number":378,"context_line":"                                                          allocation_pools,"},{"line_number":379,"context_line":"                                                          subnet_args)"},{"line_number":380,"context_line":"        self._validate_subnet_cidr(context, network, subnet_args[\u0027cidr\u0027])"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_0e6d0998","side":"PARENT","line":377,"updated":"2015-06-29 23:52:08.000000000","message":"NOTE:  This is now called from neutron/db/ipam_non_pluggable_backend.py","commit_id":"e120bad02841ed54ed071d82bffc47671f612137"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self._validate_allocation_pools(allocation_pools, cidr)"},{"line_number":294,"context_line":"        if gateway_ip:"},{"line_number":295,"context_line":"            self.validate_gw_out_of_pools(gateway_ip, allocation_pools)"},{"line_number":296,"context_line":"        allocation_pools \u003d [netaddr.IPRange(p[\u0027start\u0027], p[\u0027end\u0027])"},{"line_number":297,"context_line":"                            for p in allocation_pools]"},{"line_number":298,"context_line":"        return allocation_pools"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_aeb97deb","line":296,"updated":"2015-06-29 23:52:08.000000000","message":"So, the old code didn\u0027t need this conversion step.  The new code needs it because the callers have all changed to expect a list of IPRanges instead of the dict.  This is a bit of cognitive load on reviewers.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self._validate_allocation_pools(allocation_pools, cidr)"},{"line_number":294,"context_line":"        if gateway_ip:"},{"line_number":295,"context_line":"            self.validate_gw_out_of_pools(gateway_ip, allocation_pools)"},{"line_number":296,"context_line":"        allocation_pools \u003d [netaddr.IPRange(p[\u0027start\u0027], p[\u0027end\u0027])"},{"line_number":297,"context_line":"                            for p in allocation_pools]"},{"line_number":298,"context_line":"        return allocation_pools"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_aec24be7","line":296,"in_reply_to":"ba3cc151_7204a0bf","updated":"2015-07-02 13:32:57.000000000","message":"moved to separate review, and to make it more clear convertation to IPRange is done just before SubnetRequest create","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        self._validate_allocation_pools(allocation_pools, cidr)"},{"line_number":294,"context_line":"        if gateway_ip:"},{"line_number":295,"context_line":"            self.validate_gw_out_of_pools(gateway_ip, allocation_pools)"},{"line_number":296,"context_line":"        allocation_pools \u003d [netaddr.IPRange(p[\u0027start\u0027], p[\u0027end\u0027])"},{"line_number":297,"context_line":"                            for p in allocation_pools]"},{"line_number":298,"context_line":"        return allocation_pools"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_7204a0bf","line":296,"in_reply_to":"ba3cc151_aeb97deb","updated":"2015-06-30 11:29:27.000000000","message":"Carl, will try to move this change into separate review","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"}],"neutron/db/ipam_non_pluggable_backend.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        return ips"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def add_auto_addrs_on_network_ports(self, context, subnet, ipam_subnet):"},{"line_number":435,"context_line":"        \"\"\"For an auto-address subnet, add addrs for ports on the net.\"\"\""},{"line_number":436,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":437,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_713834d4","line":434,"updated":"2015-06-29 23:52:08.000000000","message":"It doesn\u0027t make sense to me in the context of this patch why this should be added here.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        return ips"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def add_auto_addrs_on_network_ports(self, context, subnet, ipam_subnet):"},{"line_number":435,"context_line":"        \"\"\"For an auto-address subnet, add addrs for ports on the net.\"\"\""},{"line_number":436,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":437,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_ee7b73bc","line":434,"in_reply_to":"ba3cc151_079dd858","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        return ips"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def add_auto_addrs_on_network_ports(self, context, subnet, ipam_subnet):"},{"line_number":435,"context_line":"        \"\"\"For an auto-address subnet, add addrs for ports on the net.\"\"\""},{"line_number":436,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":437,"context_line":"            network_id \u003d subnet[\u0027network_id\u0027]"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_079dd858","line":434,"in_reply_to":"ba3cc151_713834d4","updated":"2015-06-30 11:29:27.000000000","message":"will move these changes to another patchset","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        if subnet[\u0027cidr\u0027] is not attributes.ATTR_NOT_SPECIFIED:"},{"line_number":483,"context_line":"            subnet[\u0027gateway_ip\u0027] \u003d self._gateway_ip_str(subnet,"},{"line_number":484,"context_line":"                                                        subnet[\u0027cidr\u0027])"},{"line_number":485,"context_line":"            subnet[\u0027allocation_pools\u0027] \u003d self._prepare_allocation_pools("},{"line_number":486,"context_line":"                subnet[\u0027allocation_pools\u0027],"},{"line_number":487,"context_line":"                subnet[\u0027cidr\u0027],"},{"line_number":488,"context_line":"                subnet[\u0027gateway_ip\u0027])"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_ae117dae","line":485,"updated":"2015-06-29 23:52:08.000000000","message":"It is a bit unexpected that subnet[\u0027allocation_pools\u0027] changes from a list of dicts to a list of IPRanges here.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        if subnet[\u0027cidr\u0027] is not attributes.ATTR_NOT_SPECIFIED:"},{"line_number":483,"context_line":"            subnet[\u0027gateway_ip\u0027] \u003d self._gateway_ip_str(subnet,"},{"line_number":484,"context_line":"                                                        subnet[\u0027cidr\u0027])"},{"line_number":485,"context_line":"            subnet[\u0027allocation_pools\u0027] \u003d self._prepare_allocation_pools("},{"line_number":486,"context_line":"                subnet[\u0027allocation_pools\u0027],"},{"line_number":487,"context_line":"                subnet[\u0027cidr\u0027],"},{"line_number":488,"context_line":"                subnet[\u0027gateway_ip\u0027])"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_b24c6843","line":485,"in_reply_to":"ba3cc151_ae117dae","updated":"2015-06-30 11:29:27.000000000","message":"yeah, I\u0027ll try to decompose this change in allocation_pools tracking into separate patch.\nBut it becomes pretty hard to split it more because SubnetRequests requires to have allocation_pools as IPRange.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"905f315799ca7c16e207c84ccfadc083445b062d","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        if subnet[\u0027cidr\u0027] is not attributes.ATTR_NOT_SPECIFIED:"},{"line_number":483,"context_line":"            subnet[\u0027gateway_ip\u0027] \u003d self._gateway_ip_str(subnet,"},{"line_number":484,"context_line":"                                                        subnet[\u0027cidr\u0027])"},{"line_number":485,"context_line":"            subnet[\u0027allocation_pools\u0027] \u003d self._prepare_allocation_pools("},{"line_number":486,"context_line":"                subnet[\u0027allocation_pools\u0027],"},{"line_number":487,"context_line":"                subnet[\u0027cidr\u0027],"},{"line_number":488,"context_line":"                subnet[\u0027gateway_ip\u0027])"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_4e437f6c","line":485,"in_reply_to":"ba3cc151_b24c6843","updated":"2015-07-02 13:32:57.000000000","message":"Done","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        if subnetpool_id:"},{"line_number":494,"context_line":"            driver \u003d subnet_alloc.SubnetAllocator(subnetpool, context)"},{"line_number":495,"context_line":"            ipam_subnet \u003d driver.allocate_subnet(subnet_request)"},{"line_number":496,"context_line":"            subnet_request \u003d ipam_subnet.get_details()"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        subnet \u003d self._save_subnet(context,"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_4e55514e","line":495,"updated":"2015-06-29 23:52:08.000000000","message":"Where is the call to driver.allocate... for not subnetpool_id?  I guess I expected a call to \"get_request\" and some call to allocate in either case for symmetry if nothing else.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4ddcf0e299d15d10aec4d4a2eb11fd004158a94f","unresolved":false,"context_lines":[{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        if subnetpool_id:"},{"line_number":494,"context_line":"            driver \u003d subnet_alloc.SubnetAllocator(subnetpool, context)"},{"line_number":495,"context_line":"            ipam_subnet \u003d driver.allocate_subnet(subnet_request)"},{"line_number":496,"context_line":"            subnet_request \u003d ipam_subnet.get_details()"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        subnet \u003d self._save_subnet(context,"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_a967f723","line":495,"in_reply_to":"ba3cc151_329cd8bf","updated":"2015-07-01 04:23:21.000000000","message":"That makes sense.  I figured it was correct the way that you coded it.  I mostly just wanted to point out the surprise that code readers may have.  I tend to like to minimize surprises in code.  :)","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        if subnetpool_id:"},{"line_number":494,"context_line":"            driver \u003d subnet_alloc.SubnetAllocator(subnetpool, context)"},{"line_number":495,"context_line":"            ipam_subnet \u003d driver.allocate_subnet(subnet_request)"},{"line_number":496,"context_line":"            subnet_request \u003d ipam_subnet.get_details()"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        subnet \u003d self._save_subnet(context,"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_329cd8bf","line":495,"in_reply_to":"ba3cc151_4e55514e","updated":"2015-06-30 11:29:27.000000000","message":"For non-pluggable ipam case and if subnetpool_id is None these actions are not strictly needed. \nIn this case next two lines should return original subnet_request passed in:\n\nipam_subnet \u003d driver.allocate_subnet(subnet_request)\n\nsubnet_request \u003d ipam_subnet.get_details()\n\nSo if subnetpool_id is not set, these two lines are ommitted.\nHowever, we may want to use some fake driver for non-ipam and subnetpool_id is None case, just to preserv the same interface.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"80a8f03ed35d56939cc73794406eb6f542ae6ade","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                                   subnet[\u0027dns_nameservers\u0027],"},{"line_number":506,"context_line":"                                   subnet[\u0027host_routes\u0027],"},{"line_number":507,"context_line":"                                   subnet_request)"},{"line_number":508,"context_line":"        # ipam_subnet is not expected to be allocated for non pluggable ipam,"},{"line_number":509,"context_line":"        # so just return None for it (second element in returned tuple)"},{"line_number":510,"context_line":"        return subnet, None"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_3132acf2","line":508,"updated":"2015-06-29 23:52:08.000000000","message":"ipam_subnet doesn\u0027t make sense at all in the context of this patch.","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"afadc23aa304513097a74137aad16c500cde9ec9","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                                   subnet[\u0027dns_nameservers\u0027],"},{"line_number":506,"context_line":"                                   subnet[\u0027host_routes\u0027],"},{"line_number":507,"context_line":"                                   subnet_request)"},{"line_number":508,"context_line":"        # ipam_subnet is not expected to be allocated for non pluggable ipam,"},{"line_number":509,"context_line":"        # so just return None for it (second element in returned tuple)"},{"line_number":510,"context_line":"        return subnet, None"}],"source_content_type":"text/x-python","patch_set":89,"id":"ba3cc151_67ae2487","line":508,"in_reply_to":"ba3cc151_3132acf2","updated":"2015-06-30 11:29:27.000000000","message":"will move these changes to another patchset","commit_id":"7a6f1ed257ed643d59a1e63d254b0fdc17bb2f2b"}],"neutron/db/non_ipam_backend.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class NonIpamBackend(backend_mixin.BackendMixin):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @staticmethod"},{"line_number":38,"context_line":"    def _generate_ip(context, subnets):"}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_2eda1379","line":35,"updated":"2015-05-13 22:00:37.000000000","message":"NOTE:  This looks like it is mostly a straight-forward move of functionality from db_base_plugin_v2.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"}],"neutron/ipam/__init__.py":[{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"943a12e46b6397f574188e7bab15193c35eaa4cb","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_973ffc24","line":254,"updated":"2015-02-23 15:22:41.000000000","message":"Unless importutils.import_class already does this, we need to make sure that \"address\" is clean or this could create a security hole.\n\nAlso, we should define a convention to parse address into the class name, followed by request-class specific parameters. That is, only take the first token out of \"address\" as part of the class name, using \":\" or space or something as the delimiter. This enables the request class to accept input parameters.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"c3acbf5b20afa0036f6e30297291523e070a18e3","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_611b7c73","line":254,"in_reply_to":"ba7be1f8_1b794fc8","updated":"2015-02-24 13:19:34.000000000","message":"Ah, ok, if dbbase just passes spec string from upper level to Factory class, then right, dbbase is not driver-aware and what I was descibing in previous comment does not apply.\nBut I am curious, who generates this spec string? (I guess api just passes string without any busines logic inside it).\nAs far as I see only Nova or Horizon make call to Neutron API to allocate subnet or ip. Will any of them become driver-aware, or there are parts which I am not aware of?","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"ead8b2f9c64c4fc81bdb572d0b204573d4c4e2e2","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_bf2e6841","line":254,"in_reply_to":"ba7be1f8_611b7c73","updated":"2015-02-24 15:04:46.000000000","message":"At this point it would be the user at the Horizon console or it would be the caller of an API. It\u0027s not elegant - but it\u0027s the only way to support these use cases without API changes on a per-driver basis which is not really practical with the current infrastructure.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8ef813e49dcd4a9feb3b5ae2d2a2081493d2d9ab","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_9f13920c","line":254,"in_reply_to":"ba7be1f8_973ffc24","updated":"2015-02-23 16:20:31.000000000","message":"John,\nOk, I\u0027ll add aditional checks in \u0027address\u0027 before passing it into import.\n\nBut passing argumets for init request class via string looks overcomplicated for me.\nI would prefer instantaise Request class directly if it requires any parameters:\n\u003e request \u003d ipam.SometypeAddressRequest(params)\nrather than using \n\u003e request \u003d ipam.AddressRequestFactory(\"Sometype:params\")\nI do not see yet good reason, why do we have to dynamically instantaise all Requests. Am I missing something?\n\nAnd if we really need to pass agruments into Factory, variable argument count for factory class can be used.\nSo all unprocessed arguments could be passed down to instantaised Request class.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"0ee9960d369bf1ca53b016038a5bf75d6be15558","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_1b794fc8","line":254,"in_reply_to":"ba7be1f8_989d45bf","updated":"2015-02-24 12:48:15.000000000","message":"I am not following how this makes it driver-aware:\n\napi passes string spec which gets to dabble\n\ndbbase passes string spec request factory\n\nrequest factory parses first token, generates correct request class, passing rest of string to the class to deal with\n\nfactory returns reference to request object back to dbbase\n\nHow does that make dbase need to know about the request class? It only needs to know the base class.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"640f56776efa97361440f3d0918b4b916e5b3670","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_bfb0568c","line":254,"in_reply_to":"ba7be1f8_9f13920c","updated":"2015-02-23 16:32:10.000000000","message":"So, the intent here is to allow the drivers to define their own types of requests. We cannot predict if that should have parameters or not. The specific use case I am trying to capture is the ability to select addresses based upon meta-data. Actually this is more important for subnets than addresses, but the same pattern applies. \n\nWe want to avoid API changes for this. By \"encoding\" the request in a string and letting the request object validate and parse that, we avoid an API change but enable a lot more use cases.\n\nExample, suppose I have a meta-data request class: MetaDataAddressRequest, then I can encode a request like: \"MetaData:AppName\u003dXYZ:Tier\u003dWeb:Environment\u003dTest\"\n\nwhich would allow the IPAM driver to manage that request.\n\nI don\u0027t see a need for the factory method to parse all of that, but we need to have a way to grab the first token and pass the rest to the request class. This is the only real way to avoid API changes with every different type of request class.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"bfb434209fb1ba849430ceadf896452b9b6c1a1a","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_b8bcbedd","line":254,"in_reply_to":"ba7be1f8_bf2e6841","updated":"2015-02-24 15:53:38.000000000","message":"Thanks for clarifications, now I see the whole chain and it make more sense to me.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b325164904940e9f05e9b1f8636247e0e7fb4d9e","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            return SpecificAddressRequest(address)"},{"line_number":253,"context_line":"        except netaddr.AddrFormatError:"},{"line_number":254,"context_line":"            path \u003d \u0027neutron.ipam.%sAddressRequest\u0027 % address"},{"line_number":255,"context_line":"            request_class \u003d importutils.import_class(path)"},{"line_number":256,"context_line":"            return request_class()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_989d45bf","line":254,"in_reply_to":"ba7be1f8_bfb0568c","updated":"2015-02-24 12:00:06.000000000","message":"I think I got the idea, but I see some inconsistencies on this way:\nFactory class is called from db_base_plugin_v2, and this file is independent from specific driver.\nCurrently part of AddressRequest class name is passed (\u0027MetaData\u0027) to Factory class to load right AddressRequest class.\nSo db_base_plugin_v2 should be avare of driver specific AddressRequst classes, but we can\u0027t do it because db_base_plugin_v2 should be driver independent.","commit_id":"64986f7ce7484cf80630511a68097ed5572a3e3d"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"83b864f8c87383dbb52edd0898d21cc136860462","unresolved":false,"context_lines":[{"line_number":243,"context_line":"    \"\"\"Used to request allocating the special router gateway address.\"\"\""},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class AddressRequestFactory(object):"},{"line_number":247,"context_line":"    \"\"\"Factory class to create right address request based on input\"\"\""},{"line_number":248,"context_line":"    def __new__(cls, address):"},{"line_number":249,"context_line":"        if not address:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_102798b7","line":246,"updated":"2015-03-05 15:51:27.000000000","message":"We should have a similar factory method for subnet requests.","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"3e91b45406c39437b63d94fd4ad59d4df93de3fe","unresolved":false,"context_lines":[{"line_number":243,"context_line":"    \"\"\"Used to request allocating the special router gateway address.\"\"\""},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class AddressRequestFactory(object):"},{"line_number":247,"context_line":"    \"\"\"Factory class to create right address request based on input\"\"\""},{"line_number":248,"context_line":"    def __new__(cls, address):"},{"line_number":249,"context_line":"        if not address:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_0614a1f3","line":246,"in_reply_to":"9a80dd14_102798b7","updated":"2015-03-06 05:44:51.000000000","message":"+1","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3947b8f15d01f888b604c7f350d5e853ae4bde8e","unresolved":false,"context_lines":[{"line_number":243,"context_line":"    \"\"\"Used to request allocating the special router gateway address.\"\"\""},{"line_number":244,"context_line":""},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"class AddressRequestFactory(object):"},{"line_number":247,"context_line":"    \"\"\"Factory class to create right address request based on input\"\"\""},{"line_number":248,"context_line":"    def __new__(cls, address):"},{"line_number":249,"context_line":"        if not address:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_8ab79e39","line":246,"in_reply_to":"9a80dd14_102798b7","updated":"2015-03-06 15:58:20.000000000","message":"Done","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"83b864f8c87383dbb52edd0898d21cc136860462","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    def _parse_meta(cls, meta):"},{"line_number":264,"context_line":"        \"\"\"Take request class and meta arguments (optionally) from meta"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        To load request class: MetaDataAddressRequest"},{"line_number":267,"context_line":"        pass meta \"MetaData\""},{"line_number":268,"context_line":"        To load the same request class with optional arguments"},{"line_number":269,"context_line":"        \"MetaData:AppName\u003dXYZ:Tier\u003dWeb:Environment\u003dTest\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_b5595e5d","line":266,"updated":"2015-03-05 15:51:27.000000000","message":"Probably should add more descriptive comments here explaining what this is for:\n\nThis enables the addition of new request classes without modification of the factory method. The portion of the address string before the first : will be treated as identifying the class. The rest of the string format is up to the specific class to parse and manage.\n\nFor example, if a class MetaDataAddressRequest exists, the user could choose this address request type with an address specification string: \"MetaData:AppName\u003dXYZ:Tier\u003dWeb:Environment\u003dTest\", and the correct class would be loaded and passed the necessary data to return an IP.","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3947b8f15d01f888b604c7f350d5e853ae4bde8e","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    def _parse_meta(cls, meta):"},{"line_number":264,"context_line":"        \"\"\"Take request class and meta arguments (optionally) from meta"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        To load request class: MetaDataAddressRequest"},{"line_number":267,"context_line":"        pass meta \"MetaData\""},{"line_number":268,"context_line":"        To load the same request class with optional arguments"},{"line_number":269,"context_line":"        \"MetaData:AppName\u003dXYZ:Tier\u003dWeb:Environment\u003dTest\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_8c3ed926","line":266,"in_reply_to":"9a80dd14_b5595e5d","updated":"2015-03-06 15:58:20.000000000","message":"Sure, I\u0027ll update it in new revision","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"dd16cdb6d1fed2a7fbaf522e2ff0ecb3b60da565","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import netaddr"},{"line_number":15,"context_line":"import re"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from oslo_utils import importutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_8c6c709e","line":17,"updated":"2015-03-24 01:25:37.000000000","message":"This import ordering is kinda whacked.  It\u0027s:\n\nstdlib\n\\n\nthird-party\n\\n\nself\n\n... i count 5 here.","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"eaeaf86c38a91fbb940042ebf2e99497ca4cc1f8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import netaddr"},{"line_number":15,"context_line":"import re"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from oslo_utils import importutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_e31de067","line":17,"in_reply_to":"1a6ced46_8c6c709e","updated":"2015-03-24 13:20:50.000000000","message":"looks like automerge result, will fix it","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"96707b4f5545d56da50df03e14fba8310770ea69","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import netaddr"},{"line_number":15,"context_line":"import re"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from oslo_utils import importutils"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"7ad8896b_34c87874","line":17,"in_reply_to":"1a6ced46_e31de067","updated":"2015-05-11 17:28:49.000000000","message":"Done","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"dd16cdb6d1fed2a7fbaf522e2ff0ecb3b60da565","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        else:"},{"line_number":281,"context_line":"            raise ValueError(\u0027%s class should contain only \u0027"},{"line_number":282,"context_line":"                             \u0027alphanumeric characters, the underscore \u0027"},{"line_number":283,"context_line":"                             \u0027and dots\u0027 % cls.ClassPostfix)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class AddressRequestFactory(BaseRequestFactory):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_ac692c8d","line":283,"updated":"2015-03-24 01:25:37.000000000","message":"This meta-goo doesn\u0027t strike me as cleaner than just using the stevedore shorthand in setup.cfg for python paths.","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"fedfb799811f45d10cf198566dcaa933f9345c99","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        else:"},{"line_number":281,"context_line":"            raise ValueError(\u0027%s class should contain only \u0027"},{"line_number":282,"context_line":"                             \u0027alphanumeric characters, the underscore \u0027"},{"line_number":283,"context_line":"                             \u0027and dots\u0027 % cls.ClassPostfix)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class AddressRequestFactory(BaseRequestFactory):"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_deba7c6d","line":283,"in_reply_to":"1a6ced46_ac692c8d","updated":"2015-03-24 12:12:20.000000000","message":"Well, it prevents the need for yet-another-configuration-option. Personally I prefer convention over configuration - it simplifies things for the user as well as for developers and QA.\n\nThis technique does have the disadvantage of require case-sensitivity in the request string though. A configuration option would eliminate that problem, and also you could re-order the priority of choosing the type of request from a given request string.\n\nAlternatively, we could add configuration options that point to the subnet and address request factory classes to use. Then, if a driver wants to add its own request types, it can just use its own factory. However, that has an issue when we move from a single global driver to a driver-per-pool which is the intention in the future. \n\nIn the end I think this meta method works fine for now.","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"dd16cdb6d1fed2a7fbaf522e2ff0ecb3b60da565","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class AddressRequestFactory(BaseRequestFactory):"},{"line_number":287,"context_line":"    ClassPostfix \u003d \u0027AddressRequest\u0027"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def __new__(cls, address, *args, **kwargs):"},{"line_number":290,"context_line":"        \"\"\"Factory class to create right request based on input\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_8c5550c8","line":287,"updated":"2015-03-24 01:25:37.000000000","message":"this field is trivially derivable from __class__.__name__","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"96707b4f5545d56da50df03e14fba8310770ea69","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class AddressRequestFactory(BaseRequestFactory):"},{"line_number":287,"context_line":"    ClassPostfix \u003d \u0027AddressRequest\u0027"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def __new__(cls, address, *args, **kwargs):"},{"line_number":290,"context_line":"        \"\"\"Factory class to create right request based on input\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"7ad8896b_f4b9d0ed","line":287,"in_reply_to":"1a6ced46_66081992","updated":"2015-05-11 17:28:49.000000000","message":"Done","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"eaeaf86c38a91fbb940042ebf2e99497ca4cc1f8","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class AddressRequestFactory(BaseRequestFactory):"},{"line_number":287,"context_line":"    ClassPostfix \u003d \u0027AddressRequest\u0027"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def __new__(cls, address, *args, **kwargs):"},{"line_number":290,"context_line":"        \"\"\"Factory class to create right request based on input\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_c021bafd","line":287,"in_reply_to":"1a6ced46_8c5550c8","updated":"2015-03-24 13:20:50.000000000","message":"In this case it is not exactly match with classname, \u0027AddressRequest\u0027 vs \u0027AddressRequestFactory\u0027.\nAnd main purpose of this variable here to be concatenated into full path to class  which is going to be loaded in _parse_meta():\n\n\u0027neutron.ipam.%(class)s%(postfix)s\u0027 % {\u0027class\u0027: meta_class, \u0027postfix\u0027: cls.ClassPostfix}","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"0139a57ba8caecf50d720d02452d9df7d27c7aa4","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"class AddressRequestFactory(BaseRequestFactory):"},{"line_number":287,"context_line":"    ClassPostfix \u003d \u0027AddressRequest\u0027"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def __new__(cls, address, *args, **kwargs):"},{"line_number":290,"context_line":"        \"\"\"Factory class to create right request based on input\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_66081992","line":287,"in_reply_to":"1a6ced46_c021bafd","updated":"2015-03-24 15:10:07.000000000","message":"right, but __class__.__name__.replace(\u0027Request\u0027, \u0027\u0027) and you\u0027re there.","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"dd16cdb6d1fed2a7fbaf522e2ff0ecb3b60da565","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            if meta_args:"},{"line_number":320,"context_line":"                return request_class(meta_args, *args, **kwargs)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                return request_class(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_2c5e1ce7","line":322,"updated":"2015-03-24 01:25:37.000000000","message":"These two classes are basically identical.  It could move into the base, and pass in the two things that are different.","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"eaeaf86c38a91fbb940042ebf2e99497ca4cc1f8","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            if meta_args:"},{"line_number":320,"context_line":"                return request_class(meta_args, *args, **kwargs)"},{"line_number":321,"context_line":"            else:"},{"line_number":322,"context_line":"                return request_class(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a6ced46_e076b63d","line":322,"in_reply_to":"1a6ced46_2c5e1ce7","updated":"2015-03-24 13:20:50.000000000","message":"It was originally in BaseRequestFactory, but I then splitted into separate code because passing additional \u0027tenant_id and subnet_id\u0027 to SubnetRequest made it more complex to process in single method, however still possible, so I\u0027ll consider reducing code duplication here.","commit_id":"fa08f93e8dd32a0849647d2714d07112c40b9eb9"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    WILDCARDS \u003d {constants.IPv4: \u00270.0.0.0\u0027,"},{"line_number":129,"context_line":"                 constants.IPv6: \u0027::\u0027}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def __init__(self, tenant_id, subnet, version, prefixlen,"},{"line_number":132,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        :param version: Either constants.IPv4 or constants.IPv6"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_e467ee23","line":131,"updated":"2015-04-10 17:32:16.000000000","message":"Nit: Why the change from subnet_id to subnet? An ID should be passed here, right?","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"42b976dcab1e153fa874355e1c7dc7f65656e0c5","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    WILDCARDS \u003d {constants.IPv4: \u00270.0.0.0\u0027,"},{"line_number":129,"context_line":"                 constants.IPv6: \u0027::\u0027}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def __init__(self, tenant_id, subnet, version, prefixlen,"},{"line_number":132,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        :param version: Either constants.IPv4 or constants.IPv6"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_ffaaa96f","line":131,"in_reply_to":"7aaa499b_97e27ad4","updated":"2015-04-13 17:26:33.000000000","message":"Interesting. I\u0027ve observed some dark matter as well :)  I see the contrail plugin tests are failing, is the only place where the errors are reported? As I click through the failures, most look to be contrail-specific failures.  As far as I know, the contrail plugin does not extend the db_plugin. However, the unit tests seem to extend some of the test cases from test_db_plugin.py. I wonder if that weirdness is somehow to blame for these unit test failures.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"843910dfec2371c66e8cea538a8a5c5b181b194d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    WILDCARDS \u003d {constants.IPv4: \u00270.0.0.0\u0027,"},{"line_number":129,"context_line":"                 constants.IPv6: \u0027::\u0027}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def __init__(self, tenant_id, subnet, version, prefixlen,"},{"line_number":132,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        :param version: Either constants.IPv4 or constants.IPv6"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_97e27ad4","line":131,"in_reply_to":"7aaa499b_e467ee23","updated":"2015-04-13 11:42:38.000000000","message":"I found strange bug during testing with reference IPAM driver.\nIf subnet was fetched in reference IPAM driver, port got deleted and foreign key violation was generated on ipallocation insert(because port no longer exists). It was obserted on patchset 27 and around, see failure logs at [1].\nThe only workaround I found is passing subnet dict into reference ipam driver instead of fetching subnet inside of it.\nSo I am changing interface around to pass subnet dict instead of subnet id.\nYou are welcome to share your thoughts if you have any ideas on how it is even possible, that reading subnet leads to deleting port. It is still some kind of dark matter for me. \n\n[1] http://logs.openstack.org/36/153236/27/check/gate-neutron-python27/d813b90/testr_results.html.gz\ntest example: test_create_floatingip_with_specific_ip","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"6f758f6b7c9a371fa0a6978bb56a108ea531fdc5","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    WILDCARDS \u003d {constants.IPv4: \u00270.0.0.0\u0027,"},{"line_number":129,"context_line":"                 constants.IPv6: \u0027::\u0027}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def __init__(self, tenant_id, subnet, version, prefixlen,"},{"line_number":132,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        :param version: Either constants.IPv4 or constants.IPv6"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_caccc937","line":131,"in_reply_to":"7aaa499b_ffaaa96f","updated":"2015-04-13 17:44:36.000000000","message":"You right, this issue(deleting port on fetch subnet) was observed only for Open Contrail unit tests, so it has something to do with the way how Contrail plugin/tests are writen. Probably closer look at contrail implementation will give the answer, I\u0027ll take a look.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7e5e271f31ff1bd72344d0a7ecf39f08d0f7d1ea","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    \"\"\"Factory class to create right request based on input\"\"\""},{"line_number":248,"context_line":"    AnyRequest \u003d None"},{"line_number":249,"context_line":"    SpecificRequest \u003d None"},{"line_number":250,"context_line":"    AddressIndex \u003d 0"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":253,"context_line":"        args_list \u003d [a for a in args]"}],"source_content_type":"text/x-python","patch_set":63,"id":"9a0c5dc1_0e4d0f6c","line":250,"updated":"2015-05-13 22:00:37.000000000","message":"It is odd that this is camel case.  Typically I expect a camel case name to be for a class.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"48e949859195a0bd5c1c82f4692531c6cb7332f3","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    \"\"\"Factory class to create right request based on input\"\"\""},{"line_number":248,"context_line":"    AnyRequest \u003d None"},{"line_number":249,"context_line":"    SpecificRequest \u003d None"},{"line_number":250,"context_line":"    AddressIndex \u003d 0"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":253,"context_line":"        args_list \u003d [a for a in args]"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_8dd162fe","line":250,"in_reply_to":"9a0c5dc1_0e4d0f6c","updated":"2015-05-14 06:01:52.000000000","message":"How about changing to the following?\n\n any_request\n specific_request\n address_index","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"}],"neutron/ipam/drivers/neutrondb_ipam/driver.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        # This is almost a no-op because the Neutron DB IPAM driver does not"},{"line_number":360,"context_line":"        # delete IPAllocation objects, neither rebuilds availability ranges"},{"line_number":361,"context_line":"        # at every deallocation. The only operation it performs is to delete"},{"line_number":362,"context_line":"        # an IPRequest entry."},{"line_number":363,"context_line":"        session \u003d self._context.session"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        count \u003d self.subnet_manager.delete_allocation("}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_0782dc52","line":362,"updated":"2015-04-10 17:32:16.000000000","message":"Nit: I know this is a work in-progress, but I don\u0027t think this comment is  applicable here","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":366,"context_line":"            session, address)"},{"line_number":367,"context_line":"        # count can hardly be greater than 1, but it can be 0..."},{"line_number":368,"context_line":"        if not count:"},{"line_number":369,"context_line":"            raise ipam_exc.IpAddressAllocationNotFound("},{"line_number":370,"context_line":"                subnet_id\u003dself.subnet_manager.neutron_id,"},{"line_number":371,"context_line":"                ip_address\u003daddress)"},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_4790e495","line":369,"updated":"2015-04-10 17:32:16.000000000","message":"Nit: Again, I understand this is a work in-progress. Let\u0027s raise a different exception here and be sure this logic applies to subnet de-allocation.","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"50135ec1c37114ec7ef962195ba8daeba4c6bb93","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        # Getting subnet directly from NeutronDbPluginV2, not from plugin,"},{"line_number":100,"context_line":"        # because opencontrail overrides cause port deletion on subnet fetch"},{"line_number":101,"context_line":"        neutron_subnet \u003d \\"},{"line_number":102,"context_line":"            base_plugin.NeutronDbPluginV2()._get_subnet(ctx, neutron_subnet_id)"},{"line_number":103,"context_line":"        auto_address \u003d ipv6_utils.is_auto_address_subnet(neutron_subnet)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return cls(ipam_subnet[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":54,"id":"3acd31a7_f1b3e2e7","line":102,"updated":"2015-05-01 06:30:59.000000000","message":"Check out my response to the email thread. It would be nice if we didn\u0027t have to hack real functionality to work around contrails unit tests.\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2015-April/063045.html","commit_id":"4e0fccc8a375b1d65484de953015671b74452a33"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"117eb77584bc2fb1aeadc42591afa689ad7a6711","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        # Getting subnet directly from NeutronDbPluginV2, not from plugin,"},{"line_number":100,"context_line":"        # because opencontrail overrides cause port deletion on subnet fetch"},{"line_number":101,"context_line":"        neutron_subnet \u003d \\"},{"line_number":102,"context_line":"            base_plugin.NeutronDbPluginV2()._get_subnet(ctx, neutron_subnet_id)"},{"line_number":103,"context_line":"        auto_address \u003d ipv6_utils.is_auto_address_subnet(neutron_subnet)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return cls(ipam_subnet[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":54,"id":"3acd31a7_18c1b780","line":102,"in_reply_to":"3acd31a7_f1b3e2e7","updated":"2015-05-04 13:29:34.000000000","message":"Fixed in patchset 55 by mocking NeutronDbSubnet fetch_subnet for OpenContrail tests.","commit_id":"4e0fccc8a375b1d65484de953015671b74452a33"}],"neutron/ipam/subnet_alloc.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"734969694ce142c4be90ac480ee5e458e868b30e","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        raise NotImplementedError()"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def remove_subnet(self, subnet, subnet_id):"},{"line_number":156,"context_line":"        raise NotImplementedError()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class IpamSubnet(driver.Subnet):"}],"source_content_type":"text/x-python","patch_set":41,"id":"7aaa499b_a49d665b","line":156,"updated":"2015-04-10 17:32:16.000000000","message":"These 3 methods need implementations. Is fleshing these out within the scope of this patch?","commit_id":"969e0a4df93a7e680797072dd85ad30b225e64af"}],"neutron/tests/functional/db/test_ipam.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"55012546e941b88351130b567bbb0db5a3d19216","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            self.turn_off_pluggable_ipam()"},{"line_number":60,"context_line":"        self.ip_allocation_pool \u003d models_v2.IPAllocationPool"},{"line_number":61,"context_line":"        self.ip_allocation \u003d models_v2.IPAllocation"},{"line_number":62,"context_line":"        self.plugin \u003d base_plugin.NeutronDbPluginV2()"},{"line_number":63,"context_line":"        self.cxt \u003d get_admin_test_context(self.engine.url)"},{"line_number":64,"context_line":"        self.addCleanup(self.cxt._session.close)"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_5b6fa792","line":61,"updated":"2015-05-14 05:20:34.000000000","message":"What purpose do these two assignments serve?","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3c7d86ff6114511959fd4ea5961c3bb9933291b2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            self.turn_off_pluggable_ipam()"},{"line_number":60,"context_line":"        self.ip_allocation_pool \u003d models_v2.IPAllocationPool"},{"line_number":61,"context_line":"        self.ip_allocation \u003d models_v2.IPAllocation"},{"line_number":62,"context_line":"        self.plugin \u003d base_plugin.NeutronDbPluginV2()"},{"line_number":63,"context_line":"        self.cxt \u003d get_admin_test_context(self.engine.url)"},{"line_number":64,"context_line":"        self.addCleanup(self.cxt._session.close)"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_1c4a4284","line":61,"in_reply_to":"7a016987_5b6fa792","updated":"2015-05-14 09:42:52.000000000","message":"This is something that left from debugging this test, will revert this part.","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"}],"neutron/tests/unit/agent/test_securitygroups_rpc.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"55012546e941b88351130b567bbb0db5a3d19216","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               const.IPv6: \u00272001:db8::/64\u0027}"},{"line_number":43,"context_line":"FAKE_IP \u003d {const.IPv4: \u002710.0.0.1\u0027,"},{"line_number":44,"context_line":"           const.IPv6: \u0027fe80::1\u0027,"},{"line_number":45,"context_line":"           \u0027IPv6_GLOBAL\u0027: \u00272001:0db8::1\u0027,"},{"line_number":46,"context_line":"           \u0027IPv6_LLA\u0027: \u0027fe80::123\u0027,"},{"line_number":47,"context_line":"           \u0027IPv6_DHCP\u0027: \u00272001:db8::3\u0027}"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_7b95c33e","side":"PARENT","line":45,"updated":"2015-05-14 05:20:34.000000000","message":"What brought this change on?","commit_id":"907a91d34ac8ad436d90fc56c05b552ae07a7eba"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3c7d86ff6114511959fd4ea5961c3bb9933291b2","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               const.IPv6: \u00272001:db8::/64\u0027}"},{"line_number":43,"context_line":"FAKE_IP \u003d {const.IPv4: \u002710.0.0.1\u0027,"},{"line_number":44,"context_line":"           const.IPv6: \u0027fe80::1\u0027,"},{"line_number":45,"context_line":"           \u0027IPv6_GLOBAL\u0027: \u00272001:0db8::1\u0027,"},{"line_number":46,"context_line":"           \u0027IPv6_LLA\u0027: \u0027fe80::123\u0027,"},{"line_number":47,"context_line":"           \u0027IPv6_DHCP\u0027: \u00272001:db8::3\u0027}"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_f7789f91","side":"PARENT","line":45,"in_reply_to":"7a016987_7b95c33e","updated":"2015-05-14 09:42:52.000000000","message":"IPv6 address looses leading \u00270\u0027 after:\n\n\u003e\u003e\u003e str(netaddr.IPAddress(\u00272001:0db8::1\u0027))\n\n\u00272001:db8::1\u0027\n\nWhile using new IPAM interface this conversion happens, so in tests string \u00272001:0db8::1\u0027 did not matched \u00272001:db8::1\u0027","commit_id":"907a91d34ac8ad436d90fc56c05b552ae07a7eba"}],"neutron/tests/unit/db/test_db_base_plugin_ipam.py":[{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"83b864f8c87383dbb52edd0898d21cc136860462","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return {\u0027ips\u0027: allocated_ips,"},{"line_number":210,"context_line":"                \u0027request\u0027: request}"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def test_allocate_single_fixed_ip(self):"},{"line_number":213,"context_line":"        mocks \u003d self._prepare_db_base()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        network \u003d netaddr.IPNetwork(\u0027192.168.15.0/24\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_10907842","line":212,"updated":"2015-03-05 15:51:27.000000000","message":"We need a test of the AddressFactory, including the specific, any, and custom request class types.","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"3947b8f15d01f888b604c7f350d5e853ae4bde8e","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        return {\u0027ips\u0027: allocated_ips,"},{"line_number":210,"context_line":"                \u0027request\u0027: request}"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def test_allocate_single_fixed_ip(self):"},{"line_number":213,"context_line":"        mocks \u003d self._prepare_db_base()"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        network \u003d netaddr.IPNetwork(\u0027192.168.15.0/24\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_0c68291c","line":212,"in_reply_to":"9a80dd14_10907842","updated":"2015-03-06 15:58:20.000000000","message":"Added test for AddressRequestFactory into test_ipam.py,\nwill add more tests for SubnetRequestFactory","commit_id":"4fb66577f40e77483cfc68cb906e6e96f88b4cd7"}],"neutron/tests/unit/plugins/opencontrail/test_contrail_plugin.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"55012546e941b88351130b567bbb0db5a3d19216","unresolved":false,"context_lines":[{"line_number":212,"context_line":"class ContrailPluginTestCase(test_plugin.NeutronDbPluginV2TestCase):"},{"line_number":213,"context_line":"    _plugin_name \u003d (\u0027%s.NeutronPluginContrailCoreV2\u0027 % CONTRAIL_PKG_PATH)"},{"line_number":214,"context_line":"    _fetch \u003d \u0027neutron.ipam.drivers.neutrondb_ipam.driver.NeutronDbSubnet\u0027\\"},{"line_number":215,"context_line":"             \u0027._fetch_subnet\u0027"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def setUp(self, plugin\u003dNone, ext_mgr\u003dNone):"},{"line_number":218,"context_line":"        if \u0027v6\u0027 in self._testMethodName:"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_db2f17f5","line":215,"updated":"2015-05-14 05:20:34.000000000","message":"Use parentheses for line breaks instead of a \\\n\n_fetch \u003d (\u0027neutron.ipam.drivers.neutrondb_ipam.driver.NeutronDbSubnet\u0027\n          \u0027._fetch_subnet\u0027)","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"},{"author":{"_account_id":13721,"name":"Hosung Hwang","email":"hhwang@infoblox.com","username":"hhwang"},"change_message_id":"5f56bc48e54140c5c9e14e52bd5be5ea229f1651","unresolved":false,"context_lines":[{"line_number":212,"context_line":"class ContrailPluginTestCase(test_plugin.NeutronDbPluginV2TestCase):"},{"line_number":213,"context_line":"    _plugin_name \u003d (\u0027%s.NeutronPluginContrailCoreV2\u0027 % CONTRAIL_PKG_PATH)"},{"line_number":214,"context_line":"    _fetch \u003d \u0027neutron.ipam.drivers.neutrondb_ipam.driver.NeutronDbSubnet\u0027\\"},{"line_number":215,"context_line":"             \u0027._fetch_subnet\u0027"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def setUp(self, plugin\u003dNone, ext_mgr\u003dNone):"},{"line_number":218,"context_line":"        if \u0027v6\u0027 in self._testMethodName:"}],"source_content_type":"text/x-python","patch_set":63,"id":"7a016987_6c27d2b6","line":215,"in_reply_to":"7a016987_db2f17f5","updated":"2015-05-18 23:02:39.000000000","message":"Done","commit_id":"ff8f1a340fcc2814f41c78510cc5e61e99469158"}]}
