)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fb7a4a35d9484c9cc13afda1c3bc82847786e982","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This does not work and I know it."},{"line_number":10,"context_line":"If you want to review the general approach, go ahead."},{"line_number":11,"context_line":"If you want to point out that it does not work, or nitpick it,"},{"line_number":12,"context_line":"plese don\u0027t waste your time."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"It\u0027s a work progress to let the other contributors working on"},{"line_number":15,"context_line":"making IPAM better and pluggable check what I\u0027m doing with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da86d52c_db32450f","line":12,"updated":"2015-02-11 09:22:27.000000000","message":"plese \u003d\u003e please","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ce846a409e469be06613fa4c45d9555ca4242d5b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This does not work and I know it."},{"line_number":10,"context_line":"If you want to review the general approach, go ahead."},{"line_number":11,"context_line":"If you want to point out that it does not work, or nitpick it,"},{"line_number":12,"context_line":"plese don\u0027t waste your time."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"It\u0027s a work progress to let the other contributors working on"},{"line_number":15,"context_line":"making IPAM better and pluggable check what I\u0027m doing with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da86d52c_fa61ba39","line":12,"in_reply_to":"da86d52c_db32450f","updated":"2015-02-11 20:40:52.000000000","message":"so... you do love wasting your time!\n\nI\u0027m sorry there can be only one procrastinator in our team, and that\u0027s me","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":7,"context_line":"IPAM reference driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Finishing up unit tests."},{"line_number":10,"context_line":"Full commit message coming up soon."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9a80dd14_e87846fa","line":10,"updated":"2015-03-18 15:14:27.000000000","message":"I hope it will be before the session finale :)","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"IPAM reference driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Finishing up unit tests."},{"line_number":10,"context_line":"Full commit message coming up soon."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9a80dd14_7ab32a4d","line":10,"in_reply_to":"9a80dd14_e87846fa","updated":"2015-03-18 19:49:16.000000000","message":"maybe...","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"b826a069cebc291e48d67127daa836e9f40fcc53","unresolved":false,"context_lines":[{"line_number":7,"context_line":"IPAM reference driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Finishing up unit tests."},{"line_number":10,"context_line":"Full commit message coming up soon."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"9a0c5dc1_6320479c","line":10,"updated":"2015-05-13 09:07:24.000000000","message":"It\u0027s time to update the commit message :)","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"570dc4b241490602c0c372d555581abbf47d457b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"IPAM reference driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Finishing up unit tests."},{"line_number":10,"context_line":"Full commit message coming up soon."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"9a0c5dc1_24ba50c1","line":10,"in_reply_to":"9a0c5dc1_6320479c","updated":"2015-05-13 12:39:39.000000000","message":"Done","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"570bdfd86b13333ae85b78d2d90aae0a6b9445e1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"IPAM reference driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An alternate pluggable IPAM implementation comparing to built in one"},{"line_number":10,"context_line":"from db_base_plugin_v2."},{"line_number":11,"context_line":"Modifies IPAM interface to allow passing context to driver and"},{"line_number":12,"context_line":"intruduce new interface method \u0027assotiate_neutron_subnet\u0027."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a0c5dc1_ce5f0e40","line":10,"updated":"2015-05-13 13:48:46.000000000","message":"s/comparing to built in one from/from the built-in one in/","commit_id":"a8b328d3db755232c615fdb74e3e120e821cd883"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"faa9b09ffe0b5fd607caea8b79362bf2f201dfd4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"IPAM reference driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"An alternate pluggable IPAM implementation comparing to built in one"},{"line_number":10,"context_line":"from db_base_plugin_v2."},{"line_number":11,"context_line":"Modifies IPAM interface to allow passing context to driver and"},{"line_number":12,"context_line":"intruduce new interface method \u0027assotiate_neutron_subnet\u0027."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a0c5dc1_fd472275","line":10,"in_reply_to":"9a0c5dc1_ce5f0e40","updated":"2015-05-13 15:19:27.000000000","message":"Done","commit_id":"a8b328d3db755232c615fdb74e3e120e821cd883"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"570bdfd86b13333ae85b78d2d90aae0a6b9445e1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"An alternate pluggable IPAM implementation comparing to built in one"},{"line_number":10,"context_line":"from db_base_plugin_v2."},{"line_number":11,"context_line":"Modifies IPAM interface to allow passing context to driver and"},{"line_number":12,"context_line":"intruduce new interface method \u0027assotiate_neutron_subnet\u0027."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a0c5dc1_ee3e52d9","line":12,"updated":"2015-05-13 13:48:46.000000000","message":"s/intruduce/introduce/\n\ns/assotiate/associate/","commit_id":"a8b328d3db755232c615fdb74e3e120e821cd883"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"faa9b09ffe0b5fd607caea8b79362bf2f201dfd4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"An alternate pluggable IPAM implementation comparing to built in one"},{"line_number":10,"context_line":"from db_base_plugin_v2."},{"line_number":11,"context_line":"Modifies IPAM interface to allow passing context to driver and"},{"line_number":12,"context_line":"intruduce new interface method \u0027assotiate_neutron_subnet\u0027."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a0c5dc1_dd5fbe3f","line":12,"in_reply_to":"9a0c5dc1_cc9f164f","updated":"2015-05-13 15:19:27.000000000","message":"Done","commit_id":"a8b328d3db755232c615fdb74e3e120e821cd883"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"ecf66e7d490012221574a2e0a2c9930ea50fc250","unresolved":false,"context_lines":[{"line_number":9,"context_line":"An alternate pluggable IPAM implementation comparing to built in one"},{"line_number":10,"context_line":"from db_base_plugin_v2."},{"line_number":11,"context_line":"Modifies IPAM interface to allow passing context to driver and"},{"line_number":12,"context_line":"intruduce new interface method \u0027assotiate_neutron_subnet\u0027."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements blueprint reference-ipam-driver"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9a0c5dc1_cc9f164f","line":12,"in_reply_to":"9a0c5dc1_ee3e52d9","updated":"2015-05-13 14:20:52.000000000","message":"ah, thanks, will fix it soon.\nI need to read my commit messages once they has been written:)","commit_id":"a8b328d3db755232c615fdb74e3e120e821cd883"}],"neutron/context.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            timestamp\u003dtimestamp, load_admin_roles\u003dload_admin_roles,"},{"line_number":166,"context_line":"            request_id\u003drequest_id, tenant_name\u003dtenant_name,"},{"line_number":167,"context_line":"            user_name\u003duser_name, overwrite\u003doverwrite,"},{"line_number":168,"context_line":"            auth_token\u003dauth_token, **kwargs)"},{"line_number":169,"context_line":"        # allow the context to use an existing database session."},{"line_number":170,"context_line":"        # The user is supposed to be aware that this might lead to unexpected"},{"line_number":171,"context_line":"        # results if not used appropriately."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b2211d4f","line":168,"updated":"2015-02-04 23:33:21.000000000","message":"Is there no better way to add a new optional argument to the end?  :(","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            timestamp\u003dtimestamp, load_admin_roles\u003dload_admin_roles,"},{"line_number":166,"context_line":"            request_id\u003drequest_id, tenant_name\u003dtenant_name,"},{"line_number":167,"context_line":"            user_name\u003duser_name, overwrite\u003doverwrite,"},{"line_number":168,"context_line":"            auth_token\u003dauth_token, **kwargs)"},{"line_number":169,"context_line":"        # allow the context to use an existing database session."},{"line_number":170,"context_line":"        # The user is supposed to be aware that this might lead to unexpected"},{"line_number":171,"context_line":"        # results if not used appropriately."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_52f7f858","line":168,"in_reply_to":"da86d52c_b2211d4f","updated":"2015-02-05 00:42:22.000000000","message":"you need to redefine __init__, and that also involves unfortunately calling the superclass. Unless we make the session property r/w which does not seem like a good idea to me.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                 roles\u003dNone, timestamp\u003dNone, load_admin_roles\u003dTrue,"},{"line_number":155,"context_line":"                 request_id\u003dNone, tenant_name\u003dNone, user_name\u003dNone,"},{"line_number":156,"context_line":"                 overwrite\u003dTrue, auth_token\u003dNone,"},{"line_number":157,"context_line":"                 existing_session\u003dNone, **kwargs):"},{"line_number":158,"context_line":"        super(Context, self).__init__("},{"line_number":159,"context_line":"            user_id, tenant_id, is_admin\u003dis_admin,"},{"line_number":160,"context_line":"            read_deleted\u003dread_deleted, roles\u003droles,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_0eb45480","line":157,"updated":"2015-03-20 18:06:46.000000000","message":"Oh my... It could be just:\n\ndef __init__(self, existing_session\u003dNone, *args, **kwargs):\n    super(Context, self).__init__(self, **args, **kwargs)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                 roles\u003dNone, timestamp\u003dNone, load_admin_roles\u003dTrue,"},{"line_number":155,"context_line":"                 request_id\u003dNone, tenant_name\u003dNone, user_name\u003dNone,"},{"line_number":156,"context_line":"                 overwrite\u003dTrue, auth_token\u003dNone,"},{"line_number":157,"context_line":"                 existing_session\u003dNone, **kwargs):"},{"line_number":158,"context_line":"        super(Context, self).__init__("},{"line_number":159,"context_line":"            user_id, tenant_id, is_admin\u003dis_admin,"},{"line_number":160,"context_line":"            read_deleted\u003dread_deleted, roles\u003droles,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_e6f8b7e7","line":157,"in_reply_to":"9a80dd14_0eb45480","updated":"2015-03-23 18:38:16.000000000","message":"yeah it is like this because there\u0027s some religious thing about kwargs going on...\n\nAnyway, it seems like we need to pass down a db session or a whole context down to this driver, so the change in context.py might be reverted.\n\nAnyway, I am happy to use kwargs, provided that you\u0027ll defend me when somebody complains against its usage ;)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"}],"neutron/db/migration/alembic_migrations/versions/599c6a226151_neutrodb_ipam.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table("},{"line_number":34,"context_line":"        \u0027ipamsubnets\u0027,"},{"line_number":35,"context_line":"        sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_694d6172","line":32,"updated":"2015-03-11 18:55:27.000000000","message":"This is the standard upgrade script here.\n\nWhat about data migration from existing Neutron installations which will have data in the corresponding Neutron tables and they want to enable this implementation?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.create_table("},{"line_number":34,"context_line":"        \u0027ipamsubnets\u0027,"},{"line_number":35,"context_line":"        sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_545e5677","line":32,"in_reply_to":"9a80dd14_694d6172","updated":"2015-03-12 09:09:41.000000000","message":"This is why I sent an email about introducing a concept of allocator.\n\nBasically it is not possible to run a migration only iff a specific conf variable is setting. We made this mistake with plugins and have paid a hefty price for fixing the db.\n\nBasically if the migration is executed at time t0 and the configuration option is enable at time t \u003e t0, the migration won\u0027t apply and the IPAM driver would not work. Similarly, this also implies that once the configuration option is enabled you cannot change it, unless you first downgrade and then upgrade again the DB, which is not acceptable, I think.\n\nWe *could* provide an ad-hoc script to move data from \"baked\" ipam tables into the new ones. This won\u0027t be different from what has been done when ML2 was introduced. It is a possibility, and surely the simplest one. A script for that can be developed in less than a hour. I prefer the allocator concept as it paves the way for future developments, but if that requires to circle back on design I\u0027ll just do the data conversion script.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"420cf8a8a52211d1528c2f8e78a998942397e37b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":69,"context_line":"        sa.PrimaryKeyConstraint(\u0027allocation_pool_id\u0027, \u0027first_ip\u0027, \u0027last_ip\u0027),"},{"line_number":70,"context_line":"        sa.UniqueConstraint(\u0027first_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":71,"context_line":"                            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":72,"context_line":"        sa.UniqueConstraint(\u0027last_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":73,"context_line":"                            name\u003d\u0027unique_last_ip_pool_id\u0027))"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_4f1fdcb7","line":71,"updated":"2015-03-11 09:36:26.000000000","message":"Uniqueconstraints named: uniq_(table_name)0(colums_names)","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":69,"context_line":"        sa.PrimaryKeyConstraint(\u0027allocation_pool_id\u0027, \u0027first_ip\u0027, \u0027last_ip\u0027),"},{"line_number":70,"context_line":"        sa.UniqueConstraint(\u0027first_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":71,"context_line":"                            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":72,"context_line":"        sa.UniqueConstraint(\u0027last_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":73,"context_line":"                            name\u003d\u0027unique_last_ip_pool_id\u0027))"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_74a35a9e","line":71,"in_reply_to":"9a80dd14_4f1fdcb7","updated":"2015-03-12 09:09:41.000000000","message":"I did not know we were mandating a convention on this.\nThat\u0027s ok I\u0027ll do it.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    op.create_table("},{"line_number":34,"context_line":"        \u0027ipamsubnets\u0027,"},{"line_number":35,"context_line":"        sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":36,"context_line":"        sa.Column(\u0027neutron_subnet_id\u0027, sa.String(length\u003d36), nullable\u003dTrue),"},{"line_number":37,"context_line":"        sa.ForeignKeyConstraint([\u0027neutron_subnet_id\u0027],"},{"line_number":38,"context_line":"                                [\u0027subnets.id\u0027],"},{"line_number":39,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_6e08702d","line":36,"updated":"2015-03-20 18:06:46.000000000","message":"is nullable\u003dTrue so that we can maintain ipam subnets that are defined externally but not in neutron?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    op.create_table("},{"line_number":34,"context_line":"        \u0027ipamsubnets\u0027,"},{"line_number":35,"context_line":"        sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":36,"context_line":"        sa.Column(\u0027neutron_subnet_id\u0027, sa.String(length\u003d36), nullable\u003dTrue),"},{"line_number":37,"context_line":"        sa.ForeignKeyConstraint([\u0027neutron_subnet_id\u0027],"},{"line_number":38,"context_line":"                                [\u0027subnets.id\u0027],"},{"line_number":39,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_064b132c","line":36,"in_reply_to":"9a80dd14_6e08702d","updated":"2015-03-23 18:38:16.000000000","message":"yes. The intended workflow is the following:\n\n1) allocate subnet externally before creating neutron\u0027s (this is because we\u0027re relinquishing allocation pools setup logic to the external driver)\n2) create neutron subnet\n3) associate the two","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027iprequests\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027status\u0027, sa.String(length\u003d36), nullable\u003dTrue),"},{"line_number":46,"context_line":"        sa.Column(\u0027subnet_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_09e60eb0","line":43,"updated":"2015-03-20 18:06:46.000000000","message":"Should we be consistent and call the table \u0027ipamrequests\u0027?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027iprequests\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027ip_address\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027status\u0027, sa.String(length\u003d36), nullable\u003dTrue),"},{"line_number":46,"context_line":"        sa.Column(\u0027subnet_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_0672337c","line":43,"in_reply_to":"9a80dd14_09e60eb0","updated":"2015-03-23 18:38:16.000000000","message":"we should, definitely.\nWe should call it ipamallocations, and I thought I already did it...","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c5e72573a3c68db5f75bd8863342f303fd311a1e","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                            name\u003d\u0027unique_last_ip_pool_id\u0027))"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def downgrade():"},{"line_number":77,"context_line":"    op.drop_table(\u0027ipamavailabilityranges\u0027)"},{"line_number":78,"context_line":"    op.drop_table(\u0027ipamallocationpools\u0027)"},{"line_number":79,"context_line":"    op.drop_table(\u0027iprequests\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_b6489b5c","line":76,"updated":"2015-03-23 23:59:27.000000000","message":"I am aware that I need to remove the downgrade migration","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"83e7c1820044f39ba2797aa8b590406a8c33062c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":71,"context_line":"        sa.PrimaryKeyConstraint(\u0027allocation_pool_id\u0027, \u0027first_ip\u0027, \u0027last_ip\u0027),"},{"line_number":72,"context_line":"        sa.UniqueConstraint(\u0027first_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":73,"context_line":"                            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":74,"context_line":"        sa.UniqueConstraint(\u0027last_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":75,"context_line":"                            name\u003d\u0027unique_last_ip_pool_id\u0027))"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aa53dc9_b33b42eb","line":73,"updated":"2015-04-07 13:58:15.000000000","message":"Uniqueconstraints should be named \"uniq_(table_name)0(column_names)\"","commit_id":"fba4a45821116b54c51731bc774e7beeecb2d263"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"7f0d28d59c7718c102d0ee4779b4f652cbf08ca7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":71,"context_line":"        sa.PrimaryKeyConstraint(\u0027allocation_pool_id\u0027, \u0027first_ip\u0027, \u0027last_ip\u0027),"},{"line_number":72,"context_line":"        sa.UniqueConstraint(\u0027first_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":73,"context_line":"                            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":74,"context_line":"        sa.UniqueConstraint(\u0027last_ip\u0027, \u0027allocation_pool_id\u0027,"},{"line_number":75,"context_line":"                            name\u003d\u0027unique_last_ip_pool_id\u0027))"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aa53dc9_d300d803","line":73,"in_reply_to":"9aa53dc9_b33b42eb","updated":"2015-04-08 11:41:45.000000000","message":"Done","commit_id":"fba4a45821116b54c51731bc774e7beeecb2d263"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"b826a069cebc291e48d67127daa836e9f40fcc53","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                [\u0027ipamallocationpools.id\u0027],"},{"line_number":67,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":68,"context_line":"        sa.PrimaryKeyConstraint(\u0027allocation_pool_id\u0027, \u0027first_ip\u0027, \u0027last_ip\u0027),"},{"line_number":69,"context_line":"        # TODO(pbondar): Do we have any name convention for non-unique indexes?"},{"line_number":70,"context_line":"        sa.Index(\u0027index_ipamavailabilityranges0first_ip0allocation_pool_id\u0027,"},{"line_number":71,"context_line":"                 \u0027first_ip\u0027, \u0027allocation_pool_id\u0027),"},{"line_number":72,"context_line":"        sa.Index(\u0027index_ipamavailabilityranges0last_ip0allocation_pool_id\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a0c5dc1_68126464","line":69,"updated":"2015-05-13 09:07:24.000000000","message":"Example of index name: https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/20c469a5f920_add_index_for_port.py#L32","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"570dc4b241490602c0c372d555581abbf47d457b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                                [\u0027ipamallocationpools.id\u0027],"},{"line_number":67,"context_line":"                                ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":68,"context_line":"        sa.PrimaryKeyConstraint(\u0027allocation_pool_id\u0027, \u0027first_ip\u0027, \u0027last_ip\u0027),"},{"line_number":69,"context_line":"        # TODO(pbondar): Do we have any name convention for non-unique indexes?"},{"line_number":70,"context_line":"        sa.Index(\u0027index_ipamavailabilityranges0first_ip0allocation_pool_id\u0027,"},{"line_number":71,"context_line":"                 \u0027first_ip\u0027, \u0027allocation_pool_id\u0027),"},{"line_number":72,"context_line":"        sa.Index(\u0027index_ipamavailabilityranges0last_ip0allocation_pool_id\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a0c5dc1_04b18ce1","line":69,"in_reply_to":"9a0c5dc1_68126464","updated":"2015-05-13 12:39:39.000000000","message":"Done","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"}],"neutron/ipam/__init__.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_559594e2","line":256,"updated":"2015-03-11 18:55:27.000000000","message":"Why is EUI64 a good default besides the fact that it is the only choice?  When it is not the only choice, I\u0027m not sure a default will make sense.  That will just force the reader to go look at the definition to know which kind of generator is being created by default.\n\nAlso, when there are multiple types, I\u0027m not sure this class does much, if any, common work.  Why not just call this class Eui64AddressRequest and create another class when there is another type later?  I imagine this class will be much simpler because __init__ will look like this:\n\n address \u003d _generate_eui64_address(mac\u003d...)\n super(Eui64AddressRequest, self).__init__(address)\n\nAlso, I\u0027d rather see this:\n\n generator \u003d Eui64AddressRequest(mac\u003d...)\n\n... than this:\n\n generator \u003d AutomaticAddressRequest(mac\u003d...)\n\n... or even this:\n\n generator \u003d AutomaticAddressRequest(address_type\u003dAutomaticAddressRequest.EUI64, mac\u003d...)","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"5c238b3bd0d8e85e550b1eecdbc6ec7f70f77119","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_e49ece62","line":256,"in_reply_to":"9a80dd14_01fe74ae","updated":"2015-03-11 22:13:54.000000000","message":"I was trying to, but not very well I guess! This was discussed a bit in [1] at L287 and in [2] L426, but I will try to make my thoughts clear here.\n\nWhat I am saying is, your example is from the perspective of a client of the API. That is, the caller creates the request type they are interested in and passes it to the driver. \n\nFrom the driver perspective, it\u0027s getting in a generic request. Each driver has to build support for each type of request that it will handle - and reject a request if it doesn\u0027t know how to handle that type.\n\nIn an ideal world, the *request* would be the object with the knowledge of how to generate an address - that is, the request classes would be supplied by the driver package, and the allocate call would delegate to those classes. In addition, a factory method would be provided by each driver, to instantiate the correct request class based upon the inputs. However, that\u0027s not how we designed it from the start. Instead, there is one factory method that generates driver-independent request classes for the basic request types (though it does allow some driver-specific request types as well). Then, the driver-specific allocate call inspects the type and handles the logic based on which type. \n\nFor auto-addressing, we can get to a bit more toward the ideal design, since auto-addressing is not actually driver-specific. Therefore, we can delegate the auto-address generation to the subclass. The driver doesn\u0027t have to be aware of what subclasses exist. Thus, we don\u0027t have to change any drivers just because a new auto-allocation scheme is being supported. Instead, the request class can handle it all.\n\n\n[1] https://review.openstack.org/#/c/150485/4/neutron/ipam/drivers/neutrondb_ipam.py,unified\n[2] https://review.openstack.org/#/c/153236/2/neutron/db/db_base_plugin_v2.py","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d98ef9178c5f96dd196935add4a6fb82ccf25345","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_01fe74ae","line":256,"in_reply_to":"9a80dd14_3d90fa94","updated":"2015-03-11 21:47:14.000000000","message":"@John, I\u0027m not sure if you\u0027re responding to my comment or not.  If so, I\u0027m not sure what you\u0027re saying.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"b4bc7fef29860d58fae154b45104071ef44033b9","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_3d90fa94","line":256,"in_reply_to":"9a80dd14_559594e2","updated":"2015-03-11 21:23:15.000000000","message":"Having this class enables the IPAM driver to treat the request polymorphically - it can check if it\u0027s an automatic request and if so just request that it generate itself. The driver doesn\u0027t need to know the specific method of generation or have any knowledge of the subclasses of this.\n\nIt comes down to that our driver right now contains the knowledge of how to translate a request into an address, and the address request class is really only used polymorphically for validation of the inputs. In the case of the auto-addressing, we can do a little better and also allow polymorphism to generate the  address.\n\nTo do the same for other requests, we would have to have the drivers create individual request objects with their own subclasses to handle their specific generation logic. This would mean the drivers would override the factory method. This was discussed in some earlier reviews, but I think it\u0027s too late now to take that approach generally.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"64b3ba19c2cd5265540e2bc7b7ea8909e773e73d","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_74cc3562","line":256,"in_reply_to":"9a80dd14_74027a3f","updated":"2015-03-12 10:56:43.000000000","message":"Just to make sure, you aware of Factory[1] I use to build address request automatically. AutomaticAddressRequest and BaseRequestFactory are doing similar thing (build right address request from input), so probably we could use just one of them. \n\n[1] https://review.openstack.org/#/c/153236/20/neutron/ipam/__init__.py","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3cf8b7e228f1a1b9836b112b72b89b63c6e96b2a","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_0537eeff","line":256,"in_reply_to":"9a80dd14_74cc3562","updated":"2015-03-13 21:45:21.000000000","message":"The more important part of my question was why is EUI64 the right default?\n\nThe other suggestion was not as important but it used more words so it probably looked important.  This has nothing to do with Python or Java.  I couldn\u0027t care less what the typical conventions are with the two developer communities.  Feel free to push back on my suggestion.  I\u0027ll respect you more than I would if you blindly do whatever I say.  ;)","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    _address_generators \u003d {EUI64: _generate_eui64_address}"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def __init__(self, address_type\u003dEUI64, **kwargs):"},{"line_number":257,"context_line":"        \"\"\""},{"line_number":258,"context_line":"        This constructor builds an automatic IP address. Parameter needed for"},{"line_number":259,"context_line":"        generating it can be passed as optional keyword arguments."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_74027a3f","line":256,"in_reply_to":"9a80dd14_e49ece62","updated":"2015-03-12 09:09:41.000000000","message":"Carl, I knew you were going to point this out.\nWe\u0027re entering the OO fundamentalism field here.\nI\u0027ll do reluctantly as you suggest ;)\n\nBut can we remember that python is not java, please?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        address_generator \u003d self._address_generators.get(address_type)"},{"line_number":267,"context_line":"        if not address_generator:"},{"line_number":268,"context_line":"            raise ipam_exc.InvalidAddressType(address_type\u003daddress_type)"},{"line_number":269,"context_line":"        address \u003d address_generator(self, **kwargs)"},{"line_number":270,"context_line":"        super(AutomaticAddressRequest, self).__init__(address)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_7850cd0a","line":269,"updated":"2015-03-11 18:55:27.000000000","message":"I think how this class uses kwargs obfuscates things a bit.  With my comment on L256 this is not necessary.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        address_generator \u003d self._address_generators.get(address_type)"},{"line_number":267,"context_line":"        if not address_generator:"},{"line_number":268,"context_line":"            raise ipam_exc.InvalidAddressType(address_type\u003daddress_type)"},{"line_number":269,"context_line":"        address \u003d address_generator(self, **kwargs)"},{"line_number":270,"context_line":"        super(AutomaticAddressRequest, self).__init__(address)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_9459ae5d","line":269,"in_reply_to":"9a80dd14_7850cd0a","updated":"2015-03-12 09:09:41.000000000","message":"Well, I guess this is one of the advantages of using python, which you might also see as a way of cutting corners. On the other hand, even if you had explicit parameters you still have no form whatsover of type checking.\nthey would be just names.\n\nRegardless, I\u0027m going to go polymorphic here, so the discussion does not apply at all.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return self._allocation_pools"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _validate_with_subnet(self, subnet):"},{"line_number":104,"context_line":"        if self.gateway_ip and cfg.CONF.force_gateway_on_subnet:"},{"line_number":105,"context_line":"            gw_ip \u003d netaddr.IPAddress(self.gateway_ip)"},{"line_number":106,"context_line":"            if (gw_ip.version \u003d\u003d 4 or (gw_ip.version \u003d\u003d 6"},{"line_number":107,"context_line":"                                       and not gw_ip.is_link_local())):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_5f73737f","line":104,"updated":"2015-03-20 00:59:30.000000000","message":"I\u0027m not sure that force_gateway_on_subnet has anything to do with IPAM.  My thinking was if the gateway is not on the subnet then we just wouldn\u0027t tell IPAM about it.  The purpose of telling IPAM about the gateway is so that it can reserve it from the subnet.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        return self._allocation_pools"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _validate_with_subnet(self, subnet):"},{"line_number":104,"context_line":"        if self.gateway_ip and cfg.CONF.force_gateway_on_subnet:"},{"line_number":105,"context_line":"            gw_ip \u003d netaddr.IPAddress(self.gateway_ip)"},{"line_number":106,"context_line":"            if (gw_ip.version \u003d\u003d 4 or (gw_ip.version \u003d\u003d 6"},{"line_number":107,"context_line":"                                       and not gw_ip.is_link_local())):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_e6ec37ca","line":104,"in_reply_to":"9a80dd14_5f73737f","updated":"2015-03-23 18:38:16.000000000","message":"I agree with your view.\nHowever, this was failing unit tests.\nIf I changed the unit tests, then I would have had to change also the relevant logic for the \"non-driver\" code.\n\nAnyway, the logic you implemented requires that a gateway address is within the subnet range. It seems neutron allows also to have gateways outside of a subnet range. It might seem weird, but there have been discussion in the past about this and there are deployments where this actually occurs. I will fetch the relevant ml discussion is that might be helpful for you.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if self.gateway_ip and cfg.CONF.force_gateway_on_subnet:"},{"line_number":105,"context_line":"            gw_ip \u003d netaddr.IPAddress(self.gateway_ip)"},{"line_number":106,"context_line":"            if (gw_ip.version \u003d\u003d 4 or (gw_ip.version \u003d\u003d 6"},{"line_number":107,"context_line":"                                       and not gw_ip.is_link_local())):"},{"line_number":108,"context_line":"                if self.gateway_ip not in subnet:"},{"line_number":109,"context_line":"                    raise ValueError(\"gateway_ip is not in the subnet\")"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9f696b8e","line":107,"updated":"2015-03-20 00:59:30.000000000","message":"This also seems irrelevant to IPAM (is_link_local).","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if self.gateway_ip and cfg.CONF.force_gateway_on_subnet:"},{"line_number":105,"context_line":"            gw_ip \u003d netaddr.IPAddress(self.gateway_ip)"},{"line_number":106,"context_line":"            if (gw_ip.version \u003d\u003d 4 or (gw_ip.version \u003d\u003d 6"},{"line_number":107,"context_line":"                                       and not gw_ip.is_link_local())):"},{"line_number":108,"context_line":"                if self.gateway_ip not in subnet:"},{"line_number":109,"context_line":"                    raise ValueError(\"gateway_ip is not in the subnet\")"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_86a1c3ab","line":107,"in_reply_to":"9a80dd14_9f696b8e","updated":"2015-03-23 18:38:16.000000000","message":"I added for changing the intended logic of your method in the least possible cases.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class AutomaticAddressRequest(SpecificAddressRequest):"},{"line_number":212,"context_line":"    \"\"\"Used to create auto generated addresses, such as EUI64\"\"\""},{"line_number":213,"context_line":"    EUI64 \u003d \u0027eui64\u0027"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _generate_eui64_address(self, **kwargs):"},{"line_number":216,"context_line":"        if set(kwargs) !\u003d set([\u0027prefix\u0027, \u0027mac\u0027]):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_24e9397f","line":213,"updated":"2015-03-20 18:06:46.000000000","message":"Should it be defined somewhere outside the class, so that it can be used easier when request object is instantiated?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"class AutomaticAddressRequest(SpecificAddressRequest):"},{"line_number":212,"context_line":"    \"\"\"Used to create auto generated addresses, such as EUI64\"\"\""},{"line_number":213,"context_line":"    EUI64 \u003d \u0027eui64\u0027"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _generate_eui64_address(self, **kwargs):"},{"line_number":216,"context_line":"        if set(kwargs) !\u003d set([\u0027prefix\u0027, \u0027mac\u0027]):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_8604637f","line":213,"in_reply_to":"9a80dd14_24e9397f","updated":"2015-03-23 18:38:16.000000000","message":"ok","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        if set(kwargs) !\u003d set([\u0027prefix\u0027, \u0027mac\u0027]):"},{"line_number":217,"context_line":"            raise ipam_exc.AddressCalculationFailure("},{"line_number":218,"context_line":"                address_type\u003d\u0027eui-64\u0027,"},{"line_number":219,"context_line":"                reason\u003d\u0027must provide exactly 2 arguments - cidr and MAC\u0027)"},{"line_number":220,"context_line":"        prefix \u003d kwargs[\u0027prefix\u0027]"},{"line_number":221,"context_line":"        mac_address \u003d kwargs[\u0027mac\u0027]"},{"line_number":222,"context_line":"        return ipv6_utils.get_ipv6_addr_by_EUI64(prefix, mac_address)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_24b5b9ec","line":219,"updated":"2015-03-20 18:06:46.000000000","message":"Then why don\u0027t we just specify those arguments explicitly and not allow any **kwargs? If that\u0027s just for exception type, you can wrap address_generator() call with try: except below.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        if set(kwargs) !\u003d set([\u0027prefix\u0027, \u0027mac\u0027]):"},{"line_number":217,"context_line":"            raise ipam_exc.AddressCalculationFailure("},{"line_number":218,"context_line":"                address_type\u003d\u0027eui-64\u0027,"},{"line_number":219,"context_line":"                reason\u003d\u0027must provide exactly 2 arguments - cidr and MAC\u0027)"},{"line_number":220,"context_line":"        prefix \u003d kwargs[\u0027prefix\u0027]"},{"line_number":221,"context_line":"        mac_address \u003d kwargs[\u0027mac\u0027]"},{"line_number":222,"context_line":"        return ipv6_utils.get_ipv6_addr_by_EUI64(prefix, mac_address)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_edfb94bb","line":219,"updated":"2015-03-20 14:50:32.000000000","message":"prefix and MAC?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        if set(kwargs) !\u003d set([\u0027prefix\u0027, \u0027mac\u0027]):"},{"line_number":217,"context_line":"            raise ipam_exc.AddressCalculationFailure("},{"line_number":218,"context_line":"                address_type\u003d\u0027eui-64\u0027,"},{"line_number":219,"context_line":"                reason\u003d\u0027must provide exactly 2 arguments - cidr and MAC\u0027)"},{"line_number":220,"context_line":"        prefix \u003d kwargs[\u0027prefix\u0027]"},{"line_number":221,"context_line":"        mac_address \u003d kwargs[\u0027mac\u0027]"},{"line_number":222,"context_line":"        return ipv6_utils.get_ipv6_addr_by_EUI64(prefix, mac_address)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_8612a3b2","line":219,"in_reply_to":"9a80dd14_24b5b9ec","updated":"2015-03-23 18:38:16.000000000","message":"you\u0027re right it should not be kwargs.\nI managed to auto revert my code.\n\nI indeed removed this... probably while I and Pavel pushed patchsets we managed to revert the Eui64AddressRequest class","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"}],"neutron/ipam/base.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda3974f0d43c1011f1797f862c9fcc7c1fe9500","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class SubnetRequest(object):"},{"line_number":68,"context_line":"    def __init__(self, owner\u003dNone, neutron_id\u003dNone,"},{"line_number":69,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":70,"context_line":"        \"\"\"Initializer"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_4933dd13","line":68,"updated":"2015-02-04 17:03:00.000000000","message":"neutron_id included in my patch.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda3974f0d43c1011f1797f862c9fcc7c1fe9500","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return self._allocation_pools"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"class AnySubnetRequest(SubnetRequest):"},{"line_number":116,"context_line":"    \"\"\"A template for allocating an unspecified subnet from IPAM"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    The initial reference implementation will not support this.  The API has no"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_491afd7d","line":115,"updated":"2015-02-04 17:03:00.000000000","message":"Included these name changes in my patch.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return self._allocation_pools"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"class AnySubnetRequest(SubnetRequest):"},{"line_number":116,"context_line":"    \"\"\"A template for allocating an unspecified subnet from IPAM"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    The initial reference implementation will not support this.  The API has no"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_d2a2084a","line":115,"in_reply_to":"da86d52c_491afd7d","updated":"2015-02-05 00:42:22.000000000","message":"thanks","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda3974f0d43c1011f1797f862c9fcc7c1fe9500","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    __meta__ \u003d abc.ABCMeta"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    @classmethod"},{"line_number":180,"context_line":"    def get_instance(cls, subnet_pool):"},{"line_number":181,"context_line":"        \"\"\"Returns an instance of the configured IPAM driver"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        :param subnet_pool: An instance of a sub-class of SubnetPool for the"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_a915394a","line":180,"updated":"2015-02-04 17:03:00.000000000","message":"Included in my patch.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda3974f0d43c1011f1797f862c9fcc7c1fe9500","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        super(SpecificAddress, self).__init__()"},{"line_number":245,"context_line":"        # TODO(Carl) Validation (local only)"},{"line_number":246,"context_line":"        self._address \u003d address"},{"line_number":247,"context_line":"        # Optional information for generation of EUI-64 addeesses"},{"line_number":248,"context_line":"        self._mac_address \u003d mac_address"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_a9ea99a9","line":247,"updated":"2015-02-04 17:03:00.000000000","message":"I thought that Neutron would generate the EUI-64 outside of IPAM and simply inform IPAM of the result.  But, we can discuss this.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        super(SpecificAddress, self).__init__()"},{"line_number":245,"context_line":"        # TODO(Carl) Validation (local only)"},{"line_number":246,"context_line":"        self._address \u003d address"},{"line_number":247,"context_line":"        # Optional information for generation of EUI-64 addeesses"},{"line_number":248,"context_line":"        self._mac_address \u003d mac_address"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_f28aacbd","line":247,"in_reply_to":"da86d52c_a9ea99a9","updated":"2015-02-05 00:42:22.000000000","message":"I might be ok with the strategy you proposed (treating a EUI-64 as a specific address and letting the mgmt layer generate it)","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"cda4fff410b525e9a3c5ce2f05d0eb873f97c8b4","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class SubnetRequest(object):"},{"line_number":68,"context_line":"    def __init__(self, owner\u003dNone, neutron_id\u003dNone,"},{"line_number":69,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":70,"context_line":"        \"\"\"Initializer"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_30b572ee","line":68,"updated":"2015-02-10 08:21:31.000000000","message":"neutron_id is little confusing.\ncan we rename it to subnet_id ?","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ce846a409e469be06613fa4c45d9555ca4242d5b","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"class SubnetRequest(object):"},{"line_number":68,"context_line":"    def __init__(self, owner\u003dNone, neutron_id\u003dNone,"},{"line_number":69,"context_line":"                 gateway_ip\u003dNone, allocation_pools\u003dNone):"},{"line_number":70,"context_line":"        \"\"\"Initializer"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_ba4662be","line":68,"in_reply_to":"da86d52c_30b572ee","updated":"2015-02-11 20:40:52.000000000","message":"canchange","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"}],"neutron/ipam/driver.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @abc.abstractmethod"},{"line_number":122,"context_line":"    def associate_neutron_subnet(self, subnet_id):"},{"line_number":123,"context_line":"        \"\"\"Associate the IPAM subnet with a neutron subnet."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        This operation should be performed to attach a neutron subnet to the"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_98b4a1f3","line":122,"updated":"2015-03-11 18:55:27.000000000","message":"Is this association for IPAM or for Neutron?  If the former, what is the purpose?  If the latter, why is the IPAM driver being asked to do this?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3cf8b7e228f1a1b9836b112b72b89b63c6e96b2a","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @abc.abstractmethod"},{"line_number":122,"context_line":"    def associate_neutron_subnet(self, subnet_id):"},{"line_number":123,"context_line":"        \"\"\"Associate the IPAM subnet with a neutron subnet."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        This operation should be performed to attach a neutron subnet to the"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_683cffc8","line":122,"in_reply_to":"9a80dd14_54165656","updated":"2015-03-13 21:45:21.000000000","message":"I don\u0027t see it called from anywhere so I don\u0027t have the context.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @abc.abstractmethod"},{"line_number":122,"context_line":"    def associate_neutron_subnet(self, subnet_id):"},{"line_number":123,"context_line":"        \"\"\"Associate the IPAM subnet with a neutron subnet."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        This operation should be performed to attach a neutron subnet to the"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_54165656","line":122,"in_reply_to":"9a80dd14_98b4a1f3","updated":"2015-03-12 09:09:41.000000000","message":"where do you want to track this? \nIf you want to do it outside the driver, we\u0027ll maintain the association in the base plugin class..\n\nI thought the driver was the one interesting in keeping this tracking, but since it will become boilerplate code common to every driver I can move it into the base db class.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"}],"neutron/ipam/drivers/neutrondb_ipam.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                subnet_id\u003dself._neutron_id,"},{"line_number":97,"context_line":"                ip\u003dip_address)"},{"line_number":98,"context_line":"        # TODO(salv-orlando): Find a way to cache subnets\u0027 data thus avoiding"},{"line_number":99,"context_line":"        # repeated database accesses"},{"line_number":100,"context_line":"        # NOTE(salv-orlando): Not sure why the router interface owner would"},{"line_number":101,"context_line":"        # represent an exception to this logic"},{"line_number":102,"context_line":"        if not subnet:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b76ca6d1","line":99,"updated":"2015-02-04 23:33:21.000000000","message":"Caching in memory is the only thing that I can think of to make all of this database stuff work better.  However, the distributed nature of the Neutron server is at odds with it.  I think I posted to the ML about this a while back and someone mentioned memcache or something.  I didn\u0027t have much time to look in to it.  The other thought I had was to make it a separate service but then you have HA concerns and all of that.\n\nBasically, if availability could be calculated at startup and held in memory then a lot of the complexity of the current database access could be eliminated.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                subnet_id\u003dself._neutron_id,"},{"line_number":97,"context_line":"                ip\u003dip_address)"},{"line_number":98,"context_line":"        # TODO(salv-orlando): Find a way to cache subnets\u0027 data thus avoiding"},{"line_number":99,"context_line":"        # repeated database accesses"},{"line_number":100,"context_line":"        # NOTE(salv-orlando): Not sure why the router interface owner would"},{"line_number":101,"context_line":"        # represent an exception to this logic"},{"line_number":102,"context_line":"        if not subnet:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_77c94e25","line":99,"in_reply_to":"da86d52c_b76ca6d1","updated":"2015-02-05 00:42:22.000000000","message":"memcached would indeed be a decent solution in my opinion.\nIt handles cache invalidation fairly well.\n\nIt does not have to be part of the first implementation of the reference driver, as one has always to be careful anytime cached data are used.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # represent an exception to this logic"},{"line_number":102,"context_line":"        if not subnet:"},{"line_number":103,"context_line":"            subnet \u003d self._fetch_subnet(session)"},{"line_number":104,"context_line":"        if (self._auto_address and port_device_owner not in"},{"line_number":105,"context_line":"            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":106,"context_line":"            raise ipam_exc.AllocationOnAutoAddressSubnet("},{"line_number":107,"context_line":"                subnet_id\u003dself._neutron_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b77ae674","line":104,"updated":"2015-02-04 23:33:21.000000000","message":"Another reason I think auto_address logic maybe belongs outside of IPAM.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # represent an exception to this logic"},{"line_number":102,"context_line":"        if not subnet:"},{"line_number":103,"context_line":"            subnet \u003d self._fetch_subnet(session)"},{"line_number":104,"context_line":"        if (self._auto_address and port_device_owner not in"},{"line_number":105,"context_line":"            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":106,"context_line":"            raise ipam_exc.AllocationOnAutoAddressSubnet("},{"line_number":107,"context_line":"                subnet_id\u003dself._neutron_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_37fa7643","line":104,"in_reply_to":"da86d52c_b77ae674","updated":"2015-02-05 00:42:22.000000000","message":"It is indeed weird that the IPAM driver should be aware of the device owner.\nOn the other hand, auto address generation might be regarded as being IP address management as well - but at the same time one could argue that since the address is auto generated then there is no IPAM at all.\n\nI\u0027m borderline in favour of keeping it in, exclusively to ensure separation of concerns with the db base plugin class.\n\nIt is however a decision that can be easily revised and reverted in future.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                   for ip_address in ip_addresses])"},{"line_number":128,"context_line":"        # NOTE: the Neutron DB IPAM driver can leverage access to the whole"},{"line_number":129,"context_line":"        # Neutron DB - therefore it can perform queries also on models which"},{"line_number":130,"context_line":"        # are not exclusive to the IPAM driver"},{"line_number":131,"context_line":"        range_qry \u003d session.query("},{"line_number":132,"context_line":"            models_v2.IPAvailabilityRange).join("},{"line_number":133,"context_line":"            models_v2.IPAllocationPool).filter_by("}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_d75afa28","line":130,"updated":"2015-02-04 23:33:21.000000000","message":"Is this note meant to caution us away from performing queries outside the realm of the IPAM driver?  Or, are you thinking this could provide some sort of advantage?  I\u0027m hoping along the lines of caution.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"509f69a9fb9d1201a843d4b182f7576e68b58863","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                   for ip_address in ip_addresses])"},{"line_number":128,"context_line":"        # NOTE: the Neutron DB IPAM driver can leverage access to the whole"},{"line_number":129,"context_line":"        # Neutron DB - therefore it can perform queries also on models which"},{"line_number":130,"context_line":"        # are not exclusive to the IPAM driver"},{"line_number":131,"context_line":"        range_qry \u003d session.query("},{"line_number":132,"context_line":"            models_v2.IPAvailabilityRange).join("},{"line_number":133,"context_line":"            models_v2.IPAllocationPool).filter_by("}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_dd1e706f","line":130,"in_reply_to":"da86d52c_178812c4","updated":"2015-02-05 22:04:43.000000000","message":"If a goal is to enable plugging in a totally external system in place of this one, wouldn\u0027t it be wise to think of this system as an external system?","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                   for ip_address in ip_addresses])"},{"line_number":128,"context_line":"        # NOTE: the Neutron DB IPAM driver can leverage access to the whole"},{"line_number":129,"context_line":"        # Neutron DB - therefore it can perform queries also on models which"},{"line_number":130,"context_line":"        # are not exclusive to the IPAM driver"},{"line_number":131,"context_line":"        range_qry \u003d session.query("},{"line_number":132,"context_line":"            models_v2.IPAvailabilityRange).join("},{"line_number":133,"context_line":"            models_v2.IPAllocationPool).filter_by("}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_178812c4","line":130,"in_reply_to":"da86d52c_d75afa28","updated":"2015-02-05 00:42:22.000000000","message":"I put the note to make it explicit that this specific IPAM driver is logically part of Neutron, and is therefore ok for it to access models such as port, subnet, etc. which are not part of the driver itself.\n\nOther drivers might implement a different logic.\nFor instance, the whole subnet characterization might be passed into a derived class of SubnetRequest, and information about IPAllocation might be stored in driver-specific tables. In this case however none of that makes any sense, so we would be better off just reusing the models neutron already has.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        :returns: something"},{"line_number":188,"context_line":"        \"\"\""},{"line_number":189,"context_line":"        # TODO(salv-orlando): devise a solution which works smoothly also for"},{"line_number":190,"context_line":"        # active/active clusters such as MySQL galera"},{"line_number":191,"context_line":"        ip_qry \u003d session.query("},{"line_number":192,"context_line":"            models_v2.IPAllocation).with_lockmode(\u0027update\u0027)"},{"line_number":193,"context_line":"        # PostgreSQL does not support select...for update with an outer join."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_5718ca74","line":190,"updated":"2015-02-04 23:33:21.000000000","message":"I\u0027d love to see this.  I\u0027ve thought about this a fair amount and have yet to come up with a great idea.  You may know more about databases and designing for queries than me.  I\u0027d love to discuss it at some point if you need a sounding board.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"509f69a9fb9d1201a843d4b182f7576e68b58863","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        :returns: something"},{"line_number":188,"context_line":"        \"\"\""},{"line_number":189,"context_line":"        # TODO(salv-orlando): devise a solution which works smoothly also for"},{"line_number":190,"context_line":"        # active/active clusters such as MySQL galera"},{"line_number":191,"context_line":"        ip_qry \u003d session.query("},{"line_number":192,"context_line":"            models_v2.IPAllocation).with_lockmode(\u0027update\u0027)"},{"line_number":193,"context_line":"        # PostgreSQL does not support select...for update with an outer join."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_5d5c404b","line":190,"in_reply_to":"da86d52c_175d7247","updated":"2015-02-05 22:04:43.000000000","message":"I\u0027d like to see what you have in mind in more detail.  It might help us design the subnetpool allocation logic which has other challenges to overcome.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        :returns: something"},{"line_number":188,"context_line":"        \"\"\""},{"line_number":189,"context_line":"        # TODO(salv-orlando): devise a solution which works smoothly also for"},{"line_number":190,"context_line":"        # active/active clusters such as MySQL galera"},{"line_number":191,"context_line":"        ip_qry \u003d session.query("},{"line_number":192,"context_line":"            models_v2.IPAllocation).with_lockmode(\u0027update\u0027)"},{"line_number":193,"context_line":"        # PostgreSQL does not support select...for update with an outer join."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_175d7247","line":190,"in_reply_to":"da86d52c_5718ca74","updated":"2015-02-05 00:42:22.000000000","message":"I have it on my notepad. Forgot to share it.\n\nMy approach is based on triggering a unique index violation, which should result in failures both for active/passive and active/active clusters. In the latter case however this is reported to the application layer as a deadlock.\nThis might make things a little bit more complicated, and therefore I\u0027m pondering an alternative with an approach like compare and swap, that is to say: write something on the DB and then have a query to confirm what you wrote which also verifies is somebody else changed what you wrote before. If this happens this query would fail the where condition, update 0 records and then you\u0027ll know you have to retry the operation (the downside of this approach is that it can lead, in theory, to starvation - and - in some cases but not this - to false negatives in validating the compare \u0026 swap condition)","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        # FIXME(salv-orlando): This is super inefficient for networks larger"},{"line_number":205,"context_line":"        # than /16. In conjunction with the locking queries this might make"},{"line_number":206,"context_line":"        # the service unavaiable for periods of seconds, minutes, or days!"},{"line_number":207,"context_line":"        # (if you have a /8 subnet)"},{"line_number":208,"context_line":"        allocations \u003d netaddr.IPSet([netaddr.IPAddress(i[\u0027ip_address\u0027])"},{"line_number":209,"context_line":"                                     for i in ip_qry_results])"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_8c1a357b","line":207,"updated":"2015-02-04 23:33:21.000000000","message":"The complexity grows with the number of allocations, not the size of the network.  Granted, a /8 allows more allocations in theory but can you think of real world scenario where a /8 network will be used that isn\u0027t super sparsely allocated?\n\nI couldn\u0027t which is why I went with this implementation originally.\n\nThere are real world networks (e.g. share external network) for which this could perform badly but not quite as badly as you are thinking.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        # FIXME(salv-orlando): This is super inefficient for networks larger"},{"line_number":205,"context_line":"        # than /16. In conjunction with the locking queries this might make"},{"line_number":206,"context_line":"        # the service unavaiable for periods of seconds, minutes, or days!"},{"line_number":207,"context_line":"        # (if you have a /8 subnet)"},{"line_number":208,"context_line":"        allocations \u003d netaddr.IPSet([netaddr.IPAddress(i[\u0027ip_address\u0027])"},{"line_number":209,"context_line":"                                     for i in ip_qry_results])"},{"line_number":210,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_5701aa04","line":207,"in_reply_to":"da86d52c_8c1a357b","updated":"2015-02-05 00:42:22.000000000","message":"I tested for the worst case. If it was a problem I deemed serious I would also have filed a bug upstream.\nAs you say this is an issue that probably no deployment will ever see in practice. In order to use a /8 address space and trigger the reconstruction of the range they would need to allocate almost 17M addresses. While huge, this is a number which might be actually reached by some public clouds after sometime (and I\u0027m pretty sure they\u0027ll have their own machinery to periodically trigger the rebuild)","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # dangerous thing to do, if executed from within another database"},{"line_number":263,"context_line":"        # transaction. For this reason either:"},{"line_number":264,"context_line":"        # 1) it should be documented that the IPAM driver should never be"},{"line_number":265,"context_line":"        #    called from within a database transaction, which is also good"},{"line_number":266,"context_line":"        #    practice since in the general case these drivers may interact"},{"line_number":267,"context_line":"        #    with remote backends"},{"line_number":268,"context_line":"        # 2) A Neutron context, with a database session, is passed to IPAM"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_09fab774","line":265,"updated":"2015-02-04 23:33:21.000000000","message":"Thinking out loud here.  I really think a lot of the database unknowns stem from the IPAllocation table serving as a link between Neutron and IPAM.\n\nIt is not clear to me whether Neutron will own this table or if IPAM will own this table or if they will always have to share it.  Does the IPAllocation record get written in the IPAM context or in the Neutron context?  Or, does the IP address part get written in the IPAM context and then the port id gets written in the Neutron context?\n\nOn one hand, the Port table directly links to IPAllocation with an orm.relationship (fixed_ips).  Even with a totally external IPAM system, Neutron will still need to record the allocation in this table for \"fixed_ips\".\n\nOn the other hand, current Neutron IPAM uses this table as the definitive source of what has been allocated and it looks like this patch hasn\u0027t changed that.\n\nTrying to split IPAM out from Neutron seems (to me) to be hung up on this table.  Part of me thinks that we should duplicate the data to make IPAM act more like an external system.  (i.e. leave IPAllocation to Neutron and duplicate the address/subnet_id tuple in a new table, IPAMAllocations or something)\n\nIf IPAM and Neutron continue to share this table, then I think they should share a database context.  If we split the table in to two -- one for IPAM and  one for Neutron -- then I think that the two should use different non-overlapping contexts.\n\nYour thoughts?","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # dangerous thing to do, if executed from within another database"},{"line_number":263,"context_line":"        # transaction. For this reason either:"},{"line_number":264,"context_line":"        # 1) it should be documented that the IPAM driver should never be"},{"line_number":265,"context_line":"        #    called from within a database transaction, which is also good"},{"line_number":266,"context_line":"        #    practice since in the general case these drivers may interact"},{"line_number":267,"context_line":"        #    with remote backends"},{"line_number":268,"context_line":"        # 2) A Neutron context, with a database session, is passed to IPAM"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_324c44c8","line":265,"in_reply_to":"da86d52c_09fab774","updated":"2015-02-05 00:42:22.000000000","message":"I went exactly through your same thought process.\nAt the beginning I considered the best thing to do would be to duplicate.\n\nBut then I kind of changed my mind, since duplicating data is never such a good idea. On the other hand if you do not duplicate the data then you will have both the IPAM driver and neutron\u0027s DB class storing the IP allocation, which is pointless as well.\n\nA possible approach is where the driver would not store the IP allocation in the database, but rely on neutron\u0027s  db base class to do that. It would return the ip address allocated for the subnet, but not store the IP allocation. The operations on IP avalaibility ranges can guarantee the same IP is not generated twice, but we still need to be very careful about \"specific\" IP allocation, as there could be a risk of duplicates unless the IPAM driver is called within a transaction from the mgmt layer and that transaction is reused.\n\nSince we do not want to do that, I am leaning towards an approach where IPAllocation is augmented with a \"status\" column. This driver will first mark IP as \"reserved\", then \"committed\" once the relevant IP ranges operations are committed, and finally \"allocated\" when they are stored in the mgmt layer (_store_ip_allocation). In this way at no point it should be possible to duplicate IP allocations. The additional difficulty here is that we\u0027d also need a process, either based on explicit rollback or expiration, to be able to get rid of \"garbage\" which would ensue from IP allocations which were reserved and then not committed. I know this sounds complicated, but the same considerations also apply when using a separate allocation table in the IPAM driver.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"509f69a9fb9d1201a843d4b182f7576e68b58863","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # dangerous thing to do, if executed from within another database"},{"line_number":263,"context_line":"        # transaction. For this reason either:"},{"line_number":264,"context_line":"        # 1) it should be documented that the IPAM driver should never be"},{"line_number":265,"context_line":"        #    called from within a database transaction, which is also good"},{"line_number":266,"context_line":"        #    practice since in the general case these drivers may interact"},{"line_number":267,"context_line":"        #    with remote backends"},{"line_number":268,"context_line":"        # 2) A Neutron context, with a database session, is passed to IPAM"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_fd9893c1","line":265,"in_reply_to":"da86d52c_324c44c8","updated":"2015-02-05 22:04:43.000000000","message":"I agree about getting rid of \"garbage.\"  It has to be done and it will be a bit complicated no matter how we split this up.  Just the fact that we\u0027re enabling external systems means that we will have some complication like this.\n\nI\u0027m still not bought in to sharing the table.  I think we have complication either way and I find it easier to think about it when the ownership line is more clearly drawn and this IPAM system is treated the same way as any other external system (which will duplicate the data).\n\nI\u0027m not convinced either way yet.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"56f1e52cd4e6b731158b12eb5a407f33a157cfe1","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # dangerous thing to do, if executed from within another database"},{"line_number":263,"context_line":"        # transaction. For this reason either:"},{"line_number":264,"context_line":"        # 1) it should be documented that the IPAM driver should never be"},{"line_number":265,"context_line":"        #    called from within a database transaction, which is also good"},{"line_number":266,"context_line":"        #    practice since in the general case these drivers may interact"},{"line_number":267,"context_line":"        #    with remote backends"},{"line_number":268,"context_line":"        # 2) A Neutron context, with a database session, is passed to IPAM"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_382f75f8","line":265,"in_reply_to":"da86d52c_fd9893c1","updated":"2015-02-06 19:16:28.000000000","message":"At the moment I am slightly partial to not duplicating data.\nMostly because I was taught in school that denormalized data are not a good thing, in general.\n\nWhat you are also suggesting here is to treat the current IPAM logic as an IPAM system that even if lives in neutron\u0027s tree is architecturally separated from neutron. The idea from an architectural standpoint is sound.\nNevertheless this means that we should assume two components:\n\n- Neutron\u0027s builtin IPAM system\n- Neutron IPAM driver for its builtin system\n\nStill, the latter component (the driver) is part of neutron, and therefore should be able to access the Neutron database.\nWhat I\u0027m aiming to is a first iteration where the two components listed above are still together, and implemented within the driver to comply with the plugglabe IPAM interface.\nIn the next iteration, which will be post kilo (likely), I would like to further externalise the IPAM code - and I\u0027m even considering having a dedicated db, in which case there would not even be anymore a question about sharing or not data models.\n\nI know I could have avoided this process and go straight for two components, but I also have to balance this effort with the other things I\u0027m working on for this release cycle.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        #    practice since in the general case these drivers may interact"},{"line_number":267,"context_line":"        #    with remote backends"},{"line_number":268,"context_line":"        # 2) A Neutron context, with a database session, is passed to IPAM"},{"line_number":269,"context_line":"        #    methods."},{"line_number":270,"context_line":"        session \u003d db_api.get_session()"},{"line_number":271,"context_line":"        with session.begin():"},{"line_number":272,"context_line":"            db_subnet \u003d self._fetch_subnet(session)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_e95d637a","line":269,"updated":"2015-02-04 23:33:21.000000000","message":"I don\u0027t think this helps the remote backend case.  I tend to think that IPAM should be done outside of a database transaction, at least in the long term.  I don\u0027t know, maybe for the reference implementation we can leave it in and pass the context but ultimately, I think the reference implementation should be treated just like a remote system.  Maybe we could iterate on this.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        #    practice since in the general case these drivers may interact"},{"line_number":267,"context_line":"        #    with remote backends"},{"line_number":268,"context_line":"        # 2) A Neutron context, with a database session, is passed to IPAM"},{"line_number":269,"context_line":"        #    methods."},{"line_number":270,"context_line":"        session \u003d db_api.get_session()"},{"line_number":271,"context_line":"        with session.begin():"},{"line_number":272,"context_line":"            db_subnet \u003d self._fetch_subnet(session)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_f23b8cce","line":269,"in_reply_to":"da86d52c_e95d637a","updated":"2015-02-05 00:42:22.000000000","message":"I agree with you. I tend to always put all the options on the table, also those I don\u0027t regard as good. In this way, somebody else pointing out that they\u0027re no good validates my initial thinking.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9013b087569559d48603c702a896b52959c88e5c","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                    # Return here as when the address is auto generated there"},{"line_number":294,"context_line":"                    # should be no availability ranges where the allocation"},{"line_number":295,"context_line":"                    # should be noted."},{"line_number":296,"context_line":"                    return self._generate_eui64_address("},{"line_number":297,"context_line":"                        session, address_request.mac_address)"},{"line_number":298,"context_line":"            # NOTE(salv-orlando): _allocate_specific_ips accepts a list as in"},{"line_number":299,"context_line":"            # the near future this driver will switch to an algorithm where"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_2cd069f5","line":296,"updated":"2015-02-04 23:33:21.000000000","message":"I was thinking that eui64 would be calculated outside of Neutron and IPAM would just be informed about it through a specific address request.  I think I mentioned this already in the other file.  However, my thinking behind that was to simplify IPAM a bit and not require an external system to support or know about auto-address subnets.\n\nIt isn\u0027t like there are multiple ways to calculate an EUI64 address.  To me, it seems like a Neutron detail, not an IPAM one.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6602438061bc9161c7ec31c7ca4ab3445600d521","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                    # Return here as when the address is auto generated there"},{"line_number":294,"context_line":"                    # should be no availability ranges where the allocation"},{"line_number":295,"context_line":"                    # should be noted."},{"line_number":296,"context_line":"                    return self._generate_eui64_address("},{"line_number":297,"context_line":"                        session, address_request.mac_address)"},{"line_number":298,"context_line":"            # NOTE(salv-orlando): _allocate_specific_ips accepts a list as in"},{"line_number":299,"context_line":"            # the near future this driver will switch to an algorithm where"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_323284f2","line":296,"in_reply_to":"da86d52c_2cd069f5","updated":"2015-02-05 00:42:22.000000000","message":"yeah, that sounds like a good reasoning to me.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"1cc85b2af23627c81263b52d8af4ccb77c02b360","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        cls._driver_instance \u003d cls()"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    @classmethod"},{"line_number":335,"context_line":"    def get_instance(cls, subnet_pool\u003dNone):"},{"line_number":336,"context_line":"        \"\"\"Return the singleton instance of the driver."},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        :param subnet_pool: this parameter is ignored."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_bd41423b","line":335,"updated":"2015-01-29 09:56:06.000000000","message":"I would suggest to move driver loader logic into IpamDriver base class to make it  common across all drivers. I have started doing so under: https://review.openstack.org/#/c/147479/\nDoes it make sense to you?","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"56f1e52cd4e6b731158b12eb5a407f33a157cfe1","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        cls._driver_instance \u003d cls()"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    @classmethod"},{"line_number":335,"context_line":"    def get_instance(cls, subnet_pool\u003dNone):"},{"line_number":336,"context_line":"        \"\"\"Return the singleton instance of the driver."},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        :param subnet_pool: this parameter is ignored."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_180471c5","line":335,"in_reply_to":"fa81d914_bd41423b","updated":"2015-02-06 19:16:28.000000000","message":"sure. I did it here because I needed it for this patch and did not want to make too many changes into Carl\u0027s work","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"33d188099b3f0da3f29eafabc28832b5649194d0","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":348,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":349,"context_line":"        \"\"\""},{"line_number":350,"context_line":"        pass"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def allocate_subnet(self, subnet_request):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_1b720f11","line":349,"updated":"2015-02-04 16:18:15.000000000","message":"I know it WIP, but just to make sure we are on the same page about this method.\nI expect it to have slightly different interface (to have additionally neutron_subnet_id in param list):\n\ndef get_subnet(self, cidr, neutron_subnet_id):\n    return NeutronDbSubnet(cidr, neutron_subnet_id)","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"56f1e52cd4e6b731158b12eb5a407f33a157cfe1","unresolved":false,"context_lines":[{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":348,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":349,"context_line":"        \"\"\""},{"line_number":350,"context_line":"        pass"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def allocate_subnet(self, subnet_request):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_5825095b","line":349,"in_reply_to":"da86d52c_1b720f11","updated":"2015-02-06 19:16:28.000000000","message":"sure that\u0027s what the comments says. I\u0027ll do that.","commit_id":"18a44efdc26a38d05d36140bfbb595dc730dbd56"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"cda4fff410b525e9a3c5ce2f05d0eb873f97c8b4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack LLC."},{"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":3,"id":"da86d52c_ed8f8121","line":1,"updated":"2015-02-10 08:21:31.000000000","message":"2014 to 2015","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"f82240c2b0abcb0d04e0b3eef1ef0d6d473186cf","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class NeutronDbSubnet(ipam_base.IPAMSubnet):"},{"line_number":37,"context_line":"    \"\"\"Manage IP addresses for Neutron DB IPAM driver."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    This class implements the strategy for IP address allocation and"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_2af412f1","line":36,"updated":"2015-02-10 13:06:28.000000000","message":"This class access neutron database. Is there any way to skip this ?, If my external IPAM system doesn\u0027t need neutron database.","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ce846a409e469be06613fa4c45d9555ca4242d5b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class NeutronDbSubnet(ipam_base.IPAMSubnet):"},{"line_number":37,"context_line":"    \"\"\"Manage IP addresses for Neutron DB IPAM driver."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    This class implements the strategy for IP address allocation and"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_f23aaccb","line":36,"in_reply_to":"da86d52c_2af412f1","updated":"2015-02-11 20:40:52.000000000","message":"I carefully thought about it and I decided that it\u0027s ok for this driver at least.\n\nThis driver indeed assumes it\u0027s built-in in neutron and therefore it\u0027s ok to assume it shares a database with it.\n\nOther drivers interfacing with external IPAM system might not need to access at all the neutron database.\n\nNevertheless, looking at the code we only access elements from the neutron\u0027s DB to retrieve subnet\u0027s data, including allocation pools, and availability ranges,\nThe latter in my opinion are part of the data model that this IPAM driver should handle. IPAllocation data are an interesting case as they are both part of the neutron\u0027s model needed to support the API and part of the IPAM driver. Carl had a similar comment in the previous patchset and I\u0027m working on a solution for it.\n\nAs we evolve this driver this might become not necessary at all, or might be solved by passing more arguments to the subnet object  instance. I think it might be ok to do a first iteration assuming this driver can have visibility into the neutron database. We can then evolve the interface in order to get to a point where even this IPAM driver in theory might be regarded as an external system.","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"f82240c2b0abcb0d04e0b3eef1ef0d6d473186cf","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        admin_ctx \u003d context.get_admin_context("},{"line_number":62,"context_line":"            load_admin_roles\u003dFalse,"},{"line_number":63,"context_line":"            existing_session\u003dsession)"},{"line_number":64,"context_line":"        subnet \u003d self._plugin._get_subnet(admin_ctx, self._neutron_id)"},{"line_number":65,"context_line":"        self._auto_address \u003d ipv6_utils.is_auto_address_subnet(subnet)"},{"line_number":66,"context_line":"        return subnet"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_6f729ce4","line":64,"updated":"2015-02-10 13:06:28.000000000","message":"this get subnet from external IPAM via plugin, right ?","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ce846a409e469be06613fa4c45d9555ca4242d5b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        admin_ctx \u003d context.get_admin_context("},{"line_number":62,"context_line":"            load_admin_roles\u003dFalse,"},{"line_number":63,"context_line":"            existing_session\u003dsession)"},{"line_number":64,"context_line":"        subnet \u003d self._plugin._get_subnet(admin_ctx, self._neutron_id)"},{"line_number":65,"context_line":"        self._auto_address \u003d ipv6_utils.is_auto_address_subnet(subnet)"},{"line_number":66,"context_line":"        return subnet"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_7a030a42","line":64,"in_reply_to":"da86d52c_6f729ce4","updated":"2015-02-11 20:40:52.000000000","message":"It does. This is way more convenient that performing direct DB access, simply because we do not have a real DB API. DB access logic is part of \"base\" plugin class.","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":9631,"name":"sajuptpm","email":"sajuptpm@gmail.com","username":"sajuptpm"},"change_message_id":"234b7bbcfe46b280b2d18db7958fffdf29e2469f","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                  {\u0027ip_address\u0027: ip_address,"},{"line_number":252,"context_line":"                   \u0027first_ip\u0027: ip_address,"},{"line_number":253,"context_line":"                   \u0027last_ip\u0027: ip_range[\u0027last_ip\u0027]})"},{"line_number":254,"context_line":"        return ip_range[\u0027first_ip\u0027]"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def allocate(self, address_request):"},{"line_number":257,"context_line":"        # TODO(salv-orlando): Ban locking queries on allocation"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_5ca3dd4e","line":254,"updated":"2015-02-10 10:18:42.000000000","message":"Change return ip_range[\u0027first_ip\u0027] to return ip_address","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"ce846a409e469be06613fa4c45d9555ca4242d5b","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                  {\u0027ip_address\u0027: ip_address,"},{"line_number":252,"context_line":"                   \u0027first_ip\u0027: ip_address,"},{"line_number":253,"context_line":"                   \u0027last_ip\u0027: ip_range[\u0027last_ip\u0027]})"},{"line_number":254,"context_line":"        return ip_range[\u0027first_ip\u0027]"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def allocate(self, address_request):"},{"line_number":257,"context_line":"        # TODO(salv-orlando): Ban locking queries on allocation"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_522e188d","line":254,"in_reply_to":"da86d52c_5ca3dd4e","updated":"2015-02-11 20:40:52.000000000","message":"ok","commit_id":"5e98b2a586bc346164896a080ccccf314ee61645"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e147cf575e1c5b959881c8ccf271c1de5e162ecf","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":285,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":286,"context_line":"            else:"},{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_cfadfa9c","line":287,"updated":"2015-02-11 22:19:26.000000000","message":"I want to remove the auto address logic. As suggested by Carl, we\u0027d let the caller calculate the EUI 64 address, and treat it as a specific address request.\n\nBefore doing that I have two questions:\n1) How should we behave when the neutron driver receives a anyaddressrequest for an auto addressing subnet?\n2) Since we\u0027re extensively using polymorphism, does it make sense to have a EUI64AddressRequest which might derive from an AutogenerateAddressRequest class?","commit_id":"bc38b2aff0a3a51dd814c5ee7ee504711382fc4f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"993472ac079fefbaee1dfe3a78ebecee553e778c","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":285,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":286,"context_line":"            else:"},{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_23d0581e","line":287,"in_reply_to":"da86d52c_42df21d6","updated":"2015-02-12 13:35:54.000000000","message":"The only thing we need to do is to enforce a logic which ensures consistent IP addressing. So I think that this driver should be aware that the subnet has automatic address and reject with error \u0027any\u0027 requests. The interesting this however imo is that this consideration is generic enough that this kind of validation might be in the base class.\n\nAlso, regarding the other cases you mentioned my answer is: it depends on how generic is the case. If it\u0027s a RFC which might or might not be implemented by the IPAM system, the choice should be left to the driver.\n\nRegarding whether an addressrequestclass should be able to generate a EUI-64 address, I am ok with it","commit_id":"bc38b2aff0a3a51dd814c5ee7ee504711382fc4f"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"646a3aaaf99bdb98effc3842c3e4114285154b8c","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":285,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":286,"context_line":"            else:"},{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_42df21d6","line":287,"in_reply_to":"da86d52c_cfadfa9c","updated":"2015-02-11 22:57:18.000000000","message":"1) I would think this is an error. There are other \"special\" spaces like multicast address spaces, etc. based on various RFCs. Do we want to enforce all of that logic?\n\n2) If we did this, I would expect that the address generation code would probably live in the EUI64AddressRequest class. That would certainly isolate it and allow other algorithms to plugin to the auto-generation without any changes other than creating the new subclass.","commit_id":"bc38b2aff0a3a51dd814c5ee7ee504711382fc4f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self._cidr \u003d cidr"},{"line_number":45,"context_line":"        self._neutron_id \u003d neutron_subnet_id"},{"line_number":46,"context_line":"        # The subnet address mode is a read-only attribute in neutron API. For"},{"line_number":47,"context_line":"        # this reason it is safe to"},{"line_number":48,"context_line":"        self._auto_address \u003d False"},{"line_number":49,"context_line":"        # reference to the neutron plugin"},{"line_number":50,"context_line":"        # the plugin is used for access to Neutron"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_c6eb1ea2","line":47,"updated":"2015-03-03 23:28:25.000000000","message":"it is safe to what?","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self._cidr \u003d cidr"},{"line_number":45,"context_line":"        self._neutron_id \u003d neutron_subnet_id"},{"line_number":46,"context_line":"        # The subnet address mode is a read-only attribute in neutron API. For"},{"line_number":47,"context_line":"        # this reason it is safe to"},{"line_number":48,"context_line":"        self._auto_address \u003d False"},{"line_number":49,"context_line":"        # reference to the neutron plugin"},{"line_number":50,"context_line":"        # the plugin is used for access to Neutron"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_7b4b7eb0","line":47,"in_reply_to":"ba7be1f8_c6eb1ea2","updated":"2015-03-05 00:18:08.000000000","message":"mistery!!!!","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return False"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _verify_ip(self, session, ip_address,"},{"line_number":82,"context_line":"                   port_device_owner\u003dNone):"},{"line_number":83,"context_line":"        \"\"\"Verify whether IP address can be allocated on subnet."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param session: database session"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_666fd22b","line":82,"updated":"2015-03-03 23:28:25.000000000","message":"Is port_device_owner needed?  I don\u0027t see that anyone passes it.  I guess maybe it is a placeholder for your NOTE on L104.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return False"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _verify_ip(self, session, ip_address,"},{"line_number":82,"context_line":"                   port_device_owner\u003dNone):"},{"line_number":83,"context_line":"        \"\"\"Verify whether IP address can be allocated on subnet."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        :param session: database session"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_9b9592e6","line":82,"in_reply_to":"ba7be1f8_666fd22b","updated":"2015-03-05 00:18:08.000000000","message":"it would have become used... but since we\u0027re moving address generation out of the ipam driver it is now the consumer  responsability to generate the ip using eui 64 or similars - so the ipam driver should not be bothered anymore","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0c6fead10dc6d0dda378908607d653f0e1346e23","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        :raises: InvalidInput, IpAddressAlreadyAllocated"},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        # Ensure that the IP\u0027s are unique"},{"line_number":92,"context_line":"        if not self._check_unique_ip(session, ip_address):"},{"line_number":93,"context_line":"            raise ipam_exc.IpAddressAlreadyAllocated("},{"line_number":94,"context_line":"                subnet_id\u003dself._neutron_id,"},{"line_number":95,"context_line":"                ip\u003dip_address)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_8b80bf47","line":92,"updated":"2015-02-23 13:29:33.000000000","message":"Coud we delegate to sql such check using a db constraint?","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9230ef65f182e64f8da0feba5befb36bfdfaf3f8","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        :raises: InvalidInput, IpAddressAlreadyAllocated"},{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        # Ensure that the IP\u0027s are unique"},{"line_number":92,"context_line":"        if not self._check_unique_ip(session, ip_address):"},{"line_number":93,"context_line":"            raise ipam_exc.IpAddressAlreadyAllocated("},{"line_number":94,"context_line":"                subnet_id\u003dself._neutron_id,"},{"line_number":95,"context_line":"                ip\u003dip_address)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_32e8f0e1","line":92,"in_reply_to":"ba7be1f8_8b80bf47","updated":"2015-03-02 21:59:06.000000000","message":"I simply copied over previous code.\nI believe the reason for the early check was that since the allocation operation involved also modifying availability ranges, the cost of a rollback on constraint violation was higher than doing an additional check.\n\nOn the other hand, I agree this can be solved in a fairly easy using constraints doing a flush before moving to availability ranges so that we can trigger the duplicate entry error earliers in the process.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                ip\u003dip_address)"},{"line_number":102,"context_line":"        # TODO(salv-orlando): Find a way to cache subnets\u0027 data thus avoiding"},{"line_number":103,"context_line":"        # repeated database accesses"},{"line_number":104,"context_line":"        # NOTE(salv-orlando): Not sure why the router interface owner would"},{"line_number":105,"context_line":"        # represent an exception to this logic"},{"line_number":106,"context_line":"        if (self._auto_address and port_device_owner not in"},{"line_number":107,"context_line":"            constants.ROUTER_INTERFACE_OWNERS):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_e90715c8","line":104,"updated":"2015-03-03 23:28:25.000000000","message":"On a SLAAC subnet, for example, the VM instances will calculate their own eui64 addresses.  But, the router gateway ports don\u0027t.  So, if the subnet is set for auto-address and it isn\u0027t a router port then IPAM shouldn\u0027t allocate.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                ip\u003dip_address)"},{"line_number":102,"context_line":"        # TODO(salv-orlando): Find a way to cache subnets\u0027 data thus avoiding"},{"line_number":103,"context_line":"        # repeated database accesses"},{"line_number":104,"context_line":"        # NOTE(salv-orlando): Not sure why the router interface owner would"},{"line_number":105,"context_line":"        # represent an exception to this logic"},{"line_number":106,"context_line":"        if (self._auto_address and port_device_owner not in"},{"line_number":107,"context_line":"            constants.ROUTER_INTERFACE_OWNERS):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_fb884ee9","line":104,"in_reply_to":"ba7be1f8_e90715c8","updated":"2015-03-05 00:18:08.000000000","message":"thanks for the clarification. I tend to forget the router port from a l3 perspective belongs to the router","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        # repeated database accesses"},{"line_number":104,"context_line":"        # NOTE(salv-orlando): Not sure why the router interface owner would"},{"line_number":105,"context_line":"        # represent an exception to this logic"},{"line_number":106,"context_line":"        if (self._auto_address and port_device_owner not in"},{"line_number":107,"context_line":"            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":108,"context_line":"            raise ipam_exc.AllocationOnAutoAddressSubnet("},{"line_number":109,"context_line":"                subnet_id\u003dself._neutron_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_69dfa569","line":106,"updated":"2015-03-03 23:28:25.000000000","message":"I think this all needs to move out of IPAM.  \"Auto-address only subnets\" is a Neutron concept, not an IPAM one.  I think we need to separate this from IPAM and be sure this check is added before the call to IPAM.  Neutron should only inform IPAM of eui-64 calculated addresses.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        # repeated database accesses"},{"line_number":104,"context_line":"        # NOTE(salv-orlando): Not sure why the router interface owner would"},{"line_number":105,"context_line":"        # represent an exception to this logic"},{"line_number":106,"context_line":"        if (self._auto_address and port_device_owner not in"},{"line_number":107,"context_line":"            constants.ROUTER_INTERFACE_OWNERS):"},{"line_number":108,"context_line":"            raise ipam_exc.AllocationOnAutoAddressSubnet("},{"line_number":109,"context_line":"                subnet_id\u003dself._neutron_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_3b510663","line":106,"in_reply_to":"ba7be1f8_69dfa569","updated":"2015-03-05 00:18:08.000000000","message":"It\u0027s going out. I\u0027m only leaving a check to prevent anyaddress requests on auto address subnets.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    last_ip\u003dnetaddr.IPAddress(new_range.last).format())"},{"line_number":160,"context_line":"                session.add(new_ip_range)"},{"line_number":161,"context_line":"                final_ranges.append(new_ip_range)"},{"line_number":162,"context_line":"        # Most callers might ignore this return value, which is however"},{"line_number":163,"context_line":"        # useful for testing purposes"},{"line_number":164,"context_line":"        LOG.debug(\"Availability ranges for subnet id %(subnet_id)s \""},{"line_number":165,"context_line":"                  \"modified: %(new_ranges)s\","}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_690ec53c","line":162,"updated":"2015-03-03 23:28:25.000000000","message":"Does this comment belong down by L170?","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    last_ip\u003dnetaddr.IPAddress(new_range.last).format())"},{"line_number":160,"context_line":"                session.add(new_ip_range)"},{"line_number":161,"context_line":"                final_ranges.append(new_ip_range)"},{"line_number":162,"context_line":"        # Most callers might ignore this return value, which is however"},{"line_number":163,"context_line":"        # useful for testing purposes"},{"line_number":164,"context_line":"        LOG.debug(\"Availability ranges for subnet id %(subnet_id)s \""},{"line_number":165,"context_line":"                  \"modified: %(new_ranges)s\","}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_db9f0a02","line":162,"in_reply_to":"ba7be1f8_690ec53c","updated":"2015-03-05 00:18:08.000000000","message":"yeah it is better to place it there","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            models_v2.IPAllocation).with_lockmode(\u0027update\u0027)"},{"line_number":190,"context_line":"        # PostgreSQL does not support select...for update with an outer join."},{"line_number":191,"context_line":"        # No join is needed here."},{"line_number":192,"context_line":"        # TODO(salv-orlando): The query below is probably unnecessary"},{"line_number":193,"context_line":"        pool_qry \u003d session.query("},{"line_number":194,"context_line":"            models_v2.IPAllocationPool).options("},{"line_number":195,"context_line":"            sa_orm.noload(\u0027available_ranges\u0027)).with_lockmode(\u0027update\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_147abc87","line":192,"updated":"2015-03-03 23:28:25.000000000","message":"This is a bit vague.  What do you mean it is probably unnecessary?","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            models_v2.IPAllocation).with_lockmode(\u0027update\u0027)"},{"line_number":190,"context_line":"        # PostgreSQL does not support select...for update with an outer join."},{"line_number":191,"context_line":"        # No join is needed here."},{"line_number":192,"context_line":"        # TODO(salv-orlando): The query below is probably unnecessary"},{"line_number":193,"context_line":"        pool_qry \u003d session.query("},{"line_number":194,"context_line":"            models_v2.IPAllocationPool).options("},{"line_number":195,"context_line":"            sa_orm.noload(\u0027available_ranges\u0027)).with_lockmode(\u0027update\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_db6d4a06","line":192,"in_reply_to":"ba7be1f8_147abc87","updated":"2015-03-05 00:18:08.000000000","message":"it was just a placeholder I left for myself... to think about whether I could do without it.\n\nI was considering caching allocation pools in the subnet object thus avoiding this query but this did not work","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        ip_qry_results \u003d ip_qry.filter_by(subnet_id\u003dself._neutron_id)"},{"line_number":201,"context_line":"        # FIXME(salv-orlando): This is super inefficient for networks larger"},{"line_number":202,"context_line":"        # than /16. In conjunction with the locking queries this might make"},{"line_number":203,"context_line":"        # the service unavaiable for periods of seconds, minutes, or days!"},{"line_number":204,"context_line":"        # (if you have a /8 subnet)"},{"line_number":205,"context_line":"        allocations \u003d netaddr.IPSet([netaddr.IPAddress(i[\u0027ip_address\u0027])"},{"line_number":206,"context_line":"                                     for i in ip_qry_results])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_347b407c","line":203,"updated":"2015-03-03 23:28:25.000000000","message":"I think I might have said this before but the efficiency is not correlated directly to the size of the network.  It is correlated with the number of actual allocations.  Have you observed any practical scenarios which would result in days or even minutes?","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        ip_qry_results \u003d ip_qry.filter_by(subnet_id\u003dself._neutron_id)"},{"line_number":201,"context_line":"        # FIXME(salv-orlando): This is super inefficient for networks larger"},{"line_number":202,"context_line":"        # than /16. In conjunction with the locking queries this might make"},{"line_number":203,"context_line":"        # the service unavaiable for periods of seconds, minutes, or days!"},{"line_number":204,"context_line":"        # (if you have a /8 subnet)"},{"line_number":205,"context_line":"        allocations \u003d netaddr.IPSet([netaddr.IPAddress(i[\u0027ip_address\u0027])"},{"line_number":206,"context_line":"                                     for i in ip_qry_results])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_5b06ba21","line":203,"in_reply_to":"ba7be1f8_347b407c","updated":"2015-03-05 00:18:08.000000000","message":"yes you did. If you find the comment annoying I can just remove it. It\u0027s more a placeholder for myself for future work.\n\nThis is an artificial reconstruction of this scenario: http://paste.openstack.org/show/188303/\n\nI find it hard to believe it could be something realistic however. Indeed as I replied to your previous comment I do not intend to do anything about it at the moment.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        # FIXME(salv-orlando): This is super inefficient for networks larger"},{"line_number":202,"context_line":"        # than /16. In conjunction with the locking queries this might make"},{"line_number":203,"context_line":"        # the service unavaiable for periods of seconds, minutes, or days!"},{"line_number":204,"context_line":"        # (if you have a /8 subnet)"},{"line_number":205,"context_line":"        allocations \u003d netaddr.IPSet([netaddr.IPAddress(i[\u0027ip_address\u0027])"},{"line_number":206,"context_line":"                                     for i in ip_qry_results])"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_34c980ac","line":204,"updated":"2015-03-03 23:28:25.000000000","message":"/8 ipv4 or /8 ipv6.  ;)","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        # FIXME(salv-orlando): This is super inefficient for networks larger"},{"line_number":202,"context_line":"        # than /16. In conjunction with the locking queries this might make"},{"line_number":203,"context_line":"        # the service unavaiable for periods of seconds, minutes, or days!"},{"line_number":204,"context_line":"        # (if you have a /8 subnet)"},{"line_number":205,"context_line":"        allocations \u003d netaddr.IPSet([netaddr.IPAddress(i[\u0027ip_address\u0027])"},{"line_number":206,"context_line":"                                     for i in ip_qry_results])"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_f60ea533","line":204,"in_reply_to":"ba7be1f8_34c980ac","updated":"2015-03-05 00:18:08.000000000","message":"even the /8 for ipv4.\nMy brain still defaults to ipv4","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                    last_ip\u003dstr(netaddr.IPAddress(ip_range.last)))"},{"line_number":222,"context_line":"                session.add(available_range)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def _generate_eui64_address(self, session, mac_address):"},{"line_number":225,"context_line":"        prefix \u003d self._cidr"},{"line_number":226,"context_line":"        return ipv6_utils.get_ipv6_addr_by_EUI64(prefix, mac_address)"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_74fa1876","line":224,"updated":"2015-03-03 23:28:25.000000000","message":"Shouldn\u0027t be needed anymore.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                    last_ip\u003dstr(netaddr.IPAddress(ip_range.last)))"},{"line_number":222,"context_line":"                session.add(available_range)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    def _generate_eui64_address(self, session, mac_address):"},{"line_number":225,"context_line":"        prefix \u003d self._cidr"},{"line_number":226,"context_line":"        return ipv6_utils.get_ipv6_addr_by_EUI64(prefix, mac_address)"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_561db165","line":224,"in_reply_to":"ba7be1f8_74fa1876","updated":"2015-03-05 00:18:08.000000000","message":"it\u0027s going","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":285,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":286,"context_line":"            else:"},{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_6fd32504","line":287,"updated":"2015-03-03 23:28:25.000000000","message":"I still think Neutron needs to check this before calling IPAM and not call it in the auto address case to allocate but just to inform.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":285,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":286,"context_line":"            else:"},{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_761ab56f","line":287,"in_reply_to":"ba7be1f8_6fd32504","updated":"2015-03-05 00:18:08.000000000","message":"I agree with you. It\u0027s gone","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"},{"line_number":291,"context_line":"                    # should be no availability ranges where the allocation"},{"line_number":292,"context_line":"                    # should be noted."},{"line_number":293,"context_line":"                    return self._generate_eui64_address("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_0fe389d9","line":290,"updated":"2015-03-03 23:28:25.000000000","message":"This got me thinking that there is one \"auto address\" detail that this code should be aware of.  This code should optimize around eui-64 addresses.  This should be done independently of neutron\u0027s auto_address setting.\n\nMore specifically, I think availability ranges should never be adjusted around eui-64 addresses regardless and maybe we don\u0027t even record or even check the \"allocation\".    I think this is easy for this code to detect, just AND the address with this mask and compare.\n\n mask \u003d netaddr.IPAddress(\u0027::ff:ff00:0\u0027)\n eui64 \u003d netaddr.IPAddress(\u0027::ff:fe00:0\u0027)\n def _is_eui64_address(ip):\n     ip \u003d netaddr.IPAddress(ip)\n     return ip.version \u003d\u003d 6 and eui64 \u003d\u003d mask \u0026 ip\n\nSo, with this utility, replace this with:\n\n if not _is_eui64_address(ip_\nDo you think that it is fair that IPAM should never allocate out of the eui-64 portion of the subnet?\n\nI\u0027d handle this an implementation detail of this driver.  Other drivers could follow suit or do their own thing.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                if not self._auto_address:"},{"line_number":288,"context_line":"                    ip_address \u003d self._generate_ip(session)"},{"line_number":289,"context_line":"                else:"},{"line_number":290,"context_line":"                    # Return here as when the address is auto generated there"},{"line_number":291,"context_line":"                    # should be no availability ranges where the allocation"},{"line_number":292,"context_line":"                    # should be noted."},{"line_number":293,"context_line":"                    return self._generate_eui64_address("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_163a59cd","line":290,"in_reply_to":"ba7be1f8_0fe389d9","updated":"2015-03-05 00:18:08.000000000","message":"correct I will do that in the next patchset","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def deallocate(self, address):"},{"line_number":303,"context_line":"        # This should be a no-op because the Neutron DB IPAM driver does not"},{"line_number":304,"context_line":"        # delete IPAllocation obkects, neither rebuilds availability ranges"},{"line_number":305,"context_line":"        # at everu deallocation. In the near function this method could be used"},{"line_number":306,"context_line":"        # to mark IPs as \u0027deallocated\u0027, assuming that there will be any gain by"},{"line_number":307,"context_line":"        # doing so."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_4f0e618d","line":304,"updated":"2015-03-03 23:28:25.000000000","message":"*objects","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def deallocate(self, address):"},{"line_number":303,"context_line":"        # This should be a no-op because the Neutron DB IPAM driver does not"},{"line_number":304,"context_line":"        # delete IPAllocation obkects, neither rebuilds availability ranges"},{"line_number":305,"context_line":"        # at everu deallocation. In the near function this method could be used"},{"line_number":306,"context_line":"        # to mark IPs as \u0027deallocated\u0027, assuming that there will be any gain by"},{"line_number":307,"context_line":"        # doing so."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_964d6975","line":304,"in_reply_to":"ba7be1f8_4f0e618d","updated":"2015-03-05 00:18:08.000000000","message":"yup","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def deallocate(self, address):"},{"line_number":303,"context_line":"        # This should be a no-op because the Neutron DB IPAM driver does not"},{"line_number":304,"context_line":"        # delete IPAllocation obkects, neither rebuilds availability ranges"},{"line_number":305,"context_line":"        # at everu deallocation. In the near function this method could be used"},{"line_number":306,"context_line":"        # to mark IPs as \u0027deallocated\u0027, assuming that there will be any gain by"},{"line_number":307,"context_line":"        # doing so."},{"line_number":308,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_8f23f903","line":305,"updated":"2015-03-03 23:28:25.000000000","message":"*every","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def deallocate(self, address):"},{"line_number":303,"context_line":"        # This should be a no-op because the Neutron DB IPAM driver does not"},{"line_number":304,"context_line":"        # delete IPAllocation obkects, neither rebuilds availability ranges"},{"line_number":305,"context_line":"        # at everu deallocation. In the near function this method could be used"},{"line_number":306,"context_line":"        # to mark IPs as \u0027deallocated\u0027, assuming that there will be any gain by"},{"line_number":307,"context_line":"        # doing so."},{"line_number":308,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_f65ce527","line":305,"in_reply_to":"ba7be1f8_8f23f903","updated":"2015-03-05 00:18:08.000000000","message":"yep","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cda941c857db56f35aff556843ece1b94a3f52a1","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        # delete IPAllocation obkects, neither rebuilds availability ranges"},{"line_number":305,"context_line":"        # at everu deallocation. In the near function this method could be used"},{"line_number":306,"context_line":"        # to mark IPs as \u0027deallocated\u0027, assuming that there will be any gain by"},{"line_number":307,"context_line":"        # doing so."},{"line_number":308,"context_line":"        pass"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_6f2885e2","line":307,"updated":"2015-03-03 23:28:25.000000000","message":"I agree with this whole paragraph except for the typos.  ;)","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"281154540959cfa7f8b8f660594f89211a57412c","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        # delete IPAllocation obkects, neither rebuilds availability ranges"},{"line_number":305,"context_line":"        # at everu deallocation. In the near function this method could be used"},{"line_number":306,"context_line":"        # to mark IPs as \u0027deallocated\u0027, assuming that there will be any gain by"},{"line_number":307,"context_line":"        # doing so."},{"line_number":308,"context_line":"        pass"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_564bf158","line":307,"in_reply_to":"ba7be1f8_6f2885e2","updated":"2015-03-05 00:18:08.000000000","message":"yop","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"c3e13b79c2ad2b4d5a3145b6748e3b69e380864b","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        pass"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def allocate_subnet(self, subnet_request):"},{"line_number":350,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        This method does not actually do any operation in the driver, given"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_e81fc8b5","line":349,"updated":"2015-02-20 05:42:01.000000000","message":"This makes me wonder about the viability of subnet pools for Kilo.  This seems imply that for subnet pools to make it into Kilo we would A) make sure the reference driver is aware of subnet pools or B) implement subnet pool aware functionality somewhere else (then what is pluggable IPAM good for?).  In the subnet allocation spec this was called out as a dependency.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"56053abae27bdfe52490cbf9187f8596b4e9e534","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        pass"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def allocate_subnet(self, subnet_request):"},{"line_number":350,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        This method does not actually do any operation in the driver, given"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_d931dba3","line":349,"in_reply_to":"ba7be1f8_9ef90950","updated":"2015-02-20 18:37:16.000000000","message":"Sounds like a reasonable approach.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9230ef65f182e64f8da0feba5befb36bfdfaf3f8","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        pass"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def allocate_subnet(self, subnet_request):"},{"line_number":350,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        This method does not actually do any operation in the driver, given"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_b2bb00e4","line":349,"in_reply_to":"ba7be1f8_d931dba3","updated":"2015-03-02 21:59:06.000000000","message":"don\u0027t stop the subnet pool!","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ea7931f4523c21563a7577305352c3faabd96aa3","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        pass"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def allocate_subnet(self, subnet_request):"},{"line_number":350,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        This method does not actually do any operation in the driver, given"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_9ef90950","line":349,"in_reply_to":"ba7be1f8_e81fc8b5","updated":"2015-02-20 18:22:37.000000000","message":"Subnet pools are almost orthogonal to this work.  I suggest we continue to implement the subnet pool functionality in a separate implementation of the interface.  For the short term, we\u0027ll instantiate that instance when doing subnet pool stuff down to allocating subnets.  At some point, when both are ready, we should be able to marry the two in to a single driver.\n\nFor now, I think we should be able to stay out of each other\u0027s way.","commit_id":"43255db7e6e7bdb271a323fe5741cb293f2ce665"}],"neutron/ipam/drivers/neutrondb_ipam/db_api.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# NOTE(salv-orlando): This is the same decorator used elsewhere in openstack"},{"line_number":36,"context_line":"# projects. It is used in this driver to perform transaction retry in case"},{"line_number":37,"context_line":"# write intent locks result in a deadlock failure in multimaster clusters."},{"line_number":38,"context_line":"def retry_on_deadlock(f):"},{"line_number":39,"context_line":"    \"\"\"Decorator to retry a DB API call if Deadlock was received.\"\"\""},{"line_number":40,"context_line":"    @functools.wraps(f)"},{"line_number":41,"context_line":"    def wrapped(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_23b9ca2e","line":38,"updated":"2015-03-11 18:55:27.000000000","message":"nit:  Do we have this in common code?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# NOTE(salv-orlando): This is the same decorator used elsewhere in openstack"},{"line_number":36,"context_line":"# projects. It is used in this driver to perform transaction retry in case"},{"line_number":37,"context_line":"# write intent locks result in a deadlock failure in multimaster clusters."},{"line_number":38,"context_line":"def retry_on_deadlock(f):"},{"line_number":39,"context_line":"    \"\"\"Decorator to retry a DB API call if Deadlock was received.\"\"\""},{"line_number":40,"context_line":"    @functools.wraps(f)"},{"line_number":41,"context_line":"    def wrapped(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_7f13335c","line":38,"in_reply_to":"9a80dd14_23b9ca2e","updated":"2015-03-12 09:09:41.000000000","message":"no we don\u0027t.\nI checked.\n\nThere are probably other patches in review which introduce similar approaches. As they\u0027ve not yet merged I don\u0027t think it\u0027s a good idea to stack this patch on top of those to get this feature.\n\nIf the feature is merged later in common code, using that should be trivial.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3cf8b7e228f1a1b9836b112b72b89b63c6e96b2a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"# NOTE(salv-orlando): This is the same decorator used elsewhere in openstack"},{"line_number":36,"context_line":"# projects. It is used in this driver to perform transaction retry in case"},{"line_number":37,"context_line":"# write intent locks result in a deadlock failure in multimaster clusters."},{"line_number":38,"context_line":"def retry_on_deadlock(f):"},{"line_number":39,"context_line":"    \"\"\"Decorator to retry a DB API call if Deadlock was received.\"\"\""},{"line_number":40,"context_line":"    @functools.wraps(f)"},{"line_number":41,"context_line":"    def wrapped(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_e8846f5f","line":38,"in_reply_to":"9a80dd14_7f13335c","updated":"2015-03-13 21:45:21.000000000","message":"ok","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7823,"name":"Xiang Hui","email":"xianghuir@gmail.com","username":"xianghui"},"change_message_id":"668189e58dab899f54a53bddbae985c596dd3273","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self, neutron_subnet_id):"},{"line_number":69,"context_line":"        self._ipam_subnet_id \u003d None"},{"line_number":70,"context_line":"        self._neutron_subnet_id \u003d neutron_subnet_id"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @property"},{"line_number":73,"context_line":"    def neutron_id(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_9e551720","line":70,"updated":"2015-03-13 05:35:58.000000000","message":"So this IpamSubnetManager instance will just manage only one ipam_subnet_id associated with one neutron_subnet_id?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7823,"name":"Xiang Hui","email":"xianghuir@gmail.com","username":"xianghui"},"change_message_id":"668189e58dab899f54a53bddbae985c596dd3273","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def create_pool(self, session, pool_start, pool_end):"},{"line_number":100,"context_line":"        \"\"\"Create an allocation pool and availability ranges for the subnet."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        This method does not perform any validation on parameters; it simply"},{"line_number":103,"context_line":"        persist data on the database."},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_122e7b43","line":101,"updated":"2015-03-13 05:35:58.000000000","message":"Sorry for my slow, I am trying to figure out clearly the difference during these concepts: \u0027SubnetPool\u0027[1], \u0027AllocationPool\u0027, and \u0027Pool\u0027[2].\nFrom what I understand here is that the \u0027AllocationPool\u0027 is a set of available ip ranges  for a specific subnet? and looks like SubnetPool do the same way other than a pool of subnets.\n\n[1]. https://review.openstack.org/#/c/134339/40/neutron/ipam/__init__.py\n[2]. https://review.openstack.org/#/c/134339/40/neutron/ipam/driver.py","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7823,"name":"Xiang Hui","email":"xianghuir@gmail.com","username":"xianghui"},"change_message_id":"668189e58dab899f54a53bddbae985c596dd3273","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        ip_range \u003d db_models.IpamAvailabilityRange("},{"line_number":115,"context_line":"            allocation_pool\u003dip_pool,"},{"line_number":116,"context_line":"            first_ip\u003dpool_start,"},{"line_number":117,"context_line":"            last_ip\u003dpool_end)"},{"line_number":118,"context_line":"        session.add(ip_range)"},{"line_number":119,"context_line":"        return ip_pool"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_72b7b7f5","line":117,"updated":"2015-03-13 05:35:58.000000000","message":"What\u0027s the purpose for \u0027ip_pool\u0027 and \u0027ip_range\u0027 all have first_ip and last_ip?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7823,"name":"Xiang Hui","email":"xianghuir@gmail.com","username":"xianghui"},"change_message_id":"668189e58dab899f54a53bddbae985c596dd3273","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            db_models.IpamAvailabilityRange).join("},{"line_number":160,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":161,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def create_range(self, session, allocation_pool_id,"},{"line_number":164,"context_line":"                     range_start, range_end):"},{"line_number":165,"context_line":"        \"\"\"Create an availabilty range for a given pool."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_d273034c","line":162,"updated":"2015-03-13 05:35:58.000000000","message":"Is there any cases need to differ list_ranges_by_subnet_id and list_ranges_by_allocation_pool?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":23,"context_line":"# Database operations for Neutron\u0027s DB-backed IPAM driver"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# Maximum number of retries upon database deadlock feailures"},{"line_number":26,"context_line":"MAX_RETRIES \u003d 10"},{"line_number":27,"context_line":"BASE_RETRY_INTERVAL \u003d 0.1"},{"line_number":28,"context_line":"MAX_RETRY_INTERVAL \u003d 40"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_e894c6e9","line":25,"updated":"2015-03-18 15:14:27.000000000","message":"\u003d\u003e failures","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            ip_qry.filter_by(subnet_id\u003dself._ipam_subnet_id,"},{"line_number":166,"context_line":"                             status\u003d\u0027ALLOCATED\u0027,"},{"line_number":167,"context_line":"                             ip_address\u003dip_address).one()"},{"line_number":168,"context_line":"        except orm_exc.NoResultFound:"},{"line_number":169,"context_line":"            return True"},{"line_number":170,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_83a96ddf","line":167,"updated":"2015-03-18 15:14:27.000000000","message":".first() add a LIMIT 1 but not one() as one() can raise a MultipleResultFound:\n\n  result \u003d ...first()\n  return result is None","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            ip_qry.filter_by(subnet_id\u003dself._ipam_subnet_id,"},{"line_number":166,"context_line":"                             status\u003d\u0027ALLOCATED\u0027,"},{"line_number":167,"context_line":"                             ip_address\u003dip_address).one()"},{"line_number":168,"context_line":"        except orm_exc.NoResultFound:"},{"line_number":169,"context_line":"            return True"},{"line_number":170,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_7a8a4a65","line":167,"in_reply_to":"9a80dd14_83a96ddf","updated":"2015-03-18 19:49:16.000000000","message":"yes I remember what we said here. I think i fixed it but then I must have messed up patchsets.","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    def delete_allocation(self, session, ip_address):"},{"line_number":205,"context_line":"        \"\"\"Remove an IP allocation for this subnet."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        :param session: database sesssion"},{"line_number":208,"context_line":"        :param ip_address: IP address for which the allocation entry should"},{"line_number":209,"context_line":"            be removed."},{"line_number":210,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_83f24d99","line":207,"updated":"2015-03-18 15:14:27.000000000","message":"session","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    def delete_allocation(self, session, ip_address):"},{"line_number":205,"context_line":"        \"\"\"Remove an IP allocation for this subnet."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        :param session: database sesssion"},{"line_number":208,"context_line":"        :param ip_address: IP address for which the allocation entry should"},{"line_number":209,"context_line":"            be removed."},{"line_number":210,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_fa7e3a69","line":207,"in_reply_to":"9a80dd14_83f24d99","updated":"2015-03-18 19:49:16.000000000","message":"I\u0027ve got a problem with a sticky s","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":209,"context_line":"            be removed."},{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":"        return session.query(db_models.IPRequest).filter_by("},{"line_number":212,"context_line":"            ip_address\u003dip_address, subnet_id\u003dself._ipam_subnet_id).delete("},{"line_number":213,"context_line":"            synchronize_session\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_e32a29e6","line":212,"updated":"2015-03-18 15:14:27.000000000","message":"Should we check ip_address status? ... in fact i am not sure to understand possible status values","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":209,"context_line":"            be removed."},{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":"        return session.query(db_models.IPRequest).filter_by("},{"line_number":212,"context_line":"            ip_address\u003dip_address, subnet_id\u003dself._ipam_subnet_id).delete("},{"line_number":213,"context_line":"            synchronize_session\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_ba3922a5","line":212,"in_reply_to":"9a80dd14_e32a29e6","updated":"2015-03-18 19:49:16.000000000","message":"the status at the moment is a placeholder for a different allocation strategy we will implement in liberty. I did not feel like the idea of moving away from availability ranges would have been received immediately, but I\u0027m adding this attribute now mostly to avoid another db migration when time comes.","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        :returns: the idenfier of created IPAM subnet"},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        if not self._ipam_subnet_id:"},{"line_number":55,"context_line":"            self._ipam_subnet_id \u003d uuidutils.generate_uuid()"},{"line_number":56,"context_line":"        ipam_subnet \u003d db_models.IpamSubnet("},{"line_number":57,"context_line":"            id\u003dself._ipam_subnet_id,"},{"line_number":58,"context_line":"            neutron_subnet_id\u003dself._neutron_subnet_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_bf7a90ee","line":55,"updated":"2015-03-20 18:06:46.000000000","message":"nit: that could belong to __init__ to unload create() method a bit.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        return range_qry"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_first_range(self, session, locking\u003dFalse):"},{"line_number":114,"context_line":"        \"\"\"Return the first availability range for the subnet"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        :param session: database session"},{"line_number":117,"context_line":"        :param locking: specifies whether a write-intent lock should be"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9b8cff36","line":114,"updated":"2015-03-20 18:06:46.000000000","message":"Since our beloved life-time Pedant of the Project is the author of the patch, I will hijack his position here and ask what is \u0027first\u0027 in this context, and whether databases guarantee any order of records to us.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"c5e72573a3c68db5f75bd8863342f303fd311a1e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        return range_qry"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_first_range(self, session, locking\u003dFalse):"},{"line_number":114,"context_line":"        \"\"\"Return the first availability range for the subnet"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        :param session: database session"},{"line_number":117,"context_line":"        :param locking: specifies whether a write-intent lock should be"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_9bdbc81a","line":114,"in_reply_to":"9a80dd14_9b8cff36","updated":"2015-03-23 23:59:27.000000000","message":"I will satisfy your thirst for pedantry in the method\u0027s docstring.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        :return: list of availability ranges as instances of"},{"line_number":131,"context_line":"            neutron.ipam.drivers.neutrondb_ipam.db_models.IpamAvailabilityRange"},{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        return self._range_query(session, locking)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def list_ranges_by_allocation_pool(self, session, allocation_pool_id,"},{"line_number":136,"context_line":"                                       locking\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_2d312ca2","line":133,"updated":"2015-03-20 14:50:32.000000000","message":"nit: .all() to return a list rather than query (to align with docstring, or rather change docstring)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        :return: list of availability ranges as instances of"},{"line_number":131,"context_line":"            neutron.ipam.drivers.neutrondb_ipam.db_models.IpamAvailabilityRange"},{"line_number":132,"context_line":"        \"\"\""},{"line_number":133,"context_line":"        return self._range_query(session, locking)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def list_ranges_by_allocation_pool(self, session, allocation_pool_id,"},{"line_number":136,"context_line":"                                       locking\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_266acf1a","line":133,"in_reply_to":"9a80dd14_2d312ca2","updated":"2015-03-23 18:38:16.000000000","message":"you caught this ;) I hope nobody would realize I was returning the query and use its iterator!","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        return session.query("},{"line_number":147,"context_line":"            db_models.IpamAvailabilityRange).join("},{"line_number":148,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":149,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_range(self, session, allocation_pool_id,"},{"line_number":152,"context_line":"                     range_start, range_end):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_0dbc68db","line":149,"updated":"2015-03-20 14:50:32.000000000","message":"ditto","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def create_range(self, session, allocation_pool_id,"},{"line_number":152,"context_line":"                     range_start, range_end):"},{"line_number":153,"context_line":"        \"\"\"Create an availabilty range for a given pool."},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        This method does not perform any validation on parameters; it simply"},{"line_number":156,"context_line":"        persist data on the database."}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_fba33b9b","line":153,"updated":"2015-03-20 18:06:46.000000000","message":"nit: availability","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\"Create an availabilty range for a given pool."},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        This method does not perform any validation on parameters; it simply"},{"line_number":156,"context_line":"        persist data on the database."},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        :param session: database session"},{"line_number":159,"context_line":"        :param allocation_pool_id: allocation pool identifier"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_bbad4386","line":156,"updated":"2015-03-20 18:06:46.000000000","message":"nit: persists","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        iprequest \u003d session.query(db_models.IPRequest).filter_by("},{"line_number":175,"context_line":"            subnet_id\u003dself._ipam_subnet_id, status\u003d\u0027ALLOCATED\u0027,"},{"line_number":176,"context_line":"            ip_address\u003dip_address).first()"},{"line_number":177,"context_line":"        if iprequest:"},{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":"        return True"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_3bef93b2","line":177,"updated":"2015-03-20 18:06:46.000000000","message":"nit: return not iprequest","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        iprequest \u003d session.query(db_models.IPRequest).filter_by("},{"line_number":175,"context_line":"            subnet_id\u003dself._ipam_subnet_id, status\u003d\u0027ALLOCATED\u0027,"},{"line_number":176,"context_line":"            ip_address\u003dip_address).first()"},{"line_number":177,"context_line":"        if iprequest:"},{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":"        return True"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_0977a4d5","line":177,"in_reply_to":"9a80dd14_3bef93b2","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            status\u003dstatus)"},{"line_number":195,"context_line":"        if locking:"},{"line_number":196,"context_line":"            ip_qry \u003d ip_qry.with_lockmode(\u0027update\u0027)"},{"line_number":197,"context_line":"        return ip_qry"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def create_allocation(self, session, ip_address,"},{"line_number":200,"context_line":"                          status\u003d\u0027ALLOCATED\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9b16bfa5","line":197,"updated":"2015-03-20 18:06:46.000000000","message":".all(), as in other Oleg\u0027s comments?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            status\u003dstatus)"},{"line_number":195,"context_line":"        if locking:"},{"line_number":196,"context_line":"            ip_qry \u003d ip_qry.with_lockmode(\u0027update\u0027)"},{"line_number":197,"context_line":"        return ip_qry"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def create_allocation(self, session, ip_address,"},{"line_number":200,"context_line":"                          status\u003d\u0027ALLOCATED\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_297460ce","line":197,"in_reply_to":"9a80dd14_9b16bfa5","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        return session.query(db_models.IPRequest).filter_by("},{"line_number":221,"context_line":"            ip_address\u003dip_address, subnet_id\u003dself._ipam_subnet_id).delete("},{"line_number":222,"context_line":"            synchronize_session\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9bcb1f1d","line":222,"updated":"2015-03-20 18:06:46.000000000","message":"what is the rationale behind using synchronize_session\u003dFalse here?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        return session.query(db_models.IPRequest).filter_by("},{"line_number":221,"context_line":"            ip_address\u003dip_address, subnet_id\u003dself._ipam_subnet_id).delete("},{"line_number":222,"context_line":"            synchronize_session\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_e949688c","line":222,"in_reply_to":"9a80dd14_9bcb1f1d","updated":"2015-03-23 18:38:16.000000000","message":"performance. We avoid checking the state of the object in the sqlalchemy session (defualt behaviour) and just execute the statement","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"}],"neutron/ipam/drivers/neutrondb_ipam/db_models.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"6a866f5555c4641f6b99d9b2d1399ee660014726","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                                 ondelete\u003d\"CASCADE\"),"},{"line_number":57,"context_line":"                                   nullable\u003dFalse,"},{"line_number":58,"context_line":"                                   primary_key\u003dTrue)"},{"line_number":59,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":60,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":61,"context_line":"    __table_args__ \u003d ("},{"line_number":62,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_3d49dad0","line":59,"updated":"2015-03-11 21:30:57.000000000","message":"I have had some complaints about the allocator not allocating sequentially because these ranges are stored as strings which sort differently than they would if these were store numerically.  Should we sort them numerically?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":60,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":61,"context_line":"    __table_args__ \u003d ("},{"line_number":62,"context_line":"        sa.UniqueConstraint("},{"line_number":63,"context_line":"            first_ip, allocation_pool_id,"},{"line_number":64,"context_line":"            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":65,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_fe62e5d7","line":62,"updated":"2015-03-11 18:55:27.000000000","message":"Aren\u0027t these two UniqueConstraints redundant with the primary_key?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":76,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":77,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":78,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":79,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":80,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_de952189","line":77,"updated":"2015-03-11 18:55:27.000000000","message":"+1  Having thought about this a while, I think this is the best way to do it.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3cf8b7e228f1a1b9836b112b72b89b63c6e96b2a","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":76,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":77,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":78,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":79,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":80,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_88da1376","line":77,"in_reply_to":"9a80dd14_3f58db31","updated":"2015-03-13 21:45:21.000000000","message":"+1","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":76,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":77,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":78,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":79,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":80,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_3f58db31","line":77,"in_reply_to":"9a80dd14_de952189","updated":"2015-03-12 09:09:41.000000000","message":"Unfortunately the other options have even more problems.\nI am still a bit worried about having duplicated information though.\nIndeed I need to fix the code to remove the possibility that the allocation pools from the neutron side could go out of sync with those on the IPAM side.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"7a9d04802a98d258e02db5f80071f569707d8ccc","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    # The subnet identifier is redundant but come handy for looking up"},{"line_number":110,"context_line":"    # IP addresses to remove."},{"line_number":111,"context_line":"    subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":112,"context_line":"                          sa.ForeignKey(\u0027ipamsubnets.id\u0027),"},{"line_number":113,"context_line":"                          primary_key\u003dTrue,"},{"line_number":114,"context_line":"                          nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_40da06ea","line":112,"updated":"2015-03-18 16:22:22.000000000","message":"need ondelete\u003d\"CASCADE\" here as well","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    # The subnet identifier is redundant but come handy for looking up"},{"line_number":110,"context_line":"    # IP addresses to remove."},{"line_number":111,"context_line":"    subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":112,"context_line":"                          sa.ForeignKey(\u0027ipamsubnets.id\u0027),"},{"line_number":113,"context_line":"                          primary_key\u003dTrue,"},{"line_number":114,"context_line":"                          nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_7a4faa34","line":112,"in_reply_to":"9a80dd14_40da06ea","updated":"2015-03-18 19:49:16.000000000","message":"Done","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                                 ondelete\u003d\"CASCADE\"),"},{"line_number":44,"context_line":"                                   nullable\u003dFalse,"},{"line_number":45,"context_line":"                                   primary_key\u003dTrue)"},{"line_number":46,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":47,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_bf270fc6","line":46,"updated":"2015-03-20 00:59:30.000000000","message":"Are you sure that 64 is enough?!  What about the binary representation of ipv6 divided along 16 bit boundaries [1].  They won\u0027t fit!\n\n[1] https://msdn.microsoft.com/en-us/library/aa921042.aspx\n\n(I\u0027m joking of course)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                                 ondelete\u003d\"CASCADE\"),"},{"line_number":44,"context_line":"                                   nullable\u003dFalse,"},{"line_number":45,"context_line":"                                   primary_key\u003dTrue)"},{"line_number":46,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":47,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_e47c2f75","line":46,"in_reply_to":"9a80dd14_bf270fc6","updated":"2015-03-23 18:38:16.000000000","message":"I think we should be future proof and make the field large enough for ipv8 addresses!","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":47,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("},{"line_number":50,"context_line":"            first_ip, allocation_pool_id,"},{"line_number":51,"context_line":"            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":52,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_e22730b4","line":49,"updated":"2015-03-20 00:59:30.000000000","message":"See PS7.  I guess this isn\u0027t all that important if they are redundant, they can be dropped later, right?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7133f84be8c92213d4b9b4000ad1276ab00bd87f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":47,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("},{"line_number":50,"context_line":"            first_ip, allocation_pool_id,"},{"line_number":51,"context_line":"            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":52,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":11,"id":"7ad32947_ca20654c","line":49,"in_reply_to":"1a6ced46_44c1837f","updated":"2015-04-27 21:19:51.000000000","message":"Isn\u0027t there a more direct way to create an index?  In SQL I\u0027d just say \"CREATE INDEX\".  But, I\u0027m constantly surprised by what I don\u0027t know about the abstraction created by sqlalchemy.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"cde9c8fa5eb19e3fafbb577d7d885868cf91fb7d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":47,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("},{"line_number":50,"context_line":"            first_ip, allocation_pool_id,"},{"line_number":51,"context_line":"            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":52,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":11,"id":"7ad32947_ababcf88","line":49,"in_reply_to":"7ad32947_ca20654c","updated":"2015-04-28 15:05:17.000000000","message":"According to documentation sqlalchemy allows to create indexes without unique constraint[1].\n\n[1] http://docs.sqlalchemy.org/en/latest/core/constraints.html#indexes","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    first_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":47,"context_line":"    last_ip \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("},{"line_number":50,"context_line":"            first_ip, allocation_pool_id,"},{"line_number":51,"context_line":"            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":52,"context_line":"        sa.UniqueConstraint("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_44c1837f","line":49,"in_reply_to":"9a80dd14_e22730b4","updated":"2015-03-23 18:38:16.000000000","message":"I think the unique constraints are actually used to implement indexes to accelerate db operations","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":63,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":64,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":65,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":66,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":67,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_640fb12e","line":64,"updated":"2015-03-20 18:06:46.000000000","message":"tp -\u003e to","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":63,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":64,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":65,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":66,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":67,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_6955781c","line":64,"in_reply_to":"9a80dd14_640fb12e","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      data redundancy."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                                  sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":97,"context_line":"                                                ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                                  nullable\u003dTrue)"},{"line_number":99,"context_line":"    allocation_pools \u003d sa_orm.relationship(IpamAllocationPool,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_3f84ffd1","line":96,"updated":"2015-03-20 00:59:30.000000000","message":"If IPAM is supposed to be external, does it make sense to have foreign keys with cascading deletes cross the boundary?  Shouldn\u0027t we be explicitly notifying IPAM of the deletion of the subnet through the API instead?  My thinking here is that this implementation should be on the same playing field as other external IPAM systems in order for the other external systems to have a chance of working and continuing to work.\n\nI brought up nearly the same question in Ryan\u0027s review [1] today where he\u0027s added a foreign key the other way:  from a subnet to a subnet pool.\n\n[1] https://review.openstack.org/#/c/157597/42/neutron/db/models_v2.py","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7133f84be8c92213d4b9b4000ad1276ab00bd87f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      data redundancy."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                                  sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":97,"context_line":"                                                ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                                  nullable\u003dTrue)"},{"line_number":99,"context_line":"    allocation_pools \u003d sa_orm.relationship(IpamAllocationPool,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7ad32947_ea02016f","line":96,"in_reply_to":"1a6ced46_243ac7cd","updated":"2015-04-27 21:19:51.000000000","message":"It isn\u0027t that foreign keys are not useful.  I think they\u0027re great.  I\u0027m not trying to argue that we get rid of them.  For example, I think the one on L74 is great and most, if not all, of the ones we have currently are good.\n\nI think that using a foreign key constraint that crosses IPAM and Neutron db models implies an intimate connection between them that an external system will not have and could result in a real problem for the external systems.\n\nFor example, the db takes care of cascading deletes across a foreign key.  If it is convenient for this driver to take advantage of cascading deletes, it probably means that a true external driver will have problems because it needs explicit notification of deletes and cannot rely on the DB to take care of it.\n\nI worry that any convenience that you take advantage of in this regard could translate directly in to an inconvenience or worse in another external driver.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      data redundancy."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                                  sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":97,"context_line":"                                                ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                                  nullable\u003dTrue)"},{"line_number":99,"context_line":"    allocation_pools \u003d sa_orm.relationship(IpamAllocationPool,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_8448255d","line":96,"in_reply_to":"9a80dd14_3f84ffd1","updated":"2015-03-20 18:06:46.000000000","message":"Yes, since we started the whole IPAM rework to add external IPAM support, we should make sure internal implementation behaves the same way.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      data redundancy."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                                  sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":97,"context_line":"                                                ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                                  nullable\u003dTrue)"},{"line_number":99,"context_line":"    allocation_pools \u003d sa_orm.relationship(IpamAllocationPool,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_243ac7cd","line":96,"in_reply_to":"9a80dd14_8448255d","updated":"2015-03-23 18:38:16.000000000","message":"Since this is an \"internal\" driver, which leverages the fact that its data are in the neutron DB, I think it makes sense to leverage foreign keys.\n\nAs this is a driver implementation detail it can always be changed in the future. But for the time being I find the foreign key handy.\n\nHopefully foreign keys are still deemed useful and not just an arcane tool used by developers of a past-era.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    status \u003d sa.Column(sa.String(36))"},{"line_number":109,"context_line":"    # The subnet identifier is redundant but come handy for looking up"},{"line_number":110,"context_line":"    # IP addresses to remove."},{"line_number":111,"context_line":"    subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":112,"context_line":"                          sa.ForeignKey(\u0027ipamsubnets.id\u0027,"},{"line_number":113,"context_line":"                                        ondelete\u003d\"CASCADE\"),"},{"line_number":114,"context_line":"                          primary_key\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_0d7b88f5","line":111,"updated":"2015-03-20 14:50:32.000000000","message":"ipam_subnet_id may be better for consistency with IpamAllocationPool and IpamSubnet","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    status \u003d sa.Column(sa.String(36))"},{"line_number":109,"context_line":"    # The subnet identifier is redundant but come handy for looking up"},{"line_number":110,"context_line":"    # IP addresses to remove."},{"line_number":111,"context_line":"    subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":112,"context_line":"                          sa.ForeignKey(\u0027ipamsubnets.id\u0027,"},{"line_number":113,"context_line":"                                        ondelete\u003d\"CASCADE\"),"},{"line_number":114,"context_line":"                          primary_key\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_e457cf00","line":111,"in_reply_to":"9a80dd14_0d7b88f5","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"75c9e073fb918e6268684e7e051c6d6d4182b37c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    __table_args__ \u003d ("},{"line_number":49,"context_line":"        sa.UniqueConstraint("},{"line_number":50,"context_line":"            first_ip, allocation_pool_id,"},{"line_number":51,"context_line":"            name\u003d\u0027unique_first_ip_pool_id\u0027),"},{"line_number":52,"context_line":"        sa.UniqueConstraint("},{"line_number":53,"context_line":"            last_ip, allocation_pool_id,"},{"line_number":54,"context_line":"            name\u003d\u0027unique_last_ip_pool_id\u0027),"}],"source_content_type":"text/x-python","patch_set":17,"id":"9aa53dc9_19365fe6","line":51,"updated":"2015-04-08 12:59:26.000000000","message":"this should be also updated","commit_id":"cfa73360e439ce8f2e07ed7e618d6d25972321d3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"531a326ab78f4feb5854bd5ea7a943ff5e21b4a7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      data redundancy."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                                  sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":97,"context_line":"                                                ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                                  nullable\u003dTrue)"},{"line_number":99,"context_line":"    allocation_pools \u003d sa_orm.relationship(IpamAllocationPool,"}],"source_content_type":"text/x-python","patch_set":23,"id":"7ad32947_6ac5d159","line":96,"updated":"2015-04-27 22:31:01.000000000","message":"See PS11.","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b8b6f06ab36381eba4702cdf746ee0956bfcc5ec","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      data redundancy."},{"line_number":94,"context_line":"    \"\"\""},{"line_number":95,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                                  sa.ForeignKey(\u0027subnets.id\u0027,"},{"line_number":97,"context_line":"                                                ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                                  nullable\u003dTrue)"},{"line_number":99,"context_line":"    allocation_pools \u003d sa_orm.relationship(IpamAllocationPool,"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aca2d91_93aa9d18","line":96,"in_reply_to":"7ad32947_6ac5d159","updated":"2015-05-06 16:33:27.000000000","message":"Removed ForeignKey constraint according to PS11","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"531a326ab78f4feb5854bd5ea7a943ff5e21b4a7","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                                           cascade\u003d\u0027delete\u0027)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class IPRequest(model_base.BASEV2):"},{"line_number":106,"context_line":"    \"\"\"Model class for IP Allocation requests. \"\"\""},{"line_number":107,"context_line":"    ip_address \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":108,"context_line":"    status \u003d sa.Column(sa.String(36))"}],"source_content_type":"text/x-python","patch_set":23,"id":"7ad32947_3374f49a","line":105,"updated":"2015-04-27 22:31:01.000000000","message":"Should this start with Ipam?  IpamIpRequest?","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b8b6f06ab36381eba4702cdf746ee0956bfcc5ec","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                                           cascade\u003d\u0027delete\u0027)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class IPRequest(model_base.BASEV2):"},{"line_number":106,"context_line":"    \"\"\"Model class for IP Allocation requests. \"\"\""},{"line_number":107,"context_line":"    ip_address \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":108,"context_line":"    status \u003d sa.Column(sa.String(36))"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aca2d91_53c76512","line":105,"in_reply_to":"7ad32947_3374f49a","updated":"2015-05-06 16:33:27.000000000","message":"Renamed to IpamAllocation according to PS11 for 599c6a226151_neutrodb_ipam.py","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"4c76a47d261aa19b08db7beb8a072ae36b32d398","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":61,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":62,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":63,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":64,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":65,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a0c5dc1_52e2af04","line":62,"updated":"2015-05-13 07:56:14.000000000","message":"s/tp/to/","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"570dc4b241490602c0c372d555581abbf47d457b","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# NOTE(salv-orlando): The following data model creates redundancy with"},{"line_number":61,"context_line":"# models_v2.IPAllocationPool. This level of data redundancy could be tolerated"},{"line_number":62,"context_line":"# considering that the following model is specific tp the  IPAM driver logic."},{"line_number":63,"context_line":"# It therefore represents an internal representation of a subnet allocation"},{"line_number":64,"context_line":"# pool and can therefore change in the future, where as"},{"line_number":65,"context_line":"# models_v2.IPAllocationPool is the representation of IP allocation pools in"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a0c5dc1_c4cb7452","line":62,"in_reply_to":"9a0c5dc1_52e2af04","updated":"2015-05-13 12:39:39.000000000","message":"Done","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"},{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"4c76a47d261aa19b08db7beb8a072ae36b32d398","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"       For subnet data persistency - such as cidr and gateway IP, the IPAM"},{"line_number":90,"context_line":"       driver relies on Neutron\u0027s subnet model as source of truth to limit"},{"line_number":91,"context_line":"      data redundancy."},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":94,"context_line":"                                  nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a0c5dc1_f2c88376","line":91,"updated":"2015-05-13 07:56:14.000000000","message":"check the indentation in the above comment.","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"570dc4b241490602c0c372d555581abbf47d457b","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"       For subnet data persistency - such as cidr and gateway IP, the IPAM"},{"line_number":90,"context_line":"       driver relies on Neutron\u0027s subnet model as source of truth to limit"},{"line_number":91,"context_line":"      data redundancy."},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    neutron_subnet_id \u003d sa.Column(sa.String(36),"},{"line_number":94,"context_line":"                                  nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a0c5dc1_84c57c3d","line":91,"in_reply_to":"9a0c5dc1_f2c88376","updated":"2015-05-13 12:39:39.000000000","message":"Done","commit_id":"0002ff7c28c96a6cf4b95caee285a1c7c85b7220"}],"neutron/ipam/drivers/neutrondb_ipam/driver.py":[{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"28553c10ba8b555dd155b1df6566b6e64dbf60a6","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":407,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":408,"context_line":"        \"\"\""},{"line_number":409,"context_line":"        pass"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def allocate_subnet(self, subnet_request):"},{"line_number":412,"context_line":"        \"\"\"Create an IPAMSubnet object for the provided cidr."}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_b300fa66","line":409,"updated":"2015-03-10 09:47:12.000000000","message":"Hi Salvatore, need this method to be implemented to move forward with IPAM  tesing.\nCurrently any ip allocation fails on:\n\nipam_subnet \u003d ipam_driver.get_subnet(ip[\u0027subnet_cidr\u0027])\n\nallocated_ip \u003d ipam_subnet.allocate(ip_request)\n\nCauses:\n\n\u003eAttributeError: \u0027NoneType\u0027 object has no attribute \u0027allocate\u0027","commit_id":"5d75eb4f112c68dcb968932ce3eceaa96822502e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        return ipam.SpecificSubnetRequest("},{"line_number":369,"context_line":"            cidr, tenant_id, self._neutron_subnet_id, gateway_ip, self.pools)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def associate_neutron_subnet(self, subnet_id):"},{"line_number":372,"context_line":"        \"\"\"Set neutron identifier for this subnet\"\"\""},{"line_number":373,"context_line":"        session \u003d db_api.get_session()"},{"line_number":374,"context_line":"        self.subnet_manager.associate_neutron_id(session, subnet_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_6374a29c","line":371,"updated":"2015-03-11 18:55:27.000000000","message":"No one calls this except in test_neutron_db_ipam_driver.  I had a question in the base class about why this is needed.  Now, I wonder even more if it is needed.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3cf8b7e228f1a1b9836b112b72b89b63c6e96b2a","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        return ipam.SpecificSubnetRequest("},{"line_number":369,"context_line":"            cidr, tenant_id, self._neutron_subnet_id, gateway_ip, self.pools)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def associate_neutron_subnet(self, subnet_id):"},{"line_number":372,"context_line":"        \"\"\"Set neutron identifier for this subnet\"\"\""},{"line_number":373,"context_line":"        session \u003d db_api.get_session()"},{"line_number":374,"context_line":"        self.subnet_manager.associate_neutron_id(session, subnet_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_08d6234f","line":371,"in_reply_to":"9a80dd14_1f30779d","updated":"2015-03-13 21:45:21.000000000","message":"That helps.  Thanks for the context.  I guess with the foreign key constraint, you couldn\u0027t just create the association with the subnet_id before the subnet object is actually written to the db.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        return ipam.SpecificSubnetRequest("},{"line_number":369,"context_line":"            cidr, tenant_id, self._neutron_subnet_id, gateway_ip, self.pools)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def associate_neutron_subnet(self, subnet_id):"},{"line_number":372,"context_line":"        \"\"\"Set neutron identifier for this subnet\"\"\""},{"line_number":373,"context_line":"        session \u003d db_api.get_session()"},{"line_number":374,"context_line":"        self.subnet_manager.associate_neutron_id(session, subnet_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_1f30779d","line":371,"in_reply_to":"9a80dd14_6374a29c","updated":"2015-03-12 09:09:41.000000000","message":"Err... indeed this is not wired yet in the db base plugin ;)\n\nBasically with Pavel we discussed the workflow for creating a subnet, and we have a bit of a chicken and egg problem.\nNeutron needs to ask IPAM to allocate the subnet, but it does not have yet a subnet DB object - because it lacks allocation pools, which have to be determined by the IPAM driver.\n\nso the IPAM driver allocate a subnet which still does not exist in neutron.\nOnce that is done, neutron creates the DB subnet, and associates it with the IPAM subnet.\n\nNote that since drivers can interact with 3rd parties we\u0027re not going to call them from within databse transaction. Database transactions have to be as fast as possible, we cannot make HTTP calls inside them which can potentially time out. Also, there is still that little eventlet issue which leads to lock wait timeouts.\n\nThe alternative approach would be to split the neutron DB transaction in two, and use the following workflow\n\n1) Create Neutron Subnet model *ONLY*\n2) Call IPAM driver to allocate subnet and pools\n3) Complete neutron allocation storing pool info\n\nAs these will be 3 split transactions, we\u0027d need to do some tricky things to ensure subnets created at step 1 but before the API call is completed are not exposed through the API, because of atomicity","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    @utils.synchronized(\u0027ipamdriver\u0027)"},{"line_number":388,"context_line":"    def _create_driver_instance(cls):"},{"line_number":389,"context_line":"        # This is ugly at the moment, but as in the future the pool id will be"},{"line_number":390,"context_line":"        # make compulsory it might be better to pass a \"None\" pool id"},{"line_number":391,"context_line":"        cls._driver_instance \u003d cls(subnet_pool_id\u003dNone)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_38b9f02e","line":390,"updated":"2015-03-11 18:55:27.000000000","message":"The plan currently is to always pass a None pool_id for backwards compatible operation.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    @utils.synchronized(\u0027ipamdriver\u0027)"},{"line_number":388,"context_line":"    def _create_driver_instance(cls):"},{"line_number":389,"context_line":"        # This is ugly at the moment, but as in the future the pool id will be"},{"line_number":390,"context_line":"        # make compulsory it might be better to pass a \"None\" pool id"},{"line_number":391,"context_line":"        cls._driver_instance \u003d cls(subnet_pool_id\u003dNone)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_5fe10ffd","line":390,"in_reply_to":"9a80dd14_38b9f02e","updated":"2015-03-12 09:09:41.000000000","message":"well, at some point we want to stop being backward compatible...","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f19c54b986d5eca8cb43daba8e1e5f95168b7bd9","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            cls._create_driver_instance()"},{"line_number":401,"context_line":"        return cls._driver_instance"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def get_subnet(self, cidr):"},{"line_number":404,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        :param cidr: subnet\u0027s CIDR"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_782b68eb","line":403,"updated":"2015-03-11 18:55:27.000000000","message":"My email to the ML suggests passing subnet_id as an alternate identifier here to deal with potential overlap. \n\n  def get_subnet(self, cidr, identifier):\n\nI\u0027d like your thoughts on that.  Other IPAM systems may ignore it.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4bf6606fb94d6e117953fab8695bbf198566bc89","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            cls._create_driver_instance()"},{"line_number":401,"context_line":"        return cls._driver_instance"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def get_subnet(self, cidr):"},{"line_number":404,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        :param cidr: subnet\u0027s CIDR"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_a083b054","line":403,"updated":"2015-03-12 19:30:11.000000000","message":"sounds like the signature is different now?","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e83c1bac93a63ea7b61cd3273eed23d60dd7b582","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            cls._create_driver_instance()"},{"line_number":401,"context_line":"        return cls._driver_instance"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def get_subnet(self, cidr):"},{"line_number":404,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        :param cidr: subnet\u0027s CIDR"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_7fced384","line":403,"in_reply_to":"9a80dd14_782b68eb","updated":"2015-03-12 09:09:41.000000000","message":"I think that email has diverged into a confusion regarding where restrictions on cidr overlaps should apply... what\u0027s this identifier in your view? A neutron subnet id, or an ipam-specific id? I just ened to know that so that I can code around accordingly. Both work for me.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3cf8b7e228f1a1b9836b112b72b89b63c6e96b2a","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            cls._create_driver_instance()"},{"line_number":401,"context_line":"        return cls._driver_instance"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def get_subnet(self, cidr):"},{"line_number":404,"context_line":"        \"\"\"Simply create an IPAMSubnet object for the provided cidr."},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        :param cidr: subnet\u0027s CIDR"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_e860efa6","line":403,"in_reply_to":"9a80dd14_7fced384","updated":"2015-03-13 21:45:21.000000000","message":"My suggestion is that the client will pass both the cidr and the subnet_id.  The combination of the two can be thought of as the identifier for the subnet.","commit_id":"51641b5f80890ab48f0964ef4e9636d31e98671c"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"707cd18e0ae4be7e368d9a774b300bf9af71a065","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        retry_interval\u003dipam_db_api.BASE_RETRY_INTERVAL,"},{"line_number":350,"context_line":"        max_retry_interval\u003dipam_db_api.MAX_RETRY_INTERVAL)"},{"line_number":351,"context_line":"    def allocate(self, address_request):"},{"line_number":352,"context_line":"        # NOTE(salv-orlando): Creating a new db session might be a rather"},{"line_number":353,"context_line":"        # dangerous thing to do, if executed from within another database"},{"line_number":354,"context_line":"        # transaction. Therefore  the IPAM driver should never be"},{"line_number":355,"context_line":"        # called from within a database transaction, which is also good"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_cbffcea9","line":352,"updated":"2015-03-19 11:27:16.000000000","message":"Each plugin uses construction like:\n\ndef _create_port_db(self, context, port):\n\n    with session.begin(subtransactions\u003dTrue):\n\n        result \u003d super(Ml2Plugin, self).create_port(context, port)\n\n        ...\n\nSo create_port() from db_base_plugin_v2.py is already wrapped up in db transaction.\nIn this case we can\u0027t ensure that allocate() is called outside db_transaction by refactoring only db_base_plugin_v2.py. In fact to achive that each plugin has to be reworked, also create_floatingip() from l3_db wraps create_port() into transaction and probably much more places work like that.","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":380,"context_line":"            # Create IP allocation request object"},{"line_number":381,"context_line":"            # The only defined status at this stage is \u0027ALLOCATED\u0027."},{"line_number":382,"context_line":"            # More states will be available in the future - e.g.: RECYCLABLE"},{"line_number":383,"context_line":"            self.subnet_manager.create_allocation(session, ip_address)"},{"line_number":384,"context_line":"        return ip_address"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def deallocate(self, address):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_838fad2d","line":383,"updated":"2015-03-18 15:14:27.000000000","message":"How do we ensure ip_address is not allocated between L368 and L383?\n\n... according to create_allocation implementation, it seems a DB integrity constraint error will be raised when it appends so do we need to verify if the ip is allocated a priori? \n\nIt seems we need to catch the db integrity constraint errors.","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":380,"context_line":"            # Create IP allocation request object"},{"line_number":381,"context_line":"            # The only defined status at this stage is \u0027ALLOCATED\u0027."},{"line_number":382,"context_line":"            # More states will be available in the future - e.g.: RECYCLABLE"},{"line_number":383,"context_line":"            self.subnet_manager.create_allocation(session, ip_address)"},{"line_number":384,"context_line":"        return ip_address"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def deallocate(self, address):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_7aa7aaa7","line":383,"in_reply_to":"9a80dd14_838fad2d","updated":"2015-03-18 19:49:16.000000000","message":"_allocate_specific_ip does a SELECT FOR UPDATE - this is indeed the same algorithm as before with a retry. I know several contributors have concerns over this approach but I have not been able to find a better non-locking approach. I tried some, and they all proved worse than retrying, even on multimaster nodes.\n\nIf it doesn\u0027t the write intent lock query that\u0027s because I changed the default behaviour in db_api and forgot to update the call.\n\nI\u0027ll check.","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        gw_ip \u003d int(netaddr.IPAddress(gateway_ip or net.last))"},{"line_number":64,"context_line":"        # Use the gw_ip to find a point for splitting allocation pools"},{"line_number":65,"context_line":"        # for this subnet"},{"line_number":66,"context_line":"        split_ip \u003d min(max(gw_ip, net.first), net.last)"},{"line_number":67,"context_line":"        if split_ip \u003e first_ip:"},{"line_number":68,"context_line":"            pools.append(netaddr.IPRange(first_ip, split_ip - 1))"},{"line_number":69,"context_line":"        if split_ip \u003c last_ip:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_1ed71dc0","line":66,"updated":"2015-03-20 18:06:46.000000000","message":"Looks like we do all the heavy lifting ourselves here. I would recommend to instead rely on netaddr. Specifically, generate IPSet for cidr, then substract gateway_ip from it, then call to iter_ipranges() to get the pools.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    pools \u003d cls._generate_pools(subnet_request.subnet,"},{"line_number":97,"context_line":"                                                subnet_request.gateway_ip)"},{"line_number":98,"context_line":"                else:"},{"line_number":99,"context_line":"                    pools \u003d subnet_request.allocation_pools"},{"line_number":100,"context_line":"                session.flush()"},{"line_number":101,"context_line":"                # Create IPAM allocation pools and availability ranges"},{"line_number":102,"context_line":"                cls.create_allocation_pools(subnet_manager, session, pools)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_feb0898c","line":99,"updated":"2015-03-20 18:06:46.000000000","message":"It does not seem that we enforce allocation_pools to exclude gateway_ip anywhere. Are we ok with it?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                   allocation_pools\u003dpools,"},{"line_number":135,"context_line":"                   subnet_id\u003dneutron_subnet_id)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, internal_id, cidr\u003dNone,"},{"line_number":138,"context_line":"                 allocation_pools\u003dNone, subnet_id\u003dNone):"},{"line_number":139,"context_line":"        # reference to the neutron plugin"},{"line_number":140,"context_line":"        # the plugin is used for access to Neutron resources such as subnets"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9e16ada5","line":137,"updated":"2015-03-20 18:06:46.000000000","message":"It\u0027s uncommon to have __init__ in the middle of a class. Can we move it to the top?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                   allocation_pools\u003dpools,"},{"line_number":135,"context_line":"                   subnet_id\u003dneutron_subnet_id)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, internal_id, cidr\u003dNone,"},{"line_number":138,"context_line":"                 allocation_pools\u003dNone, subnet_id\u003dNone):"},{"line_number":139,"context_line":"        # reference to the neutron plugin"},{"line_number":140,"context_line":"        # the plugin is used for access to Neutron resources such as subnets"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_04478b20","line":137,"in_reply_to":"9a80dd14_9e16ada5","updated":"2015-03-23 18:38:16.000000000","message":"sure","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        final_ranges \u003d []"},{"line_number":218,"context_line":"        if allocation_pool_id:"},{"line_number":219,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_allocation_pool("},{"line_number":220,"context_line":"                session, allocation_pool_id, locking\u003dTrue)"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_subnet_id("},{"line_number":223,"context_line":"                session, locking\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_c2b6ac24","line":220,"updated":"2015-03-20 00:59:30.000000000","message":"Should there be a LOCKING constant or something to make these consistent?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        final_ranges \u003d []"},{"line_number":218,"context_line":"        if allocation_pool_id:"},{"line_number":219,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_allocation_pool("},{"line_number":220,"context_line":"                session, allocation_pool_id, locking\u003dTrue)"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_subnet_id("},{"line_number":223,"context_line":"                session, locking\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_c40ad3d1","line":220,"in_reply_to":"9a80dd14_c2b6ac24","updated":"2015-03-23 18:38:16.000000000","message":"what\u0027s not consistent?\nDo you want a locking constant to replace the locking boolean parameter?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_allocation_pool("},{"line_number":220,"context_line":"                session, allocation_pool_id, locking\u003dTrue)"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_subnet_id("},{"line_number":223,"context_line":"                session, locking\u003dTrue)"},{"line_number":224,"context_line":"        for db_range in av_ranges:"},{"line_number":225,"context_line":"            initial_ip_set \u003d netaddr.IPSet(netaddr.IPRange("}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_3127c613","line":222,"updated":"2015-03-20 14:50:32.000000000","message":"by_subnet_id suffix is confusing for method with no subnet_id parameter","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_allocation_pool("},{"line_number":220,"context_line":"                session, allocation_pool_id, locking\u003dTrue)"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_subnet_id("},{"line_number":223,"context_line":"                session, locking\u003dTrue)"},{"line_number":224,"context_line":"        for db_range in av_ranges:"},{"line_number":225,"context_line":"            initial_ip_set \u003d netaddr.IPSet(netaddr.IPRange("}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_44f6e3d8","line":222,"in_reply_to":"9a80dd14_3127c613","updated":"2015-03-23 18:38:16.000000000","message":"makes sense.. by subnet_id can be dropped","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                session.delete(db_range)"},{"line_number":231,"context_line":"                continue"},{"line_number":232,"context_line":"            if initial_ip_set \u003d\u003d final_ip_set:"},{"line_number":233,"context_line":"                # IP address does not fall within the current range, move"},{"line_number":234,"context_line":"                # to the next one"},{"line_number":235,"context_line":"                final_ranges.append(db_range)"},{"line_number":236,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_85274cc6","line":233,"updated":"2015-03-20 14:50:32.000000000","message":"shoud exception be raised if ip address does not fall into any range?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                session.delete(db_range)"},{"line_number":231,"context_line":"                continue"},{"line_number":232,"context_line":"            if initial_ip_set \u003d\u003d final_ip_set:"},{"line_number":233,"context_line":"                # IP address does not fall within the current range, move"},{"line_number":234,"context_line":"                # to the next one"},{"line_number":235,"context_line":"                final_ranges.append(db_range)"},{"line_number":236,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_e4dd0f44","line":233,"in_reply_to":"9a80dd14_85274cc6","updated":"2015-03-23 18:38:16.000000000","message":"The condition you mention might occur when allocating a specific IP address which is either already taken or outside allocation pools.\nIn the first case _verify_ip will fail the operation.\nIn the second case, the way neutron does IPAM allows out of pool allocation and no range changes would be needed.\nI agree this is a bit awkward but I had a requirement to not change software behaviour\n\nWhen an address is generated automatically, an exception is raised if all the ranges are exhausted.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                # to the next one"},{"line_number":235,"context_line":"                final_ranges.append(db_range)"},{"line_number":236,"context_line":"                continue"},{"line_number":237,"context_line":"            for new_range in final_ip_set.iter_ipranges():"},{"line_number":238,"context_line":"                # store new range in database"},{"line_number":239,"context_line":"                # use netaddr.IPAddress format() method which is equivalent"},{"line_number":240,"context_line":"                # to str(...) but also enables us to use different"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_e0fb9678","line":237,"updated":"2015-03-20 14:50:32.000000000","message":"if initial db_range \u003d 10.0.0.2 - 10.0.0.10, target ip to allocate 10.0.0.5, then new ranges here will be 10.0.0.2 - 10.0.0.4 and 10.0.0.6 - 10.0.0.10, right? If so then condition at #244 will work for both new ranges and db_range will be updated 2 times. Is that expected?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                # to the next one"},{"line_number":235,"context_line":"                final_ranges.append(db_range)"},{"line_number":236,"context_line":"                continue"},{"line_number":237,"context_line":"            for new_range in final_ip_set.iter_ipranges():"},{"line_number":238,"context_line":"                # store new range in database"},{"line_number":239,"context_line":"                # use netaddr.IPAddress format() method which is equivalent"},{"line_number":240,"context_line":"                # to str(...) but also enables us to use different"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_3a101c4e","line":237,"in_reply_to":"9a80dd14_e0fb9678","updated":"2015-03-23 18:38:16.000000000","message":"this logic leverages the fact that in this condition you will be always creating a new range. So there is only one range that can be update, the other is always added - and since the first range always ends up matching the condition then the algorithm works.\n\nHowever, I will try to refactor the code in a way that it seems less magic","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                              new_ip_range[\u0027allocation_pool_id\u0027])"},{"line_number":259,"context_line":"                    final_ranges.append(new_ip_range)"},{"line_number":260,"context_line":"        # Most callers might ignore this return value, which is however"},{"line_number":261,"context_line":"        # useful for testing purposes"},{"line_number":262,"context_line":"        LOG.debug(\"Availability ranges for subnet id %(subnet_id)s \""},{"line_number":263,"context_line":"                  \"modified: %(new_ranges)s\","},{"line_number":264,"context_line":"                  {\u0027subnet_id\u0027: self.subnet_manager.neutron_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_22a94890","line":261,"updated":"2015-03-20 00:59:30.000000000","message":"Should the comment be down before L268?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                              new_ip_range[\u0027allocation_pool_id\u0027])"},{"line_number":259,"context_line":"                    final_ranges.append(new_ip_range)"},{"line_number":260,"context_line":"        # Most callers might ignore this return value, which is however"},{"line_number":261,"context_line":"        # useful for testing purposes"},{"line_number":262,"context_line":"        LOG.debug(\"Availability ranges for subnet id %(subnet_id)s \""},{"line_number":263,"context_line":"                  \"modified: %(new_ranges)s\","},{"line_number":264,"context_line":"                  {\u0027subnet_id\u0027: self.subnet_manager.neutron_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_5a1dd865","line":261,"in_reply_to":"9a80dd14_22a94890","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ca4c46c53f1f7e3aa8d0630d31a3473c9b4331dc","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                subnet_id\u003dself.subnet_manager.neutron_id)"},{"line_number":339,"context_line":"        # A suitable range was found. Return IP address."},{"line_number":340,"context_line":"        ip_address \u003d ip_range[\u0027first_ip\u0027]"},{"line_number":341,"context_line":"        LOG.debug(\"Allocated IP - %(ip_address)s from range \""},{"line_number":342,"context_line":"                  \"[%(first_ip)s; %(last_ip)s]\","},{"line_number":343,"context_line":"                  {\u0027ip_address\u0027: ip_address,"},{"line_number":344,"context_line":"                   \u0027first_ip\u0027: ip_address,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_003c2ae0","line":341,"updated":"2015-03-20 14:50:32.000000000","message":"in fact it was not yet allocated, just chosen, correct? (I know you like pedantry :P)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                subnet_id\u003dself.subnet_manager.neutron_id)"},{"line_number":339,"context_line":"        # A suitable range was found. Return IP address."},{"line_number":340,"context_line":"        ip_address \u003d ip_range[\u0027first_ip\u0027]"},{"line_number":341,"context_line":"        LOG.debug(\"Allocated IP - %(ip_address)s from range \""},{"line_number":342,"context_line":"                  \"[%(first_ip)s; %(last_ip)s]\","},{"line_number":343,"context_line":"                  {\u0027ip_address\u0027: ip_address,"},{"line_number":344,"context_line":"                   \u0027first_ip\u0027: ip_address,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_1a3a80cd","line":341,"in_reply_to":"9a80dd14_003c2ae0","updated":"2015-03-23 18:38:16.000000000","message":"duly noted","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                   \u0027last_ip\u0027: ip_range[\u0027last_ip\u0027]})"},{"line_number":346,"context_line":"        return ip_address, ip_range[\u0027allocation_pool_id\u0027]"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    # NOTE(salv-orlando): This is the same decorator used elsewhere in"},{"line_number":349,"context_line":"    # openstack projects. It is used in this driver to perform transaction"},{"line_number":350,"context_line":"    # retry in case write intent locks result in a deadlock failure in"},{"line_number":351,"context_line":"    # multimaster clusters."}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_42a63c10","line":348,"updated":"2015-03-20 00:59:30.000000000","message":"nit:  Is this note relevant anymore?  I remember it was good to see when you had the implementation copied in to this file.  Now, I think most of this is self-explanatory just from using the decorator.  Hopefully, the decorator itself is reasonably described at the source.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                   \u0027last_ip\u0027: ip_range[\u0027last_ip\u0027]})"},{"line_number":346,"context_line":"        return ip_address, ip_range[\u0027allocation_pool_id\u0027]"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    # NOTE(salv-orlando): This is the same decorator used elsewhere in"},{"line_number":349,"context_line":"    # openstack projects. It is used in this driver to perform transaction"},{"line_number":350,"context_line":"    # retry in case write intent locks result in a deadlock failure in"},{"line_number":351,"context_line":"    # multimaster clusters."}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_5a34f8dd","line":348,"in_reply_to":"9a80dd14_42a63c10","updated":"2015-03-23 18:38:16.000000000","message":"I can remove it","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":378,"context_line":"                    # The IPAM driver assumes that the caller generates an"},{"line_number":379,"context_line":"                    # address for this class of subnets (eg.: eui-64)"},{"line_number":380,"context_line":"                    raise ipam_exc.InvalidAddressRequest("},{"line_number":381,"context_line":"                        reason\u003d(\"The IPAM driver is unable to generate IP \""},{"line_number":382,"context_line":"                                \"addresses on subnet %s as it is configured \""},{"line_number":383,"context_line":"                                \"for automatic address mode\" %"},{"line_number":384,"context_line":"                                self.subnet_manager.neutron_id))"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_e24e506e","line":381,"updated":"2015-03-20 00:59:30.000000000","message":"Do you think someone will ask for translations for these?  They seem written to be seen by the end user but I imagine that this situation would actually be more of a programmer error than a user error.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":378,"context_line":"                    # The IPAM driver assumes that the caller generates an"},{"line_number":379,"context_line":"                    # address for this class of subnets (eg.: eui-64)"},{"line_number":380,"context_line":"                    raise ipam_exc.InvalidAddressRequest("},{"line_number":381,"context_line":"                        reason\u003d(\"The IPAM driver is unable to generate IP \""},{"line_number":382,"context_line":"                                \"addresses on subnet %s as it is configured \""},{"line_number":383,"context_line":"                                \"for automatic address mode\" %"},{"line_number":384,"context_line":"                                self.subnet_manager.neutron_id))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_1a41a039","line":381,"in_reply_to":"9a80dd14_e24e506e","updated":"2015-03-23 18:38:16.000000000","message":"I think we can enable the translation for this string.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"19b35bf4f595be6e4004300eb04d90df0cfcad26","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                                \"addresses on subnet %s as it is configured \""},{"line_number":383,"context_line":"                                \"for automatic address mode\" %"},{"line_number":384,"context_line":"                                self.subnet_manager.neutron_id))"},{"line_number":385,"context_line":"                ip_address, all_pool_id \u003d self._generate_ip(session)"},{"line_number":386,"context_line":"            self._allocate_specific_ip(session, ip_address, all_pool_id)"},{"line_number":387,"context_line":"            # Create IP allocation request object"},{"line_number":388,"context_line":"            # The only defined status at this stage is \u0027ALLOCATED\u0027."}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_82f594cc","line":385,"updated":"2015-03-20 00:59:30.000000000","message":"I was scratching my head trying to figure out what an \"all_pool_id\" was.  maybe \"alloc_pool_id\" or \"allocation_pool_id\" would be better?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                                \"addresses on subnet %s as it is configured \""},{"line_number":383,"context_line":"                                \"for automatic address mode\" %"},{"line_number":384,"context_line":"                                self.subnet_manager.neutron_id))"},{"line_number":385,"context_line":"                ip_address, all_pool_id \u003d self._generate_ip(session)"},{"line_number":386,"context_line":"            self._allocate_specific_ip(session, ip_address, all_pool_id)"},{"line_number":387,"context_line":"            # Create IP allocation request object"},{"line_number":388,"context_line":"            # The only defined status at this stage is \u0027ALLOCATED\u0027."}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_3a3e5cb9","line":385,"in_reply_to":"9a80dd14_82f594cc","updated":"2015-03-23 18:38:16.000000000","message":"sure. I forgot \"all\" is an english word.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    def update_allocation_pools(self, pools):"},{"line_number":409,"context_line":"        # Pools have already been validated in the subnet request object which"},{"line_number":410,"context_line":"        # was sent to the subnet pool driver. Further validation should not be"},{"line_number":411,"context_line":"        # required."},{"line_number":412,"context_line":"        session \u003d db_api.get_session()"},{"line_number":413,"context_line":"        with session.begin():"},{"line_number":414,"context_line":"            self.subnet_manager.delete_allocation_pools(session)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_c1a84a8e","line":411,"updated":"2015-03-20 18:06:46.000000000","message":"Should it be an internal method?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    def update_allocation_pools(self, pools):"},{"line_number":409,"context_line":"        # Pools have already been validated in the subnet request object which"},{"line_number":410,"context_line":"        # was sent to the subnet pool driver. Further validation should not be"},{"line_number":411,"context_line":"        # required."},{"line_number":412,"context_line":"        session \u003d db_api.get_session()"},{"line_number":413,"context_line":"        with session.begin():"},{"line_number":414,"context_line":"            self.subnet_manager.delete_allocation_pools(session)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_1a68c0b9","line":411,"in_reply_to":"9a80dd14_c1a84a8e","updated":"2015-03-23 18:38:16.000000000","message":"maybe","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        self._pools \u003d pools"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def get_details(self):"},{"line_number":419,"context_line":"        \"\"\"Return subnet data as a SpecificSubnetRequest\"\"\""},{"line_number":420,"context_line":"        tenant_id \u003d None"},{"line_number":421,"context_line":"        gateway_ip \u003d None"},{"line_number":422,"context_line":"        if self.subnet_manager.neutron_id:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_e199ce6d","line":419,"updated":"2015-03-20 18:06:46.000000000","message":"(No action required) It raises a question whether the class has a proper name. Maybe SpecificSubnetInfo would be less confusing.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        self._pools \u003d pools"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def get_details(self):"},{"line_number":419,"context_line":"        \"\"\"Return subnet data as a SpecificSubnetRequest\"\"\""},{"line_number":420,"context_line":"        tenant_id \u003d None"},{"line_number":421,"context_line":"        gateway_ip \u003d None"},{"line_number":422,"context_line":"        if self.subnet_manager.neutron_id:"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_5a907895","line":419,"in_reply_to":"9a80dd14_e199ce6d","updated":"2015-03-23 18:38:16.000000000","message":"I raised the same question on the driver interface review.\nI think we can tweak the interface to this aim (specifically I think that the whole get_details method might be replaced by getters for the attributes one needs to retrieve)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    @utils.synchronized(\u0027ipamdriver\u0027)"},{"line_number":447,"context_line":"    def _create_driver_instance(cls):"},{"line_number":448,"context_line":"        # This is ugly at the moment, but as in the future the pool id will be"},{"line_number":449,"context_line":"        # make compulsory it might be better to pass a \"None\" pool id"},{"line_number":450,"context_line":"        cls._driver_instance \u003d cls(subnet_pool_id\u003dNone)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_1b5acf4f","line":449,"updated":"2015-03-20 18:06:46.000000000","message":"nit: make -\u003e made, might -\u003e may","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    @utils.synchronized(\u0027ipamdriver\u0027)"},{"line_number":447,"context_line":"    def _create_driver_instance(cls):"},{"line_number":448,"context_line":"        # This is ugly at the moment, but as in the future the pool id will be"},{"line_number":449,"context_line":"        # make compulsory it might be better to pass a \"None\" pool id"},{"line_number":450,"context_line":"        cls._driver_instance \u003d cls(subnet_pool_id\u003dNone)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_9ae9101d","line":449,"in_reply_to":"9a80dd14_1b5acf4f","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        This method does not actually do any operation in the driver, given"},{"line_number":474,"context_line":"        its simplified nature."},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":477,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":478,"context_line":"        \"\"\""},{"line_number":479,"context_line":"        # SubnetRequest must be an instance of SpecificSubnet"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_be5451fe","line":476,"updated":"2015-03-20 18:06:46.000000000","message":"may I ask you to describe types of arguments in this class in addition to their intent?","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        This method does not actually do any operation in the driver, given"},{"line_number":474,"context_line":"        its simplified nature."},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":477,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":478,"context_line":"        \"\"\""},{"line_number":479,"context_line":"        # SubnetRequest must be an instance of SpecificSubnet"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_daf38808","line":476,"in_reply_to":"9a80dd14_be5451fe","updated":"2015-03-23 18:38:16.000000000","message":"no you can\u0027t! ;)","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":476,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":477,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":478,"context_line":"        \"\"\""},{"line_number":479,"context_line":"        # SubnetRequest must be an instance of SpecificSubnet"},{"line_number":480,"context_line":"        if not isinstance(subnet_request, ipam.SpecificSubnetRequest):"},{"line_number":481,"context_line":"            raise ipam_exc.InvalidSubnetRequestType("},{"line_number":482,"context_line":"                subnet_type\u003dtype(subnet_request))"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_bea291f9","line":479,"updated":"2015-03-20 18:06:46.000000000","message":"nit: it\u0027s obvious from the code below. I guess you should remove the comment.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":476,"context_line":"        :param cidr: subnet\u0027s CIDR"},{"line_number":477,"context_line":"        :returns: a NeutronDbSubnet instance"},{"line_number":478,"context_line":"        \"\"\""},{"line_number":479,"context_line":"        # SubnetRequest must be an instance of SpecificSubnet"},{"line_number":480,"context_line":"        if not isinstance(subnet_request, ipam.SpecificSubnetRequest):"},{"line_number":481,"context_line":"            raise ipam_exc.InvalidSubnetRequestType("},{"line_number":482,"context_line":"                subnet_type\u003dtype(subnet_request))"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_7995413f","line":479,"in_reply_to":"9a80dd14_bea291f9","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        return NeutronDbSubnet.create_from_subnet_request(subnet_request)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def update_subnet(self, subnet_request):"},{"line_number":486,"context_line":"        \"\"\"Update subnet info the in the IPAM driver."},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        The only update subnet information the driver needs to be aware of"},{"line_number":489,"context_line":"        are allocation pools."}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9eedcd27","line":486,"updated":"2015-03-20 18:06:46.000000000","message":"nit: the -\u003e \u0027\u0027","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        return NeutronDbSubnet.create_from_subnet_request(subnet_request)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def update_subnet(self, subnet_request):"},{"line_number":486,"context_line":"        \"\"\"Update subnet info the in the IPAM driver."},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        The only update subnet information the driver needs to be aware of"},{"line_number":489,"context_line":"        are allocation pools."}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_9992fd55","line":486,"in_reply_to":"9a80dd14_9eedcd27","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"399fd7dbf01e956cbb5b338a90c2742411d4e087","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def _read_neutron_subnet(self, session\u003dNone):"},{"line_number":158,"context_line":"        neutron_subnet \u003d self._fetch_subnet(session)"},{"line_number":159,"context_line":"        self._cidr \u003d neutron_subnet[\u0027cidr\u0027]"},{"line_number":160,"context_line":"        self._auto_address \u003d ipv6_utils.is_auto_address_subnet(neutron_subnet)"},{"line_number":161,"context_line":"        return neutron_subnet"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _fetch_subnet(self, session):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aaa499b_606a4ab5","line":160,"updated":"2015-04-14 17:14:14.000000000","message":"Do we need this?  I still don\u0027t think that IPAM should have to know this about the subnet.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"4bc223a8adccd3041b4491329ea96d98a7a64e05","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def _read_neutron_subnet(self, session\u003dNone):"},{"line_number":158,"context_line":"        neutron_subnet \u003d self._fetch_subnet(session)"},{"line_number":159,"context_line":"        self._cidr \u003d neutron_subnet[\u0027cidr\u0027]"},{"line_number":160,"context_line":"        self._auto_address \u003d ipv6_utils.is_auto_address_subnet(neutron_subnet)"},{"line_number":161,"context_line":"        return neutron_subnet"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _fetch_subnet(self, session):"}],"source_content_type":"text/x-python","patch_set":19,"id":"5aa745d1_a8dbe01a","line":160,"in_reply_to":"7aaa499b_606a4ab5","updated":"2015-04-16 12:32:10.000000000","message":"I would vote for this too. \nDetecting auto_address request by ipv6_utils.is_eui64_address() can make fetching subnet no longer needed in most cases.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"399fd7dbf01e956cbb5b338a90c2742411d4e087","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"7aaa499b_406f4e92","line":208,"updated":"2015-04-14 17:14:14.000000000","message":"Instead of relying on knowledge that Neutron has marked the subnet as an auto-address subnet, could we do something different?\n\nI propose we write a method called \"isEui64Address(...)\" that returns true if the address passed falls in the Eui64 space.  Then we rewrite this as this:\n\n  if ipv6_utils.is_eui64_address(ip_address):\n      return\n\nThen, IPAM would support subnets with both eui-64 addresses and specifically allocated addresses that are not eui-64 for things like routers, dns, and other infrastructure stuff.\n\nIt makes IPAM less intimately tied to this auto-address attribute on the subnet which is really a Neutron thing.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"959441501636ed59da372c6abceab660b984d49a","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"1aca2d91_b96e602d","line":208,"in_reply_to":"1aca2d91_5035e8d7","updated":"2015-05-07 19:27:57.000000000","message":"Makes sense. So we can go with the EUI-64 detection, so that the driver is still called but the reference driver doesn\u0027t need to understand that flag.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"725538a6f7a7671704c8348928a10733b3370f22","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"1aca2d91_ca9c9c5f","line":208,"in_reply_to":"1aca2d91_b96e602d","updated":"2015-05-07 20:31:01.000000000","message":"+1","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"c732aae37d9d00eb5ab8bc2e9f00e98002de5bd0","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"1aca2d91_49587a32","line":208,"in_reply_to":"1aca2d91_ca9c9c5f","updated":"2015-05-08 16:34:19.000000000","message":"Done in PS27","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":12912,"name":"John Belamaric","email":"jbelamaric@infoblox.com","username":"johnbelamaric"},"change_message_id":"1c5f6de7679be607c5f11129ad0986dded9514bd","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"3acd31a7_d62e4742","line":208,"in_reply_to":"3acd31a7_7deab6ad","updated":"2015-05-05 14:33:09.000000000","message":"While an IPAM system is not going to control the auto-addressing, the user may want to have visibility in their IPAM system into the auto-addresses, particularly for prefixes that are not link-local. Without this call I don\u0027t see how that can be done.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4c12f46f000b527c7867a1c0113f577a4f93a400","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"1aca2d91_5035e8d7","line":208,"in_reply_to":"3acd31a7_d62e4742","updated":"2015-05-07 16:03:55.000000000","message":"Looking at it from a programming API perspective, I think it is good to give the IPAM driver an opportunity to see the allocation even if it is automatic.  From the reference implementation perspective, I think it is fine to just ignore it.  That is just my opinion though.\n\nThe current proposal ignores it.  My proposal to detect EUI-64 addresses also ignores it.  So, it doesn\u0027t change that aspect of it.  It just makes the reference implementation less aware of Neutron internals.  I think that is a good thing.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"66f1cca13f244e4316f51bf3637c7f2639600b16","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"bab921fb_6e0f17e2","line":208,"in_reply_to":"7aaa499b_406f4e92","updated":"2015-04-23 14:17:55.000000000","message":"Carl, not sure if it is possible to detect if address is eui64 for sure.\nUsually EUI-64 address can be detected by \u0027FF:FE\u0027 in the middle of the second 64 bit part of IPv6 address.\nBut I have not seen any restriction which could disallow setting such address manually (which looks like EUI-64, but was not generated from MAC and used not in SLAAC subnets).\nIn this case this check can not be reliable.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"696bfd1cbea7b560f3c52f9ef8d20f3dd52fd179","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"3acd31a7_7deab6ad","line":208,"in_reply_to":"7ad32947_e72a3a2c","updated":"2015-05-05 13:07:17.000000000","message":"I would say that in general doing nothing when calling allocate_specific_ip does not make a lot sense. Then my vote would be for neutron to not call at all the IPAM driver for subnets with automatic address.\nWe shall simply not worry anymore about auto_address.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0f77050c5faa9e790edc881298ff87d7dea4b16b","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        \"\"\""},{"line_number":206,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":207,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":208,"context_line":"        if self._auto_address:"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":19,"id":"7ad32947_e72a3a2c","line":208,"in_reply_to":"bab921fb_6e0f17e2","updated":"2015-04-27 20:05:59.000000000","message":"I think that convention is the only guard against it currently but I\u0027m not sure that is a bad thing.  Personally, I don\u0027t think there is any good reason to use the eui64 address space for anything but eui64 addresses that correspond to the actually L2 address in use.  Would it be better if we formalized it by actively rejecting requests for address from this space?\n\nI vote we don\u0027t worry about this case and note somewhere that using this address space for something other than eui64 is not supported.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"399fd7dbf01e956cbb5b338a90c2742411d4e087","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":375,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":376,"context_line":"            else:"},{"line_number":377,"context_line":"                if self._auto_address:"},{"line_number":378,"context_line":"                    # The IPAM driver assumes that the caller generates an"},{"line_number":379,"context_line":"                    # address for this class of subnets (eg.: eui-64)"},{"line_number":380,"context_line":"                    raise ipam_exc.InvalidAddressRequest("}],"source_content_type":"text/x-python","patch_set":19,"id":"7aaa499b_009ca667","line":377,"updated":"2015-04-14 17:14:14.000000000","message":"At this point, I think this is a programming error.  Neutron shouldn\u0027t be making this request for an \"auto-address\" subnet.\n\nDown the road, Neutron may want to support subnets that mix eui-64 and specifically allocated addresses for other purposes.  I think IPAM should be fine with this.\n\nIn my opinion, we don\u0027t need to make this check here, do we?  Is there a reason for it?","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"696bfd1cbea7b560f3c52f9ef8d20f3dd52fd179","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                ip_address \u003d str(address_request.address)"},{"line_number":375,"context_line":"                self._verify_ip(session, ip_address)"},{"line_number":376,"context_line":"            else:"},{"line_number":377,"context_line":"                if self._auto_address:"},{"line_number":378,"context_line":"                    # The IPAM driver assumes that the caller generates an"},{"line_number":379,"context_line":"                    # address for this class of subnets (eg.: eui-64)"},{"line_number":380,"context_line":"                    raise ipam_exc.InvalidAddressRequest("}],"source_content_type":"text/x-python","patch_set":19,"id":"3acd31a7_9d9d920c","line":377,"in_reply_to":"7aaa499b_009ca667","updated":"2015-05-05 13:07:17.000000000","message":"We are doing this check because we are under the assumption that neutron will always call the IPAM driver.\nIf we can remove that assumption this check is not needed anymore. I believe it has not been decided whether EUI-64 addresses are or not in the realm of IPAM. \nThe other side of the story is that neutron should just defer anything address-related to the IPAM driver.\n\nI am fine anyway, this is a minor technical detail in my opinion.\nanyway, as you said this is a programming error, I am offended and I won\u0027t talk to you anymore!","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"ab60d314c7bbb61ce2a4d5348d229e4babdbe7df","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        \"\"\"Return subnet data as a SpecificSubnetRequest\"\"\""},{"line_number":420,"context_line":"        tenant_id \u003d None"},{"line_number":421,"context_line":"        gateway_ip \u003d None"},{"line_number":422,"context_line":"        if self.subnet_manager.neutron_id:"},{"line_number":423,"context_line":"            neutron_subnet \u003d self._read_neutron_subnet()"},{"line_number":424,"context_line":"            tenant_id \u003d neutron_subnet[\u0027tenant_id\u0027]"},{"line_number":425,"context_line":"            gateway_ip \u003d neutron_subnet[\u0027gateway_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"dac4157f_7a08a391","line":422,"updated":"2015-04-22 09:09:02.000000000","message":"To generate SpecificSubnetRequest from IPAMSubnet tenant_id and gateway_ip has to be read from Neutron Subnet, so even if _auto_address part is reworked, neutron subnet still has to be fetched from database.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0f77050c5faa9e790edc881298ff87d7dea4b16b","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        \"\"\"Return subnet data as a SpecificSubnetRequest\"\"\""},{"line_number":420,"context_line":"        tenant_id \u003d None"},{"line_number":421,"context_line":"        gateway_ip \u003d None"},{"line_number":422,"context_line":"        if self.subnet_manager.neutron_id:"},{"line_number":423,"context_line":"            neutron_subnet \u003d self._read_neutron_subnet()"},{"line_number":424,"context_line":"            tenant_id \u003d neutron_subnet[\u0027tenant_id\u0027]"},{"line_number":425,"context_line":"            gateway_ip \u003d neutron_subnet[\u0027gateway_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"7ad32947_47b68edd","line":422,"in_reply_to":"dac4157f_7a08a391","updated":"2015-04-27 20:05:59.000000000","message":"Agreed.  However, we can still remove _read_neutron_subnet from the __init__ code path on L155 which should remove it from from the code paths where you\u0027ve seen problems.","commit_id":"d888833625bff3268ef570cae576caabb1a820cc"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"531a326ab78f4feb5854bd5ea7a943ff5e21b4a7","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def _read_neutron_subnet(self, session\u003dNone):"},{"line_number":158,"context_line":"        neutron_subnet \u003d self._fetch_subnet(session)"},{"line_number":159,"context_line":"        self._cidr \u003d neutron_subnet[\u0027cidr\u0027]"},{"line_number":160,"context_line":"        self._auto_address \u003d ipv6_utils.is_auto_address_subnet(neutron_subnet)"},{"line_number":161,"context_line":"        return neutron_subnet"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _fetch_subnet(self, session):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7ad32947_535f700e","line":160,"updated":"2015-04-27 22:31:01.000000000","message":"See PS19","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"61936ce6a32ab0865e65a8194dbff9780f9077f9","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def _read_neutron_subnet(self, session\u003dNone):"},{"line_number":158,"context_line":"        neutron_subnet \u003d self._fetch_subnet(session)"},{"line_number":159,"context_line":"        self._cidr \u003d neutron_subnet[\u0027cidr\u0027]"},{"line_number":160,"context_line":"        self._auto_address \u003d ipv6_utils.is_auto_address_subnet(neutron_subnet)"},{"line_number":161,"context_line":"        return neutron_subnet"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _fetch_subnet(self, session):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a0c5dc1_28c7f513","line":160,"in_reply_to":"7ad32947_535f700e","updated":"2015-05-12 12:47:58.000000000","message":"Done","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"aa4da1b286de9d4d132e6b613810213e7526ecea","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        \"\"\""},{"line_number":171,"context_line":"        # Return immediately for subnets with automatic address mode. For this"},{"line_number":172,"context_line":"        # class of subnets availability ranges do not apply"},{"line_number":173,"context_line":"        if self._auto_address:"},{"line_number":174,"context_line":"            return"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        LOG.debug(\"Removing %(ip_address)s from availability ranges for \""}],"source_content_type":"text/x-python","patch_set":26,"id":"1aca2d91_ca85bc07","line":173,"updated":"2015-05-07 20:31:11.000000000","message":"On-going discussion in PS19 about this...","commit_id":"ea03559fcbf26a96ed378ab08682d3d7db77ae31"}],"neutron/ipam/exceptions.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class AddressCalculationFailure(exceptions.NeutronException):"},{"line_number":24,"context_line":"    message \u003d _(\"Unable to calculate %(address_type)s address because of:\""},{"line_number":25,"context_line":"                \"%(reason)s\")"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_3be233a0","line":24,"updated":"2015-03-20 18:06:46.000000000","message":"nit: space missing after :","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class AddressCalculationFailure(exceptions.NeutronException):"},{"line_number":24,"context_line":"    message \u003d _(\"Unable to calculate %(address_type)s address because of:\""},{"line_number":25,"context_line":"                \"%(reason)s\")"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_3983c905","line":24,"in_reply_to":"9a80dd14_3be233a0","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class AllocationOnAutoAddressSubnet(exceptions.NeutronException):"},{"line_number":56,"context_line":"    message \u003d (_(\"IPv6 address %(ip)s cannot be directly \""},{"line_number":57,"context_line":"                 \"assigned to a port on subnet %(subnet_id)s as the \""},{"line_number":58,"context_line":"                 \"subnet is configured for automatic addresses\"))"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_7b966bf1","line":56,"updated":"2015-03-20 18:06:46.000000000","message":"If it\u0027s specific to IPv6, then the class should be named appropriately.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class AllocationOnAutoAddressSubnet(exceptions.NeutronException):"},{"line_number":56,"context_line":"    message \u003d (_(\"IPv6 address %(ip)s cannot be directly \""},{"line_number":57,"context_line":"                 \"assigned to a port on subnet %(subnet_id)s as the \""},{"line_number":58,"context_line":"                 \"subnet is configured for automatic addresses\"))"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_b976d93c","line":56,"in_reply_to":"9a80dd14_7b966bf1","updated":"2015-03-23 18:38:16.000000000","message":"it\u0027s supposed to be called differently indeed.","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"}],"neutron/ipam/utils.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"cd0d4fac27211ad16b7cbc2060c2d6e2d6126975","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"},{"line_number":23,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"        # network or the broadcast address"},{"line_number":25,"context_line":"        return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_a4c38436","line":25,"updated":"2015-02-05 09:52:09.000000000","message":"you can use:\n\n  return net.network \u003c ip \u003c net.broadcast","commit_id":"386ac035b4ce95740641e0d117ac9c9537e5b613"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"211ac60b6bdf7f7b5d9ebeb5e2a608012672c1ad","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"},{"line_number":23,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"        # network or the broadcast address"},{"line_number":25,"context_line":"        return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_e3622915","line":25,"updated":"2015-03-18 15:14:27.000000000","message":"iirc, you can use:\n\n net.network \u003c ip \u003c net.broadcast\n\nwhich is clearer","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"47b9f638f6a2b275230ce454d8f9b15fb5c9bf7b","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"},{"line_number":23,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"        # network or the broadcast address"},{"line_number":25,"context_line":"        return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_3af2929b","line":25,"in_reply_to":"9a80dd14_e3622915","updated":"2015-03-18 19:49:16.000000000","message":"Done","commit_id":"352757028fe9dc606aad22fa7c90f97791422e0f"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"52e4245808cfb91b26e871f4b613ec7ae9a9b6a5","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"        # network or the broadcast address"},{"line_number":25,"context_line":"        return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_9b679f24","line":26,"updated":"2015-03-20 18:06:46.000000000","message":"-\u003e \u0027and ip in net\u0027","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"57d5f2d465182208f590284b7cd26cbe1f1549cc","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        # Check that the IP is valid on subnet. This cannot be the"},{"line_number":24,"context_line":"        # network or the broadcast address"},{"line_number":25,"context_line":"        return (ip !\u003d net.network and ip !\u003d net.broadcast"},{"line_number":26,"context_line":"                and net.netmask \u0026 ip \u003d\u003d net.network)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6ced46_19952d33","line":26,"in_reply_to":"9a80dd14_9b679f24","updated":"2015-03-23 18:38:16.000000000","message":"Done","commit_id":"5e13040a5fb88872f75cf46618e23486e4b32b48"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"531a326ab78f4feb5854bd5ea7a943ff5e21b4a7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def check_subnet_ip(cidr, ip_address):"},{"line_number":20,"context_line":"        \"\"\"Validate that the IP address is on the subnet.\"\"\""},{"line_number":21,"context_line":"        ip \u003d netaddr.IPAddress(ip_address)"},{"line_number":22,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"}],"source_content_type":"text/x-python","patch_set":23,"id":"7ad32947_73e70c41","line":19,"updated":"2015-04-27 22:31:01.000000000","message":"Duplicates a method in neutron/db/db_base_plugin_v2.py.  I\u0027m not too upset about it though.  :)","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"b8b6f06ab36381eba4702cdf746ee0956bfcc5ec","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def check_subnet_ip(cidr, ip_address):"},{"line_number":20,"context_line":"        \"\"\"Validate that the IP address is on the subnet.\"\"\""},{"line_number":21,"context_line":"        ip \u003d netaddr.IPAddress(ip_address)"},{"line_number":22,"context_line":"        net \u003d netaddr.IPNetwork(cidr)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aca2d91_3a403956","line":19,"in_reply_to":"7ad32947_73e70c41","updated":"2015-05-06 16:33:27.000000000","message":"Done","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"}],"neutron/tests/unit/ipam/drivers/neutrondb_ipam/test_db_api.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"531a326ab78f4feb5854bd5ea7a943ff5e21b4a7","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        pass"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_delete_allocation(self):"},{"line_number":56,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":23,"id":"7ad32947_b3f924cb","line":56,"updated":"2015-04-27 22:31:01.000000000","message":"Looks like they all pass.  We should hardcode all of our UT results like this, we\u0027d have a lot fewer failing tests.  ;)","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"61936ce6a32ab0865e65a8194dbff9780f9077f9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        pass"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_delete_allocation(self):"},{"line_number":56,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a0c5dc1_48e229a1","line":56,"in_reply_to":"7ad32947_b3f924cb","updated":"2015-05-12 12:47:58.000000000","message":"Done","commit_id":"2501891ad36e9a04bc4f0e13e19cf759208b9822"}],"neutron/tests/unit/test_ipam.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"531a326ab78f4feb5854bd5ea7a943ff5e21b4a7","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"class TestAddressRequest(base.BaseTestCase):"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    # This class doesn\u0027t test much.  At least running through all of the"},{"line_number":178,"context_line":"    # constructors may shake out some trivial bugs."},{"line_number":179,"context_line":"    def test_specific_address_ipv6(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"7ad32947_531770ed","side":"PARENT","line":176,"updated":"2015-04-27 22:31:01.000000000","message":"nit:  Shouldn\u0027t remove whitespace.","commit_id":"9563a7ae02da518ca20d2d8ec65c8a58312af927"}]}
