)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F9%2BUc%3D","line":10,"updated":"2014-03-31 20:38:20.000000000","message":"i think it makes sense to add a link in a form of\n implements bp blueprint-name","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"9807e502c7f6745bf38d490ed6ea23c298f1ed86","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F98b0%3D","line":10,"in_reply_to":"AAAAWH%2F9%2BUc%3D","updated":"2014-04-02 10:13:06.000000000","message":"DocImpact is also needed since new attribute is added to router.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F9jfQ%3D","line":10,"in_reply_to":"AAAAWH%2F9%2BUc%3D","updated":"2014-04-03 18:20:53.000000000","message":"How do I link the blueprint in the commit message.\nCan you provide me some tips.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F9je4%3D","line":10,"in_reply_to":"AAAAWH%2F98b0%3D","updated":"2014-04-03 18:20:53.000000000","message":"Can you provide me some handle on this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"910b1fd577c044840a165c304907f4a57b0e2fb4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAWH%2F9aG4%3D","line":10,"in_reply_to":"AAAAWH%2F9jfQ%3D","updated":"2014-04-04 18:14:23.000000000","message":"literally, put this line:\nimplemets bp l3-dvr-blabla\n\nwhere l3-dvr-blabla is the name or blueprint as it is registered on the launchpad","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAW3%2F%2F%2FFQ%3D","line":10,"updated":"2014-04-09 03:50:21.000000000","message":"Add: \n\nDocImpact\n\nimplements neutron-ovs-dvr","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact: implements neutron-ovs-dvr"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3ae8d1ca_716349dc","line":10,"updated":"2014-05-29 21:55:50.000000000","message":"nit:  git review keys off of the word Blueprint here and keeps setting the topic incorrectly.  Maybe \"This patch is a port of Neutron OVS Distributed Router.  Of course, with a proper \"Partially Implements\" line below, you could just take this out.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add L3 Extension for Distributed Routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact: implements neutron-ovs-dvr"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1ae5cdf2_01f94e4d","line":10,"in_reply_to":"3ae8d1ca_716349dc","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"5feffe7c170899a1d1531b3aaab7ee4f79a45f4e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact: implements neutron-ovs-dvr"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3ae8d1ca_58c59e8c","line":12,"updated":"2014-05-29 14:37:00.000000000","message":"Did you mean to have the DocImpact on a separate line and then also this:\n\npartially-implements neutron-ovs-dvr\n\n??","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact: implements neutron-ovs-dvr"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1ae5cdf2_2f4ab183","line":12,"in_reply_to":"3ae8d1ca_58c59e8c","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact: implements neutron-ovs-dvr"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3ae8d1ca_11468523","line":12,"in_reply_to":"3ae8d1ca_58c59e8c","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a part of Neutron OVS Distributed"},{"line_number":10,"context_line":"Router Blueprint neutron-ovs-dvr."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"DocImpact: implements neutron-ovs-dvr"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I7227fbe2718eba6665a5afb5dcaaaa77b341091f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3ae8d1ca_f15919ff","line":12,"in_reply_to":"3ae8d1ca_58c59e8c","updated":"2014-05-29 21:55:50.000000000","message":"I\u0027d add the word blueprint in there because it is that word that git-review keys off to set the topic name.\n\nPartially Implements: blueprint neutron-ovs-dvr","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"an existing (centralized) router to a distributed"},{"line_number":17,"context_line":"one; the opposite conversion, even though allowed by"},{"line_number":18,"context_line":"the API, may not be honored by the underlying"},{"line_number":19,"context_line":"plugin implementation."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"When creating a router (regardless of the user role),"},{"line_number":22,"context_line":"Neutron will rely on a system wide configuration, whose"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"1ae5cdf2_20d0801e","line":19,"updated":"2014-06-03 16:55:41.000000000","message":"It would be good for the plugin to be able to \"veto\" the operation so that the API call will fail. Maybe that is what the code does but it isn\u0027t clear what \"allowed by the API\" means here.\n\nI hope that the API call will fail immediately in this case.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":16,"context_line":"an existing (centralized) router to a distributed"},{"line_number":17,"context_line":"one; the opposite conversion, even though allowed by"},{"line_number":18,"context_line":"the API, may not be honored by the underlying"},{"line_number":19,"context_line":"plugin implementation."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"When creating a router (regardless of the user role),"},{"line_number":22,"context_line":"Neutron will rely on a system wide configuration, whose"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"1ae5cdf2_3db89de4","line":19,"in_reply_to":"1ae5cdf2_20d0801e","updated":"2014-06-03 21:49:29.000000000","message":"what I mean here is that we allow PUT on the distributed attribute. This implies that an admin can convert from centralized to distributed. That said we might not want to do the opposite, at least in the beginning. We can let the server fails promptly with a forbidden, perhaps.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for blueprint neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"1ae5cdf2_54bc37dc","line":27,"updated":"2014-06-04 20:41:07.000000000","message":"This line has caused the topic for this review to change to bp/neutron-testing-refactor.  I really think git-review needs to be less aggressive but in the meantime, could you change the topic of this review back to bp/neutron-ovs-dvr and reword this so that git-review stops keying off of this?","commit_id":"955795afc0b0664d3e55ab0055f7c1b3d0087179"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for blueprint neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"1ae5cdf2_34d6cbf1","line":27,"in_reply_to":"1ae5cdf2_54bc37dc","updated":"2014-06-04 20:45:08.000000000","message":"darn!","commit_id":"955795afc0b0664d3e55ab0055f7c1b3d0087179"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for BLU3PR1|\\|7 neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"1ae5cdf2_491c8b6a","line":27,"updated":"2014-06-05 12:08:12.000000000","message":"nit: something weird here with blueprint","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for BLU3PR1|\\|7 neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"1ae5cdf2_7e9e5664","line":27,"in_reply_to":"1ae5cdf2_491c8b6a","updated":"2014-06-05 14:29:00.000000000","message":"it\u0027s leet-speek for blueprint. If I wrote blueprint the topic branch would be changed because of a bug in git-review ;)","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for BLU3PR1|\\|7 neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"1ae5cdf2_12d463bb","line":27,"in_reply_to":"1ae5cdf2_7e9e5664","updated":"2014-06-05 16:02:24.000000000","message":"funny :)","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for BLU3PR1|\\|7 neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"1ae5cdf2_39eb7679","line":27,"updated":"2014-06-19 00:07:29.000000000","message":"Why the interesting spelling of blueprint?  In any event, this refers to https://review.openstack.org/#/c/82775/, right?","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":24,"context_line":"default currently allows to create \u0027centralized\u0027 routers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Tests are added for basic unit coverage; when the first"},{"line_number":27,"context_line":"building blocks for BLU3PR1|\\|7 neutron-testing-refactor"},{"line_number":28,"context_line":"are complete, functional testing will be added."},{"line_number":29,"context_line":"This is because we should be moving away from how"},{"line_number":30,"context_line":"extension tests have been done up until now."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"1ae5cdf2_8e4a4225","line":27,"in_reply_to":"1ae5cdf2_39eb7679","updated":"2014-06-19 07:48:34.000000000","message":"This is because of a bug for git-review: it strips the branch topic and add the name found after the first blueprint tag (or bug) found in the commit message, and yes that\u0027s the review","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"}],"etc/neutron.conf":[{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":2,"context_line":"# Print more verbose output (set logging level to INFO instead of default WARNING level)."},{"line_number":3,"context_line":"# verbose \u003d False"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dGlobal Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# router_distributed \u003d False"},{"line_number":7,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dGlobal Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":""}],"source_content_type":"text/plain","patch_set":4,"id":"AAAAW3%2F%2F%2FF4%3D","line":5,"updated":"2014-04-09 03:50:21.000000000","message":"maybe it\u0027s better to add one line comment about what is this config for.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":3,"context_line":"# verbose \u003d False"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dGlobal Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# router_distributed \u003d False"},{"line_number":7,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dGlobal Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# Print debugging output (set logging level to DEBUG instead of default WARNING level)."}],"source_content_type":"text/plain","patch_set":4,"id":"AAAAW3%2F%2F%2FGc%3D","line":6,"updated":"2014-04-09 03:50:21.000000000","message":"Does this mean we can only create one type of router (distributed or not) per neutron server?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dGlobal Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# router_distributed \u003d False"},{"line_number":7,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dGlobal Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# Print debugging output (set logging level to DEBUG instead of default WARNING level)."},{"line_number":10,"context_line":"# debug \u003d False"}],"source_content_type":"text/plain","patch_set":4,"id":"AAAAW3%2F%2F%2FFo%3D","line":7,"updated":"2014-04-09 03:50:21.000000000","message":"Suggest to change to \"end of Global Config Option for Distributed L3 Router\"","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"5feffe7c170899a1d1531b3aaab7ee4f79a45f4e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# Print more verbose output (set logging level to INFO instead of default WARNING level)."},{"line_number":3,"context_line":"# verbose \u003d False"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dStart Global Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# Setting the \"router_distributed\" flag to \"True\" would enable controllers"},{"line_number":7,"context_line":"# to create \"distributed\" routers in the plugin."},{"line_number":8,"context_line":"# Set \"router_distributed\" flag to \"False\" to support the legacy mode routers."}],"source_content_type":"text/plain","patch_set":10,"id":"3ae8d1ca_786eda97","line":5,"updated":"2014-05-29 14:37:00.000000000","message":"The precedent for these types of sections appears to be like this:\n\n# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Start Global Config Options for Distributed L3 Router \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# Print more verbose output (set logging level to INFO instead of default WARNING level)."},{"line_number":3,"context_line":"# verbose \u003d False"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"#\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dStart Global Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# Setting the \"router_distributed\" flag to \"True\" would enable controllers"},{"line_number":7,"context_line":"# to create \"distributed\" routers in the plugin."},{"line_number":8,"context_line":"# Set \"router_distributed\" flag to \"False\" to support the legacy mode routers."}],"source_content_type":"text/plain","patch_set":10,"id":"3ae8d1ca_51472d1d","line":5,"in_reply_to":"3ae8d1ca_786eda97","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"unresolved":false,"context_lines":[{"line_number":3,"context_line":"# verbose \u003d False"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dStart Global Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# Setting the \"router_distributed\" flag to \"True\" would enable controllers"},{"line_number":7,"context_line":"# to create \"distributed\" routers in the plugin."},{"line_number":8,"context_line":"# Default value is \"False\" to support legacy mode (centralized) routers."},{"line_number":9,"context_line":"#"}],"source_content_type":"text/plain","patch_set":15,"id":"1ae5cdf2_dd68c789","line":6,"updated":"2014-06-02 17:51:09.000000000","message":"The wording is slightly odd here, as I\u0027m confused by what \"controllers\" means here. Should this instead say \"L3 agents\"?","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":3,"context_line":"# verbose \u003d False"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dStart Global Config Option for Distributed L3 Router\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":6,"context_line":"# Setting the \"router_distributed\" flag to \"True\" would enable controllers"},{"line_number":7,"context_line":"# to create \"distributed\" routers in the plugin."},{"line_number":8,"context_line":"# Default value is \"False\" to support legacy mode (centralized) routers."},{"line_number":9,"context_line":"#"}],"source_content_type":"text/plain","patch_set":15,"id":"1ae5cdf2_fd4bc384","line":6,"in_reply_to":"1ae5cdf2_dd68c789","updated":"2014-06-02 17:58:40.000000000","message":"Done","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"}],"etc/policy.json":[{"author":{"_account_id":1038,"name":"Jack McCann","username":"jack-mccann"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"create_router:distributed\": \"rule:admin_only\","},{"line_number":67,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    \"create_firewall\": \"\","},{"line_number":71,"context_line":"    \"get_firewall\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":55,"id":"baada198_812287ff","line":68,"updated":"2014-07-09 18:43:54.000000000","message":"admin-only attribute should be visible to admin only (like provider network attributes) , something like \"get_router:distributed\": \"rule:admin_only\"","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"create_router:distributed\": \"rule:admin_only\","},{"line_number":67,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    \"create_firewall\": \"\","},{"line_number":71,"context_line":"    \"get_firewall\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":55,"id":"baada198_9c058c16","line":68,"in_reply_to":"baada198_812287ff","updated":"2014-07-09 19:12:19.000000000","message":"makes sense. Done","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"    \"delete_port\": \"rule:admin_or_owner\","},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"create_router:distributed\": \"rule:admin_only\","},{"line_number":67,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":69,"context_line":""}],"source_content_type":"application/json","patch_set":66,"id":"baada198_9007331d","line":66,"updated":"2014-07-16 19:55:39.000000000","message":"Nit: The three new \"distributed\" attributes should probably be grouped together in one block, seems to be how other things are done in this file.","commit_id":"1caa51ea68ba9844ed6e48b3714b742c9096c0af"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"    \"delete_port\": \"rule:admin_or_owner\","},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"create_router:distributed\": \"rule:admin_only\","},{"line_number":67,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":69,"context_line":""}],"source_content_type":"application/json","patch_set":66,"id":"baada198_e6e7d944","line":66,"in_reply_to":"baada198_9007331d","updated":"2014-07-16 20:03:40.000000000","message":"um, there was no clear convention for what I was able to tell..but I see what you mean.","commit_id":"1caa51ea68ba9844ed6e48b3714b742c9096c0af"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"    \"delete_port\": \"rule:admin_or_owner\","},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"create_router:distributed\": \"rule:admin_only\","},{"line_number":67,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":69,"context_line":""}],"source_content_type":"application/json","patch_set":66,"id":"baada198_661e690f","line":66,"in_reply_to":"baada198_e6e7d944","updated":"2014-07-16 20:09:44.000000000","message":"The convention was not clear to me either.  I actually thought of the same feedback a while back and held my peace because of that.\n\nAnyway, this patch is closed for nits.  ;)","commit_id":"1caa51ea68ba9844ed6e48b3714b742c9096c0af"}],"neutron/api/v2/attributes.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":467,"context_line":"    if data is not None:"},{"line_number":468,"context_line":"        return convert_to_boolean(data)"},{"line_number":469,"context_line":"    return data"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"def convert_to_boolean(data):"},{"line_number":473,"context_line":"    if isinstance(data, basestring):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_58acb335","line":470,"updated":"2014-06-03 08:18:23.000000000","message":"(both nits)\n- I think the following is more simple though it is a personal preference. It is common patterns used in this file.\n\n  if data is None:\n      return\n  return convert_to_boolean(data)\n\n- In alphabetical order, this method should be placed after convert_to_boolean.","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    if data is not None:"},{"line_number":468,"context_line":"        return convert_to_boolean(data)"},{"line_number":469,"context_line":"    return data"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"def convert_to_boolean(data):"},{"line_number":473,"context_line":"    if isinstance(data, basestring):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_c389b827","line":470,"in_reply_to":"1ae5cdf2_58acb335","updated":"2014-06-03 08:26:04.000000000","message":"a) I don\u0027t see how it\u0027s simpler, it\u0027s still 3 lines of code.\n\nb) there\u0027s no alphabetical order respected throughout the file, so even if I moved this after it\u0027s not gonna help :)","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":466,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":467,"context_line":"    if data is not None:"},{"line_number":468,"context_line":"        return convert_to_boolean(data)"},{"line_number":469,"context_line":"    return data"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"def convert_to_boolean(data):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_80c31456","line":469,"updated":"2014-06-03 16:55:41.000000000","message":"nit: This is just \"return None\" in this case.  You could leave it out.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":466,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":467,"context_line":"    if data is not None:"},{"line_number":468,"context_line":"        return convert_to_boolean(data)"},{"line_number":469,"context_line":"    return data"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"def convert_to_boolean(data):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7dcdc584","line":469,"in_reply_to":"1ae5cdf2_80c31456","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"unresolved":false,"context_lines":[{"line_number":482,"context_line":""},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":485,"context_line":"    if data is not None:"},{"line_number":486,"context_line":"        return convert_to_boolean(data)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_5bd43fe8","line":485,"updated":"2014-06-13 18:04:50.000000000","message":"if data:","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":482,"context_line":""},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":485,"context_line":"    if data is not None:"},{"line_number":486,"context_line":"        return convert_to_boolean(data)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_08517d2f","line":485,"in_reply_to":"1ae5cdf2_5bd43fe8","updated":"2014-06-14 11:25:55.000000000","message":"that won\u0027t work in case data is False or 0. The signature is pretty self explanatory: covert_to_boolean_if_not_none :)","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":483,"context_line":"    if data is not None:"},{"line_number":484,"context_line":"        return convert_to_boolean(data)"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def convert_to_int(data):"}],"source_content_type":"text/x-python","patch_set":66,"id":"baada198_2382a3c8","line":484,"updated":"2014-07-16 19:55:39.000000000","message":"Should the seemingly duplicate definition in neutron/plugins/vmware/extensions/distributedrouter.py be removed, and the call to it fixed, now that this is here?  Or just file a bug so we clean that in a subsequent submit?","commit_id":"1caa51ea68ba9844ed6e48b3714b742c9096c0af"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":483,"context_line":"    if data is not None:"},{"line_number":484,"context_line":"        return convert_to_boolean(data)"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def convert_to_int(data):"}],"source_content_type":"text/x-python","patch_set":66,"id":"baada198_66490932","line":484,"in_reply_to":"baada198_2382a3c8","updated":"2014-07-16 20:03:40.000000000","message":"It\u0027s purposely duplicated now. I need to work on the nsx plugin to bring their distributed routing feature in line with the API definition proposed here. In the process the duplication will go away.","commit_id":"1caa51ea68ba9844ed6e48b3714b742c9096c0af"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":483,"context_line":"    if data is not None:"},{"line_number":484,"context_line":"        return convert_to_boolean(data)"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def convert_to_int(data):"}],"source_content_type":"text/x-python","patch_set":66,"id":"baada198_a60161b1","line":484,"in_reply_to":"baada198_66490932","updated":"2014-07-16 20:09:44.000000000","message":"Another patch is appropriate for this work.","commit_id":"1caa51ea68ba9844ed6e48b3714b742c9096c0af"}],"neutron/common/constants.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"DEVICE_OWNER_DHCP \u003d \"network:dhcp\""},{"line_number":36,"context_line":"DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED \u003d \"network:router_interface_distributed\""},{"line_number":37,"context_line":"DEVICE_OWNER_AGENT_GW \u003d \"network:floatingip_agent_gateway\""},{"line_number":38,"context_line":"DEVICE_OWNER_ROUTER_SNAT \u003d \"network:router_centralized_snat\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEVICE_ID_RESERVED_DHCP_PORT \u003d \"reserved_dhcp_port\""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_112be530","line":38,"updated":"2014-05-29 21:55:50.000000000","message":"DEVICE_OWNER_ROUTER_CENTRAL \u003d \"network:router_dvr_central\" ???\n\nI still don\u0027t like using SNAT to mean the central component of a DVR because the term SNAT applies to floating ips as well.  Also, the central component of the router component is used for VPN.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":35,"context_line":"DEVICE_OWNER_DHCP \u003d \"network:dhcp\""},{"line_number":36,"context_line":"DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED \u003d \"network:router_interface_distributed\""},{"line_number":37,"context_line":"DEVICE_OWNER_AGENT_GW \u003d \"network:floatingip_agent_gateway\""},{"line_number":38,"context_line":"DEVICE_OWNER_ROUTER_SNAT \u003d \"network:router_centralized_snat\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"DEVICE_ID_RESERVED_DHCP_PORT \u003d \"reserved_dhcp_port\""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_6f6d9904","line":38,"in_reply_to":"3ae8d1ca_112be530","updated":"2014-05-29 23:02:47.000000000","message":"I\u0027ll take care of this in another iteration","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"INTERFACE_KEY \u003d \u0027_interfaces\u0027"},{"line_number":44,"context_line":"METERING_LABEL_KEY \u003d \u0027_metering_labels\u0027"},{"line_number":45,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d \u0027_floatingip_agent_interfaces\u0027"},{"line_number":46,"context_line":"SNAT_ROUTER_INTF_KEY \u003d \u0027_snat_router_interfaces\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"IPv4 \u003d \u0027IPv4\u0027"},{"line_number":49,"context_line":"IPv6 \u003d \u0027IPv6\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_71f269d3","line":46,"updated":"2014-05-29 21:55:50.000000000","message":"Same SNAT comment.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":43,"context_line":"INTERFACE_KEY \u003d \u0027_interfaces\u0027"},{"line_number":44,"context_line":"METERING_LABEL_KEY \u003d \u0027_metering_labels\u0027"},{"line_number":45,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d \u0027_floatingip_agent_interfaces\u0027"},{"line_number":46,"context_line":"SNAT_ROUTER_INTF_KEY \u003d \u0027_snat_router_interfaces\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"IPv4 \u003d \u0027IPv4\u0027"},{"line_number":49,"context_line":"IPv6 \u003d \u0027IPv6\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_af76c1d6","line":46,"in_reply_to":"3ae8d1ca_71f269d3","updated":"2014-05-29 23:02:47.000000000","message":"I\u0027ll take care of this in another iteration","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"INTERFACE_KEY \u003d \u0027_interfaces\u0027"},{"line_number":44,"context_line":"METERING_LABEL_KEY \u003d \u0027_metering_labels\u0027"},{"line_number":45,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d \u0027_floatingip_agent_interfaces\u0027"},{"line_number":46,"context_line":"SNAT_ROUTER_INTF_KEY \u003d \u0027_snat_router_interfaces\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"IPv4 \u003d \u0027IPv4\u0027"},{"line_number":49,"context_line":"IPv6 \u003d \u0027IPv6\u0027"}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_cd4e3096","line":46,"updated":"2014-06-26 05:48:50.000000000","message":"These are not used. I guess these are intended to use sync_router originally. But it seems it is now intended to use get_agent_gateway_port and get_snat_router_interface_ports.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"unresolved":false,"context_lines":[{"line_number":33,"context_line":"DEVICE_OWNER_ROUTER_GW \u003d \"network:router_gateway\""},{"line_number":34,"context_line":"DEVICE_OWNER_FLOATINGIP \u003d \"network:floatingip\""},{"line_number":35,"context_line":"DEVICE_OWNER_DHCP \u003d \"network:dhcp\""},{"line_number":36,"context_line":"DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED \u003d \"network:router_interface_distributed\""},{"line_number":37,"context_line":"DEVICE_OWNER_AGENT_GW \u003d \"network:floatingip_agent_gateway\""},{"line_number":38,"context_line":"DEVICE_OWNER_ROUTER_SNAT \u003d \"network:router_centralized_snat\""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"dab895d6_d16c7f39","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":36},"updated":"2014-06-30 03:55:18.000000000","message":"it seems that this almost always involves line wrapping where it\u0027s used.\ni\u0027d say this is too long name.","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":33,"context_line":"DEVICE_OWNER_ROUTER_GW \u003d \"network:router_gateway\""},{"line_number":34,"context_line":"DEVICE_OWNER_FLOATINGIP \u003d \"network:floatingip\""},{"line_number":35,"context_line":"DEVICE_OWNER_DHCP \u003d \"network:dhcp\""},{"line_number":36,"context_line":"DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED \u003d \"network:router_interface_distributed\""},{"line_number":37,"context_line":"DEVICE_OWNER_AGENT_GW \u003d \"network:floatingip_agent_gateway\""},{"line_number":38,"context_line":"DEVICE_OWNER_ROUTER_SNAT \u003d \"network:router_centralized_snat\""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_6ebf50d1","line":36,"in_reply_to":"dab895d6_d16c7f39","updated":"2014-06-30 20:18:27.000000000","message":"I\u0027ll make it shorter","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"}],"neutron/db/l3_attrs_db.py":[{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _delete_current_gw_port(self, context, router_id, router, new_network):"},{"line_number":133,"context_line":"        # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":134,"context_line":"        # Centralized SNAT"},{"line_number":135,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":136,"context_line":"              self)._delete_current_gw_port(context, router_id,"},{"line_number":137,"context_line":"                                            router, new_network)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_bd4a1bc3","line":134,"updated":"2014-06-02 17:51:09.000000000","message":"Nit: Remove second wording of \"Centralized SNAT\" here.","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _delete_current_gw_port(self, context, router_id, router, new_network):"},{"line_number":133,"context_line":"        # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":134,"context_line":"        # Centralized SNAT"},{"line_number":135,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":136,"context_line":"              self)._delete_current_gw_port(context, router_id,"},{"line_number":137,"context_line":"                                            router, new_network)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_1d4f8f93","line":134,"in_reply_to":"1ae5cdf2_bd4a1bc3","updated":"2014-06-02 17:58:40.000000000","message":"Done","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":147,"context_line":"            # FIXME(swami): fix hard-coded value set to ubuntu"},{"line_number":148,"context_line":"            snat_p_list \u003d self.get_snat_interface_port_list("},{"line_number":149,"context_line":"                context, router[\u0027id\u0027], \"ubuntu\")"},{"line_number":150,"context_line":"            if not snat_p_list:"},{"line_number":151,"context_line":"                LOG.debug(_(\"SNAT interface ports not created: %s\"),"},{"line_number":152,"context_line":"                          snat_p_list)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_7d27b312","line":149,"updated":"2014-06-02 17:51:09.000000000","message":"Why is this hard coded to ubuntu? It looks like get_snat_interface_port_list() expects a host parameter.","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":147,"context_line":"            # FIXME(swami): fix hard-coded value set to ubuntu"},{"line_number":148,"context_line":"            snat_p_list \u003d self.get_snat_interface_port_list("},{"line_number":149,"context_line":"                context, router[\u0027id\u0027], \"ubuntu\")"},{"line_number":150,"context_line":"            if not snat_p_list:"},{"line_number":151,"context_line":"                LOG.debug(_(\"SNAT interface ports not created: %s\"),"},{"line_number":152,"context_line":"                          snat_p_list)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_dd544723","line":149,"in_reply_to":"1ae5cdf2_7d27b312","updated":"2014-06-02 17:58:40.000000000","message":"I\u0027ve added the FIXME: that baffles me too ;)","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":324,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":325,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":326,"context_line":"                # exists"},{"line_number":327,"context_line":"                p_fixed_ip \u003d {\u0027subnet_id\u0027: intf_subnet}"},{"line_number":328,"context_line":"                port_data \u003d {"},{"line_number":329,"context_line":"                    \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":330,"context_line":"                    \u0027network_id\u0027: intf[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_fa890927","line":327,"updated":"2014-06-02 17:22:41.000000000","message":"if len(ips) !\u003d 1 for an intf, then intf_subnet will contain the data for some prior intf with len(ips)\u003d\u003d1.  does the code need to skip intf\u0027s for which len(ips)!\u003d1?  or set p_fixed_ip differently in that case?\n\nEven if the code works today (perhaps len(ips) is always 1?), it seems fragile.","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":325,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":326,"context_line":"                # exists"},{"line_number":327,"context_line":"                p_fixed_ip \u003d {\u0027subnet_id\u0027: intf_subnet}"},{"line_number":328,"context_line":"                port_data \u003d {"},{"line_number":329,"context_line":"                    \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":330,"context_line":"                    \u0027network_id\u0027: intf[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_e327a1b4","line":327,"in_reply_to":"1ae5cdf2_4be951b7","updated":"2014-06-02 21:02:25.000000000","message":"makes sense, but what I am not sure if we\u0027d be better off and fail. a p_fixed_ips \u003d [] it\u0027s not right.","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":324,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":325,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":326,"context_line":"                # exists"},{"line_number":327,"context_line":"                p_fixed_ip \u003d {\u0027subnet_id\u0027: intf_subnet}"},{"line_number":328,"context_line":"                port_data \u003d {"},{"line_number":329,"context_line":"                    \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":330,"context_line":"                    \u0027network_id\u0027: intf[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_4be951b7","line":327,"in_reply_to":"1ae5cdf2_dd02870a","updated":"2014-06-02 18:39:28.000000000","message":"Perhaps:\n\nif len(ips) \u003d\u003d 1:\n    p_fixed_ips \u003d [{\u0027subnet_id\u0027: intf[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]}]\nelse:\n    p_fixed_ips \u003d []\n\nthen use p_fixed_ips instead of \u0027[p_fixed_ip]\u0027 in port_data assignment.\n\nOR:\n\n p_fixed_ips \u003d [{\u0027subnet_id\u0027: ip[\u0027subnet_id\u0027]} for ip in intf[\u0027fixed_ips\u0027]]","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":325,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":326,"context_line":"                # exists"},{"line_number":327,"context_line":"                p_fixed_ip \u003d {\u0027subnet_id\u0027: intf_subnet}"},{"line_number":328,"context_line":"                port_data \u003d {"},{"line_number":329,"context_line":"                    \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":330,"context_line":"                    \u0027network_id\u0027: intf[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"1ae5cdf2_dd02870a","line":327,"in_reply_to":"1ae5cdf2_fa890927","updated":"2014-06-02 17:58:40.000000000","message":"Yes, the code is not super-clear to me, I\u0027ll let Swami comment on that who is the original author.","commit_id":"51591032fcefa5d98a9f81230687ecb4c81941f3"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin,"},{"line_number":93,"context_line":"                               ExtraAttributesMixin):"},{"line_number":94,"context_line":"    \"\"\"Mixin class to enable DVR support.\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    router_device_owners \u003d ("},{"line_number":97,"context_line":"        l3_db.L3_NAT_db_mixin."}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_83aed083","line":94,"updated":"2014-06-03 08:52:19.000000000","message":"I think this class should be moved in a dvr specific file ?","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin,"},{"line_number":93,"context_line":"                               ExtraAttributesMixin):"},{"line_number":94,"context_line":"    \"\"\"Mixin class to enable DVR support.\"\"\""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    router_device_owners \u003d ("},{"line_number":97,"context_line":"        l3_db.L3_NAT_db_mixin."}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_fcebaaad","line":94,"in_reply_to":"1ae5cdf2_83aed083","updated":"2014-06-03 11:08:05.000000000","message":"why? There\u0027s no value in doing it now, IMO, maybe later on if we start adding extra attributes..but for now I think this is fine. Let\u0027s see what other people think","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"1ae5cdf2_881b3672","updated":"2014-06-03 20:14:18.000000000","message":"This file needs docstring descriptions of many of the methods.  I want a sentence or two on each of the methods telling me what the methods overall purpose is.\n\nIs l3_attrs_db.py a good name for this file?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"1ae5cdf2_dda339b0","in_reply_to":"1ae5cdf2_881b3672","updated":"2014-06-03 21:49:29.000000000","message":"Sylvian made a similar comment, I could split this in half, the extraattributes bits and the dvr mixin, the latter part will go in a file called l3_dvr.py. Thoughts?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"1ae5cdf2_f6cb9050","in_reply_to":"1ae5cdf2_dda339b0","updated":"2014-06-04 17:09:49.000000000","message":"I could go with that.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c75508fb","line":47,"updated":"2014-06-04 15:17:43.000000000","message":"I may be missing previous discussions, but why is it a new model and not an extension to existing?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_380a2b26","line":47,"in_reply_to":"1ae5cdf2_05cef12d","updated":"2014-06-05 10:54:33.000000000","message":"Thanks for explaining, I get your point now.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_9705dc15","line":47,"in_reply_to":"1ae5cdf2_1b8825c4","updated":"2014-06-05 01:28:09.000000000","message":"Yes, I understand that. My question is why additional model is added for a single additional attribute, and attribute is not just added to existing model, like in l3_gwmode.db ?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_05cef12d","line":47,"in_reply_to":"1ae5cdf2_9705dc15","updated":"2014-06-05 07:42:13.000000000","message":"IMO, In Neutron there is (a bad) attitude of shoving everything together; this usually has negative consequences when it comes to maintainability, readability and extensibility. I do not think that a \u0027distributed\u0027 attributed belongs to l3_gwmode and if I did add it there, it would make it difficult to discover from a developer standpoint. Furthermore, adding it there means that I potentially needed to hack into existing plugins\u0027 code that makes use of the gwmode functionality, with the danger of breaking something, plus without knowing for sure (because of test coverage, or lack thereof :))\n\nTherefore, I introduced this new model where the distributed attributed belonged (and, generally, new others if they fit the same pattern as \u0027distributed\u0027). The extra table makes it very loosely decoupled from the other plugin implementations based on whichever migration strategy we currently devise and/or figure out in the future.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1b8825c4","line":47,"in_reply_to":"1ae5cdf2_c75508fb","updated":"2014-06-04 16:35:51.000000000","message":"This is just a building block to extend a Router model","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":51,"context_line":"                          primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_91a36cb1","line":48,"updated":"2014-06-03 12:59:29.000000000","message":"Nit: PEP8/257 for class doc string, have blank line before and after doc string. Here and following...","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":48,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":49,"context_line":"    router_id \u003d sa.Column(sa.String(36),"},{"line_number":50,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":51,"context_line":"                          primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_5d972948","line":48,"in_reply_to":"1ae5cdf2_91a36cb1","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_extra_router_dict(self, router_res, router_db):"},{"line_number":66,"context_line":"        extra_attrs \u003d router_db[\u0027extra_attributes\u0027]"},{"line_number":67,"context_line":"        # Return False if extra attributes are not definied for this"},{"line_number":68,"context_line":"        # neutron router"},{"line_number":69,"context_line":"        for attr in self.extra_attributes:"},{"line_number":70,"context_line":"            name \u003d attr[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_edb20c05","line":67,"updated":"2014-06-03 20:14:18.000000000","message":"From what I can tell, this method always returns None.  This comment doesn\u0027t seem right.\n\nnit: *defined","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_extra_router_dict(self, router_res, router_db):"},{"line_number":66,"context_line":"        extra_attrs \u003d router_db[\u0027extra_attributes\u0027]"},{"line_number":67,"context_line":"        # Return False if extra attributes are not definied for this"},{"line_number":68,"context_line":"        # neutron router"},{"line_number":69,"context_line":"        for attr in self.extra_attributes:"},{"line_number":70,"context_line":"            name \u003d attr[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bd9aed6b","line":67,"in_reply_to":"1ae5cdf2_edb20c05","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _process_extra_router_create("},{"line_number":76,"context_line":"        self, context, router_db, router_req):"},{"line_number":77,"context_line":"        if not router_db[\u0027extra_attributes\u0027]:"},{"line_number":78,"context_line":"            kwargs \u003d {}"},{"line_number":79,"context_line":"            for attr in self.extra_attributes:"},{"line_number":80,"context_line":"                name \u003d attr[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_8d1b48c9","line":77,"updated":"2014-06-03 20:14:18.000000000","message":"Is router_db guaranteed to have an extra_attributes key with a dict as value?  If not, this could fail.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def _process_extra_router_create("},{"line_number":76,"context_line":"        self, context, router_db, router_req):"},{"line_number":77,"context_line":"        if not router_db[\u0027extra_attributes\u0027]:"},{"line_number":78,"context_line":"            kwargs \u003d {}"},{"line_number":79,"context_line":"            for attr in self.extra_attributes:"},{"line_number":80,"context_line":"                name \u003d attr[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bda82d78","line":77,"in_reply_to":"1ae5cdf2_8d1b48c9","updated":"2014-06-03 21:49:29.000000000","message":"there\u0027s the backref relationship","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                name \u003d attr[\u0027name\u0027]"},{"line_number":92,"context_line":"                default \u003d attr[\u0027default\u0027]"},{"line_number":93,"context_line":"                router_db[\u0027extra_attributes\u0027][name] \u003d router_req.get("},{"line_number":94,"context_line":"                    name, default)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs("},{"line_number":97,"context_line":"        l3.ROUTERS, [\u0027_extend_extra_router_dict\u0027])"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_2d2874e1","line":94,"updated":"2014-06-03 20:14:18.000000000","message":"L90 - L94 is almost duplicated from L78 - L82.  This could be done up front with a dict comprehension once.  I think this method would be much shorter and read better...\n\nattrs \u003d dict((attr[\u0027name\u0027],router_req.get(attr[\u0027name\u0027], attr[\u0027default\u0027])) \n                 for attr in self.extra_attributes)\n\nif not router_db[\u0027extra_attributes\u0027]:\n    extra_attributes \u003d RouterExtraAttributes(router_id\u003drouter_db[\u0027id\u0027], **attrs)\n    context.session.add(extra_attributes)\nrouter_db[\u0027extra_attributes\u0027].update(attrs)","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":91,"context_line":"                name \u003d attr[\u0027name\u0027]"},{"line_number":92,"context_line":"                default \u003d attr[\u0027default\u0027]"},{"line_number":93,"context_line":"                router_db[\u0027extra_attributes\u0027][name] \u003d router_req.get("},{"line_number":94,"context_line":"                    name, default)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs("},{"line_number":97,"context_line":"        l3.ROUTERS, [\u0027_extend_extra_router_dict\u0027])"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_fdbd55b8","line":94,"in_reply_to":"1ae5cdf2_2d2874e1","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":97,"context_line":"        l3.ROUTERS, [\u0027_extend_extra_router_dict\u0027])"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin,"},{"line_number":101,"context_line":"                               ExtraAttributesMixin):"},{"line_number":102,"context_line":"    \"\"\"Mixin class to enable DVR support.\"\"\""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_aa0c41ee","line":100,"updated":"2014-06-04 15:17:43.000000000","message":"shoud the base class be from from l3_db or l3_gwmode_db?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":97,"context_line":"        l3.ROUTERS, [\u0027_extend_extra_router_dict\u0027])"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"class L3_NAT_with_dvr_db_mixin(l3_db.L3_NAT_db_mixin,"},{"line_number":101,"context_line":"                               ExtraAttributesMixin):"},{"line_number":102,"context_line":"    \"\"\"Mixin class to enable DVR support.\"\"\""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_3ba8811f","line":100,"in_reply_to":"1ae5cdf2_aa0c41ee","updated":"2014-06-04 16:35:51.000000000","message":"This is an extension to l3_db.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            router_db \u003d super("},{"line_number":126,"context_line":"                L3_NAT_with_dvr_db_mixin, self)._update_router_db("},{"line_number":127,"context_line":"                    context, router_id, data, gw_info)"},{"line_number":128,"context_line":"            if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":129,"context_line":"                u_device_owner \u003d DEVICE_OWNER_DVR_INTERFACE"},{"line_number":130,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id]}"},{"line_number":131,"context_line":"                ports \u003d self._core_plugin.get_ports("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_48fbeec0","line":128,"updated":"2014-06-03 20:14:18.000000000","message":"I don\u0027t understand this section.  It runs if there is no gw_info.  It checks to see if \u0027distributed\u0027 is in data but ignores whether it is True or False.\n\nThen, it searches for ports with device_id \u003d\u003d ??? and then updates the device_owner to DEVICE_OWNER_DVR_INTERFACE only if the current device owner is NOT DEVICE_OWNER_ROUTER_GW.\n\nThis just doesn\u0027t seem right but I don\u0027t know exactly what it should be.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":"            router_db \u003d super("},{"line_number":126,"context_line":"                L3_NAT_with_dvr_db_mixin, self)._update_router_db("},{"line_number":127,"context_line":"                    context, router_id, data, gw_info)"},{"line_number":128,"context_line":"            if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":129,"context_line":"                u_device_owner \u003d DEVICE_OWNER_DVR_INTERFACE"},{"line_number":130,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id]}"},{"line_number":131,"context_line":"                ports \u003d self._core_plugin.get_ports("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_3deb3db1","line":128,"in_reply_to":"1ae5cdf2_48fbeec0","updated":"2014-06-03 21:49:29.000000000","message":"I\u0027ll break it out and mark it as fixme. In the process I\u0027ll try to address your nits.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                L3_NAT_with_dvr_db_mixin, self)._update_router_db("},{"line_number":127,"context_line":"                    context, router_id, data, gw_info)"},{"line_number":128,"context_line":"            if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":129,"context_line":"                u_device_owner \u003d DEVICE_OWNER_DVR_INTERFACE"},{"line_number":130,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id]}"},{"line_number":131,"context_line":"                ports \u003d self._core_plugin.get_ports("},{"line_number":132,"context_line":"                    context.elevated(), filters\u003ddevice_filter)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_08b3a60a","line":129,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  This temporary (u_device_owner) adds no value and is a bit out of place.  Just inline it.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                    context, router_id, data, gw_info)"},{"line_number":128,"context_line":"            if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":129,"context_line":"                u_device_owner \u003d DEVICE_OWNER_DVR_INTERFACE"},{"line_number":130,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id]}"},{"line_number":131,"context_line":"                ports \u003d self._core_plugin.get_ports("},{"line_number":132,"context_line":"                    context.elevated(), filters\u003ddevice_filter)"},{"line_number":133,"context_line":"                l_device_owner \u003d {\u0027device_owner\u0027: u_device_owner}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_28a942df","line":130,"updated":"2014-06-03 20:14:18.000000000","message":"Where does \u0027id\u0027 come from here in [id]?  I think this is a problem.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id]}"},{"line_number":131,"context_line":"                ports \u003d self._core_plugin.get_ports("},{"line_number":132,"context_line":"                    context.elevated(), filters\u003ddevice_filter)"},{"line_number":133,"context_line":"                l_device_owner \u003d {\u0027device_owner\u0027: u_device_owner}"},{"line_number":134,"context_line":"                for p in ports:"},{"line_number":135,"context_line":"                    port_db \u003d self._core_plugin._get_port(context, p[\u0027id\u0027])"},{"line_number":136,"context_line":"                    if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_e8a83a8f","line":133,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  You could inline this.  This temporary adds little value.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                l_device_owner \u003d {\u0027device_owner\u0027: u_device_owner}"},{"line_number":134,"context_line":"                for p in ports:"},{"line_number":135,"context_line":"                    port_db \u003d self._core_plugin._get_port(context, p[\u0027id\u0027])"},{"line_number":136,"context_line":"                    if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":137,"context_line":"                        port_db.update(l_device_owner)"},{"line_number":138,"context_line":"            return router_db"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_681fca08","line":136,"updated":"2014-06-03 20:14:18.000000000","message":"Should this be if port_db[\u0027device_owner\u0027] !\u003d DEVICE_OWNER_DVR_INTERFACE?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"            return router_db"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _delete_current_gw_port(self, context, router_id, router, new_network):"},{"line_number":141,"context_line":"        # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":142,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":143,"context_line":"              self)._delete_current_gw_port(context, router_id,"},{"line_number":144,"context_line":"                                            router, new_network)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c8b8deca","line":141,"updated":"2014-06-03 20:14:18.000000000","message":"Do you think this should be wrapped in a transaction?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":138,"context_line":"            return router_db"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _delete_current_gw_port(self, context, router_id, router, new_network):"},{"line_number":141,"context_line":"        # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":142,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":143,"context_line":"              self)._delete_current_gw_port(context, router_id,"},{"line_number":144,"context_line":"                                            router, new_network)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_dd06d985","line":141,"in_reply_to":"1ae5cdf2_c8b8deca","updated":"2014-06-03 21:49:29.000000000","message":"It is, when it\u0027s called directly.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                            router, new_network)"},{"line_number":145,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":146,"context_line":"            self.delete_csnat_router_interface_ports(context, router,"},{"line_number":147,"context_line":"                                                     subnet_id\u003dNone)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _create_gw_port(self, context, router_id, router, new_network):"},{"line_number":150,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c8dffe0b","line":147,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  This is the default.  No need to specify.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                            router, new_network)"},{"line_number":145,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":146,"context_line":"            self.delete_csnat_router_interface_ports(context, router,"},{"line_number":147,"context_line":"                                                     subnet_id\u003dNone)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _create_gw_port(self, context, router_id, router, new_network):"},{"line_number":150,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1dfda16e","line":147,"in_reply_to":"1ae5cdf2_c8dffe0b","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        if router_is_uuid:"},{"line_number":165,"context_line":"            router \u003d self._get_router(context, router)"},{"line_number":166,"context_line":"        # Assuming router is the usual dict"},{"line_number":167,"context_line":"        return _get_router_type(router)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_interface_ports_for_network(self, context, network_id):"},{"line_number":170,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_0381c9fa","line":167,"updated":"2014-06-03 20:14:18.000000000","message":"_get_router_type returns True or False.  What is this method supposed to return?  True/False doesn\u0027t seem appropriate.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":164,"context_line":"        if router_is_uuid:"},{"line_number":165,"context_line":"            router \u003d self._get_router(context, router)"},{"line_number":166,"context_line":"        # Assuming router is the usual dict"},{"line_number":167,"context_line":"        return _get_router_type(router)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_interface_ports_for_network(self, context, network_id):"},{"line_number":170,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7df7858b","line":167,"in_reply_to":"1ae5cdf2_0381c9fa","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_interface_ports_for_network(self, context, network_id):"},{"line_number":170,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":171,"context_line":"        return (router_intf_qry.filter_by(network_id\u003dnetwork_id).filter(sa.or_("},{"line_number":172,"context_line":"            models_v2.Port.device_owner \u003d\u003d l3_const.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":173,"context_line":"            models_v2.Port.device_owner \u003d\u003d DEVICE_OWNER_DVR_INTERFACE)))"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c8145ea2","line":171,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  This could use an \"in_\" operator.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_interface_ports_for_network(self, context, network_id):"},{"line_number":170,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":171,"context_line":"        return (router_intf_qry.filter_by(network_id\u003dnetwork_id).filter(sa.or_("},{"line_number":172,"context_line":"            models_v2.Port.device_owner \u003d\u003d l3_const.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":173,"context_line":"            models_v2.Port.device_owner \u003d\u003d DEVICE_OWNER_DVR_INTERFACE)))"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_9df0d192","line":171,"in_reply_to":"1ae5cdf2_c8145ea2","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                           DEVICE_OWNER_DVR_INTERFACE])"},{"line_number":180,"context_line":"        # Add the port binding host to the floatingip dictionary"},{"line_number":181,"context_line":"        for fip in floating_ips:"},{"line_number":182,"context_line":"            f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":183,"context_line":"            fip[\u0027host\u0027] \u003d f_host"},{"line_number":184,"context_line":"        return self._process_sync_data(routers, interfaces, floating_ips)"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_8875f6fb","line":182,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  This temporary variable adds no value.  It just adds an extra line.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":179,"context_line":"                           DEVICE_OWNER_DVR_INTERFACE])"},{"line_number":180,"context_line":"        # Add the port binding host to the floatingip dictionary"},{"line_number":181,"context_line":"        for fip in floating_ips:"},{"line_number":182,"context_line":"            f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":183,"context_line":"            fip[\u0027host\u0027] \u003d f_host"},{"line_number":184,"context_line":"        return self._process_sync_data(routers, interfaces, floating_ips)"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bded8db9","line":182,"in_reply_to":"1ae5cdf2_8875f6fb","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    def get_vm_port_hostid(self, context, port_id):"},{"line_number":187,"context_line":"        \"\"\"Function to return the portbinding host_id.\"\"\""},{"line_number":188,"context_line":"        vm_port_db \u003d self._core_plugin.get_port(context, port_id)"},{"line_number":189,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":190,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def check_if_internal_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_08b5667d","line":189,"updated":"2014-06-03 20:14:18.000000000","message":"Could this be something besides compute?  Would these ports ever be something besides compute?  Like some other service?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":"    def get_vm_port_hostid(self, context, port_id):"},{"line_number":187,"context_line":"        \"\"\"Function to return the portbinding host_id.\"\"\""},{"line_number":188,"context_line":"        vm_port_db \u003d self._core_plugin.get_port(context, port_id)"},{"line_number":189,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":190,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def check_if_internal_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_3d397d41","line":189,"in_reply_to":"1ae5cdf2_08b5667d","updated":"2014-06-03 21:49:29.000000000","message":"I think here compute signifies a vm\u0027s port, and that\u0027s how Nova\u0027s port are labelled.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        \"\"\"Function to check if agent gw port pre-exist.\"\"\""},{"line_number":195,"context_line":"        if not network_id:"},{"line_number":196,"context_line":"            LOG.debug(\"No Network id exists: %s\", network_id)"},{"line_number":197,"context_line":"            return False"},{"line_number":198,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":199,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":200,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c391a148","line":197,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  return None because below returns a port if found.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"        \"\"\"Function to check if agent gw port pre-exist.\"\"\""},{"line_number":195,"context_line":"        if not network_id:"},{"line_number":196,"context_line":"            LOG.debug(\"No Network id exists: %s\", network_id)"},{"line_number":197,"context_line":"            return False"},{"line_number":198,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":199,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":200,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bd44adb7","line":197,"in_reply_to":"1ae5cdf2_c391a148","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":198,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":199,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":200,"context_line":"        for p in ports:"},{"line_number":201,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host and"},{"line_number":202,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":203,"context_line":"                return p"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_16d0fcf4","line":201,"updated":"2014-06-04 16:59:27.000000000","message":"I think you should change the signature of the  get_vm_port_hostid method to pass the port parameter otherwise the same port will be requested twice, one from the get_ports and another one from get_vm_port_hostid with the get_port ?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":198,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":199,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":200,"context_line":"        for p in ports:"},{"line_number":201,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host and"},{"line_number":202,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":203,"context_line":"                return p"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_b69d880c","line":201,"in_reply_to":"1ae5cdf2_16d0fcf4","updated":"2014-06-04 17:05:05.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        fp_host \u003d None"},{"line_number":209,"context_line":"        for fid in fp:"},{"line_number":210,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":211,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":212,"context_line":"        return fp_host"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c37601a4","line":211,"updated":"2014-06-03 20:14:18.000000000","message":"This gets assigned each time through the loop.  That doesn\u0027t seem right.  If it is right then we wasted calls to \"_get_port\" and \"get_vm_port_hostid\" for all but the last iteration through the loop.\n\nIs this code supposed to return the first one?  If so, the return could move up in to the loop.\n\nIf it really is the last iteration that matters then maybe do something like \n\nif fp:\n    fid \u003d fp.pop()\n    port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])\n    returrn self.get_vm_port_hostid(context, port_db[\u0027id\u0027])","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":208,"context_line":"        fp_host \u003d None"},{"line_number":209,"context_line":"        for fid in fp:"},{"line_number":210,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":211,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":212,"context_line":"        return fp_host"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1d0be17d","line":211,"in_reply_to":"1ae5cdf2_c37601a4","updated":"2014-06-03 21:49:29.000000000","message":"Yes, I am confused too. I\u0027ll add a FIXME for now","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":215,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":216,"context_line":"        router_ids \u003d None"},{"line_number":217,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":218,"context_line":"        context \u003d context.elevated()"},{"line_number":219,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_439831c0","line":216,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  Don\u0027t initialize this here.  Just pass None below.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":215,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":216,"context_line":"        router_ids \u003d None"},{"line_number":217,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":218,"context_line":"        context \u003d context.elevated()"},{"line_number":219,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_5d2809e2","line":216,"in_reply_to":"1ae5cdf2_439831c0","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":216,"context_line":"        router_ids \u003d None"},{"line_number":217,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":218,"context_line":"        context \u003d context.elevated()"},{"line_number":219,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":220,"context_line":"            routers \u003d self._get_sync_routers(context,"},{"line_number":221,"context_line":"                                             router_ids\u003drouter_ids)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c3eb6111","line":218,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  Use *admin_context*.  Don\u0027t overwrite context.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":215,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":216,"context_line":"        router_ids \u003d None"},{"line_number":217,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":218,"context_line":"        context \u003d context.elevated()"},{"line_number":219,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":220,"context_line":"            routers \u003d self._get_sync_routers(context,"},{"line_number":221,"context_line":"                                             router_ids\u003drouter_ids)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d25c507","line":218,"in_reply_to":"1ae5cdf2_c3eb6111","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        context \u003d context.elevated()"},{"line_number":219,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":220,"context_line":"            routers \u003d self._get_sync_routers(context,"},{"line_number":221,"context_line":"                                             router_ids\u003drouter_ids)"},{"line_number":222,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":223,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":224,"context_line":"            # Add the port binding host to the floatingip dictionary"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c3844160","line":221,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  router_ids\u003dNone","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":218,"context_line":"        context \u003d context.elevated()"},{"line_number":219,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":220,"context_line":"            routers \u003d self._get_sync_routers(context,"},{"line_number":221,"context_line":"                                             router_ids\u003drouter_ids)"},{"line_number":222,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":223,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":224,"context_line":"            # Add the port binding host to the floatingip dictionary"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_9d1e11ba","line":221,"in_reply_to":"1ae5cdf2_c3844160","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                                             router_ids\u003drouter_ids)"},{"line_number":222,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":223,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":224,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":225,"context_line":"            for fip in floating_ips:"},{"line_number":226,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":227,"context_line":"                if f_host \u003d\u003d host_id:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c307e1c8","line":224,"updated":"2014-06-03 20:14:18.000000000","message":"This comment doesn\u0027t seem relevant to this code.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":221,"context_line":"                                             router_ids\u003drouter_ids)"},{"line_number":222,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":223,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":224,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":225,"context_line":"            for fip in floating_ips:"},{"line_number":226,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":227,"context_line":"                if f_host \u003d\u003d host_id:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_fd80f5c1","line":224,"in_reply_to":"1ae5cdf2_c307e1c8","updated":"2014-06-03 21:49:29.000000000","message":"FIXME","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":227,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":228,"context_line":"                    fip_count_on_host +\u003d 1"},{"line_number":229,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":230,"context_line":"                return True"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def delete_floatingip_agent_gateway_port(self, context, host_id):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_43c6719b","line":229,"updated":"2014-06-03 20:14:18.000000000","message":"Could this ever be \u003e 1?  If so, what would that mean?  Do you really want to return None if you count \u003e 1?\n\nI\u0027m thinking you could just return True as soon as you find one and avoid counting them at all.  I think what this method wants to do is see if any of the floating ips on any of the routers are related to a particular host.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        # delete any fip agent gw port"},{"line_number":235,"context_line":"        device_filter \u003d {\u0027device_owner\u0027: [DEVICE_OWNER_AGENT_GW]}"},{"line_number":236,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":237,"context_line":"                                            filters\u003ddevice_filter)"},{"line_number":238,"context_line":"        for p in ports:"},{"line_number":239,"context_line":"            if self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host_id:"},{"line_number":240,"context_line":"                self._core_plugin._delete_port(context.elevated(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_83ef99e8","line":237,"updated":"2014-06-03 20:14:18.000000000","message":"I wish we could find a way to just delete the ports without having to query them all first.  In SQL I would just do this:\n\nDELETE from Port WHERE device_owner \u003d\u003d \u0027...\u0027 and ...\n\nI\u0027ll think about this a bit.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":234,"context_line":"        # delete any fip agent gw port"},{"line_number":235,"context_line":"        device_filter \u003d {\u0027device_owner\u0027: [DEVICE_OWNER_AGENT_GW]}"},{"line_number":236,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":237,"context_line":"                                            filters\u003ddevice_filter)"},{"line_number":238,"context_line":"        for p in ports:"},{"line_number":239,"context_line":"            if self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host_id:"},{"line_number":240,"context_line":"                self._core_plugin._delete_port(context.elevated(),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d6ce535","line":237,"in_reply_to":"1ae5cdf2_83ef99e8","updated":"2014-06-03 21:49:29.000000000","message":"I know...neutron is riddled with examples like this, mostly because we want the call to go the the underlying plugin, but in this case it does sound unnecessary.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":274,"context_line":"                return f_port"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def check_if_snat_interface_ports_exist_for_router("},{"line_number":277,"context_line":"            self, context, router_id, host):"},{"line_number":278,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":279,"context_line":"        if not router_id:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_a34495b7","line":276,"updated":"2014-06-03 20:14:18.000000000","message":"This returns a list of ports.  I think it should be named get_[something]","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":273,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":274,"context_line":"                return f_port"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def check_if_snat_interface_ports_exist_for_router("},{"line_number":277,"context_line":"            self, context, router_id, host):"},{"line_number":278,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":279,"context_line":"        if not router_id:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bd72ed0e","line":276,"in_reply_to":"1ae5cdf2_a34495b7","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self, context, router_id, host):"},{"line_number":278,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":279,"context_line":"        if not router_id:"},{"line_number":280,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), router_id)"},{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":283,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_03af097e","line":280,"updated":"2014-06-03 20:14:18.000000000","message":"No Router id exists.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self, context, router_id, host):"},{"line_number":278,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":279,"context_line":"        if not router_id:"},{"line_number":280,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), router_id)"},{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":283,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_dd62593d","line":280,"in_reply_to":"1ae5cdf2_03af097e","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":279,"context_line":"        if not router_id:"},{"line_number":280,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), router_id)"},{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":283,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":284,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_03346948","line":281,"updated":"2014-06-03 20:14:18.000000000","message":"return []","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":278,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":279,"context_line":"        if not router_id:"},{"line_number":280,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), router_id)"},{"line_number":281,"context_line":"            return"},{"line_number":282,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":283,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":284,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_fd67154b","line":281,"in_reply_to":"1ae5cdf2_03346948","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":283,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":284,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":285,"context_line":"        if ports:"},{"line_number":286,"context_line":"            return ports"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def add_csnat_router_interface_ports("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_83d95924","line":285,"updated":"2014-06-03 20:14:18.000000000","message":"Just return ports (i.e. remove this if: line).  I very much prefer returning a consistent return type.  Here that means return [] instead of None if the method would otherwise return a populated list.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":282,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":283,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":284,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":285,"context_line":"        if ports:"},{"line_number":286,"context_line":"            return ports"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def add_csnat_router_interface_ports("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1d59218e","line":285,"in_reply_to":"1ae5cdf2_83d95924","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                      \u0027admin_state_up\u0027: True,"},{"line_number":300,"context_line":"                      \u0027name\u0027: \u0027\u0027}})"},{"line_number":301,"context_line":"        if snat_port:"},{"line_number":302,"context_line":"            self._populate_subnet_for_ports(context, [snat_port])"},{"line_number":303,"context_line":"        else:"},{"line_number":304,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":305,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_beebc811","line":302,"updated":"2014-06-03 20:14:18.000000000","message":"should this return snat_port?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":299,"context_line":"                      \u0027admin_state_up\u0027: True,"},{"line_number":300,"context_line":"                      \u0027name\u0027: \u0027\u0027}})"},{"line_number":301,"context_line":"        if snat_port:"},{"line_number":302,"context_line":"            self._populate_subnet_for_ports(context, [snat_port])"},{"line_number":303,"context_line":"        else:"},{"line_number":304,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":305,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_3d5edd76","line":302,"in_reply_to":"1ae5cdf2_beebc811","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            # TODO(swami) Check with Mike on this if it is required."},{"line_number":316,"context_line":"            self._populate_subnet_for_ports(context, port_list)"},{"line_number":317,"context_line":"            return port_list"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":320,"context_line":"            port_list \u003d []"},{"line_number":321,"context_line":"            filters \u003d {"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_231085a7","line":318,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  No need for else here.  Cleaner code without it (less indentation)","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":315,"context_line":"            # TODO(swami) Check with Mike on this if it is required."},{"line_number":316,"context_line":"            self._populate_subnet_for_ports(context, port_list)"},{"line_number":317,"context_line":"            return port_list"},{"line_number":318,"context_line":"        else:"},{"line_number":319,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":320,"context_line":"            port_list \u003d []"},{"line_number":321,"context_line":"            filters \u003d {"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_5d56495d","line":318,"in_reply_to":"1ae5cdf2_231085a7","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                admin_ctx, filters)"},{"line_number":326,"context_line":"            for intf in int_ports:"},{"line_number":327,"context_line":"                LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":328,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":329,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":330,"context_line":"                if ips:"},{"line_number":331,"context_line":"                    # Passing the subnet for the port to make sure the IP\u0027s"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_0382a9c7","line":328,"updated":"2014-06-03 20:14:18.000000000","message":"Should this be logged in the loop or outside the loop?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":325,"context_line":"                admin_ctx, filters)"},{"line_number":326,"context_line":"            for intf in int_ports:"},{"line_number":327,"context_line":"                LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":328,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":329,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":330,"context_line":"                if ips:"},{"line_number":331,"context_line":"                    # Passing the subnet for the port to make sure the IP\u0027s"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d53056b","line":328,"in_reply_to":"1ae5cdf2_0382a9c7","updated":"2014-06-03 21:49:29.000000000","message":"FIXME","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            for intf in int_ports:"},{"line_number":327,"context_line":"                LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":328,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":329,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":330,"context_line":"                if ips:"},{"line_number":331,"context_line":"                    # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":332,"context_line":"                    # are assigned on the right subnet if multiple subnet"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_235ec576","line":329,"updated":"2014-06-03 20:14:18.000000000","message":"This value is not used except on the next line in a boolean context (i.e. to check if the list is empty).  Remove this line and change the next line.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":326,"context_line":"            for intf in int_ports:"},{"line_number":327,"context_line":"                LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":328,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":329,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":330,"context_line":"                if ips:"},{"line_number":331,"context_line":"                    # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":332,"context_line":"                    # are assigned on the right subnet if multiple subnet"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1dd041c8","line":329,"in_reply_to":"1ae5cdf2_235ec576","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":328,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":329,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":330,"context_line":"                if ips:"},{"line_number":331,"context_line":"                    # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":332,"context_line":"                    # are assigned on the right subnet if multiple subnet"},{"line_number":333,"context_line":"                    # exists"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_436f512b","line":330,"updated":"2014-06-03 20:14:18.000000000","message":"if intf[\u0027fixed_ips\u0027]:","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":327,"context_line":"                LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":328,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":329,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":330,"context_line":"                if ips:"},{"line_number":331,"context_line":"                    # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":332,"context_line":"                    # are assigned on the right subnet if multiple subnet"},{"line_number":333,"context_line":"                    # exists"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_5ddd69df","line":330,"in_reply_to":"1ae5cdf2_436f512b","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                    # are assigned on the right subnet if multiple subnet"},{"line_number":333,"context_line":"                    # exists"},{"line_number":334,"context_line":"                    intf_subnet \u003d intf[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":335,"context_line":"                    p_fixed_ip \u003d {\u0027subnet_id\u0027: intf_subnet}"},{"line_number":336,"context_line":"                    port_data \u003d {"},{"line_number":337,"context_line":"                        \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":338,"context_line":"                        \u0027network_id\u0027: intf[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_23a32550","line":335,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  p_fixed_ip adds little value.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":332,"context_line":"                    # are assigned on the right subnet if multiple subnet"},{"line_number":333,"context_line":"                    # exists"},{"line_number":334,"context_line":"                    intf_subnet \u003d intf[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":335,"context_line":"                    p_fixed_ip \u003d {\u0027subnet_id\u0027: intf_subnet}"},{"line_number":336,"context_line":"                    port_data \u003d {"},{"line_number":337,"context_line":"                        \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":338,"context_line":"                        \u0027network_id\u0027: intf[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_9de371a3","line":335,"in_reply_to":"1ae5cdf2_23a32550","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":345,"context_line":"                    }"},{"line_number":346,"context_line":"                    snat_port \u003d self._core_plugin.create_port("},{"line_number":347,"context_line":"                        admin_ctx, {\u0027port\u0027: port_data})"},{"line_number":348,"context_line":"                    port_list.append(snat_port)"},{"line_number":349,"context_line":"                    if not snat_port:"},{"line_number":350,"context_line":"                        msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":351,"context_line":"                        raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_6301ad37","line":348,"updated":"2014-06-03 20:14:18.000000000","message":"Move this after L349 - L351","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":345,"context_line":"                    }"},{"line_number":346,"context_line":"                    snat_port \u003d self._core_plugin.create_port("},{"line_number":347,"context_line":"                        admin_ctx, {\u0027port\u0027: port_data})"},{"line_number":348,"context_line":"                    port_list.append(snat_port)"},{"line_number":349,"context_line":"                    if not snat_port:"},{"line_number":350,"context_line":"                        msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":351,"context_line":"                        raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bde02d97","line":348,"in_reply_to":"1ae5cdf2_6301ad37","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    if not snat_port:"},{"line_number":350,"context_line":"                        msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":351,"context_line":"                        raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":352,"context_line":"            if port_list:"},{"line_number":353,"context_line":"                self._populate_subnet_for_ports(context, port_list)"},{"line_number":354,"context_line":"            return port_list"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_839159f3","line":352,"updated":"2014-06-03 20:14:18.000000000","message":"This check isn\u0027t strictly necessary.  _populate_subnet_for_ports won\u0027t do anything if port_list is empty.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    if not snat_port:"},{"line_number":350,"context_line":"                        msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":351,"context_line":"                        raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":352,"context_line":"            if port_list:"},{"line_number":353,"context_line":"                self._populate_subnet_for_ports(context, port_list)"},{"line_number":354,"context_line":"            return port_list"},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_ddf09969","line":352,"in_reply_to":"1ae5cdf2_839159f3","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        Function provides the details of the VM ARP to the"},{"line_number":360,"context_line":"        L3 agent when a Nova instance gets created or deleted."},{"line_number":361,"context_line":"        \"\"\""},{"line_number":362,"context_line":"        distributed_ports \u003d False"},{"line_number":363,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":364,"context_line":"        if \"compute:\" not in port_dict[\u0027device_owner\u0027]:"},{"line_number":365,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bed2e859","line":362,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  This could be easily eliminated.  See my comment on L378.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":359,"context_line":"        Function provides the details of the VM ARP to the"},{"line_number":360,"context_line":"        L3 agent when a Nova instance gets created or deleted."},{"line_number":361,"context_line":"        \"\"\""},{"line_number":362,"context_line":"        distributed_ports \u003d False"},{"line_number":363,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":364,"context_line":"        if \"compute:\" not in port_dict[\u0027device_owner\u0027]:"},{"line_number":365,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_fdf55557","line":362,"in_reply_to":"1ae5cdf2_bed2e859","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            return"},{"line_number":366,"context_line":"        ip \u003d port_dict[\u0027fixed_ips\u0027][0]"},{"line_number":367,"context_line":"        ip_address \u003d ip[\u0027ip_address\u0027]"},{"line_number":368,"context_line":"        subnet \u003d ip[\u0027subnet_id\u0027]"},{"line_number":369,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]}}"},{"line_number":370,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":371,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c3336112","line":368,"updated":"2014-06-03 20:14:18.000000000","message":"nit: could easily inline these two lines above.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":365,"context_line":"            return"},{"line_number":366,"context_line":"        ip \u003d port_dict[\u0027fixed_ips\u0027][0]"},{"line_number":367,"context_line":"        ip_address \u003d ip[\u0027ip_address\u0027]"},{"line_number":368,"context_line":"        subnet \u003d ip[\u0027subnet_id\u0027]"},{"line_number":369,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]}}"},{"line_number":370,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":371,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1de761ad","line":368,"in_reply_to":"1ae5cdf2_c3336112","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]}}"},{"line_number":370,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":371,"context_line":"        for port in ports:"},{"line_number":372,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d \"network:router_interface_distributed\":"},{"line_number":373,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":374,"context_line":"                router_dict \u003d self._get_router(context, router_id)"},{"line_number":375,"context_line":"                if router_dict[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_63244dc5","line":372,"updated":"2014-06-03 20:14:18.000000000","message":"Use constant here:  DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":369,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]}}"},{"line_number":370,"context_line":"        ports \u003d self._core_plugin.get_ports(context, filters\u003dfilters)"},{"line_number":371,"context_line":"        for port in ports:"},{"line_number":372,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d \"network:router_interface_distributed\":"},{"line_number":373,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":374,"context_line":"                router_dict \u003d self._get_router(context, router_id)"},{"line_number":375,"context_line":"                if router_dict[\u0027distributed\u0027]:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_5d048949","line":372,"in_reply_to":"1ae5cdf2_63244dc5","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                if router_dict[\u0027distributed\u0027]:"},{"line_number":376,"context_line":"                    distributed_ports \u003d True"},{"line_number":377,"context_line":"                    break"},{"line_number":378,"context_line":"        if distributed_ports:"},{"line_number":379,"context_line":"            arp_table \u003d {\u0027ip_address\u0027: ip_address,"},{"line_number":380,"context_line":"                         \u0027mac_address\u0027: port_dict[\u0027mac_address\u0027],"},{"line_number":381,"context_line":"                         \u0027subnet_id\u0027: subnet}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_237165e0","line":378,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  You could just move this section up under L375 and return at the end instead of break.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":375,"context_line":"                if router_dict[\u0027distributed\u0027]:"},{"line_number":376,"context_line":"                    distributed_ports \u003d True"},{"line_number":377,"context_line":"                    break"},{"line_number":378,"context_line":"        if distributed_ports:"},{"line_number":379,"context_line":"            arp_table \u003d {\u0027ip_address\u0027: ip_address,"},{"line_number":380,"context_line":"                         \u0027mac_address\u0027: port_dict[\u0027mac_address\u0027],"},{"line_number":381,"context_line":"                         \u0027subnet_id\u0027: subnet}"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d014537","line":378,"in_reply_to":"1ae5cdf2_237165e0","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                                                      arp_table)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def delete_csnat_router_interface_ports(self, context,"},{"line_number":391,"context_line":"                                            router, subnet_id\u003dNone):"},{"line_number":392,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":393,"context_line":"        device_filter \u003d {"},{"line_number":394,"context_line":"            \u0027device_id\u0027: [router[\u0027id\u0027]],"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_ad33a412","line":391,"updated":"2014-06-03 20:14:18.000000000","message":"What is the use case for passing a subnet_id?  Does this take in to account the fact that a network might be configured with more than one subnet and a router could have its fixed ip from any one of them (not all of them, that isn\u0027t how multiple subnets works)?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":388,"context_line":"                                                      arp_table)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def delete_csnat_router_interface_ports(self, context,"},{"line_number":391,"context_line":"                                            router, subnet_id\u003dNone):"},{"line_number":392,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":393,"context_line":"        device_filter \u003d {"},{"line_number":394,"context_line":"            \u0027device_id\u0027: [router[\u0027id\u0027]],"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_dd97b9ea","line":391,"in_reply_to":"1ae5cdf2_ad33a412","updated":"2014-06-03 21:49:29.000000000","message":"FIXME..","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        device_filter \u003d {"},{"line_number":394,"context_line":"            \u0027device_id\u0027: [router[\u0027id\u0027]],"},{"line_number":395,"context_line":"            \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":396,"context_line":"        c_snat_ports \u003d self._core_plugin.get_ports("},{"line_number":397,"context_line":"            admin_ctx, filters\u003ddevice_filter)"},{"line_number":398,"context_line":"        if c_snat_ports:"},{"line_number":399,"context_line":"            for p in c_snat_ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_ad9724eb","line":396,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  Does this always return something iterable or will it return None.  If the former, the if statement below could be removed.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":393,"context_line":"        device_filter \u003d {"},{"line_number":394,"context_line":"            \u0027device_id\u0027: [router[\u0027id\u0027]],"},{"line_number":395,"context_line":"            \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":396,"context_line":"        c_snat_ports \u003d self._core_plugin.get_ports("},{"line_number":397,"context_line":"            admin_ctx, filters\u003ddevice_filter)"},{"line_number":398,"context_line":"        if c_snat_ports:"},{"line_number":399,"context_line":"            for p in c_snat_ports:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_fd9c7511","line":396,"in_reply_to":"1ae5cdf2_ad9724eb","updated":"2014-06-03 21:49:29.000000000","message":"ditto","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                    break"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"def _get_router_type(router):"},{"line_number":414,"context_line":"    \"\"\"Determine the type of router to be handled.\"\"\""},{"line_number":415,"context_line":"    default_router_type \u003d cfg.CONF.router_distributed"},{"line_number":416,"context_line":"    requested_router_type \u003d router.get(\u0027distributed\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_08400606","line":413,"updated":"2014-06-03 20:14:18.000000000","message":"This returns True if the router should be distributed and False otherwise.  A better name for this method would be something like \"_is_router_distributed\".","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":410,"context_line":"                    break"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"def _get_router_type(router):"},{"line_number":414,"context_line":"    \"\"\"Determine the type of router to be handled.\"\"\""},{"line_number":415,"context_line":"    default_router_type \u003d cfg.CONF.router_distributed"},{"line_number":416,"context_line":"    requested_router_type \u003d router.get(\u0027distributed\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_5d8ba9c2","line":413,"in_reply_to":"1ae5cdf2_08400606","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":416,"context_line":"    requested_router_type \u003d router.get(\u0027distributed\u0027)"},{"line_number":417,"context_line":"    return (requested_router_type"},{"line_number":418,"context_line":"            if attributes.is_attr_set(requested_router_type)"},{"line_number":419,"context_line":"            else default_router_type)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_adc9e427","line":419,"updated":"2014-06-03 20:14:18.000000000","message":"This method appears just a little too complicated.  To me, this reads more easily:\n\nrequested \u003d router.get(\u0027distributed\u0027)\nif attributes.is_attr_set(requested):\n    return requested\nreturn cfg.CONF.router_distributed","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":416,"context_line":"    requested_router_type \u003d router.get(\u0027distributed\u0027)"},{"line_number":417,"context_line":"    return (requested_router_type"},{"line_number":418,"context_line":"            if attributes.is_attr_set(requested_router_type)"},{"line_number":419,"context_line":"            else default_router_type)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d8865c5","line":419,"in_reply_to":"1ae5cdf2_adc9e427","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo.config import cfg"},{"line_number":16,"context_line":"import sqlalchemy as sa"},{"line_number":17,"context_line":"from sqlalchemy import orm"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_0ad987f2","line":15,"updated":"2014-06-05 17:49:48.000000000","message":"should be a newline here","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo.config import cfg"},{"line_number":16,"context_line":"import sqlalchemy as sa"},{"line_number":17,"context_line":"from sqlalchemy import orm"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_b025625d","line":15,"in_reply_to":"1ae5cdf2_0ad987f2","updated":"2014-06-05 18:20:46.000000000","message":"Done","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"    cfg.BoolOpt(\u0027router_distributed\u0027,"},{"line_number":27,"context_line":"                default\u003dFalse,"},{"line_number":28,"context_line":"                help\u003d_(\"System-wide flag that determines the type of router \""},{"line_number":29,"context_line":"                       \"to create when it is omitted in the user request.\")),"},{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_2ae483aa","line":29,"updated":"2014-06-05 17:49:48.000000000","message":"I thought this was supposed to be an admin flag.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"    cfg.BoolOpt(\u0027router_distributed\u0027,"},{"line_number":27,"context_line":"                default\u003dFalse,"},{"line_number":28,"context_line":"                help\u003d_(\"System-wide flag that determines the type of router \""},{"line_number":29,"context_line":"                       \"to create when it is omitted in the user request.\")),"},{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_f0e9aae6","line":29,"in_reply_to":"1ae5cdf2_2ae483aa","updated":"2014-06-05 18:20:46.000000000","message":"It is the default type for a router, i.e. how the router should be created when nothing explicit is specified.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":28,"context_line":"                help\u003d_(\"System-wide flag that determines the type of router \""},{"line_number":29,"context_line":"                       \"to create when it is omitted in the user request.\")),"},{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_556182d1","line":31,"updated":"2014-06-05 10:02:19.000000000","message":"Seems to be related to the DVR, so should be move to the dvr specific file ?","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":28,"context_line":"                help\u003d_(\"System-wide flag that determines the type of router \""},{"line_number":29,"context_line":"                       \"to create when it is omitted in the user request.\")),"},{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":"cfg.CONF.register_opts(router_distributed_opts)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_fe8186fb","line":31,"in_reply_to":"1ae5cdf2_556182d1","updated":"2014-06-05 14:29:00.000000000","message":"Done","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":39,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":40,"context_line":"                          primary_key\u003dTrue)"},{"line_number":41,"context_line":"    # Whether the router is a legacy (centralized) or a distributed one"},{"line_number":42,"context_line":"    distributed \u003d sa.Column(sa.Boolean, default\u003dFalse, nullable\u003dFalse)"},{"line_number":43,"context_line":"    router \u003d orm.relationship("},{"line_number":44,"context_line":"        l3_db.Router,"},{"line_number":45,"context_line":"        backref\u003dorm.backref(\"extra_attributes\", lazy\u003d\u0027joined\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_55c7c263","line":42,"updated":"2014-06-05 10:02:19.000000000","message":"My concern is about future extensions wanting to extend the l3 model, a such extension will add extra parameter here but maybe will not want this dvr specific attribute, because some plugins don\u0027t implement all the extensions ? IMHO The previous approach found in the gwmode extension was more flexible in this point of view since each extension was in charge on its own data model changes ?","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":39,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":40,"context_line":"                          primary_key\u003dTrue)"},{"line_number":41,"context_line":"    # Whether the router is a legacy (centralized) or a distributed one"},{"line_number":42,"context_line":"    distributed \u003d sa.Column(sa.Boolean, default\u003dFalse, nullable\u003dFalse)"},{"line_number":43,"context_line":"    router \u003d orm.relationship("},{"line_number":44,"context_line":"        l3_db.Router,"},{"line_number":45,"context_line":"        backref\u003dorm.backref(\"extra_attributes\", lazy\u003d\u0027joined\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_5ecfda55","line":42,"in_reply_to":"1ae5cdf2_55c7c263","updated":"2014-06-05 14:29:00.000000000","message":"This is about adding extra attributes to a router. If plugins don\u0027t want to implement all extensions then they shouldn\u0027t extend this one. Not sure I get your point, really. It\u0027s the same thing with gwmode.","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":39,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":40,"context_line":"                          primary_key\u003dTrue)"},{"line_number":41,"context_line":"    # Whether the router is a legacy (centralized) or a distributed one"},{"line_number":42,"context_line":"    distributed \u003d sa.Column(sa.Boolean, default\u003dFalse, nullable\u003dFalse)"},{"line_number":43,"context_line":"    router \u003d orm.relationship("},{"line_number":44,"context_line":"        l3_db.Router,"},{"line_number":45,"context_line":"        backref\u003dorm.backref(\"extra_attributes\", lazy\u003d\u0027joined\u0027,"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_b2080fdb","line":42,"in_reply_to":"1ae5cdf2_5ecfda55","updated":"2014-06-05 16:02:24.000000000","message":"I mean, I going to introduce the HA Vrrp Extension. If I add the extra fields of the vrrp here and a plugin wants to implements only the dvr extension it will have the vrrp attributes since it will use this class for the dvr. Before If I wanted to implement only the dvr extension and having only the dvr attributes in the DB, I just had to import the right extension db file ?","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":54,"context_line":"                router.get(attr[\u0027name\u0027], attr[\u0027default\u0027]))"},{"line_number":55,"context_line":"                for attr in extra_attributes))"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _process_extra_router_create("},{"line_number":58,"context_line":"        self, context, router_db, router_req):"},{"line_number":59,"context_line":"        kwargs \u003d self._get_extra_attributes(router_req, self.extra_attributes)"},{"line_number":60,"context_line":"        # extra_attributes reference is populated via backref"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_a25ebc10","line":57,"updated":"2014-06-09 07:11:41.000000000","message":"(nit) I prefer to _process_extraattr_router_create.\nAt now it may be clear but I am a bit confused it as \u0027process \"extra router\" create\u0027 when reading l3_db_dvr.py.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":54,"context_line":"                router.get(attr[\u0027name\u0027], attr[\u0027default\u0027]))"},{"line_number":55,"context_line":"                for attr in extra_attributes))"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _process_extra_router_create("},{"line_number":58,"context_line":"        self, context, router_db, router_req):"},{"line_number":59,"context_line":"        kwargs \u003d self._get_extra_attributes(router_req, self.extra_attributes)"},{"line_number":60,"context_line":"        # extra_attributes reference is populated via backref"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_896e2a95","line":57,"in_reply_to":"1ae5cdf2_a25ebc10","updated":"2014-06-09 18:18:40.000000000","message":"Will address this in the next patch.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron.extensions import l3"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":25,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    __tablename__ \u003d \"router_extra_attributes\""}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_3557c95b","line":24,"updated":"2014-06-19 00:07:29.000000000","message":"Do we intend, as the name suggests, for this class/file to be used for arbitrary extensions to Router?  Perhaps a comment somewhere in the file that explains the intent would be helpful?","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron.extensions import l3"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class RouterExtraAttributes(model_base.BASEV2):"},{"line_number":25,"context_line":"    \"\"\"Additional attributes for a Virtual Router.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    __tablename__ \u003d \"router_extra_attributes\""}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_2e176ea4","line":24,"in_reply_to":"1ae5cdf2_3557c95b","updated":"2014-06-19 07:49:33.000000000","message":"Isn\u0027t that what the docstring is for? I\u0027ll beef it up","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_extra_attributes(self, router, extra_attributes):"},{"line_number":53,"context_line":"        return (dict((attr[\u0027name\u0027],"},{"line_number":54,"context_line":"                router.get(attr[\u0027name\u0027], attr[\u0027default\u0027]))"},{"line_number":55,"context_line":"                for attr in extra_attributes))"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _process_extra_attr_router_create("}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_102c9b98","line":54,"updated":"2014-06-19 00:07:29.000000000","message":"wondering if this should be indented to under \u0027a\u0027 in attr","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_extra_attributes(self, router, extra_attributes):"},{"line_number":53,"context_line":"        return (dict((attr[\u0027name\u0027],"},{"line_number":54,"context_line":"                router.get(attr[\u0027name\u0027], attr[\u0027default\u0027]))"},{"line_number":55,"context_line":"                for attr in extra_attributes))"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _process_extra_attr_router_create("}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_4e54bac5","line":54,"in_reply_to":"1ae5cdf2_102c9b98","updated":"2014-06-19 07:48:34.000000000","message":"perhaps, but so long as pep8 does not complain I wouldn\u0027t touch it ;)","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":"            name \u003d attr[\u0027name\u0027]"},{"line_number":52,"context_line":"            default \u003d attr[\u0027default\u0027]"},{"line_number":53,"context_line":"            router_res[name] \u003d ("},{"line_number":54,"context_line":"                extra_attrs and extra_attrs[name] or default)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _get_extra_attributes(self, router, extra_attributes):"},{"line_number":57,"context_line":"        return (dict((attr[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_cb3f3886","line":54,"updated":"2014-06-24 19:38:42.000000000","message":"What if extra_attrs[name] is an empty list or dict?  Is default the desired result?","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":"            name \u003d attr[\u0027name\u0027]"},{"line_number":52,"context_line":"            default \u003d attr[\u0027default\u0027]"},{"line_number":53,"context_line":"            router_res[name] \u003d ("},{"line_number":54,"context_line":"                extra_attrs and extra_attrs[name] or default)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _get_extra_attributes(self, router, extra_attributes):"},{"line_number":57,"context_line":"        return (dict((attr[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_2ecee5b7","line":54,"in_reply_to":"1ae5cdf2_cb3f3886","updated":"2014-06-24 22:21:41.000000000","message":"extra_attrs[\u0027name\u0027] cannot be neither of these. It\u0027s the property you\u0027re accessing on the model.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"unresolved":false,"context_lines":[{"line_number":33,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":34,"context_line":"                          primary_key\u003dTrue)"},{"line_number":35,"context_line":"    # Whether the router is a legacy (centralized) or a distributed one"},{"line_number":36,"context_line":"    distributed \u003d sa.Column(sa.Boolean, default\u003dFalse, nullable\u003dFalse)"},{"line_number":37,"context_line":"    router \u003d orm.relationship("},{"line_number":38,"context_line":"        l3_db.Router,"},{"line_number":39,"context_line":"        backref\u003dorm.backref(\"extra_attributes\", lazy\u003d\u0027joined\u0027,"}],"source_content_type":"text/x-python","patch_set":59,"id":"baada198_4ce08dcc","line":36,"updated":"2014-07-10 10:04:13.000000000","message":"Please, add parameter server_default\u003dsqlalchemy.sql.false() for synchronization with models.","commit_id":"6adf2178cd0f7795e7a2910a4f8612abe483ef2b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":33,"context_line":"                          sa.ForeignKey(\u0027routers.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":34,"context_line":"                          primary_key\u003dTrue)"},{"line_number":35,"context_line":"    # Whether the router is a legacy (centralized) or a distributed one"},{"line_number":36,"context_line":"    distributed \u003d sa.Column(sa.Boolean, default\u003dFalse, nullable\u003dFalse)"},{"line_number":37,"context_line":"    router \u003d orm.relationship("},{"line_number":38,"context_line":"        l3_db.Router,"},{"line_number":39,"context_line":"        backref\u003dorm.backref(\"extra_attributes\", lazy\u003d\u0027joined\u0027,"}],"source_content_type":"text/x-python","patch_set":59,"id":"baada198_880c4a96","line":36,"in_reply_to":"baada198_4ce08dcc","updated":"2014-07-10 13:45:21.000000000","message":"Done","commit_id":"6adf2178cd0f7795e7a2910a4f8612abe483ef2b"}],"neutron/db/l3_db.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.openstack.common.notifier import api as notifier_api"},{"line_number":30,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":31,"context_line":"from neutron.plugins.common import constants"},{"line_number":32,"context_line":"from neutron.plugins.ml2 import db as ml2_db"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2Bdg%3D","line":32,"updated":"2014-03-31 20:38:20.000000000","message":"that seems to be wrong dependency: common db module depends on particular plugin. see comment below","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from neutron.openstack.common.notifier import api as notifier_api"},{"line_number":30,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":31,"context_line":"from neutron.plugins.common import constants"},{"line_number":32,"context_line":"from neutron.plugins.ml2 import db as ml2_db"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9joo%3D","line":32,"in_reply_to":"AAAAWH%2F9%2Bdg%3D","updated":"2014-04-03 18:20:53.000000000","message":"I had a question on this, but I will take care","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        return self._fields(res, fields)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def get_vm_port_hostid(self, context, port_id):"},{"line_number":117,"context_line":"        return ml2_db.get_port_binding_host(port_id)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def create_router(self, context, router):"},{"line_number":120,"context_line":"        r \u003d router[\u0027router\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BcA%3D","line":117,"updated":"2014-03-31 20:38:20.000000000","message":"looks like get_port_binding_host should be moved into base_db_plugin and implemented in particular plugins.\n\nThen, you would use self._core_plugin.get_port_binding_host(context, port_id) here.\nWith such you\u0027ll avoid the dependency on ml2","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        return self._fields(res, fields)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def get_vm_port_hostid(self, context, port_id):"},{"line_number":117,"context_line":"        return ml2_db.get_port_binding_host(port_id)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def create_router(self, context, router):"},{"line_number":120,"context_line":"        r \u003d router[\u0027router\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jt0%3D","line":117,"in_reply_to":"AAAAWH%2F9%2BcA%3D","updated":"2014-04-03 18:20:53.000000000","message":"The \"Portbinding\" table in the Commondb is not getting populated and only the \"ml2.db\" \"Portbinding\" table is the one that is getting populated. \nDo you want me to re-write this function in the db_base_plugin_v2.py by importing the \"ml2.db\".","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"9807e502c7f6745bf38d490ed6ea23c298f1ed86","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            # Ensure we actually have something to update"},{"line_number":152,"context_line":"            if r.keys():"},{"line_number":153,"context_line":"                router_db.update(r)"},{"line_number":154,"context_line":"        pay_load \u003d {}"},{"line_number":155,"context_line":"        operation \u003d None"},{"line_number":156,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":157,"context_line":"            context, [router_db[\u0027id\u0027]], operation, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9w6A%3D","line":154,"updated":"2014-04-02 10:13:06.000000000","message":"Why subnet id doesn\u0027t need to be passed like create and delete router?","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"b7f2408b5605bfd8c4cfa1035c3ad9013f495f10","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            if r.keys():"},{"line_number":153,"context_line":"                router_db.update(r)"},{"line_number":154,"context_line":"        pay_load \u003d {}"},{"line_number":155,"context_line":"        operation \u003d None"},{"line_number":156,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":157,"context_line":"            context, [router_db[\u0027id\u0027]], operation, pay_load)"},{"line_number":158,"context_line":"        return self._make_router_dict(router_db)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F96Q4%3D","line":155,"updated":"2014-04-01 09:43:42.000000000","message":"Seems to be unuseful, why sending two empty variables ?","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":313,"context_line":"        if not interface_info:"},{"line_number":314,"context_line":"            msg \u003d _(\"Either subnet_id or port_id must be specified\")"},{"line_number":315,"context_line":"            raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":316,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":317,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":318,"context_line":"            # make sure port update is committed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2Bbc%3D","line":315,"updated":"2014-03-31 20:38:20.000000000","message":"why?\n\nfrom neutron.common import exceptions as n_exc","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"},{"line_number":313,"context_line":"        if not interface_info:"},{"line_number":314,"context_line":"            msg \u003d _(\"Either subnet_id or port_id must be specified\")"},{"line_number":315,"context_line":"            raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":316,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":317,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":318,"context_line":"            # make sure port update is committed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jtU%3D","line":315,"in_reply_to":"AAAAWH%2F9%2Bbc%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care of this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                                                  port[\u0027network_id\u0027],"},{"line_number":338,"context_line":"                                                  subnet[\u0027id\u0027],"},{"line_number":339,"context_line":"                                                  subnet[\u0027cidr\u0027])"},{"line_number":340,"context_line":"                if router[\u0027distributed\u0027] is True:"},{"line_number":341,"context_line":"                    port.update("},{"line_number":342,"context_line":"                        {\u0027device_id\u0027: router_id,"},{"line_number":343,"context_line":"                         \u0027device_owner\u0027: DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BbE%3D","line":340,"updated":"2014-03-31 20:38:20.000000000","message":"nit: \n if router[\u0027distributed\u0027]:\n     ...","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                                                  port[\u0027network_id\u0027],"},{"line_number":338,"context_line":"                                                  subnet[\u0027id\u0027],"},{"line_number":339,"context_line":"                                                  subnet[\u0027cidr\u0027])"},{"line_number":340,"context_line":"                if router[\u0027distributed\u0027] is True:"},{"line_number":341,"context_line":"                    port.update("},{"line_number":342,"context_line":"                        {\u0027device_id\u0027: router_id,"},{"line_number":343,"context_line":"                         \u0027device_owner\u0027: DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jtM%3D","line":340,"in_reply_to":"AAAAWH%2F9%2BbE%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care of this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                                              subnet[\u0027cidr\u0027])"},{"line_number":358,"context_line":"            fixed_ip \u003d {\u0027ip_address\u0027: subnet[\u0027gateway_ip\u0027],"},{"line_number":359,"context_line":"                        \u0027subnet_id\u0027: subnet[\u0027id\u0027]}"},{"line_number":360,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":361,"context_line":"                l_device_owner \u003d DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":362,"context_line":"            else:"},{"line_number":363,"context_line":"                l_device_owner \u003d DEVICE_OWNER_ROUTER_INTF"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2Ba4%3D","line":360,"updated":"2014-03-31 20:38:20.000000000","message":"same as above","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                                              subnet[\u0027cidr\u0027])"},{"line_number":358,"context_line":"            fixed_ip \u003d {\u0027ip_address\u0027: subnet[\u0027gateway_ip\u0027],"},{"line_number":359,"context_line":"                        \u0027subnet_id\u0027: subnet[\u0027id\u0027]}"},{"line_number":360,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":361,"context_line":"                l_device_owner \u003d DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":362,"context_line":"            else:"},{"line_number":363,"context_line":"                l_device_owner \u003d DEVICE_OWNER_ROUTER_INTF"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9js8%3D","line":360,"in_reply_to":"AAAAWH%2F9%2Ba4%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care of this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":398,"context_line":"    def remove_router_interface(self, context, router_id, interface_info):"},{"line_number":399,"context_line":"        if not interface_info:"},{"line_number":400,"context_line":"            msg \u003d _(\"Either subnet_id or port_id must be specified\")"},{"line_number":401,"context_line":"            raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":402,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":403,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":404,"context_line":"            port_id \u003d interface_info[\u0027port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2Bak%3D","line":401,"updated":"2014-03-31 20:38:20.000000000","message":"same as above","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":398,"context_line":"    def remove_router_interface(self, context, router_id, interface_info):"},{"line_number":399,"context_line":"        if not interface_info:"},{"line_number":400,"context_line":"            msg \u003d _(\"Either subnet_id or port_id must be specified\")"},{"line_number":401,"context_line":"            raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":402,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":403,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":404,"context_line":"            port_id \u003d interface_info[\u0027port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9js4%3D","line":401,"in_reply_to":"AAAAWH%2F9%2Bak%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care of this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":404,"context_line":"            port_id \u003d interface_info[\u0027port_id\u0027]"},{"line_number":405,"context_line":"            port_db \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":406,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":407,"context_line":"                if not (port_db[\u0027device_owner\u0027] \u003d\u003d"},{"line_number":408,"context_line":"                        DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":409,"context_line":"                        and port_db[\u0027device_id\u0027] \u003d\u003d router_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2Bag%3D","line":406,"updated":"2014-03-31 20:38:20.000000000","message":"same as above.\nalso 406-416 can be simplified. the logic is the same except the comparison with a constant.\nconsider the following:\n owner \u003d DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED if router[\u0027distributed\u0027] else DEVICE_OWNER_ROUTER_INTF\n if not (port_db[\u0027device_owner\u0027] \u003d\u003d owner\n           and port_db[\u0027device_id\u0027] \u003d\u003d router_id):\n    raise l3.RouterInterfaceNotFound(router_id\u003drouter_id,\n                                                     port_id\u003dport_id)","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":404,"context_line":"            port_id \u003d interface_info[\u0027port_id\u0027]"},{"line_number":405,"context_line":"            port_db \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":406,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":407,"context_line":"                if not (port_db[\u0027device_owner\u0027] \u003d\u003d"},{"line_number":408,"context_line":"                        DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":409,"context_line":"                        and port_db[\u0027device_id\u0027] \u003d\u003d router_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jsk%3D","line":406,"in_reply_to":"AAAAWH%2F9%2Bag%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care of this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"            try:"},{"line_number":438,"context_line":"                rport_qry \u003d context.session.query(models_v2.Port)"},{"line_number":439,"context_line":"                if router[\u0027distributed\u0027] is True:"},{"line_number":440,"context_line":"                    ports \u003d rport_qry.filter_by("},{"line_number":441,"context_line":"                        device_id\u003drouter_id,"},{"line_number":442,"context_line":"                        device_owner\u003dDEVICE_OWNER_ROUTER_INTF_DISTRIBUTED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BYM%3D","line":439,"updated":"2014-03-31 20:38:20.000000000","message":"same as above","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"            try:"},{"line_number":438,"context_line":"                rport_qry \u003d context.session.query(models_v2.Port)"},{"line_number":439,"context_line":"                if router[\u0027distributed\u0027] is True:"},{"line_number":440,"context_line":"                    ports \u003d rport_qry.filter_by("},{"line_number":441,"context_line":"                        device_id\u003drouter_id,"},{"line_number":442,"context_line":"                        device_owner\u003dDEVICE_OWNER_ROUTER_INTF_DISTRIBUTED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jsY%3D","line":439,"in_reply_to":"AAAAWH%2F9%2BYM%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care of this.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"b7f2408b5605bfd8c4cfa1035c3ad9013f495f10","unresolved":false,"context_lines":[{"line_number":495,"context_line":"    def _find_rid_intf_ports("},{"line_number":496,"context_line":"        self, context, internal_port, internal_subnet_id,"},{"line_number":497,"context_line":"        external_network_id, owner"},{"line_number":498,"context_line":"    ):"},{"line_number":499,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":500,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":501,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F96NY%3D","line":498,"updated":"2014-04-01 09:43:42.000000000","message":"nit: merge with the line above","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":495,"context_line":"    def _find_rid_intf_ports("},{"line_number":496,"context_line":"        self, context, internal_port, internal_subnet_id,"},{"line_number":497,"context_line":"        external_network_id, owner"},{"line_number":498,"context_line":"    ):"},{"line_number":499,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":500,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":501,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jr8%3D","line":498,"in_reply_to":"AAAAWH%2F96NY%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"9807e502c7f6745bf38d490ed6ea23c298f1ed86","unresolved":false,"context_lines":[{"line_number":499,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":500,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":501,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":502,"context_line":"            device_owner\u003downer)"},{"line_number":503,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":504,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":505,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9wmw%3D","line":502,"updated":"2014-04-02 10:13:06.000000000","message":"What about:\n\n  router_intf_ports \u003d router_intf_qry.filter_by(network_id\u003dinternal_port[\u0027network_id\u0027]).\\\nfilter(sqlalchemy.or_(\ndevice_owner\u003d\u003dDEVICE_OWNER_ROUTER_INTF, \ndevice_owner\u003d\u003dDEVICE_OWNER_ROUTER_INTF_DISTRIBUTED))\n\nthen call _find_rid_intf_ports only once in  _get_router_for_floatingip","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":499,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":500,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":501,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":502,"context_line":"            device_owner\u003downer)"},{"line_number":503,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":504,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":505,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jrg%3D","line":502,"in_reply_to":"AAAAWH%2F9wmw%3D","updated":"2014-04-03 18:20:53.000000000","message":"I tried applying a similar query and it errors out.\nMay be I am not getting this syntax write.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"b7f2408b5605bfd8c4cfa1035c3ad9013f495f10","unresolved":false,"context_lines":[{"line_number":510,"context_line":"                    device_owner\u003dDEVICE_OWNER_ROUTER_GW).count()"},{"line_number":511,"context_line":"                if has_gw_port:"},{"line_number":512,"context_line":"                    return router_id"},{"line_number":513,"context_line":"        return None"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def _get_router_for_floatingip(self, context, internal_port,"},{"line_number":516,"context_line":"                                   internal_subnet_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F96MM%3D","line":513,"updated":"2014-04-01 09:43:42.000000000","message":"nit: not needed","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":510,"context_line":"                    device_owner\u003dDEVICE_OWNER_ROUTER_GW).count()"},{"line_number":511,"context_line":"                if has_gw_port:"},{"line_number":512,"context_line":"                    return router_id"},{"line_number":513,"context_line":"        return None"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def _get_router_for_floatingip(self, context, internal_port,"},{"line_number":516,"context_line":"                                   internal_subnet_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jrc%3D","line":513,"in_reply_to":"AAAAWH%2F96MM%3D","updated":"2014-04-03 18:20:53.000000000","message":"will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":520,"context_line":"        if not subnet_db[\u0027gateway_ip\u0027]:"},{"line_number":521,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to port on subnet %s \u0027"},{"line_number":522,"context_line":"                     \u0027which has no gateway_ip\u0027) % internal_subnet_id)"},{"line_number":523,"context_line":"            raise q_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        # find router interface ports on this network"},{"line_number":526,"context_line":"        # TODO: Swami check if can do filtering on multiple owners"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BYE%3D","line":523,"updated":"2014-03-31 20:38:20.000000000","message":"n_exc","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":520,"context_line":"        if not subnet_db[\u0027gateway_ip\u0027]:"},{"line_number":521,"context_line":"            msg \u003d (_(\u0027Cannot add floating IP to port on subnet %s \u0027"},{"line_number":522,"context_line":"                     \u0027which has no gateway_ip\u0027) % internal_subnet_id)"},{"line_number":523,"context_line":"            raise q_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        # find router interface ports on this network"},{"line_number":526,"context_line":"        # TODO: Swami check if can do filtering on multiple owners"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jrU%3D","line":523,"in_reply_to":"AAAAWH%2F9%2BYE%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                                   internal_subnet_id,"},{"line_number":533,"context_line":"                                                   external_network_id,"},{"line_number":534,"context_line":"                                                   DEVICE_OWNER_ROUTER_INTF)"},{"line_number":535,"context_line":"                if rtr_id is not None:"},{"line_number":536,"context_line":"                    return rtr_id"},{"line_number":537,"context_line":"        else:"},{"line_number":538,"context_line":"            return rtr_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BXE%3D","line":535,"updated":"2014-03-31 20:38:20.000000000","message":"same as above:\n  if not rtr_id:","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"b7f2408b5605bfd8c4cfa1035c3ad9013f495f10","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                                   internal_subnet_id,"},{"line_number":533,"context_line":"                                                   external_network_id,"},{"line_number":534,"context_line":"                                                   DEVICE_OWNER_ROUTER_INTF)"},{"line_number":535,"context_line":"                if rtr_id is not None:"},{"line_number":536,"context_line":"                    return rtr_id"},{"line_number":537,"context_line":"        else:"},{"line_number":538,"context_line":"            return rtr_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F96I0%3D","line":535,"in_reply_to":"AAAAWH%2F9%2BXE%3D","updated":"2014-04-01 09:43:42.000000000","message":"I think you meant:\n  if rtr_id:","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                                   internal_subnet_id,"},{"line_number":533,"context_line":"                                                   external_network_id,"},{"line_number":534,"context_line":"                                                   DEVICE_OWNER_ROUTER_INTF)"},{"line_number":535,"context_line":"                if rtr_id is not None:"},{"line_number":536,"context_line":"                    return rtr_id"},{"line_number":537,"context_line":"        else:"},{"line_number":538,"context_line":"            return rtr_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jrM%3D","line":535,"in_reply_to":"AAAAWH%2F96I0%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        router_id \u003d floatingip_db[\u0027router_id\u0027]"},{"line_number":701,"context_line":"        if router_id:"},{"line_number":702,"context_line":"            pay_load \u003d {}"},{"line_number":703,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":704,"context_line":"                context, [router_id],"},{"line_number":705,"context_line":"                \u0027create_floatingip\u0027, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BWs%3D","line":702,"updated":"2014-03-31 20:38:20.000000000","message":"unnecessary","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        router_id \u003d floatingip_db[\u0027router_id\u0027]"},{"line_number":701,"context_line":"        if router_id:"},{"line_number":702,"context_line":"            pay_load \u003d {}"},{"line_number":703,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":704,"context_line":"                context, [router_id],"},{"line_number":705,"context_line":"                \u0027create_floatingip\u0027, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jrI%3D","line":702,"in_reply_to":"AAAAWH%2F9%2BWs%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will look into it.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"b7f2408b5605bfd8c4cfa1035c3ad9013f495f10","unresolved":false,"context_lines":[{"line_number":702,"context_line":"            pay_load \u003d {}"},{"line_number":703,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":704,"context_line":"                context, [router_id],"},{"line_number":705,"context_line":"                \u0027create_floatingip\u0027, pay_load)"},{"line_number":706,"context_line":"        return self._make_floatingip_dict(floatingip_db)"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    def update_floatingip(self, context, id, floatingip):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F96Co%3D","line":705,"updated":"2014-04-01 09:43:42.000000000","message":"Same as above, why sending an empty variable. The current agent implementation doesn\u0027t use command field nor the payload field. It seems you plan to change to agent side you could filter the payload value there ?\n\nProbably the same for all rpc messages","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":702,"context_line":"            pay_load \u003d {}"},{"line_number":703,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":704,"context_line":"                context, [router_id],"},{"line_number":705,"context_line":"                \u0027create_floatingip\u0027, pay_load)"},{"line_number":706,"context_line":"        return self._make_floatingip_dict(floatingip_db)"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    def update_floatingip(self, context, id, floatingip):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jqo%3D","line":705,"in_reply_to":"AAAAWH%2F96Co%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":723,"context_line":"        if router_id and router_id !\u003d before_router_id:"},{"line_number":724,"context_line":"            router_ids.append(router_id)"},{"line_number":725,"context_line":"        if router_ids:"},{"line_number":726,"context_line":"            pay_load \u003d {}"},{"line_number":727,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":728,"context_line":"                context, router_ids, \u0027update_floatingip\u0027, pay_load)"},{"line_number":729,"context_line":"        return self._make_floatingip_dict(floatingip_db)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BWc%3D","line":726,"updated":"2014-03-31 20:38:20.000000000","message":"unnecessary","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":743,"context_line":"                                          floatingip[\u0027floating_port_id\u0027],"},{"line_number":744,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":745,"context_line":"        if router_id:"},{"line_number":746,"context_line":"            pay_load \u003d {}"},{"line_number":747,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":748,"context_line":"                context, [router_id],"},{"line_number":749,"context_line":"                \u0027delete_floatingip\u0027, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BWY%3D","line":746,"updated":"2014-03-31 20:38:20.000000000","message":"unnecessary","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":743,"context_line":"                                          floatingip[\u0027floating_port_id\u0027],"},{"line_number":744,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":745,"context_line":"        if router_id:"},{"line_number":746,"context_line":"            pay_load \u003d {}"},{"line_number":747,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":748,"context_line":"                context, [router_id],"},{"line_number":749,"context_line":"                \u0027delete_floatingip\u0027, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jqg%3D","line":746,"in_reply_to":"AAAAWH%2F9%2BWY%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":816,"context_line":"                raise Exception(_(\u0027Multiple floating IPs found for port %s\u0027)"},{"line_number":817,"context_line":"                                % port_id)"},{"line_number":818,"context_line":"        if router_id:"},{"line_number":819,"context_line":"            pay_load \u003d {}"},{"line_number":820,"context_line":"            operation \u003d None"},{"line_number":821,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":822,"context_line":"                context, [router_id], operation, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BWE%3D","line":819,"updated":"2014-03-31 20:38:20.000000000","message":"why creating variables that are not used other than passing as parameters?","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":816,"context_line":"                raise Exception(_(\u0027Multiple floating IPs found for port %s\u0027)"},{"line_number":817,"context_line":"                                % port_id)"},{"line_number":818,"context_line":"        if router_id:"},{"line_number":819,"context_line":"            pay_load \u003d {}"},{"line_number":820,"context_line":"            operation \u003d None"},{"line_number":821,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":822,"context_line":"                context, [router_id], operation, pay_load)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jps%3D","line":819,"in_reply_to":"AAAAWH%2F9%2BWE%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            pay_load \u003d {}"},{"line_number":820,"context_line":"            operation \u003d None"},{"line_number":821,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":822,"context_line":"                context, [router_id], operation, pay_load)"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":825,"context_line":"        gw_port_id_gw_port_dict \u003d dict((gw_port[\u0027id\u0027], gw_port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BVU%3D","line":822,"updated":"2014-03-31 20:38:20.000000000","message":"self.l3_rpc_notifier.routers_updated(context, [router_id], None, {})","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            pay_load \u003d {}"},{"line_number":820,"context_line":"            operation \u003d None"},{"line_number":821,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":822,"context_line":"                context, [router_id], operation, pay_load)"},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":825,"context_line":"        gw_port_id_gw_port_dict \u003d dict((gw_port[\u0027id\u0027], gw_port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jpI%3D","line":822,"in_reply_to":"AAAAWH%2F9%2BVU%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will follow the syntax given","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":498,"context_line":"                    device_owner\u003dDEVICE_OWNER_ROUTER_GW).count()"},{"line_number":499,"context_line":"                if has_gw_port:"},{"line_number":500,"context_line":"                    return router_id"},{"line_number":501,"context_line":"        return"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_router_for_floatingip(self, context, internal_port,"},{"line_number":504,"context_line":"                                   internal_subnet_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8dI%3D","line":501,"updated":"2014-04-08 11:38:30.000000000","message":"remove: return not needed at end, and will return None by default.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":31,"context_line":"from neutron.plugins.common import constants"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOsY%3D","line":33,"updated":"2014-04-15 23:57:38.000000000","message":"Avoid unrelated changes.  Even small ones like adding a line can cause merge problems down the road.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def get_vm_port_hostid(self, context, port_id):"},{"line_number":117,"context_line":"        vm_port_db \u003d self._core_plugin.get_port(context, port_id)"},{"line_number":118,"context_line":"        if vm_port_db and vm_port_db[\u0027device_owner\u0027] \u003d\u003d \u0027compute:none\u0027:"},{"line_number":119,"context_line":"            return vm_port_db[\u0027binding:host_id\u0027]"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def create_router(self, context, router):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOgw%3D","line":118,"updated":"2014-04-15 23:57:38.000000000","message":"Is \u0027compute:none\u0027 correct?  I see \u0027compute:nova\u0027 on my compute instance\u0027s ports.  I\u0027ve also seen things like \u0027compute:azN\u0027.\n\nLooking at nova/network/neutronv2/api.py it looks like this will contain the az.  The az could be about anything, I think.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def get_vm_port_hostid(self, context, port_id):"},{"line_number":117,"context_line":"        vm_port_db \u003d self._core_plugin.get_port(context, port_id)"},{"line_number":118,"context_line":"        if vm_port_db and vm_port_db[\u0027device_owner\u0027] \u003d\u003d \u0027compute:none\u0027:"},{"line_number":119,"context_line":"            return vm_port_db[\u0027binding:host_id\u0027]"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def create_router(self, context, router):"},{"line_number":122,"context_line":"        r \u003d router[\u0027router\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2F%2B7g%3D","line":119,"updated":"2014-04-09 03:50:21.000000000","message":"use HOST_ID from portbindings instead of binding:host_id","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":154,"context_line":"            if r.keys():"},{"line_number":155,"context_line":"                router_db.update(r)"},{"line_number":156,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":157,"context_line":"            context, [router_db[\u0027id\u0027]], None, {})"},{"line_number":158,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def _create_router_gw_port(self, context, router, network_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ff30%3D","line":157,"updated":"2014-04-14 09:05:17.000000000","message":"nit: why passing these args here, seems to be not used. Probably same below","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            if r.keys():"},{"line_number":155,"context_line":"                router_db.update(r)"},{"line_number":156,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":157,"context_line":"            context, [router_db[\u0027id\u0027]], None, {})"},{"line_number":158,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def _create_router_gw_port(self, context, router, network_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOkQ%3D","line":157,"in_reply_to":"AAAAW3%2F%2Ff30%3D","updated":"2014-04-15 23:57:38.000000000","message":"The motivation seems to be to override the default value of data from None to {}.\n\nI don\u0027t fully understand the reason for doing this.  From what I can see, routers_update passes data to _notification which passes it to _agent_notification which discards it.  So, why do we care whether data is {} or None?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":340,"context_line":"                if router[\u0027distributed\u0027]:"},{"line_number":341,"context_line":"                    port.update("},{"line_number":342,"context_line":"                        {\u0027device_id\u0027: router_id,"},{"line_number":343,"context_line":"                         \u0027device_owner\u0027: DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED})"},{"line_number":344,"context_line":"                else:"},{"line_number":345,"context_line":"                    port.update({\u0027device_id\u0027: router_id,"},{"line_number":346,"context_line":"                                 \u0027device_owner\u0027: DEVICE_OWNER_ROUTER_INTF})"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ff3c%3D","line":343,"updated":"2014-04-14 09:05:17.000000000","message":"Suggestion : Maybe create a device_owner variable and use it in the port.update method to have less duplicated code. You could create it at #317 and use it here and line #372","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":404,"context_line":"            port_id \u003d interface_info[\u0027port_id\u0027]"},{"line_number":405,"context_line":"            port_db \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":406,"context_line":"            device_owner \u003d ("},{"line_number":407,"context_line":"                DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED if"},{"line_number":408,"context_line":"                router[\u0027distributed\u0027] else DEVICE_OWNER_ROUTER_INTF)"},{"line_number":409,"context_line":"            if not (port_db[\u0027device_owner\u0027] \u003d\u003d device_owner"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ff2o%3D","line":406,"updated":"2014-04-14 09:05:17.000000000","message":"Same as above, move this line just after the line 402 and use it in the if/else","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":434,"context_line":"                rport_qry \u003d context.session.query(models_v2.Port)"},{"line_number":435,"context_line":"                owner \u003d ("},{"line_number":436,"context_line":"                    DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED if"},{"line_number":437,"context_line":"                    router[\u0027distributed\u0027] else DEVICE_OWNER_ROUTER_INTF)"},{"line_number":438,"context_line":"                ports \u003d rport_qry.filter_by("},{"line_number":439,"context_line":"                    device_id\u003drouter_id,"},{"line_number":440,"context_line":"                    device_owner\u003downer,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOpw%3D","line":437,"updated":"2014-04-15 23:57:38.000000000","message":"I think this is the third time this is done.  That is a good indication that a method could help.\n\ndef _router_device_owner(router):\n   ...","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def _find_rid_intf_ports(self, context, internal_port,"},{"line_number":488,"context_line":"                             internal_subnet_id,"},{"line_number":489,"context_line":"                             external_network_id, owner):"},{"line_number":490,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":491,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":492,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOng%3D","line":489,"updated":"2014-04-15 23:57:38.000000000","message":"I had to scratch my head for a moment to figure out what this method is for.  The name could be a little more clear.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":490,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":491,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":492,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":493,"context_line":"            device_owner\u003downer)"},{"line_number":494,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":495,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":496,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FggY%3D","line":493,"updated":"2014-04-14 05:47:22.000000000","message":"you can use the following \"or\" query to get both normal router interface and distributed router interface, so _find_rid_intf_port doesn\u0027t need to be called twice at line 517 and 523:\n\nrouter_intf_qry.filter_by(network_id\u003dinternal_port[\u0027network_id\u0027]).\\\nfilter(sa.or_(\nmodels_v2.Port.device_owner\u003d\u003dDEVICE_OWNER_ROUTER_INTF,\nmodels_v2.Port.device_owner\u003d\u003dDEVICE_OWNER_ROUTER_INTF_DISTRIBUTED))\n\nI\u0027ve tested this:-)","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4c0df15abc86da25e4dc5c9d0e7050e1aa752c63","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":491,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":492,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":493,"context_line":"            device_owner\u003downer)"},{"line_number":494,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":495,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":496,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2Ft%2Fk%3D","line":493,"in_reply_to":"AAAAW3%2F%2FOR4%3D","updated":"2014-04-18 14:52:18.000000000","message":"Looks like you\u0027re missing a \u0027)\u0027 just before .filter.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":491,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":492,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":493,"context_line":"            device_owner\u003downer)"},{"line_number":494,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":495,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":496,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOno%3D","line":493,"in_reply_to":"AAAAW3%2F%2FggY%3D","updated":"2014-04-15 23:57:38.000000000","message":"+1\n\nOne query instead of two will reduce overall runtime and reduce db stress.  This method could probably be flattened in to _get_router_for_floatingip with that change in place.  Actually, looking at it again, the total change of this section would be reduced to more or less just changing the query.  Less change is good for a patch of this magnitude in my opinion.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c69aa36e699245ba9ddc42e26ba72af22a5aa9f8","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":491,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":492,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":493,"context_line":"            device_owner\u003downer)"},{"line_number":494,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":495,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":496,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOR4%3D","line":493,"in_reply_to":"AAAAW3%2F%2FggY%3D","updated":"2014-04-16 22:48:57.000000000","message":"I get an object error in here.\nnetwork_id\u003dinternal_port[\u0027network_id\u0027].filter(sa.or_(\nAttributeError: \u0027unicode\u0027 object has no attribute \u0027filter\u0027","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"886755017c6776a2258057e4531f63339cf042ad","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        router_intf_qry \u003d context.session.query(models_v2.Port)"},{"line_number":491,"context_line":"        router_intf_ports \u003d router_intf_qry.filter_by("},{"line_number":492,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027],"},{"line_number":493,"context_line":"            device_owner\u003downer)"},{"line_number":494,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":495,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"},{"line_number":496,"context_line":"                router_id \u003d intf_p[\u0027device_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FHTc%3D","line":493,"in_reply_to":"AAAAXH%2F%2Ft%2Fk%3D","updated":"2014-04-23 22:34:41.000000000","message":"Thanks will check it out","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":616,"context_line":"        previous_router_id \u003d floatingip_db.router_id"},{"line_number":617,"context_line":"        port_id \u003d internal_ip_address \u003d router_id \u003d None"},{"line_number":618,"context_line":"        if ((\u0027fixed_ip_address\u0027 in fip and fip[\u0027fixed_ip_address\u0027]) and"},{"line_number":619,"context_line":"                not (\u0027port_id\u0027 in fip and fip[\u0027port_id\u0027])):"},{"line_number":620,"context_line":"            msg \u003d _(\"fixed_ip_address cannot be specified without a port_id\")"},{"line_number":621,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":622,"context_line":"        if \u0027port_id\u0027 in fip and fip[\u0027port_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2F%2B6Y%3D","line":619,"updated":"2014-04-09 03:50:21.000000000","message":"this change is not relevant?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        previous_router_id \u003d floatingip_db.router_id"},{"line_number":617,"context_line":"        port_id \u003d internal_ip_address \u003d router_id \u003d None"},{"line_number":618,"context_line":"        if ((\u0027fixed_ip_address\u0027 in fip and fip[\u0027fixed_ip_address\u0027]) and"},{"line_number":619,"context_line":"                not (\u0027port_id\u0027 in fip and fip[\u0027port_id\u0027])):"},{"line_number":620,"context_line":"            msg \u003d _(\"fixed_ip_address cannot be specified without a port_id\")"},{"line_number":621,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":622,"context_line":"        if \u0027port_id\u0027 in fip and fip[\u0027port_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOnM%3D","line":619,"in_reply_to":"AAAAW3%2F%2F%2B6Y%3D","updated":"2014-04-15 23:57:38.000000000","message":"+1.  It probably breaks pep8 as well.  ;)","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        if router_id:"},{"line_number":694,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":695,"context_line":"                context, [router_id],"},{"line_number":696,"context_line":"                \u0027create_floatingip\u0027, {})"},{"line_number":697,"context_line":"        return self._make_floatingip_dict(floatingip_db)"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def update_floatingip(self, context, id, floatingip):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOkA%3D","line":696,"updated":"2014-04-15 23:57:38.000000000","message":"See comment on line 157.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            router_ids.append(router_id)"},{"line_number":716,"context_line":"        if router_ids:"},{"line_number":717,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":718,"context_line":"                context, router_ids, \u0027update_floatingip\u0027, {})"},{"line_number":719,"context_line":"        return self._make_floatingip_dict(floatingip_db)"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    def update_floatingip_status(self, context, floatingip_id, status):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOj8%3D","line":718,"updated":"2014-04-15 23:57:38.000000000","message":"See comment on line 157.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":735,"context_line":"        if router_id:"},{"line_number":736,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":737,"context_line":"                context, [router_id],"},{"line_number":738,"context_line":"                \u0027delete_floatingip\u0027, {})"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"    def get_floatingip(self, context, id, fields\u003dNone):"},{"line_number":741,"context_line":"        floatingip \u003d self._get_floatingip(context, id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOj4%3D","line":738,"updated":"2014-04-15 23:57:38.000000000","message":"See comment on line 157.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":806,"context_line":"                                % port_id)"},{"line_number":807,"context_line":"        if router_id:"},{"line_number":808,"context_line":"            self.l3_rpc_notifier.routers_updated("},{"line_number":809,"context_line":"                context, [router_id], None, {})"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"    def _build_routers_list(self, routers, gw_ports):"},{"line_number":812,"context_line":"        gw_port_id_gw_port_dict \u003d dict((gw_port[\u0027id\u0027], gw_port)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOj0%3D","line":809,"updated":"2014-04-15 23:57:38.000000000","message":"See comment on line 157.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":862,"context_line":"        return gw_ports"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def get_sync_interfaces(self, context, router_ids,"},{"line_number":865,"context_line":"                            device_owner\u003dDEVICE_OWNER_ROUTER_INTF):"},{"line_number":866,"context_line":"        \"\"\"Query router interfaces that relate to list of router_ids.\"\"\""},{"line_number":867,"context_line":"        if not router_ids:"},{"line_number":868,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2F%2B40%3D","line":865,"updated":"2014-04-09 03:50:21.000000000","message":"can device owner be removed since not used anymore.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":873,"context_line":"        interfaces \u003d self._core_plugin.get_ports(context, filters)"},{"line_number":874,"context_line":"        filters \u003d {\u0027device_id\u0027: router_ids,"},{"line_number":875,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"},{"line_number":876,"context_line":"        interfaces.extend(self._core_plugin.get_ports(context, filters))"},{"line_number":877,"context_line":"        if interfaces:"},{"line_number":878,"context_line":"            self._populate_subnet_for_ports(context, interfaces)"},{"line_number":879,"context_line":"        return interfaces"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOaY%3D","line":876,"updated":"2014-04-15 23:57:38.000000000","message":"Similar comment to line 948 below.  Is there any way to push these two down to the plugin to perform in a single query?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":946,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":947,"context_line":"            for fip in floating_ips:"},{"line_number":948,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":949,"context_line":"                fip[\u0027host\u0027] \u003d f_host"},{"line_number":950,"context_line":"            interfaces \u003d self.get_sync_interfaces(context, router_ids)"},{"line_number":951,"context_line":"        return self._process_sync_data(routers, interfaces, floating_ips)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOcQ%3D","line":948,"updated":"2014-04-15 23:57:38.000000000","message":"This results in a db query for every iteration of this loop.  This concerns me as a scalability problem.  Is there any way to bake this all in to a single query.  It may require a new method on the plugin and some sqlalchemy skills that I do not possess.\n\nAs someone proficient in SQL, I tend to like to push these things off to the database to perform in a single query and then take the result and massage it in to my needs.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c69aa36e699245ba9ddc42e26ba72af22a5aa9f8","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":946,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":947,"context_line":"            for fip in floating_ips:"},{"line_number":948,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":949,"context_line":"                fip[\u0027host\u0027] \u003d f_host"},{"line_number":950,"context_line":"            interfaces \u003d self.get_sync_interfaces(context, router_ids)"},{"line_number":951,"context_line":"        return self._process_sync_data(routers, interfaces, floating_ips)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2F2ug%3D","line":948,"in_reply_to":"AAAAW3%2F%2FOcQ%3D","updated":"2014-04-16 22:48:57.000000000","message":"This is part of the agent update.\nRight now we are not saving any of this host related data for the FIP in any db.\nSo when a router-update comes in we check if there is an associated FIP, and we do add the host-id in here.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4c0df15abc86da25e4dc5c9d0e7050e1aa752c63","unresolved":false,"context_lines":[{"line_number":945,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":946,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":947,"context_line":"            for fip in floating_ips:"},{"line_number":948,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":949,"context_line":"                fip[\u0027host\u0027] \u003d f_host"},{"line_number":950,"context_line":"            interfaces \u003d self.get_sync_interfaces(context, router_ids)"},{"line_number":951,"context_line":"        return self._process_sync_data(routers, interfaces, floating_ips)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2Ft%2FQ%3D","line":948,"in_reply_to":"AAAAXH%2F%2F2ug%3D","updated":"2014-04-18 14:52:18.000000000","message":"Can we get all of the host_ids for all of the fips in one query instead of calling self.get_vm_port_hostid each time through the loop?  Each call to self.get_vm_port_hostid results in a db query.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"597f85cb5d7a8fea80c8fd2ad1792718305fc3aa","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                                          gw_port[\u0027id\u0027],"},{"line_number":292,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":293,"context_line":"            # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":294,"context_line":"            if router[\u0027distributed\u0027]:"},{"line_number":295,"context_line":"                device_filter \u003d {"},{"line_number":296,"context_line":"                    \u0027device_id\u0027: [router_id],"},{"line_number":297,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_SNAT]}"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_c75cbe28","line":294,"updated":"2014-04-29 17:30:29.000000000","message":"This may not be set for 3rd party plugins that do not support the extension. Please, consider using router.get(\u0027distributed\u0027)","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0eed10dc669a5ab13ccfe2d98cc55f51a8bf5f70","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                                          gw_port[\u0027id\u0027],"},{"line_number":292,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":293,"context_line":"            # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":294,"context_line":"            if router[\u0027distributed\u0027]:"},{"line_number":295,"context_line":"                device_filter \u003d {"},{"line_number":296,"context_line":"                    \u0027device_id\u0027: [router_id],"},{"line_number":297,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_SNAT]}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad9bd40_3860b800","line":294,"in_reply_to":"bad4c104_c75cbe28","updated":"2014-05-05 21:01:00.000000000","message":"+1.  It will raise an exception otherwise.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"597f85cb5d7a8fea80c8fd2ad1792718305fc3aa","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    def _router_dvr_device_owner(self, context, router):"},{"line_number":406,"context_line":"        device_owner \u003d ("},{"line_number":407,"context_line":"            DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED if"},{"line_number":408,"context_line":"            router[\u0027distributed\u0027] else DEVICE_OWNER_ROUTER_INTF)"},{"line_number":409,"context_line":"        return device_owner"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_475fce0e","line":408,"updated":"2014-04-29 17:30:29.000000000","message":"ditto","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0eed10dc669a5ab13ccfe2d98cc55f51a8bf5f70","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    def _router_dvr_device_owner(self, context, router):"},{"line_number":406,"context_line":"        device_owner \u003d ("},{"line_number":407,"context_line":"            DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED if"},{"line_number":408,"context_line":"            router[\u0027distributed\u0027] else DEVICE_OWNER_ROUTER_INTF)"},{"line_number":409,"context_line":"        return device_owner"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def add_router_interface(self, context, router_id, interface_info):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad9bd40_f810105b","line":408,"in_reply_to":"bad4c104_475fce0e","updated":"2014-05-05 21:01:00.000000000","message":"Optional suggestion for readability:\n\nif router.get(\u0027distributed\u0027):\n    return DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED\nelse:\n    return DEVICE_OWNER_ROUTER_INTF","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0eed10dc669a5ab13ccfe2d98cc55f51a8bf5f70","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            msg \u003d _(\"Either subnet_id or port_id must be specified\")"},{"line_number":414,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":415,"context_line":"        router \u003d self._get_router(context, router_id)"},{"line_number":416,"context_line":"        l_device_owner \u003d self._router_dvr_device_owner(context, router)"},{"line_number":417,"context_line":"        if \u0027port_id\u0027 in interface_info:"},{"line_number":418,"context_line":"            # make sure port update is committed"},{"line_number":419,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad9bd40_9801c408","line":416,"updated":"2014-05-05 21:01:00.000000000","message":"I\u0027m curious, what is the \u0027l_\u0027 part of the name?","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0eed10dc669a5ab13ccfe2d98cc55f51a8bf5f70","unresolved":false,"context_lines":[{"line_number":587,"context_line":"            network_id\u003dinternal_port[\u0027network_id\u0027]).filter(sa.or_("},{"line_number":588,"context_line":"            models_v2.Port.device_owner \u003d\u003d DEVICE_OWNER_ROUTER_INTF,"},{"line_number":589,"context_line":"            models_v2.Port.device_owner \u003d\u003d ("},{"line_number":590,"context_line":"            DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED)))"},{"line_number":591,"context_line":""},{"line_number":592,"context_line":"        for intf_p in router_intf_ports:"},{"line_number":593,"context_line":"            if intf_p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d internal_subnet_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad9bd40_9b01be08","line":590,"updated":"2014-05-05 21:01:00.000000000","message":"Optional:  I was looking at the queries around L950 and I wondered if you could make use of an \"in_\" method call here to use an SQL IN operator.  It might be equivalent to what you have here but could be more readable and *might* have a slight performance advantage.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0eed10dc669a5ab13ccfe2d98cc55f51a8bf5f70","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        interfaces \u003d self._core_plugin.get_ports(context, filters)"},{"line_number":950,"context_line":"        filters \u003d {\u0027device_id\u0027: router_ids,"},{"line_number":951,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"},{"line_number":952,"context_line":"        interfaces.extend(self._core_plugin.get_ports(context, filters))"},{"line_number":953,"context_line":"        if interfaces:"},{"line_number":954,"context_line":"            self._populate_subnet_for_ports(context, interfaces)"},{"line_number":955,"context_line":"        return interfaces"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad9bd40_ae01e206","line":952,"updated":"2014-05-05 21:01:00.000000000","message":"It looks like this can be run in one query by simply passing this as a filter:\n\n\u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF, DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]\n\nTake a look at neutron/db/db_base_plugin_v2.py:152.  It uses column.in_(value) to match it.  That should match either one, right?\n\nTo avoid running two queries in serial will be a good thing for performance.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0eed10dc669a5ab13ccfe2d98cc55f51a8bf5f70","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":1023,"context_line":"            for fip in floating_ips:"},{"line_number":1024,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":1025,"context_line":"                fip[\u0027host\u0027] \u003d f_host"},{"line_number":1026,"context_line":"            interfaces \u003d self.get_sync_interfaces(context, router_ids)"},{"line_number":1027,"context_line":"        return self._process_sync_data(routers, interfaces, floating_ips)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad9bd40_3b743267","line":1025,"updated":"2014-05-05 21:01:00.000000000","message":"nit:  Temporary \u0027f_host\u0027 adds no value.  Consider inlining.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            gw_info \u003d r[EXTERNAL_GW_INFO]"},{"line_number":132,"context_line":"            del r[EXTERNAL_GW_INFO]"},{"line_number":133,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, r)"},{"line_number":134,"context_line":"        dist_flag \u003d self._check_for_distributed_flag(context, router)"},{"line_number":135,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":136,"context_line":"            # pre-generate id so it will be available when"},{"line_number":137,"context_line":"            # configuring external gw port"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_fe195d7a","line":134,"updated":"2014-05-29 21:55:50.000000000","message":"nit: prefer distributed_flag","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            gw_info \u003d r[EXTERNAL_GW_INFO]"},{"line_number":132,"context_line":"            del r[EXTERNAL_GW_INFO]"},{"line_number":133,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, r)"},{"line_number":134,"context_line":"        dist_flag \u003d self._check_for_distributed_flag(context, router)"},{"line_number":135,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":136,"context_line":"            # pre-generate id so it will be available when"},{"line_number":137,"context_line":"            # configuring external gw port"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_c4085430","line":134,"in_reply_to":"1ae5cdf2_fe195d7a","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def update_router(self, context, id, router):"},{"line_number":150,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":151,"context_line":"        if not context.is_admin:"},{"line_number":152,"context_line":"            if \u0027distributed\u0027 in r:"},{"line_number":153,"context_line":"                raise l3.RouterCreateUpdateInvalidContext("},{"line_number":154,"context_line":"                    attr\u003dr[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9eae99e6","line":151,"updated":"2014-05-29 21:55:50.000000000","message":"Should this be defined in the policy file?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def update_router(self, context, id, router):"},{"line_number":150,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":151,"context_line":"        if not context.is_admin:"},{"line_number":152,"context_line":"            if \u0027distributed\u0027 in r:"},{"line_number":153,"context_line":"                raise l3.RouterCreateUpdateInvalidContext("},{"line_number":154,"context_line":"                    attr\u003dr[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_6fa59903","line":151,"in_reply_to":"1ae5cdf2_9eae99e6","updated":"2014-05-29 23:02:47.000000000","message":"indeed.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                        context.elevated(), filters\u003ddevice_filter)"},{"line_number":180,"context_line":"                    l_device_owner \u003d {\u0027device_owner\u0027: u_device_owner}"},{"line_number":181,"context_line":"                    for p in ports:"},{"line_number":182,"context_line":"                        port_db \u003d self._core_plugin._get_port("},{"line_number":183,"context_line":"                            context, p[\u0027id\u0027])"},{"line_number":184,"context_line":"                        if port_db[\u0027device_owner\u0027] !\u003d ("},{"line_number":185,"context_line":"                            DEVICE_OWNER_ROUTER_GW):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_1e0529c2","line":182,"updated":"2014-05-29 21:55:50.000000000","message":"This statement can fit on a single line.  I think it is more readable on a single line.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                        context.elevated(), filters\u003ddevice_filter)"},{"line_number":180,"context_line":"                    l_device_owner \u003d {\u0027device_owner\u0027: u_device_owner}"},{"line_number":181,"context_line":"                    for p in ports:"},{"line_number":182,"context_line":"                        port_db \u003d self._core_plugin._get_port("},{"line_number":183,"context_line":"                            context, p[\u0027id\u0027])"},{"line_number":184,"context_line":"                        if port_db[\u0027device_owner\u0027] !\u003d ("},{"line_number":185,"context_line":"                            DEVICE_OWNER_ROUTER_GW):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_cf922d9f","line":182,"in_reply_to":"1ae5cdf2_1e0529c2","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                    for p in ports:"},{"line_number":182,"context_line":"                        port_db \u003d self._core_plugin._get_port("},{"line_number":183,"context_line":"                            context, p[\u0027id\u0027])"},{"line_number":184,"context_line":"                        if port_db[\u0027device_owner\u0027] !\u003d ("},{"line_number":185,"context_line":"                            DEVICE_OWNER_ROUTER_GW):"},{"line_number":186,"context_line":"                            port_db.update(l_device_owner)"},{"line_number":187,"context_line":"            router_db \u003d self._get_router(context, id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_de54a1cc","line":184,"updated":"2014-05-29 21:55:50.000000000","message":"This if statement doesn\u0027t need to wrap.  It fits on a line.  Also, parens are not needed.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                    for p in ports:"},{"line_number":182,"context_line":"                        port_db \u003d self._core_plugin._get_port("},{"line_number":183,"context_line":"                            context, p[\u0027id\u0027])"},{"line_number":184,"context_line":"                        if port_db[\u0027device_owner\u0027] !\u003d ("},{"line_number":185,"context_line":"                            DEVICE_OWNER_ROUTER_GW):"},{"line_number":186,"context_line":"                            port_db.update(l_device_owner)"},{"line_number":187,"context_line":"            router_db \u003d self._get_router(context, id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_0f8df57b","line":184,"in_reply_to":"1ae5cdf2_de54a1cc","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":213,"context_line":"    def _check_for_distributed_flag(self, context, router):"},{"line_number":214,"context_line":"        \"\"\"Function to check and return distributed flag.\"\"\""},{"line_number":215,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":216,"context_line":"        if context.is_admin:"},{"line_number":217,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_19407155","line":216,"updated":"2014-05-29 19:49:17.000000000","message":"simplify code by doing this test at 218 instead?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    def _check_for_distributed_flag(self, context, router):"},{"line_number":214,"context_line":"        \"\"\"Function to check and return distributed flag.\"\"\""},{"line_number":215,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":216,"context_line":"        if context.is_admin:"},{"line_number":217,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_efe60944","line":216,"in_reply_to":"1ae5cdf2_fe9b1d70","updated":"2014-05-29 23:02:47.000000000","message":"this goes altogether slightly...watch for it...","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    def _check_for_distributed_flag(self, context, router):"},{"line_number":214,"context_line":"        \"\"\"Function to check and return distributed flag.\"\"\""},{"line_number":215,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":216,"context_line":"        if context.is_admin:"},{"line_number":217,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_fe9b1d70","line":216,"in_reply_to":"3ae8d1ca_19407155","updated":"2014-05-29 21:55:50.000000000","message":"+1  This if/else tree could be reduced to:\n\nif not \u0027distributed\u0027 in r or not isinstance(...)\n    return cfg.CONF.router_distributed\n\nif not context.is_admin:\n    raise ...\n\nreturn r[\u0027distributed\u0027]","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \"\"\"Function to check and return distributed flag.\"\"\""},{"line_number":215,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":216,"context_line":"        if context.is_admin:"},{"line_number":217,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"},{"line_number":220,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_1e8fe924","line":217,"updated":"2014-05-29 21:55:50.000000000","message":"What else would r[\u0027distributed\u0027] be if not a bool?  Is this check necessary?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \"\"\"Function to check and return distributed flag.\"\"\""},{"line_number":215,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":216,"context_line":"        if context.is_admin:"},{"line_number":217,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"},{"line_number":220,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_8fcf45b0","line":217,"in_reply_to":"1ae5cdf2_1e8fe924","updated":"2014-05-29 23:02:47.000000000","message":"r[\u0027distributed\u0027] can be ATTR_NOT_SPECIFIED","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"},{"line_number":220,"context_line":"                return cfg.CONF.router_distributed"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":223,"context_line":"                raise l3.RouterCreateUpdateInvalidContext("},{"line_number":224,"context_line":"                    attr\u003dr[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_b292449d","line":221,"updated":"2014-05-29 12:35:49.000000000","message":"Don\u0027t need else: as both legs return. Can reduce indenting.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":218,"context_line":"                return r[\u0027distributed\u0027]"},{"line_number":219,"context_line":"            else:"},{"line_number":220,"context_line":"                return cfg.CONF.router_distributed"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            if \u0027distributed\u0027 in r and isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":223,"context_line":"                raise l3.RouterCreateUpdateInvalidContext("},{"line_number":224,"context_line":"                    attr\u003dr[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_efbd2904","line":221,"in_reply_to":"3ae8d1ca_b292449d","updated":"2014-05-29 23:02:47.000000000","message":"this goes altogether...","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":229,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":230,"context_line":"        \"\"\"Function to check if agent gw port pre-exist.\"\"\""},{"line_number":231,"context_line":"        if not network_id:"},{"line_number":232,"context_line":"            LOG.debug(_(\"No Network id exists: %s\"), network_id)"},{"line_number":233,"context_line":"            return False"},{"line_number":234,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":235,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_52f580ec","line":232,"updated":"2014-05-29 12:35:49.000000000","message":"Can remove i18n from all debug log messages.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":230,"context_line":"        \"\"\"Function to check if agent gw port pre-exist.\"\"\""},{"line_number":231,"context_line":"        if not network_id:"},{"line_number":232,"context_line":"            LOG.debug(_(\"No Network id exists: %s\"), network_id)"},{"line_number":233,"context_line":"            return False"},{"line_number":234,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":235,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_4f31bda1","line":232,"in_reply_to":"3ae8d1ca_52f580ec","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"1db2d8679868204769d19f74ba8a390e74a0a67b","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":235,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":236,"context_line":"        for p in ports:"},{"line_number":237,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":238,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":239,"context_line":"                return p"},{"line_number":240,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_1eb609dd","line":237,"updated":"2014-05-29 21:55:50.000000000","message":"Too many parens.  This statement shouldn\u0027t need any of them.  To me, it makes the code look more complicated than it really is.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":235,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":236,"context_line":"        for p in ports:"},{"line_number":237,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":238,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":239,"context_line":"                return p"},{"line_number":240,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_cf1ced16","line":237,"in_reply_to":"1ae5cdf2_1eb609dd","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":237,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":238,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":239,"context_line":"                return p"},{"line_number":240,"context_line":"        return False"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":243,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_d2bfd0f9","line":240,"updated":"2014-05-29 12:35:49.000000000","message":"Can the Pythonic None be used in this context (and thus just remove this line) or did you think the explicit False was clearer?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":238,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":239,"context_line":"                return p"},{"line_number":240,"context_line":"        return False"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":243,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_cfca2d6e","line":240,"in_reply_to":"3ae8d1ca_d2bfd0f9","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":245,"context_line":"        fp_host \u003d None"},{"line_number":246,"context_line":"        for fid in fp:"},{"line_number":247,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":248,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":249,"context_line":"        return fp_host"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_126058a4","line":248,"updated":"2014-05-29 12:35:49.000000000","message":"could just return here, and then remove L245 and L249","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        fp_host \u003d None"},{"line_number":246,"context_line":"        for fid in fp:"},{"line_number":247,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":248,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":249,"context_line":"        return fp_host"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_8fb025f6","line":248,"in_reply_to":"3ae8d1ca_126058a4","updated":"2014-05-29 23:02:47.000000000","message":"not sure if this is the intended logic. Need to check with the author.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":252,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":253,"context_line":"        router_ids \u003d active \u003d None"},{"line_number":254,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":255,"context_line":"        context \u003d context.elevated()"},{"line_number":256,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_8f87450f","line":253,"updated":"2014-05-29 23:02:47.000000000","message":"Python is not C","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":256,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":257,"context_line":"            routers \u003d self._get_sync_routers(context,"},{"line_number":258,"context_line":"                                             router_ids\u003drouter_ids,"},{"line_number":259,"context_line":"                                             active\u003dactive)"},{"line_number":260,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":261,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":262,"context_line":"            # Add the port binding host to the floatingip dictionary"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_b2e32404","line":259,"updated":"2014-05-29 12:35:49.000000000","message":"Just active\u003dNone here?\n\nThen could remove L253","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":257,"context_line":"            routers \u003d self._get_sync_routers(context,"},{"line_number":258,"context_line":"                                             router_ids\u003drouter_ids,"},{"line_number":259,"context_line":"                                             active\u003dactive)"},{"line_number":260,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":261,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":262,"context_line":"            # Add the port binding host to the floatingip dictionary"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_efac498f","line":259,"in_reply_to":"3ae8d1ca_b2e32404","updated":"2014-05-29 23:02:47.000000000","message":"you don\u0027t need it altogether","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":259,"context_line":"                                             active\u003dactive)"},{"line_number":260,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":261,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":262,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":263,"context_line":"            for fip in floating_ips:"},{"line_number":264,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":265,"context_line":"                if f_host \u003d\u003d host_id:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_52b660fb","line":262,"updated":"2014-05-29 12:35:49.000000000","message":"I don\u0027t understand this comment, when I look at the following code (it doesn\u0027t add a binding, right?).","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                                             active\u003dactive)"},{"line_number":260,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":261,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":262,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":263,"context_line":"            for fip in floating_ips:"},{"line_number":264,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":265,"context_line":"                if f_host \u003d\u003d host_id:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_2fdd5115","line":262,"in_reply_to":"3ae8d1ca_52b660fb","updated":"2014-05-29 23:02:47.000000000","message":"Need to check with the author","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":274,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":275,"context_line":"                                            filters\u003ddevice_filter)"},{"line_number":276,"context_line":"        for p in ports:"},{"line_number":277,"context_line":"            if self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host_id:"},{"line_number":278,"context_line":"                self._core_plugin._delete_port(context.elevated(),"},{"line_number":279,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":280,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_d277d038","line":277,"updated":"2014-05-29 12:35:49.000000000","message":"I noticed here and on L237 and L264 we are getting the host ID and comparing to a host. Should a function be created to encapsulate all that?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":275,"context_line":"                                            filters\u003ddevice_filter)"},{"line_number":276,"context_line":"        for p in ports:"},{"line_number":277,"context_line":"            if self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host_id:"},{"line_number":278,"context_line":"                self._core_plugin._delete_port(context.elevated(),"},{"line_number":279,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":280,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_efda8916","line":277,"in_reply_to":"3ae8d1ca_d277d038","updated":"2014-05-29 23:02:47.000000000","message":"maybe, I\u0027ll do it in another iteration.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":307,"context_line":"                    return agent_port"},{"line_number":308,"context_line":"                else:"},{"line_number":309,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":310,"context_line":"                    raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":311,"context_line":"            else:"},{"line_number":312,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":313,"context_line":"                return f_port"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_122db8fe","line":310,"updated":"2014-05-29 12:35:49.000000000","message":"Should a more specific exception type be created and used here?\n\nSame for other places in file.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                    return agent_port"},{"line_number":308,"context_line":"                else:"},{"line_number":309,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":310,"context_line":"                    raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":311,"context_line":"            else:"},{"line_number":312,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":313,"context_line":"                return f_port"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_2f04717d","line":310,"in_reply_to":"3ae8d1ca_122db8fe","updated":"2014-05-29 23:02:47.000000000","message":"Why is this not enough?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":312,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":313,"context_line":"                return f_port"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    # Function to check if agent gateway port exist and return"},{"line_number":316,"context_line":"    # the same if exists"},{"line_number":317,"context_line":"    def check_if_snat_interface_ports_exist_for_router("},{"line_number":318,"context_line":"            self, context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_12913847","line":315,"updated":"2014-05-29 12:35:49.000000000","message":"Include in docstring for function?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":313,"context_line":"                return f_port"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    # Function to check if agent gateway port exist and return"},{"line_number":316,"context_line":"    # the same if exists"},{"line_number":317,"context_line":"    def check_if_snat_interface_ports_exist_for_router("},{"line_number":318,"context_line":"            self, context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_4f30dd56","line":315,"in_reply_to":"3ae8d1ca_12913847","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":319,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":320,"context_line":"        if not router_id:"},{"line_number":321,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), router_id)"},{"line_number":322,"context_line":"            return []"},{"line_number":323,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":324,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":325,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_12b858c7","line":322,"updated":"2014-05-29 12:35:49.000000000","message":"I see here an empty list returned. Is a list always the expected return? Asking because if L327 condiiton is false, None is returned.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        \"\"\"Query all existing snat_router_interface ports.\"\"\""},{"line_number":320,"context_line":"        if not router_id:"},{"line_number":321,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), router_id)"},{"line_number":322,"context_line":"            return []"},{"line_number":323,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":324,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":325,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_4f653d44","line":322,"in_reply_to":"3ae8d1ca_12b858c7","updated":"2014-05-29 23:02:47.000000000","message":"in the way check_if_snat_interface_ports_exist_for_router is used it\u0027s irrelevant. I\u0027ll switch to return only for consistency.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":326,"context_line":"        if ports:"},{"line_number":327,"context_line":"            return ports"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # Function to create an SNAT port when router add_interface is called"},{"line_number":330,"context_line":"    def add_csnat_router_interface_ports("},{"line_number":331,"context_line":"            self, context, router_id, network_id, subnet_payload):"},{"line_number":332,"context_line":"        \"\"\"Function to CSNAT router interface ports.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_b2c6c447","line":329,"updated":"2014-05-29 12:35:49.000000000","message":"move to docstring.","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        if ports:"},{"line_number":327,"context_line":"            return ports"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    # Function to create an SNAT port when router add_interface is called"},{"line_number":330,"context_line":"    def add_csnat_router_interface_ports("},{"line_number":331,"context_line":"            self, context, router_id, network_id, subnet_payload):"},{"line_number":332,"context_line":"        \"\"\"Function to CSNAT router interface ports.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_af25e10b","line":329,"in_reply_to":"3ae8d1ca_b2c6c447","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":355,"context_line":"        # For every router_interface we need to create a port on that"},{"line_number":356,"context_line":"        # interface"},{"line_number":357,"context_line":"        if port_list:"},{"line_number":358,"context_line":"            # Check with Mike on this if it is required."},{"line_number":359,"context_line":"            self._populate_subnet_for_ports(context, port_list)"},{"line_number":360,"context_line":"            return port_list"},{"line_number":361,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_32e2b4d5","line":358,"updated":"2014-05-29 12:35:49.000000000","message":"Convert to TODO(????) ...","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        # For every router_interface we need to create a port on that"},{"line_number":356,"context_line":"        # interface"},{"line_number":357,"context_line":"        if port_list:"},{"line_number":358,"context_line":"            # Check with Mike on this if it is required."},{"line_number":359,"context_line":"            self._populate_subnet_for_ports(context, port_list)"},{"line_number":360,"context_line":"            return port_list"},{"line_number":361,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_4fcc5d36","line":358,"in_reply_to":"3ae8d1ca_32e2b4d5","updated":"2014-05-29 23:02:47.000000000","message":"Done","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":370,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":371,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":372,"context_line":"                if len(ips) \u003d\u003d 1:"},{"line_number":373,"context_line":"                    intf_subnet \u003d intf[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":374,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":375,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":376,"context_line":"                # exists"}],"source_content_type":"text/x-python","patch_set":10,"id":"3ae8d1ca_1ff851e4","line":373,"updated":"2014-05-29 19:49:17.000000000","message":"isn\u0027t intf_subnet undefined unless len(ips) \u003d\u003d 1?\nin fact, might it not be defined for some prior intf?","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                           \u0027 so create one: %s\u0027), port_list)"},{"line_number":371,"context_line":"                ips \u003d [ip[\u0027ip_address\u0027] for ip in intf[\u0027fixed_ips\u0027]]"},{"line_number":372,"context_line":"                if len(ips) \u003d\u003d 1:"},{"line_number":373,"context_line":"                    intf_subnet \u003d intf[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027]"},{"line_number":374,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":375,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":376,"context_line":"                # exists"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_8fa4a558","line":373,"in_reply_to":"3ae8d1ca_1ff851e4","updated":"2014-05-29 23:02:47.000000000","message":"at this point the subnet must be created otherwise I don\u0027t think you can get here, but I\u0027ll double check with Swami","commit_id":"eb5b0b73bbb69719cb5322ee365ce6d65fd27178"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":116,"context_line":"            self._apply_dict_extend_functions(l3.ROUTERS, res, router)"},{"line_number":117,"context_line":"        return self._fields(res, fields)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _create_router_db(self, context, router, tenant_id):"},{"line_number":120,"context_line":"        \"\"\"Create the DB object.\"\"\""},{"line_number":121,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":122,"context_line":"            # pre-generate id so it will be available when"}],"source_content_type":"text/x-python","patch_set":20,"id":"1ae5cdf2_59c9d024","line":119,"updated":"2014-06-04 20:25:03.000000000","message":"I forgot to remove this in one of the iterations for review https://review.openstack.org/#/c/97028/","commit_id":"955795afc0b0664d3e55ab0055f7c1b3d0087179"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        return self.notify_router_interface_action("},{"line_number":499,"context_line":"            context, router_id, port[\u0027tenant_id\u0027], port[\u0027id\u0027],"},{"line_number":500,"context_line":"            port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027], \u0027add_router_interface\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"    def _confirm_router_interface_not_in_use(self, context, router_id,"},{"line_number":503,"context_line":"                                             subnet_id):"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_8a47104b","line":500,"updated":"2014-07-09 12:13:47.000000000","message":"Why not just pass \u0027create\u0027 here, and \u0027delete\u0027 down below, and the remove L472-475 and use this on L484:\n\n    notifier.info(context, \u0027router.interface.%s\u0027 % action, {\u0027router_interface\u0027: info})","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        return self.notify_router_interface_action("},{"line_number":499,"context_line":"            context, router_id, port[\u0027tenant_id\u0027], port[\u0027id\u0027],"},{"line_number":500,"context_line":"            port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027], \u0027add_router_interface\u0027)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"    def _confirm_router_interface_not_in_use(self, context, router_id,"},{"line_number":503,"context_line":"                                             subnet_id):"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_6649148b","line":500,"in_reply_to":"baada198_8a47104b","updated":"2014-07-09 13:49:46.000000000","message":"it\u0027s not quite that as add \u003d\u003e create and remove \u003d\u003e delete. I\u0027ll revise though","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":493,"context_line":"            port \u003d self._add_interface_by_subnet("},{"line_number":494,"context_line":"                context, router_id, interface_info[\u0027subnet_id\u0027], device_owner)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        return self.notify_router_interface_action("},{"line_number":497,"context_line":"            context, router_id, port[\u0027tenant_id\u0027], port[\u0027id\u0027],"},{"line_number":498,"context_line":"            port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":499,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"baada198_7e44691b","line":496,"updated":"2014-07-15 17:07:37.000000000","message":"Using the return value from a notification handling method here confused me a bit because the returned value of this method is used as API response and I think it is better to define the API response independently from the notification handling (I understand the returned \"info\" is used in notify_router_interface_action and the same thing is done in add and remove router interface action.)","commit_id":"a571835e9ed3fbfd8c38bab465d41db49b5f6fe3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":493,"context_line":"            port \u003d self._add_interface_by_subnet("},{"line_number":494,"context_line":"                context, router_id, interface_info[\u0027subnet_id\u0027], device_owner)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        return self.notify_router_interface_action("},{"line_number":497,"context_line":"            context, router_id, port[\u0027tenant_id\u0027], port[\u0027id\u0027],"},{"line_number":498,"context_line":"            port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":499,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"baada198_91b839ea","line":496,"in_reply_to":"baada198_429fc365","updated":"2014-07-16 06:32:41.000000000","message":"Yes, I thought so and generally speaking preparing API response is not a role of the notification related method. On the other hand, your point makes sense too. The code is small and I am okay to keep the code as-is.","commit_id":"a571835e9ed3fbfd8c38bab465d41db49b5f6fe3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":493,"context_line":"            port \u003d self._add_interface_by_subnet("},{"line_number":494,"context_line":"                context, router_id, interface_info[\u0027subnet_id\u0027], device_owner)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        return self.notify_router_interface_action("},{"line_number":497,"context_line":"            context, router_id, port[\u0027tenant_id\u0027], port[\u0027id\u0027],"},{"line_number":498,"context_line":"            port[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027], \u0027add\u0027)"},{"line_number":499,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"baada198_429fc365","line":496,"in_reply_to":"baada198_7e44691b","updated":"2014-07-15 20:05:44.000000000","message":"What are you suggesting here, that we packed \u0027info\u0027 out of the notify_router_interface_action method? This increases code duplication with no apparent gain as changing API responses isn\u0027t something we could do lightly without considering versioning and bw compat. What do you think?","commit_id":"a571835e9ed3fbfd8c38bab465d41db49b5f6fe3"}],"neutron/db/l3_distributed_db.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"54d37f7c6a91ec0b607d336fbc40d16651a29170","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    (c) Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":"#    All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F907o%3D","line":1,"updated":"2014-04-01 21:19:03.000000000","message":"Pull the VIM line.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.api.rpc.agentnotifiers import l3_rpc_agent_api"},{"line_number":24,"context_line":"from neutron.api.v2 import attributes"},{"line_number":25,"context_line":"from neutron.common import constants as l3_constants"},{"line_number":26,"context_line":"from neutron.common import exceptions as q_exc"},{"line_number":27,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":28,"context_line":"from neutron.db import l3_agentschedulers_db as lagentsch"},{"line_number":29,"context_line":"from neutron.db import l3_db"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BNw%3D","line":26,"updated":"2014-03-31 20:38:20.000000000","message":"n_exc would be more appropriate since first letter n represents *n*eutron project","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from neutron.api.rpc.agentnotifiers import l3_rpc_agent_api"},{"line_number":24,"context_line":"from neutron.api.v2 import attributes"},{"line_number":25,"context_line":"from neutron.common import constants as l3_constants"},{"line_number":26,"context_line":"from neutron.common import exceptions as q_exc"},{"line_number":27,"context_line":"from neutron.db import db_base_plugin_v2"},{"line_number":28,"context_line":"from neutron.db import l3_agentschedulers_db as lagentsch"},{"line_number":29,"context_line":"from neutron.db import l3_db"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9joY%3D","line":26,"in_reply_to":"AAAAWH%2F9%2BNw%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":41,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_constants.DEVICE_OWNER_AGENT_GW"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# Modify the Router Data Model adding the distributed attribute"},{"line_number":44,"context_line":"setattr(l3_db.Router, \u0027distributed\u0027,"},{"line_number":45,"context_line":"        sa.Column(sa.Boolean))"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BTc%3D","line":44,"updated":"2014-03-31 20:38:20.000000000","message":"That looks unmaintainable.\nIn my opinion you need to explicitly add this column to original router model and create migration for it.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":41,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_constants.DEVICE_OWNER_AGENT_GW"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# Modify the Router Data Model adding the distributed attribute"},{"line_number":44,"context_line":"setattr(l3_db.Router, \u0027distributed\u0027,"},{"line_number":45,"context_line":"        sa.Column(sa.Boolean))"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jns%3D","line":44,"in_reply_to":"AAAAWH%2F9%2BTc%3D","updated":"2014-04-03 18:20:53.000000000","message":"This is how the current extensions are done for the existing models. If you look at the \"ext_gw_mode\" or if you look at the \"extraroute\" etc.\nPlease tell me if I am wrong.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        #LOG.info(_(\"Router res: %s \"), router)"},{"line_number":76,"context_line":"        if context.is_admin:"},{"line_number":77,"context_line":"            if l3_dist.DVR in r:"},{"line_number":78,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":79,"context_line":"                    l_distributed \u003d r[\u0027distributed\u0027]"},{"line_number":80,"context_line":"                    return l_distributed"},{"line_number":81,"context_line":"            if ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BSY%3D","line":78,"updated":"2014-03-31 20:38:20.000000000","message":"condition ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)) always evaluates to True.\nSo 77-80 can be reduced to \n if l3_dist.DVR in r:\n    return r[\u0027distributed\u0027]","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        #LOG.info(_(\"Router res: %s \"), router)"},{"line_number":76,"context_line":"        if context.is_admin:"},{"line_number":77,"context_line":"            if l3_dist.DVR in r:"},{"line_number":78,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":79,"context_line":"                    l_distributed \u003d r[\u0027distributed\u0027]"},{"line_number":80,"context_line":"                    return l_distributed"},{"line_number":81,"context_line":"            if ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jmo%3D","line":78,"in_reply_to":"AAAAWH%2F9%2BSY%3D","updated":"2014-04-03 18:20:53.000000000","message":"the first condition \"l3_dist.DVR\" by itself, does not satisfy the condition, because at this point, if there is no value passed for the \"r[\u0027distributed\u0027] then it populates with the object.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"54d37f7c6a91ec0b607d336fbc40d16651a29170","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            if l3_dist.DVR in r:"},{"line_number":78,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":79,"context_line":"                    l_distributed \u003d r[\u0027distributed\u0027]"},{"line_number":80,"context_line":"                    return l_distributed"},{"line_number":81,"context_line":"            if ("},{"line_number":82,"context_line":"                (cfg.CONF.router_distributed is True) or"},{"line_number":83,"context_line":"                (cfg.CONF.router_distributed is False)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F906g%3D","line":80,"updated":"2014-04-01 21:19:03.000000000","message":"can get rid of temp variable l_distributed here and L85, L88, L101, L104,... unless you think it is making easier to understand.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            if l3_dist.DVR in r:"},{"line_number":78,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":79,"context_line":"                    l_distributed \u003d r[\u0027distributed\u0027]"},{"line_number":80,"context_line":"                    return l_distributed"},{"line_number":81,"context_line":"            if ("},{"line_number":82,"context_line":"                (cfg.CONF.router_distributed is True) or"},{"line_number":83,"context_line":"                (cfg.CONF.router_distributed is False)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jmA%3D","line":80,"in_reply_to":"AAAAWH%2F906g%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    l_distributed \u003d r[\u0027distributed\u0027]"},{"line_number":80,"context_line":"                    return l_distributed"},{"line_number":81,"context_line":"            if ("},{"line_number":82,"context_line":"                (cfg.CONF.router_distributed is True) or"},{"line_number":83,"context_line":"                (cfg.CONF.router_distributed is False)"},{"line_number":84,"context_line":"            ):"},{"line_number":85,"context_line":"                l_distributed \u003d cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BR4%3D","line":82,"updated":"2014-03-31 20:38:20.000000000","message":"same as above.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    l_distributed \u003d r[\u0027distributed\u0027]"},{"line_number":80,"context_line":"                    return l_distributed"},{"line_number":81,"context_line":"            if ("},{"line_number":82,"context_line":"                (cfg.CONF.router_distributed is True) or"},{"line_number":83,"context_line":"                (cfg.CONF.router_distributed is False)"},{"line_number":84,"context_line":"            ):"},{"line_number":85,"context_line":"                l_distributed \u003d cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jl0%3D","line":82,"in_reply_to":"AAAAWH%2F9%2BR4%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if not context.is_admin:"},{"line_number":92,"context_line":"            if l3_dist.DVR in r:"},{"line_number":93,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":94,"context_line":"                    raise l3_dist.RouterCreateInvalidContext("},{"line_number":95,"context_line":"                        attr\u003dr[\u0027distributed\u0027]"},{"line_number":96,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BRg%3D","line":93,"updated":"2014-03-31 20:38:20.000000000","message":"same","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if not context.is_admin:"},{"line_number":92,"context_line":"            if l3_dist.DVR in r:"},{"line_number":93,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":94,"context_line":"                    raise l3_dist.RouterCreateInvalidContext("},{"line_number":95,"context_line":"                        attr\u003dr[\u0027distributed\u0027]"},{"line_number":96,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jlk%3D","line":93,"in_reply_to":"AAAAWH%2F9%2BRg%3D","updated":"2014-04-03 18:20:53.000000000","message":"Same concern as the above, if I get rid of this condition, it populates just with the \"object\"","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                        attr\u003dr[\u0027distributed\u0027]"},{"line_number":96,"context_line":"                    )"},{"line_number":97,"context_line":"            if ("},{"line_number":98,"context_line":"                (cfg.CONF.router_distributed is True) or"},{"line_number":99,"context_line":"                (cfg.CONF.router_distributed is False)"},{"line_number":100,"context_line":"            ):"},{"line_number":101,"context_line":"                l_distributed \u003d cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BRc%3D","line":98,"updated":"2014-03-31 20:38:20.000000000","message":"same","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                        attr\u003dr[\u0027distributed\u0027]"},{"line_number":96,"context_line":"                    )"},{"line_number":97,"context_line":"            if ("},{"line_number":98,"context_line":"                (cfg.CONF.router_distributed is True) or"},{"line_number":99,"context_line":"                (cfg.CONF.router_distributed is False)"},{"line_number":100,"context_line":"            ):"},{"line_number":101,"context_line":"                l_distributed \u003d cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jlY%3D","line":98,"in_reply_to":"AAAAWH%2F9%2BRc%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"54d37f7c6a91ec0b607d336fbc40d16651a29170","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            ):"},{"line_number":101,"context_line":"                l_distributed \u003d cfg.CONF.router_distributed"},{"line_number":102,"context_line":"                return l_distributed"},{"line_number":103,"context_line":"            else:"},{"line_number":104,"context_line":"                l_distributed \u003d False"},{"line_number":105,"context_line":"                return l_distributed"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F905w%3D","line":103,"updated":"2014-04-01 21:19:03.000000000","message":"else clause never invoked, as condition will be removed on L97-98.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            ):"},{"line_number":101,"context_line":"                l_distributed \u003d cfg.CONF.router_distributed"},{"line_number":102,"context_line":"                return l_distributed"},{"line_number":103,"context_line":"            else:"},{"line_number":104,"context_line":"                l_distributed \u003d False"},{"line_number":105,"context_line":"                return l_distributed"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jks%3D","line":103,"in_reply_to":"AAAAWH%2F905w%3D","updated":"2014-04-03 18:20:53.000000000","message":"yes,  if the config option is mandatory then this will not be called. I will remove it.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        for l in l_agent:"},{"line_number":121,"context_line":"            if l[\u0027host\u0027] \u003d\u003d host:"},{"line_number":122,"context_line":"                return l[\u0027id\u0027]"},{"line_number":123,"context_line":"        return []"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # Function to check if agent gateway port exist and return"},{"line_number":126,"context_line":"    # the same if exists"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BQo%3D","line":123,"updated":"2014-03-31 20:38:20.000000000","message":"[] or None?\nif None, then you just don\u0027t need return statement (None is returned by default)","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        for l in l_agent:"},{"line_number":121,"context_line":"            if l[\u0027host\u0027] \u003d\u003d host:"},{"line_number":122,"context_line":"                return l[\u0027id\u0027]"},{"line_number":123,"context_line":"        return []"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # Function to check if agent gateway port exist and return"},{"line_number":126,"context_line":"    # the same if exists"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jkc%3D","line":123,"in_reply_to":"AAAAWH%2F9%2BQo%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # Function to check if agent gateway port exist and return"},{"line_number":126,"context_line":"    # the same if exists"},{"line_number":127,"context_line":"    def check_if_internal_gw_ports_exist_for_network("},{"line_number":128,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":129,"context_line":"        if not network_id:"},{"line_number":130,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), network_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BPk%3D","line":127,"updated":"2014-03-31 20:38:20.000000000","message":"nit: the better name would be \u0027internal_gw_ports_exist_for_network\u0027","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # Function to check if agent gateway port exist and return"},{"line_number":126,"context_line":"    # the same if exists"},{"line_number":127,"context_line":"    def check_if_internal_gw_ports_exist_for_network("},{"line_number":128,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":129,"context_line":"        if not network_id:"},{"line_number":130,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), network_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jkM%3D","line":127,"in_reply_to":"AAAAWH%2F9%2BPk%3D","updated":"2014-04-03 18:20:53.000000000","message":"Still like the current name.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def check_if_internal_gw_ports_exist_for_network("},{"line_number":128,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":129,"context_line":"        if not network_id:"},{"line_number":130,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), network_id)"},{"line_number":131,"context_line":"            return []"},{"line_number":132,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":133,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BO8%3D","line":130,"updated":"2014-03-31 20:38:20.000000000","message":"not sure info level is appropriate here","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def check_if_internal_gw_ports_exist_for_network("},{"line_number":128,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":129,"context_line":"        if not network_id:"},{"line_number":130,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), network_id)"},{"line_number":131,"context_line":"            return []"},{"line_number":132,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":133,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jjw%3D","line":130,"in_reply_to":"AAAAWH%2F9%2BO8%3D","updated":"2014-04-03 18:20:53.000000000","message":"I will remove the \"info\" level logs when I remove the WIP.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":129,"context_line":"        if not network_id:"},{"line_number":130,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), network_id)"},{"line_number":131,"context_line":"            return []"},{"line_number":132,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":133,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":134,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BQQ%3D","line":131,"updated":"2014-03-31 20:38:20.000000000","message":"[] or False?","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":129,"context_line":"        if not network_id:"},{"line_number":130,"context_line":"            LOG.info(_(\"No Network id exists: %s\"), network_id)"},{"line_number":131,"context_line":"            return []"},{"line_number":132,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":133,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":134,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jjo%3D","line":131,"in_reply_to":"AAAAWH%2F9%2BQQ%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":133,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":134,"context_line":"        for p in ports:"},{"line_number":135,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":136,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":137,"context_line":"                LOG.info(_(\"Agent Gateway port already exists: %s\"), p)"},{"line_number":138,"context_line":"                return p"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BPM%3D","line":135,"updated":"2014-03-31 20:38:20.000000000","message":"internal parens are unnecessary","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":133,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":134,"context_line":"        for p in ports:"},{"line_number":135,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":136,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":137,"context_line":"                LOG.info(_(\"Agent Gateway port already exists: %s\"), p)"},{"line_number":138,"context_line":"                return p"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jjU%3D","line":135,"in_reply_to":"AAAAWH%2F9%2BPM%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will remove it.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for p in ports:"},{"line_number":135,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":136,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":137,"context_line":"                LOG.info(_(\"Agent Gateway port already exists: %s\"), p)"},{"line_number":138,"context_line":"                return p"},{"line_number":139,"context_line":"        return False"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BO4%3D","line":137,"updated":"2014-03-31 20:38:20.000000000","message":"same on info level","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for p in ports:"},{"line_number":135,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":136,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":137,"context_line":"                LOG.info(_(\"Agent Gateway port already exists: %s\"), p)"},{"line_number":138,"context_line":"                return p"},{"line_number":139,"context_line":"        return False"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jjA%3D","line":137,"in_reply_to":"AAAAWH%2F9%2BO4%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will remove info level logs when removing the WiP","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            self, context, network_id, host):"},{"line_number":157,"context_line":"        agent_id \u003d self.get_l3_agent_from_host(context, host)"},{"line_number":158,"context_line":"        if agent_id:"},{"line_number":159,"context_line":"            LOG.info(_(\"Agent ID exists: %s\"), agent_id)"},{"line_number":160,"context_line":"            # TODO: is this call still valid for external agent gw port?"},{"line_number":161,"context_line":"            f_port \u003d self.check_if_internal_gw_ports_exist_for_network("},{"line_number":162,"context_line":"                context, network_id, host, agent_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BOI%3D","line":159,"updated":"2014-03-31 20:38:20.000000000","message":"debug level would me more appropriate here","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            self, context, network_id, host):"},{"line_number":157,"context_line":"        agent_id \u003d self.get_l3_agent_from_host(context, host)"},{"line_number":158,"context_line":"        if agent_id:"},{"line_number":159,"context_line":"            LOG.info(_(\"Agent ID exists: %s\"), agent_id)"},{"line_number":160,"context_line":"            # TODO: is this call still valid for external agent gw port?"},{"line_number":161,"context_line":"            f_port \u003d self.check_if_internal_gw_ports_exist_for_network("},{"line_number":162,"context_line":"                context, network_id, host, agent_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jiY%3D","line":159,"in_reply_to":"AAAAWH%2F9%2BOI%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will Take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            # TODO: is this call still valid for external agent gw port?"},{"line_number":161,"context_line":"            f_port \u003d self.check_if_internal_gw_ports_exist_for_network("},{"line_number":162,"context_line":"                context, network_id, host, agent_id)"},{"line_number":163,"context_line":"            if f_port is False:"},{"line_number":164,"context_line":"                LOG.info(_(\u0027Agent Gateway port does not exist,\u0027"},{"line_number":165,"context_line":"                           \u0027 so create one: %s\u0027), f_port)"},{"line_number":166,"context_line":"                agent_port \u003d self._core_plugin.create_port("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BOQ%3D","line":163,"updated":"2014-03-31 20:38:20.000000000","message":"if not f_port:","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            # TODO: is this call still valid for external agent gw port?"},{"line_number":161,"context_line":"            f_port \u003d self.check_if_internal_gw_ports_exist_for_network("},{"line_number":162,"context_line":"                context, network_id, host, agent_id)"},{"line_number":163,"context_line":"            if f_port is False:"},{"line_number":164,"context_line":"                LOG.info(_(\u0027Agent Gateway port does not exist,\u0027"},{"line_number":165,"context_line":"                           \u0027 so create one: %s\u0027), f_port)"},{"line_number":166,"context_line":"                agent_port \u003d self._core_plugin.create_port("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jiQ%3D","line":163,"in_reply_to":"AAAAWH%2F9%2BOQ%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    def delete_router(self, context, id):"},{"line_number":188,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":189,"context_line":"            router \u003d self._get_router(context, id)"},{"line_number":190,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":191,"context_line":"                device_filter \u003d {"},{"line_number":192,"context_line":"                    \u0027device_id\u0027: [id],"},{"line_number":193,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BNM%3D","line":190,"updated":"2014-03-31 20:38:20.000000000","message":"if router[\u0027distributed\u0027]:","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    def delete_router(self, context, id):"},{"line_number":188,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":189,"context_line":"            router \u003d self._get_router(context, id)"},{"line_number":190,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":191,"context_line":"                device_filter \u003d {"},{"line_number":192,"context_line":"                    \u0027device_id\u0027: [id],"},{"line_number":193,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jiE%3D","line":190,"in_reply_to":"AAAAWH%2F9%2BNM%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"},{"line_number":194,"context_line":"                ports \u003d self._core_plugin.get_ports_count("},{"line_number":195,"context_line":"                    context.elevated(),"},{"line_number":196,"context_line":"                    filters\u003ddevice_filter)"},{"line_number":197,"context_line":"                if ports:"},{"line_number":198,"context_line":"                    raise l3.RouterInUse(router_id\u003did)"},{"line_number":199,"context_line":"        super(L3_DVR_db_mixin, self).delete_router(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BM8%3D","line":196,"updated":"2014-03-31 20:38:20.000000000","message":"what if router is not distributed?","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"},{"line_number":194,"context_line":"                ports \u003d self._core_plugin.get_ports_count("},{"line_number":195,"context_line":"                    context.elevated(),"},{"line_number":196,"context_line":"                    filters\u003ddevice_filter)"},{"line_number":197,"context_line":"                if ports:"},{"line_number":198,"context_line":"                    raise l3.RouterInUse(router_id\u003did)"},{"line_number":199,"context_line":"        super(L3_DVR_db_mixin, self).delete_router(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jhE%3D","line":196,"in_reply_to":"AAAAWH%2F9%2BM8%3D","updated":"2014-04-03 18:20:53.000000000","message":"If router not distributed, the super class will be called and it will be taken care there.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        LOG.info(_(\"Updated Router res: %s\"), router)"},{"line_number":203,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":204,"context_line":"        has_gw_info \u003d True"},{"line_number":205,"context_line":"        if l3.EXTERNAL_GW_INFO in r:"},{"line_number":206,"context_line":"            has_gw_info \u003d False"},{"line_number":207,"context_line":"        # If gateway does not exist for the port, then assign the"},{"line_number":208,"context_line":"        # Distributed device owner"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BMc%3D","line":205,"updated":"2014-03-31 20:38:20.000000000","message":"has_gw_info \u003d l3.EXTERNAL_GW_INFO in r\n\nalso, can you confirm the logic above is correct and not inverted (as one may think reading variable names)","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        LOG.info(_(\"Updated Router res: %s\"), router)"},{"line_number":203,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":204,"context_line":"        has_gw_info \u003d True"},{"line_number":205,"context_line":"        if l3.EXTERNAL_GW_INFO in r:"},{"line_number":206,"context_line":"            has_gw_info \u003d False"},{"line_number":207,"context_line":"        # If gateway does not exist for the port, then assign the"},{"line_number":208,"context_line":"        # Distributed device owner"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jg4%3D","line":205,"in_reply_to":"AAAAWH%2F9%2BMc%3D","updated":"2014-04-03 18:20:53.000000000","message":"will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        # Distributed device owner"},{"line_number":209,"context_line":"        if has_gw_info:"},{"line_number":210,"context_line":"            if l3_dist.DVR in r:"},{"line_number":211,"context_line":"                if r[\u0027distributed\u0027] is True:"},{"line_number":212,"context_line":"                    u_device_owner \u003d DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":213,"context_line":"                else:"},{"line_number":214,"context_line":"                    u_device_owner \u003d DEVICE_OWNER_ROUTER_INTF"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BMI%3D","line":211,"updated":"2014-03-31 20:38:20.000000000","message":"u_device_owner \u003d DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED if r[\u0027distributed\u0027] else DEVICE_OWNER_ROUTER_INTF","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        # Distributed device owner"},{"line_number":209,"context_line":"        if has_gw_info:"},{"line_number":210,"context_line":"            if l3_dist.DVR in r:"},{"line_number":211,"context_line":"                if r[\u0027distributed\u0027] is True:"},{"line_number":212,"context_line":"                    u_device_owner \u003d DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":213,"context_line":"                else:"},{"line_number":214,"context_line":"                    u_device_owner \u003d DEVICE_OWNER_ROUTER_INTF"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jg0%3D","line":211,"in_reply_to":"AAAAWH%2F9%2BMI%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                        port_db.update(l_device_owner)"},{"line_number":224,"context_line":"        if not context.is_admin:"},{"line_number":225,"context_line":"            if l3_dist.DVR in r:"},{"line_number":226,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":227,"context_line":"                    #msg \u003d _(\"Distributed cannot be used in non-admin context\")"},{"line_number":228,"context_line":"                    raise l3_dist.RouterCreateInvalidContext("},{"line_number":229,"context_line":"                        attr\u003dr[\u0027distributed\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BL4%3D","line":226,"updated":"2014-03-31 20:38:20.000000000","message":"this always evaluates to True","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                        port_db.update(l_device_owner)"},{"line_number":224,"context_line":"        if not context.is_admin:"},{"line_number":225,"context_line":"            if l3_dist.DVR in r:"},{"line_number":226,"context_line":"                if ((r[\u0027distributed\u0027] is True) or (r[\u0027distributed\u0027] is False)):"},{"line_number":227,"context_line":"                    #msg \u003d _(\"Distributed cannot be used in non-admin context\")"},{"line_number":228,"context_line":"                    raise l3_dist.RouterCreateInvalidContext("},{"line_number":229,"context_line":"                        attr\u003dr[\u0027distributed\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jgg%3D","line":226,"in_reply_to":"AAAAWH%2F9%2BL4%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                ):"},{"line_number":248,"context_line":"                    router_id \u003d port[\u0027device_id\u0027]"},{"line_number":249,"context_line":"                    router_dict \u003d self._get_router(context, router_id)"},{"line_number":250,"context_line":"                    if router_dict[\u0027distributed\u0027] is True:"},{"line_number":251,"context_line":"                        payload \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":252,"context_line":"                        self.l3_rpc_notifier.routers_updated("},{"line_number":253,"context_line":"                            context, [router_id], None, payload"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BLs%3D","line":250,"updated":"2014-03-31 20:38:20.000000000","message":"if router_dict[\u0027distributed\u0027]:","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                ):"},{"line_number":248,"context_line":"                    router_id \u003d port[\u0027device_id\u0027]"},{"line_number":249,"context_line":"                    router_dict \u003d self._get_router(context, router_id)"},{"line_number":250,"context_line":"                    if router_dict[\u0027distributed\u0027] is True:"},{"line_number":251,"context_line":"                        payload \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":252,"context_line":"                        self.l3_rpc_notifier.routers_updated("},{"line_number":253,"context_line":"                            context, [router_id], None, payload"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jgQ%3D","line":250,"in_reply_to":"AAAAWH%2F9%2BLs%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                            context, [router_id], None, payload"},{"line_number":254,"context_line":"                        )"},{"line_number":255,"context_line":"                        break"},{"line_number":256,"context_line":"        LOG.debug(_(\u0027DVR: dvr_update_router_addvm %s \u0027), router_id)"},{"line_number":257,"context_line":"        return"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def dvr_vmarp_table_update(self, context, port_id, action):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BLo%3D","line":256,"updated":"2014-03-31 20:38:20.000000000","message":"extra space at the end of the log line","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                            context, [router_id], None, payload"},{"line_number":254,"context_line":"                        )"},{"line_number":255,"context_line":"                        break"},{"line_number":256,"context_line":"        LOG.debug(_(\u0027DVR: dvr_update_router_addvm %s \u0027), router_id)"},{"line_number":257,"context_line":"        return"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def dvr_vmarp_table_update(self, context, port_id, action):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jgE%3D","line":256,"in_reply_to":"AAAAWH%2F9%2BLo%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will remove it.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    def dvr_vmarp_table_update(self, context, port_id, action):"},{"line_number":260,"context_line":"        distributed_ports \u003d False"},{"line_number":261,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":262,"context_line":"        if not \"compute:\" in port_dict[\u0027device_owner\u0027]:"},{"line_number":263,"context_line":"            return"},{"line_number":264,"context_line":"        ip \u003d port_dict[\u0027fixed_ips\u0027][0]"},{"line_number":265,"context_line":"        ip_address \u003d ip[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BLk%3D","line":262,"updated":"2014-03-31 20:38:20.000000000","message":"per style guide lines its better to write \u0027if x not in y\u0027 instead of \u0027if not x in y\u0027","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    def dvr_vmarp_table_update(self, context, port_id, action):"},{"line_number":260,"context_line":"        distributed_ports \u003d False"},{"line_number":261,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":262,"context_line":"        if not \"compute:\" in port_dict[\u0027device_owner\u0027]:"},{"line_number":263,"context_line":"            return"},{"line_number":264,"context_line":"        ip \u003d port_dict[\u0027fixed_ips\u0027][0]"},{"line_number":265,"context_line":"        ip_address \u003d ip[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jf0%3D","line":262,"in_reply_to":"AAAAWH%2F9%2BLk%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d \"network:router_interface_distributed\":"},{"line_number":271,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":272,"context_line":"                router_dict \u003d self._get_router(context, router_id)"},{"line_number":273,"context_line":"                if router_dict[\u0027distributed\u0027] is True:"},{"line_number":274,"context_line":"                    distributed_ports \u003d True"},{"line_number":275,"context_line":"                    break"},{"line_number":276,"context_line":"        if distributed_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BLg%3D","line":273,"updated":"2014-03-31 20:38:20.000000000","message":"if router_dict[\u0027distributed\u0027]:","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            if port[\u0027device_owner\u0027] \u003d\u003d \"network:router_interface_distributed\":"},{"line_number":271,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":272,"context_line":"                router_dict \u003d self._get_router(context, router_id)"},{"line_number":273,"context_line":"                if router_dict[\u0027distributed\u0027] is True:"},{"line_number":274,"context_line":"                    distributed_ports \u003d True"},{"line_number":275,"context_line":"                    break"},{"line_number":276,"context_line":"        if distributed_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jfs%3D","line":273,"in_reply_to":"AAAAWH%2F9%2BLg%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will take care.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    (c) Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":"#    All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8SM%3D","line":1,"updated":"2014-04-08 11:38:30.000000000","message":"Remove VIM line","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    (c) Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":"#    All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Vk%3D","line":1,"in_reply_to":"AAAAWn%2F%2F8SM%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            self._set_distributed_mode(context, router_dict[\u0027id\u0027], dist_flag)"},{"line_number":83,"context_line":"            return router_dict"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    # Function to return the agent_id for a particular host"},{"line_number":86,"context_line":"    def get_l3_agent_from_host(self, context, host):"},{"line_number":87,"context_line":"        l_agent \u003d self.mylagent.get_l3_agents(context,"},{"line_number":88,"context_line":"                                              active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8R8%3D","line":85,"updated":"2014-04-08 11:38:30.000000000","message":"Consider changing comments to docstrings for each of these new methods added.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            self._set_distributed_mode(context, router_dict[\u0027id\u0027], dist_flag)"},{"line_number":83,"context_line":"            return router_dict"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    # Function to return the agent_id for a particular host"},{"line_number":86,"context_line":"    def get_l3_agent_from_host(self, context, host):"},{"line_number":87,"context_line":"        l_agent \u003d self.mylagent.get_l3_agents(context,"},{"line_number":88,"context_line":"                                              active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Vo%3D","line":85,"in_reply_to":"AAAAWn%2F%2F8R8%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":131,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":132,"context_line":"                    fip_count_on_host \u003d fip_count_on_host + 1"},{"line_number":133,"context_line":"            if fip_count_on_host \u003e 1:"},{"line_number":134,"context_line":"                return False"},{"line_number":135,"context_line":"            elif fip_count_on_host \u003d\u003d 1:"},{"line_number":136,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8cA%3D","line":133,"updated":"2014-04-08 11:38:30.000000000","message":"can replace L133-138 with:\n\nreturn fip_count_on_host \u003d\u003d 1","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":131,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":132,"context_line":"                    fip_count_on_host \u003d fip_count_on_host + 1"},{"line_number":133,"context_line":"            if fip_count_on_host \u003e 1:"},{"line_number":134,"context_line":"                return False"},{"line_number":135,"context_line":"            elif fip_count_on_host \u003d\u003d 1:"},{"line_number":136,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Vs%3D","line":133,"in_reply_to":"AAAAWn%2F%2F8cA%3D","updated":"2014-04-08 19:18:53.000000000","message":"Sorry I missed in my current patch, I will address it in the next patch.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Fip agent gateway port when the last fip disassociates from the host"},{"line_number":154,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"},{"line_number":155,"context_line":"        agt_gw_port_check \u003d False"},{"line_number":156,"context_line":"        if (not (\u0027port_id\u0027 in fip and fip[\u0027port_id\u0027])) and ("},{"line_number":157,"context_line":"                floatingip_db[\u0027fixed_port_id\u0027] is not None):"},{"line_number":158,"context_line":"            port_db \u003d self._core_plugin._get_port("},{"line_number":159,"context_line":"                context, floatingip_db[\u0027fixed_port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Zo%3D","line":156,"updated":"2014-04-08 11:38:30.000000000","message":"Isn\u0027t the \"and fip[\u0027port_id\u0027]\" redundant?\n\nDo you need to test if fixed_port_id is in floatingip_db? (I don\u0027t know, just wondering from a language perspective)","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Fip agent gateway port when the last fip disassociates from the host"},{"line_number":154,"context_line":"    def _update_fip_assoc(self, context, fip, floatingip_db, external_port):"},{"line_number":155,"context_line":"        agt_gw_port_check \u003d False"},{"line_number":156,"context_line":"        if (not (\u0027port_id\u0027 in fip and fip[\u0027port_id\u0027])) and ("},{"line_number":157,"context_line":"                floatingip_db[\u0027fixed_port_id\u0027] is not None):"},{"line_number":158,"context_line":"            port_db \u003d self._core_plugin._get_port("},{"line_number":159,"context_line":"                context, floatingip_db[\u0027fixed_port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4WE%3D","line":156,"in_reply_to":"AAAAWn%2F%2F8Zo%3D","updated":"2014-04-08 19:18:53.000000000","message":"First one is checking if the key exists, and the second one is checking the value of the key to be true, then we are anding with the \"fixed_port_id\". This is to make sure if the operation is \"FiP association or FIP disassociation or a FIP creation:.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            # TODO: is this call still valid for external agent gw port?"},{"line_number":179,"context_line":"            f_port \u003d self.check_if_internal_gw_ports_exist_for_network("},{"line_number":180,"context_line":"                context, network_id, host, agent_id)"},{"line_number":181,"context_line":"            if f_port is False:"},{"line_number":182,"context_line":"                agent_port \u003d self._core_plugin.create_port("},{"line_number":183,"context_line":"                    context.elevated(),"},{"line_number":184,"context_line":"                    {\u0027port\u0027: {\u0027tenant_id\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Q4%3D","line":181,"updated":"2014-04-08 11:38:30.000000000","message":"if not f_port:","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            # TODO: is this call still valid for external agent gw port?"},{"line_number":179,"context_line":"            f_port \u003d self.check_if_internal_gw_ports_exist_for_network("},{"line_number":180,"context_line":"                context, network_id, host, agent_id)"},{"line_number":181,"context_line":"            if f_port is False:"},{"line_number":182,"context_line":"                agent_port \u003d self._core_plugin.create_port("},{"line_number":183,"context_line":"                    context.elevated(),"},{"line_number":184,"context_line":"                    {\u0027port\u0027: {\u0027tenant_id\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4W0%3D","line":181,"in_reply_to":"AAAAWn%2F%2F8Q4%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                if agent_port:"},{"line_number":194,"context_line":"                    self._populate_subnet_for_ports(context, [agent_port])"},{"line_number":195,"context_line":"                    return agent_port"},{"line_number":196,"context_line":"                else:"},{"line_number":197,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":198,"context_line":"                    raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":199,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Qo%3D","line":196,"updated":"2014-04-08 11:38:30.000000000","message":"else: not needed. Can just unindent next two lines.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                if agent_port:"},{"line_number":194,"context_line":"                    self._populate_subnet_for_ports(context, [agent_port])"},{"line_number":195,"context_line":"                    return agent_port"},{"line_number":196,"context_line":"                else:"},{"line_number":197,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":198,"context_line":"                    raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":199,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4W4%3D","line":196,"in_reply_to":"AAAAWn%2F%2F8Qo%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                else:"},{"line_number":197,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":198,"context_line":"                    raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":199,"context_line":"            else:"},{"line_number":200,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":201,"context_line":"                return f_port"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Qk%3D","line":199,"updated":"2014-04-08 11:38:30.000000000","message":"ditto","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                else:"},{"line_number":197,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":198,"context_line":"                    raise q_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":199,"context_line":"            else:"},{"line_number":200,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":201,"context_line":"                return f_port"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4XE%3D","line":199,"in_reply_to":"AAAAWn%2F%2F8Qk%3D","updated":"2014-04-08 19:18:53.000000000","message":"I think this else is required.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                    self).update_router(context, id, router)"},{"line_number":246,"context_line":"        return router_updated_dict"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def dvr_update_router_addvm(self, context, port):"},{"line_number":249,"context_line":"        ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":250,"context_line":"        for ip in ips:"},{"line_number":251,"context_line":"            ip_address \u003d ip[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Ok%3D","line":248,"updated":"2014-04-08 11:38:30.000000000","message":"Not sure I understand the meaning of the _addvm suffix on the method name. Maybe add a docstring to clarify or choose a more descriptive name?","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                    self).update_router(context, id, router)"},{"line_number":246,"context_line":"        return router_updated_dict"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def dvr_update_router_addvm(self, context, port):"},{"line_number":249,"context_line":"        ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":250,"context_line":"        for ip in ips:"},{"line_number":251,"context_line":"            ip_address \u003d ip[\u0027ip_address\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4XY%3D","line":248,"in_reply_to":"AAAAWn%2F%2F8Ok%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                            context, [router_id], None, payload)"},{"line_number":265,"context_line":"                        break"},{"line_number":266,"context_line":"        LOG.debug(_(\u0027DVR: dvr_update_router_addvm %s \u0027), router_id)"},{"line_number":267,"context_line":"        return"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def dvr_vmarp_table_update(self, context, port_id, action):"},{"line_number":270,"context_line":"        distributed_ports \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8RM%3D","line":267,"updated":"2014-04-08 11:38:30.000000000","message":"return not needed","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                            context, [router_id], None, payload)"},{"line_number":265,"context_line":"                        break"},{"line_number":266,"context_line":"        LOG.debug(_(\u0027DVR: dvr_update_router_addvm %s \u0027), router_id)"},{"line_number":267,"context_line":"        return"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def dvr_vmarp_table_update(self, context, port_id, action):"},{"line_number":270,"context_line":"        distributed_ports \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Xg%3D","line":267,"in_reply_to":"AAAAWn%2F%2F8RM%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":282,"context_line":"                router_dict \u003d self._get_router(context, router_id)"},{"line_number":283,"context_line":"                if router_dict[\u0027distributed\u0027]:"},{"line_number":284,"context_line":"                    distributed_ports \u003d True"},{"line_number":285,"context_line":"                    break"},{"line_number":286,"context_line":"        if distributed_ports:"},{"line_number":287,"context_line":"            arp_table \u003d {\u0027ip_address\u0027: ip_address,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8N8%3D","line":284,"updated":"2014-04-08 11:38:30.000000000","message":"flag not needed, if you do L287-296 here.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":282,"context_line":"                router_dict \u003d self._get_router(context, router_id)"},{"line_number":283,"context_line":"                if router_dict[\u0027distributed\u0027]:"},{"line_number":284,"context_line":"                    distributed_ports \u003d True"},{"line_number":285,"context_line":"                    break"},{"line_number":286,"context_line":"        if distributed_ports:"},{"line_number":287,"context_line":"            arp_table \u003d {\u0027ip_address\u0027: ip_address,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4X0%3D","line":284,"in_reply_to":"AAAAWn%2F%2F8N8%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                                                      router_id,"},{"line_number":296,"context_line":"                                                      arp_table)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def dvr_deletens_ifnovm(self, context, port_id):"},{"line_number":299,"context_line":"        router_ids \u003d set()"},{"line_number":300,"context_line":"        host_port_list \u003d []"},{"line_number":301,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8TA%3D","line":298,"updated":"2014-04-08 11:38:30.000000000","message":"Function name is hard to read. Consider renaming and maybe use docstring to clarify. E.g. something like (you can come up with better naming and wording)...\n\ndef delete_inactive_dvr(...)\n    \"\"\"Delete namespace based DVR, if no active VMs.\"\"\"","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                                                      router_id,"},{"line_number":296,"context_line":"                                                      arp_table)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def dvr_deletens_ifnovm(self, context, port_id):"},{"line_number":299,"context_line":"        router_ids \u003d set()"},{"line_number":300,"context_line":"        host_port_list \u003d []"},{"line_number":301,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4YE%3D","line":298,"in_reply_to":"AAAAWn%2F%2F8TA%3D","updated":"2014-04-08 19:18:53.000000000","message":"Added doc strings and renamed the functions.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        host_port_list \u003d []"},{"line_number":301,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":302,"context_line":"        fixed_ips \u003d port_dict[\u0027fixed_ips\u0027]"},{"line_number":303,"context_line":"        for fixedip in fixed_ips:"},{"line_number":304,"context_line":"            vm_subnet \u003d fixedip[\u0027subnet_id\u0027]"},{"line_number":305,"context_line":"            filter \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [vm_subnet]}}"},{"line_number":306,"context_line":"            subnetports \u003d self._core_plugin.get_ports(context, filters\u003dfilter)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8UI%3D","line":303,"updated":"2014-04-08 11:38:30.000000000","message":"Seriously consider breaking this up into separate sub-functions, as it seems like there are 3 separate things going on here.\n\nOne is getting the list of router IDs. One is seeing if there is a VM. And one doing the deletion.\n\nYou can likely simplify the logic in L318-345, if in a separate function. For example, by immediately returning False, on L338.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        host_port_list \u003d []"},{"line_number":301,"context_line":"        port_dict \u003d self._core_plugin._get_port(context, port_id)"},{"line_number":302,"context_line":"        fixed_ips \u003d port_dict[\u0027fixed_ips\u0027]"},{"line_number":303,"context_line":"        for fixedip in fixed_ips:"},{"line_number":304,"context_line":"            vm_subnet \u003d fixedip[\u0027subnet_id\u0027]"},{"line_number":305,"context_line":"            filter \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [vm_subnet]}}"},{"line_number":306,"context_line":"            subnetports \u003d self._core_plugin.get_ports(context, filters\u003dfilter)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4YI%3D","line":303,"in_reply_to":"AAAAWn%2F%2F8UI%3D","updated":"2014-04-08 19:18:53.000000000","message":"Paul, thanks for your comments.\nI will update this in my next patch.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# Modify the Router Data Model adding the distributed attribute"},{"line_number":43,"context_line":"setattr(l3_db.Router, \u0027distributed\u0027,"},{"line_number":44,"context_line":"        sa.Column(sa.Boolean))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class L3_DVR_db_mixin(l3_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfmA%3D","line":44,"updated":"2014-04-14 09:05:17.000000000","message":"you could add the default value","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# Modify the Router Data Model adding the distributed attribute"},{"line_number":43,"context_line":"setattr(l3_db.Router, \u0027distributed\u0027,"},{"line_number":44,"context_line":"        sa.Column(sa.Boolean))"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class L3_DVR_db_mixin(l3_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOYY%3D","line":44,"in_reply_to":"AAAAW3%2F%2FfmA%3D","updated":"2014-04-15 23:57:38.000000000","message":"Please do.  I\u0027d like that to be explicit.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class L3_DVR_db_mixin(l3_db.L3_NAT_db_mixin):"},{"line_number":48,"context_line":"    \"\"\"Mixin class to add configurable distributed router modes.\"\"\""},{"line_number":49,"context_line":"    mylagent \u003d l3agent_sch_db.L3AgentSchedulerDbMixin()"},{"line_number":50,"context_line":"    # Register dict extend functions for ports and networks"},{"line_number":51,"context_line":"    db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs("},{"line_number":52,"context_line":"        l3.ROUTERS, [\u0027_extend_router_distribution_mode\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ffwk%3D","line":49,"updated":"2014-04-14 09:05:17.000000000","message":"remove since line since you\u0027re are implementing a mixin class, and this class will be inherited by the L3RouterPlugin class which also inherits from L3AgentSchedulerDbMixin.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":65,"context_line":"        if context.is_admin:"},{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfxU%3D","line":67,"updated":"2014-04-14 09:05:17.000000000","message":"seems to be unuseful since handle the type you already know that is a bool ?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":65,"context_line":"        if context.is_admin:"},{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2Fyso%3D","line":67,"in_reply_to":"AAAAW3%2F%2FOQI%3D","updated":"2014-04-17 12:40:22.000000000","message":"Maybe I missed something, but you get an object here because of the default value of this field in the extension definition. So my question is, why this field doesn\u0027t have a clear default value (ex: false). Having this default value, the API will always convert this field to a boolean. If you keep three states, what\u0027s happen when distributed is not true or false ?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c69aa36e699245ba9ddc42e26ba72af22a5aa9f8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":65,"context_line":"        if context.is_admin:"},{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOQI%3D","line":67,"in_reply_to":"AAAAW3%2F%2FfxU%3D","updated":"2014-04-16 22:48:57.000000000","message":"I need to validate if it is \"True\" or \"False\".\nIf I don\u0027t validate it here, I get an \"object\" that is assigned to the r[\u0027distributed\u0027].\nThe r[\u0027distributed\u0027] contains an \u003cobject\u003e.\nSo I cannot validate this scenario. May be I am missing something in here.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":65,"context_line":"        if context.is_admin:"},{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FDnU%3D","line":67,"in_reply_to":"AAAAXH%2F%2FHUM%3D","updated":"2014-04-24 10:27:35.000000000","message":"My remark was more about the conversion you do in the extension file, see my remark in this file","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"886755017c6776a2258057e4531f63339cf042ad","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":65,"context_line":"        if context.is_admin:"},{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FHUM%3D","line":67,"in_reply_to":"AAAAXH%2F%2Fyso%3D","updated":"2014-04-23 22:34:41.000000000","message":"Hi Sylvain,\nHere is what happens if I set a \"clear\" default value in the \"extension\" file. Say for example if I set \"distributed\u003dFalse\".\nI will always get \"distributed\u003dFalse\".\nThen I cannot distinguish a \"tenant\" executing the commands shown below\u003e\nTenant only context.\n#neutron router-create router-name --distrubuted\u003dFalse\n#neutron router-create router-name \n\nIn the first case the tenant is using the \"--distributed\u003dFalse\". And still we will not be able to through any warning message.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"},{"line_number":71,"context_line":"        if not context.is_admin:"},{"line_number":72,"context_line":"            if l3_dist.DVR in r:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfxQ%3D","line":69,"updated":"2014-04-14 09:05:17.000000000","message":"same here","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":66,"context_line":"            if l3_dist.DVR in r:"},{"line_number":67,"context_line":"                if isinstance(r[\u0027distributed\u0027], bool):"},{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"},{"line_number":71,"context_line":"        if not context.is_admin:"},{"line_number":72,"context_line":"            if l3_dist.DVR in r:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2Fyss%3D","line":69,"in_reply_to":"AAAAW3%2F%2FfxQ%3D","updated":"2014-04-17 12:40:22.000000000","message":"The config parser already checks that this field is a boolean","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":68,"context_line":"                    return r[\u0027distributed\u0027]"},{"line_number":69,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"},{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"},{"line_number":71,"context_line":"        if not context.is_admin:"},{"line_number":72,"context_line":"            if l3_dist.DVR in r:"},{"line_number":73,"context_line":"                if isinstance(r[\u0027distributed\u0027], (int, bool, float, str)):"},{"line_number":74,"context_line":"                    raise l3_dist.RouterCreateInvalidContext("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ffv8%3D","line":71,"updated":"2014-04-14 09:05:17.000000000","message":"replace if not context.is_admin by a else","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"                return cfg.CONF.router_distributed"},{"line_number":71,"context_line":"        if not context.is_admin:"},{"line_number":72,"context_line":"            if l3_dist.DVR in r:"},{"line_number":73,"context_line":"                if isinstance(r[\u0027distributed\u0027], (int, bool, float, str)):"},{"line_number":74,"context_line":"                    raise l3_dist.RouterCreateInvalidContext("},{"line_number":75,"context_line":"                        attr\u003dr[\u0027distributed\u0027])"},{"line_number":76,"context_line":"            if isinstance(cfg.CONF.router_distributed, bool):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfuE%3D","line":73,"updated":"2014-04-14 09:05:17.000000000","message":"what is the purpose of this test here ? could you elaborate on it","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"        dist_flag \u003d self._check_for_distributed_flag(context, router)"},{"line_number":81,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":82,"context_line":"            router_dict \u003d super(L3_DVR_db_mixin,"},{"line_number":83,"context_line":"                                self).create_router(context, router)"},{"line_number":84,"context_line":"            self._set_distributed_mode(context, router_dict[\u0027id\u0027], dist_flag)"},{"line_number":85,"context_line":"            return router_dict"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ffqo%3D","line":83,"updated":"2014-04-14 09:05:17.000000000","message":"since you are working also on some changes on l3_db, why not adding a parameter to the create_router method in order to pass an extra attrbitute. The idea is to remove an extra database request just to set a attribute on an object that we just created ?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d509b1ba7e96ddaed9ded2ccc3941d4a4f55b6e","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    def get_l3_agent_from_host(self, context, host):"},{"line_number":88,"context_line":"        \"\"\"Function to return the agent_id for a host.\"\"\""},{"line_number":89,"context_line":"        l_agent \u003d self.mylagent.get_l3_agents(context,"},{"line_number":90,"context_line":"                                              active\u003dTrue)"},{"line_number":91,"context_line":"        for l in l_agent:"},{"line_number":92,"context_line":"            if l[\u0027host\u0027] \u003d\u003d host:"},{"line_number":93,"context_line":"                return l[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FOTU%3D","line":90,"updated":"2014-04-15 23:57:38.000000000","message":"I think this could pass an option to filter on the host in the query instead of just getting them all.  With DVR in place, I think this could return hundreds or maybe thousands of l3 agents.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":112,"context_line":"        fp_host \u003d None"},{"line_number":113,"context_line":"        for fid in fp:"},{"line_number":114,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":115,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":116,"context_line":"        return fp_host"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Fffs%3D","line":115,"updated":"2014-04-14 09:05:17.000000000","message":"you already get the port from the database with the line just above, pass the port_db object to the get_vm_port_hostid method as optional or change its signature.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":129,"context_line":"            for fip in floating_ips:"},{"line_number":130,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":131,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":132,"context_line":"                    fip_count_on_host \u003d fip_count_on_host + 1"},{"line_number":133,"context_line":"            if fip_count_on_host \u003e 1:"},{"line_number":134,"context_line":"                return False"},{"line_number":135,"context_line":"            elif fip_count_on_host \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfeY%3D","line":132,"updated":"2014-04-14 09:05:17.000000000","message":"nit: fip_count_on_host +\u003d 1","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":131,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":132,"context_line":"                    fip_count_on_host \u003d fip_count_on_host + 1"},{"line_number":133,"context_line":"            if fip_count_on_host \u003e 1:"},{"line_number":134,"context_line":"                return False"},{"line_number":135,"context_line":"            elif fip_count_on_host \u003d\u003d 1:"},{"line_number":136,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Ffeo%3D","line":133,"updated":"2014-04-14 09:05:17.000000000","message":"I think you could replace the code between 133-138 by just:\n\nif fip_count_on_host \u003d\u003d 1:\n    return true","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"},{"line_number":131,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":132,"context_line":"                    fip_count_on_host \u003d fip_count_on_host + 1"},{"line_number":133,"context_line":"            if fip_count_on_host \u003e 1:"},{"line_number":134,"context_line":"                return False"},{"line_number":135,"context_line":"            elif fip_count_on_host \u003d\u003d 1:"},{"line_number":136,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FepM%3D","line":133,"in_reply_to":"AAAAW3%2F%2Ffeo%3D","updated":"2014-04-14 11:28:04.000000000","message":"suggested in version 2 to do:\nreturn fip_count_on_host \u003d\u003d 1","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"    def delete_router(self, context, id):"},{"line_number":195,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":196,"context_line":"            router \u003d self._get_router(context, id)"},{"line_number":197,"context_line":"            if router[\u0027distributed\u0027] is True:"},{"line_number":198,"context_line":"                device_filter \u003d {"},{"line_number":199,"context_line":"                    \u0027device_id\u0027: [id],"},{"line_number":200,"context_line":"                    \u0027device_owner\u0027: [DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED]}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfW4%3D","line":197,"updated":"2014-04-14 09:05:17.000000000","message":"if router[\u0027distributed\u0027]:","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":223,"context_line":"                    context.elevated(), filters\u003ddevice_filter)"},{"line_number":224,"context_line":"                #Device owner need not be a list since it a single port"},{"line_number":225,"context_line":"                l_device_owner \u003d {\u0027device_owner\u0027: u_device_owner}"},{"line_number":226,"context_line":"                if ports:"},{"line_number":227,"context_line":"                    for p in ports:"},{"line_number":228,"context_line":"                        port_db \u003d self._core_plugin._get_port(context, p[\u0027id\u0027])"},{"line_number":229,"context_line":"                        if port_db[\u0027device_owner\u0027] !\u003d DEVICE_OWNER_ROUTER_GW:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfZA%3D","line":226,"updated":"2014-04-14 09:05:17.000000000","message":"remove this if statement get_ports will return a list even empty","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":227,"context_line":"                    for p in ports:"},{"line_number":228,"context_line":"                        port_db \u003d self._core_plugin._get_port(context, p[\u0027id\u0027])"},{"line_number":229,"context_line":"                        if port_db[\u0027device_owner\u0027] !\u003d DEVICE_OWNER_ROUTER_GW:"},{"line_number":230,"context_line":"                            port_db.update(l_device_owner)"},{"line_number":231,"context_line":"        if not context.is_admin:"},{"line_number":232,"context_line":"            if l3_dist.DVR in r:"},{"line_number":233,"context_line":"                raise l3_dist.RouterCreateInvalidContext("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfYw%3D","line":230,"updated":"2014-04-14 09:05:17.000000000","message":"should be done in a transaction","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":232,"context_line":"            if l3_dist.DVR in r:"},{"line_number":233,"context_line":"                raise l3_dist.RouterCreateInvalidContext("},{"line_number":234,"context_line":"                    attr\u003dr[\u0027distributed\u0027])"},{"line_number":235,"context_line":"        router_updated_dict \u003d super(L3_DVR_db_mixin,"},{"line_number":236,"context_line":"                                    self).update_router(context, id, router)"},{"line_number":237,"context_line":"        return router_updated_dict"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FfYY%3D","line":235,"updated":"2014-04-14 09:05:17.000000000","message":"move this in a global transaction for this method ?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":289,"context_line":"                    if action \u003d\u003d \"add\":"},{"line_number":290,"context_line":"                        self.l3_rpc_notifier.add_arp_entry("},{"line_number":291,"context_line":"                            contex, router_id, arp_table)"},{"line_number":292,"context_line":"                    elif action \u003d\u003d \"del\":"},{"line_number":293,"context_line":"                        self.l3_rpc_notifier.delete_arp_entry("},{"line_number":294,"context_line":"                            context, router_id, arp_table)"},{"line_number":295,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FemY%3D","line":292,"updated":"2014-04-14 11:28:04.000000000","message":"Can there be any other action than add or del? If not, then this could be just \"else:\". If there can be another action, do you want to break out of the for loop, or ignore and check next port?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                            context, router_id, arp_table)"},{"line_number":295,"context_line":"                    break"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def l3_agent_notify_delete_router_namespace("},{"line_number":298,"context_line":"            self, context, port_id):"},{"line_number":299,"context_line":"        \"\"\"Function sends a notification to L3 Agent delete namespace."},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FeU8%3D","line":297,"updated":"2014-04-14 11:28:04.000000000","message":"I still think this could benefit from breaking out into three sub-functions, as it seems to have three phases: identify distributed routers, see if there are VMs, and then delete router from agent.\n\nIt would allow testing of each independently. For example, do we have UTs for case of VM or no VM?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                    router_ids.add(routerid)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        if not router_ids:"},{"line_number":322,"context_line":"            LOG.debug(_(\u0027DVR: No namespace available for this port %s\u0027"},{"line_number":323,"context_line":"                        \u0027on host %s\u0027), port_id, port_host)"},{"line_number":324,"context_line":"            return"},{"line_number":325,"context_line":"        port_host \u003d ml2_db.get_port_binding_host(port_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FefI%3D","line":322,"updated":"2014-04-14 11:28:04.000000000","message":"Is this no namespace for port, or no distributed router?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                        and port[\u0027id\u0027] !\u003d port_id"},{"line_number":345,"context_line":"                    ):"},{"line_number":346,"context_line":"                        vm_exists \u003d True"},{"line_number":347,"context_line":"                        LOG.debug(_(\u0027DVR- No Delete namespace %s on host\u0027"},{"line_number":348,"context_line":"                                    \u0027 %s for vm %s\u0027), router_id,"},{"line_number":349,"context_line":"                                  port_host, port)"},{"line_number":350,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Fee0%3D","line":347,"updated":"2014-04-14 11:28:04.000000000","message":"Should this state that there is a VM existing, so cannot delete?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            if delete_namespace:"},{"line_number":355,"context_line":"                agent \u003d self._core_plugin._get_agent_by_type_and_host("},{"line_number":356,"context_line":"                    context, l3_constants.AGENT_TYPE_L3, port_host)"},{"line_number":357,"context_line":"                LOG.debug(_(\u0027DVR- Delete router agent %s on agent.id %s\u0027),"},{"line_number":358,"context_line":"                          agent, agent.id)"},{"line_number":359,"context_line":"                query \u003d context.session.query("},{"line_number":360,"context_line":"                    l3agent_sch_db.RouterL3AgentBinding)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FeeA%3D","line":357,"updated":"2014-04-14 11:28:04.000000000","message":"Should this be on L370, after query is successful?","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"597f85cb5d7a8fea80c8fd2ad1792718305fc3aa","unresolved":false,"context_lines":[{"line_number":42,"context_line":"DEVICE_OWNER_ROUTER_SNAT \u003d l3_constants.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Modify the Router Data Model adding the distributed attribute"},{"line_number":45,"context_line":"setattr(l3_db.Router, \u0027distributed\u0027,"},{"line_number":46,"context_line":"        sa.Column(sa.Boolean, default\u003dFalse))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_a735fa47","line":45,"updated":"2014-04-29 17:30:29.000000000","message":"This might cause issues depending how the module is imported. I think a better approach would be to keep the distributed in its own model and separately from the Router model. Have a look at how the distributed router capability has been implemented for the NSX plugin.\n\nSalvatore (who\u0027s done the work for NSX) would be a good contact to understand how and if there\u0027s a chance for reconciling the two blueprints. I\u0027ll pull him into the review process.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":81,"context_line":"            router_dict \u003d super(L3_DVR_db_mixin,"},{"line_number":82,"context_line":"                                self).create_router(context, router)"},{"line_number":83,"context_line":"            self._set_distributed_mode(context, router_dict[\u0027id\u0027], dist_flag)"},{"line_number":84,"context_line":"            return router_dict"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def get_l3_agent_from_host(self, context, host):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_5bd33438","line":83,"updated":"2014-04-29 12:41:27.000000000","message":"In this method you get and update a router that you just created, it could be better to set the attribute distributed during the creation.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":83,"context_line":"            self._set_distributed_mode(context, router_dict[\u0027id\u0027], dist_flag)"},{"line_number":84,"context_line":"            return router_dict"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def get_l3_agent_from_host(self, context, host):"},{"line_number":87,"context_line":"        \"\"\"Function to return the agent_id for a host.\"\"\""},{"line_number":88,"context_line":"        l_agent \u003d self.get_l3_agents(context,"},{"line_number":89,"context_line":"                                     active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_60d84754","line":86,"updated":"2014-04-29 12:41:27.000000000","message":"maybe should be moved to neutron/db/l3_agentschedulers_db.py ?","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def get_l3_agent_from_host(self, context, host):"},{"line_number":87,"context_line":"        \"\"\"Function to return the agent_id for a host.\"\"\""},{"line_number":88,"context_line":"        l_agent \u003d self.get_l3_agents(context,"},{"line_number":89,"context_line":"                                     active\u003dTrue)"},{"line_number":90,"context_line":"        for l in l_agent:"},{"line_number":91,"context_line":"            if l[\u0027host\u0027] \u003d\u003d host:"},{"line_number":92,"context_line":"                return l[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_a0140ff6","line":89,"updated":"2014-04-29 12:41:27.000000000","message":"I think you could use the filter param of this method in order to retrieve the agent directly instead of the loop below.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"            LOG.debug(_(\"No Network id exists: %s\"), network_id)"},{"line_number":99,"context_line":"            return False"},{"line_number":100,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":101,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":102,"context_line":"        for p in ports:"},{"line_number":103,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":104,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_3bf9104e","line":101,"updated":"2014-04-29 12:41:27.000000000","message":"I a bit concerned about the performance here, since you are going to retrieve twice the ports. One time here and another time in the loop. Could it be possible to add at least device_id to the filters ?","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":103,"context_line":"            if((self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host) and"},{"line_number":104,"context_line":"               (p[\u0027device_id\u0027] \u003d\u003d agent_id)):"},{"line_number":105,"context_line":"                return p"},{"line_number":106,"context_line":"        return False"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":109,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_9babfc88","line":106,"updated":"2014-04-29 12:41:27.000000000","message":"I prefer you remove this return otherwise you will return either a port or a boolean (False)","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":111,"context_line":"        fp_host \u003d None"},{"line_number":112,"context_line":"        for fid in fp:"},{"line_number":113,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":114,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":115,"context_line":"        return fp_host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_6094c737","line":114,"updated":"2014-04-29 12:41:27.000000000","message":"Check the comment Patch-set 4. The line 113 and this line retrieve the same port from the database.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":114,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027])"},{"line_number":115,"context_line":"        return fp_host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":118,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":119,"context_line":"        router_ids \u003d active \u003d None"},{"line_number":120,"context_line":"        fip_count_on_host \u003d 0"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_5b4a5484","line":117,"updated":"2014-04-29 12:41:27.000000000","message":"I think you could change the name of this method by:\n\ncheck_if_one_fip_on_host ?","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":115,"context_line":"        return fp_host"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":118,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":119,"context_line":"        router_ids \u003d active \u003d None"},{"line_number":120,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":121,"context_line":"        context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_7b363805","line":118,"updated":"2014-04-29 12:41:27.000000000","message":"Change this docstring to explain that this method check if there is only one fip on this host","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":124,"context_line":"                                             router_ids\u003drouter_ids,"},{"line_number":125,"context_line":"                                             active\u003dactive)"},{"line_number":126,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"},{"line_number":127,"context_line":"            floating_ips \u003d self._get_sync_floating_ips(context, router_ids)"},{"line_number":128,"context_line":"            # Add the port binding host to the floatingip dictionary"},{"line_number":129,"context_line":"            for fip in floating_ips:"},{"line_number":130,"context_line":"                f_host \u003d self.get_vm_port_hostid(context, fip[\u0027port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_d66719e9","line":127,"updated":"2014-04-29 12:41:27.000000000","message":"I think I is worth it to introduce a method which returns the port associated with the floating ip and to change the  get_vm_port_hostid signature in order to avoir to much database queries.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":140,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":141,"context_line":"                                            filters\u003ddevice_filter)"},{"line_number":142,"context_line":"        for p in ports:"},{"line_number":143,"context_line":"            if self.get_vm_port_hostid(context, p[\u0027id\u0027]) \u003d\u003d host_id:"},{"line_number":144,"context_line":"                self._core_plugin._delete_port(context.elevated(),"},{"line_number":145,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":146,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_365f6510","line":143,"updated":"2014-04-29 12:41:27.000000000","message":"See my other comments about this method.","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def get_vm_port_hostid(self, context, port_id, port\u003dNone):"},{"line_number":142,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":143,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":144,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":145,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def check_if_internal_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":21,"id":"1ae5cdf2_ec957733","line":144,"updated":"2014-06-05 00:16:28.000000000","message":"this call is used to find existing agent_gw ports. The device_owner field would be set to \u0027network:floatingip_agent_gateway\u0027 (see line 220 below) I believe. So the match should be corrected ?","commit_id":"910ba551388c8f9b3e5f3dbff6a0bc06a2f65d75"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def get_vm_port_hostid(self, context, port_id, port\u003dNone):"},{"line_number":142,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":143,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":144,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":145,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def check_if_internal_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":21,"id":"1ae5cdf2_857a0122","line":144,"in_reply_to":"1ae5cdf2_ec957733","updated":"2014-06-05 07:30:32.000000000","message":"Thanks, I\u0027ll have a look","commit_id":"910ba551388c8f9b3e5f3dbff6a0bc06a2f65d75"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":145,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def check_if_internal_gw_ports_exist_for_network("},{"line_number":148,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":149,"context_line":"        \"\"\"Check if agent gw port pre-exist.\"\"\""},{"line_number":150,"context_line":"        if not network_id:"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ae5cdf2_0c58e3f8","line":147,"updated":"2014-06-05 00:16:28.000000000","message":"nit: check_if_agent_gw_ports_exist_for_network instead of \u0027internal\u0027 ?","commit_id":"910ba551388c8f9b3e5f3dbff6a0bc06a2f65d75"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":144,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":145,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def check_if_internal_gw_ports_exist_for_network("},{"line_number":148,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":149,"context_line":"        \"\"\"Check if agent gw port pre-exist.\"\"\""},{"line_number":150,"context_line":"        if not network_id:"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ae5cdf2_459c795d","line":147,"in_reply_to":"1ae5cdf2_0c58e3f8","updated":"2014-06-05 07:30:32.000000000","message":"Done","commit_id":"910ba551388c8f9b3e5f3dbff6a0bc06a2f65d75"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self, context, router_id, router_db, data, gw_info):"},{"line_number":70,"context_line":"        \"\"\"Update the model to support the dvr case of a router.\"\"\""},{"line_number":71,"context_line":"        # FIXME(swami): revise logic of the following part: what do we use"},{"line_number":72,"context_line":"        # distributed for?"},{"line_number":73,"context_line":"        if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":74,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":75,"context_line":"            filters \u003d {\u0027device_id\u0027: [router_id]}"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_ec073280","line":72,"updated":"2014-06-05 05:29:43.000000000","message":"+1.  Distributed is ignored.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"},{"line_number":77,"context_line":"            for p in ports:"},{"line_number":78,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":79,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":80,"context_line":"                    port_db.update("},{"line_number":81,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_8ccf8e55","line":79,"updated":"2014-06-05 05:29:43.000000000","message":"Should this be comparing to DEVICE_OWNER_DVR_INTERFACE?","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"},{"line_number":77,"context_line":"            for p in ports:"},{"line_number":78,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":79,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":80,"context_line":"                    port_db.update("},{"line_number":81,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_c566c9ba","line":79,"in_reply_to":"1ae5cdf2_8ccf8e55","updated":"2014-06-05 07:28:43.000000000","message":"FIXME added","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return router_db"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _delete_current_gw_port(self, context, router_id, router, new_network):"},{"line_number":95,"context_line":"        # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":96,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":97,"context_line":"              self)._delete_current_gw_port(context, router_id,"},{"line_number":98,"context_line":"                                            router, new_network)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_acf1aa96","line":95,"updated":"2014-06-05 05:29:43.000000000","message":"nit:  This comment belongs with L100.  Unless it should be a docstring for the method.  Then it should be formatted like a doc string.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return router_db"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _delete_current_gw_port(self, context, router_id, router, new_network):"},{"line_number":95,"context_line":"        # Delete the SNAT interface ports created for Centralized SNAT"},{"line_number":96,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":97,"context_line":"              self)._delete_current_gw_port(context, router_id,"},{"line_number":98,"context_line":"                                            router, new_network)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_050c31ec","line":95,"in_reply_to":"1ae5cdf2_acf1aa96","updated":"2014-06-05 07:28:43.000000000","message":"Done","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":156,"context_line":"        for p in ports:"},{"line_number":157,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host and"},{"line_number":158,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":159,"context_line":"                return p"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":162,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_eadd3be1","line":159,"updated":"2014-06-05 17:49:48.000000000","message":"seems odd to return an object...return True?","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":156,"context_line":"        for p in ports:"},{"line_number":157,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host and"},{"line_number":158,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":159,"context_line":"                return p"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":162,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_d0b66ef8","line":159,"in_reply_to":"1ae5cdf2_eadd3be1","updated":"2014-06-05 18:20:46.000000000","message":"I should probably rename this one to get_internal_gw_ports_exist_for_network","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":162,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""},{"line_number":163,"context_line":"        # FIXME(swami): what is the \"break\" condition for fp_host to be"},{"line_number":164,"context_line":"        # returned to the caller?"},{"line_number":165,"context_line":"        fp \u003d self._get_sync_floating_ips(context, [router_id])"},{"line_number":166,"context_line":"        fp_host \u003d None"},{"line_number":167,"context_line":"        for fid in fp:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_cc8d16d5","line":164,"updated":"2014-06-05 05:29:43.000000000","message":"+1.  This doesn\u0027t look right.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                f_host \u003d self.get_vm_port_hostid(admin_ctx, fip[\u0027port_id\u0027])"},{"line_number":184,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":185,"context_line":"                    fip_count_on_host +\u003d 1"},{"line_number":186,"context_line":"            # FIXME(swami): could this ever be \u003e1? If so, do we return None?"},{"line_number":187,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":188,"context_line":"                return True"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_4cb90678","line":186,"updated":"2014-06-05 05:29:43.000000000","message":"+1.  I\u0027m wondering why we\u0027re bothering to count fips.  Why not return after finding just one?","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":157,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":158,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":159,"context_line":"        for p in ports:"},{"line_number":160,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host and"},{"line_number":161,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":162,"context_line":"                return p"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_d8c947ad","line":160,"updated":"2014-06-05 10:22:21.000000000","message":"Since we are checking agent gw port here, should DEVICE_OWNER_AGENT_GW also be added to the if check?","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":161,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":162,"context_line":"                return p"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":165,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""},{"line_number":166,"context_line":"        # FIXME(swami): what is the \"break\" condition for fp_host to be"},{"line_number":167,"context_line":"        # returned to the caller?"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_78b83311","line":164,"updated":"2014-06-05 10:22:21.000000000","message":"Sorry I didn\u0027t check the previous patches. What is the purpose to return the host ids? the floating IPs on a given router can have different hosts.","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":250,"context_line":"                      \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":251,"context_line":"                      \u0027fixed_ips\u0027: [subnet_payload],"},{"line_number":252,"context_line":"                      \u0027device_id\u0027: router_id,"},{"line_number":253,"context_line":"                      \u0027device_owner\u0027: l3_const.DEVICE_OWNER_ROUTER_SNAT,"},{"line_number":254,"context_line":"                      \u0027admin_state_up\u0027: True,"},{"line_number":255,"context_line":"                      \u0027name\u0027: \u0027\u0027}})"},{"line_number":256,"context_line":"        if snat_port:"}],"source_content_type":"text/x-python","patch_set":23,"id":"1ae5cdf2_b83d5b91","line":253,"updated":"2014-06-05 10:22:21.000000000","message":"nit: use DEVICE_OWNER_DVR_SNAT.","commit_id":"d6e1acd3885c5dd7ad6606caffad773c10a633cf"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self, context, router_id, router_db, data, gw_info):"},{"line_number":79,"context_line":"        \"\"\"Update the model to support the dvr case of a router.\"\"\""},{"line_number":80,"context_line":"        # FIXME(swami): revise logic of the following part: what do we use"},{"line_number":81,"context_line":"        # distributed for?"},{"line_number":82,"context_line":"        if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":83,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":84,"context_line":"            filters \u003d {\u0027device_id\u0027: [router_id]}"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_1c3c0cbf","line":81,"updated":"2014-06-09 23:07:01.000000000","message":"+1 Please address this fixme comment.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"},{"line_number":86,"context_line":"            for p in ports:"},{"line_number":87,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":88,"context_line":"                # FIXME(swami): compare to DEVICE_OWNER_DVR_INTERFACE instead?"},{"line_number":89,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":90,"context_line":"                    port_db.update("},{"line_number":91,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_fc6760e8","line":88,"updated":"2014-06-09 23:07:01.000000000","message":"+1 Swami please address this fixme comment.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                context, router[\u0027id\u0027], \"ubuntu\")"},{"line_number":119,"context_line":"            if not snat_p_list:"},{"line_number":120,"context_line":"                LOG.debug(_(\"SNAT interface ports not created: %s\"),"},{"line_number":121,"context_line":"                          snat_p_list)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_99020fb3","line":121,"updated":"2014-06-09 07:18:01.000000000","message":"Is there a reason to log snat_p_list here? At this point it\u0027s always going to be falsy so it won\u0027t contain anything useful.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":118,"context_line":"                context, router[\u0027id\u0027], \"ubuntu\")"},{"line_number":119,"context_line":"            if not snat_p_list:"},{"line_number":120,"context_line":"                LOG.debug(_(\"SNAT interface ports not created: %s\"),"},{"line_number":121,"context_line":"                          snat_p_list)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_49b982e8","line":121,"in_reply_to":"1ae5cdf2_99020fb3","updated":"2014-06-09 18:18:40.000000000","message":"It would be useful to debug the SNAT interface ports. Since SNAT is centralized and all other routers distributed, we need to create the respective interface ports on the centralized service node. This LOG message would help us identify if the ports were created or not.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def get_vm_port_hostid(self, context, port_id, port\u003dNone):"},{"line_number":152,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":153,"context_line":"        # FIXME(swami): is the device_owner match correct? For"},{"line_number":154,"context_line":"        # DEVICE_OWNER_AGENT_GW\u0027s owned ports this test dos not"},{"line_number":155,"context_line":"        # look correct"},{"line_number":156,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":157,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_22462c24","line":154,"updated":"2014-06-09 07:11:41.000000000","message":"(nit) dos -\u003e does","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":151,"context_line":"    def get_vm_port_hostid(self, context, port_id, port\u003dNone):"},{"line_number":152,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":153,"context_line":"        # FIXME(swami): is the device_owner match correct? For"},{"line_number":154,"context_line":"        # DEVICE_OWNER_AGENT_GW\u0027s owned ports this test dos not"},{"line_number":155,"context_line":"        # look correct"},{"line_number":156,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":157,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_c9c4b261","line":154,"in_reply_to":"1ae5cdf2_22462c24","updated":"2014-06-09 18:18:40.000000000","message":"Will fix it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":154,"context_line":"        # DEVICE_OWNER_AGENT_GW\u0027s owned ports this test dos not"},{"line_number":155,"context_line":"        # look correct"},{"line_number":156,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":157,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":158,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_agent_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_825460cb","line":157,"updated":"2014-06-09 07:11:41.000000000","message":"Do we need to check if device_owner is a VM? Floating IP is not always associated with VM port, for example LBaaS port. If we don\u0027t check it, what happens? It is better to excluded non-allowed device_owner types, but it can be improved later.\n\nIf needed, it is better to use startswith():\n\n  vm_port_db[\u0027device_owner\u0027].startswith(\u0027compute:\u0027)","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        # DEVICE_OWNER_AGENT_GW\u0027s owned ports this test dos not"},{"line_number":155,"context_line":"        # look correct"},{"line_number":156,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":157,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":158,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_agent_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_791c6314","line":157,"updated":"2014-06-09 07:18:01.000000000","message":"There is a constant for this in neutron/plugins/nuage/common/constants.py\n\nNOVA_PORT_OWNER_PREF","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":154,"context_line":"        # DEVICE_OWNER_AGENT_GW\u0027s owned ports this test dos not"},{"line_number":155,"context_line":"        # look correct"},{"line_number":156,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":157,"context_line":"        if vm_port_db and \"compute:\" in vm_port_db[\u0027device_owner\u0027]:"},{"line_number":158,"context_line":"            return vm_port_db[portbindings.HOST_ID]"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_agent_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_e987ae10","line":157,"in_reply_to":"1ae5cdf2_825460cb","updated":"2014-06-09 18:18:40.000000000","message":"Will fix it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":162,"context_line":"        \"\"\"Return agent gw port if exist, or None otherwise.\"\"\""},{"line_number":163,"context_line":"        if not network_id:"},{"line_number":164,"context_line":"            LOG.debug(\"No Network id exists: %s\", network_id)"},{"line_number":165,"context_line":"            return"},{"line_number":166,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":167,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_19dd1f43","line":164,"updated":"2014-06-09 07:18:01.000000000","message":"Don\u0027t bother logging a false value unless the distinction between None, False, [], 0, \u0027\u0027, etc is important in this case.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self, context, network_id, host, agent_id):"},{"line_number":162,"context_line":"        \"\"\"Return agent gw port if exist, or None otherwise.\"\"\""},{"line_number":163,"context_line":"        if not network_id:"},{"line_number":164,"context_line":"            LOG.debug(\"No Network id exists: %s\", network_id)"},{"line_number":165,"context_line":"            return"},{"line_number":166,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id}"},{"line_number":167,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_a9acc68d","line":164,"in_reply_to":"1ae5cdf2_19dd1f43","updated":"2014-06-09 18:18:40.000000000","message":"I will fix it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":175,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""},{"line_number":176,"context_line":"        # FIXME(swami): what is the \"break\" condition for fp_host to be"},{"line_number":177,"context_line":"        # returned to the caller?"},{"line_number":178,"context_line":"        fp \u003d self._get_sync_floating_ips(context, [router_id])"},{"line_number":179,"context_line":"        fp_host \u003d None"},{"line_number":180,"context_line":"        for fid in fp:"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_7c827053","line":177,"updated":"2014-06-09 23:07:01.000000000","message":"+1 Please address this question.  This logic doesn\u0027t look right to me.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                f_host \u003d self.get_vm_port_hostid(admin_ctx, fip[\u0027port_id\u0027])"},{"line_number":197,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":198,"context_line":"                    fip_count_on_host +\u003d 1"},{"line_number":199,"context_line":"            # FIXME(swami): could this ever be \u003e1? If so, do we return None?"},{"line_number":200,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":201,"context_line":"                return True"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_b9c42b60","line":199,"updated":"2014-06-09 07:18:01.000000000","message":"Why not? Each floating IP gets a port so there could be many on one L3 agent, right?","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":196,"context_line":"                f_host \u003d self.get_vm_port_hostid(admin_ctx, fip[\u0027port_id\u0027])"},{"line_number":197,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":198,"context_line":"                    fip_count_on_host +\u003d 1"},{"line_number":199,"context_line":"            # FIXME(swami): could this ever be \u003e1? If so, do we return None?"},{"line_number":200,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":201,"context_line":"                return True"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_7c26f0bb","line":199,"in_reply_to":"1ae5cdf2_29fef66b","updated":"2014-06-09 23:07:01.000000000","message":"The next question is \"do we still return True if \u003e1\"  If so, why bother counting?  Just return True when you find the first one.\n\nIt doesn\u0027t seem right to me to return True only if there is exactly one.  Please clarify.  Maybe I\u0027m misunderstanding.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":196,"context_line":"                f_host \u003d self.get_vm_port_hostid(admin_ctx, fip[\u0027port_id\u0027])"},{"line_number":197,"context_line":"                if f_host \u003d\u003d host_id:"},{"line_number":198,"context_line":"                    fip_count_on_host +\u003d 1"},{"line_number":199,"context_line":"            # FIXME(swami): could this ever be \u003e1? If so, do we return None?"},{"line_number":200,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":201,"context_line":"                return True"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_29fef66b","line":199,"in_reply_to":"1ae5cdf2_b9c42b60","updated":"2014-06-09 18:18:40.000000000","message":"Yes there can be more than one floating ip assigned VM in a single host. So this number can be more than 1.\n\nThe answer to your question is \"yes\".","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":212,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":213,"context_line":"                return"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def get_floatingip_agent_gateway_port(self, context, network_id, host):"},{"line_number":216,"context_line":"        \"\"\"Function to return the FIP Agent GW port.\"\"\""},{"line_number":217,"context_line":"        l3_agent_db \u003d self._get_agent_by_type_and_host("},{"line_number":218,"context_line":"            context, l3_const.AGENT_TYPE_L3, host)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_e2be04d4","line":215,"updated":"2014-06-09 07:11:41.000000000","message":"The method name is \"get_xxxx\", but a port is created if not exist. For better clarification, It is better to have a better method name which indicates a port is created if necessary.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":212,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":213,"context_line":"                return"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def get_floatingip_agent_gateway_port(self, context, network_id, host):"},{"line_number":216,"context_line":"        \"\"\"Function to return the FIP Agent GW port.\"\"\""},{"line_number":217,"context_line":"        l3_agent_db \u003d self._get_agent_by_type_and_host("},{"line_number":218,"context_line":"            context, l3_const.AGENT_TYPE_L3, host)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_69f71e8d","line":215,"in_reply_to":"1ae5cdf2_e2be04d4","updated":"2014-06-09 18:18:40.000000000","message":"Yes I will address it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":224,"context_line":"            if not f_port:"},{"line_number":225,"context_line":"                LOG.info(_(\u0027Agent Gateway port does not exist,\u0027"},{"line_number":226,"context_line":"                           \u0027 so create one: %s\u0027), f_port)"},{"line_number":227,"context_line":"                agent_port \u003d self._core_plugin.create_port("},{"line_number":228,"context_line":"                    context.elevated(),"},{"line_number":229,"context_line":"                    {\u0027port\u0027: {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":230,"context_line":"                              \u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_8219c024","line":227,"updated":"2014-06-09 07:11:41.000000000","message":"If this method is called in parallel, multiple ports for the same agent gw port can be created. It can be improved later.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":224,"context_line":"            if not f_port:"},{"line_number":225,"context_line":"                LOG.info(_(\u0027Agent Gateway port does not exist,\u0027"},{"line_number":226,"context_line":"                           \u0027 so create one: %s\u0027), f_port)"},{"line_number":227,"context_line":"                agent_port \u003d self._core_plugin.create_port("},{"line_number":228,"context_line":"                    context.elevated(),"},{"line_number":229,"context_line":"                    {\u0027port\u0027: {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":230,"context_line":"                              \u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_e95fae73","line":227,"in_reply_to":"1ae5cdf2_8219c024","updated":"2014-06-09 18:18:40.000000000","message":"We are checking for the FIP ports existence first before creating a new port. The chances of redundant port is very minimum, but as you mentioned if there is a parallel call, then we might have to test and see if this creates a duplicate and if so we need to fix it later as you mentioned.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"unresolved":false,"context_lines":[{"line_number":244,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":245,"context_line":"                return f_port"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def get_snat_interface_ports_for_router(self, context, router_id, host):"},{"line_number":248,"context_line":"        \"\"\"Return all existing snat_router_interface ports.\"\"\""},{"line_number":249,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":250,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_493474fb","line":247,"updated":"2014-06-06 00:12:56.000000000","message":"Minor: host parameter is unused here, drop it off?","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":244,"context_line":"                self._populate_subnet_for_ports(context, [f_port])"},{"line_number":245,"context_line":"                return f_port"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def get_snat_interface_ports_for_router(self, context, router_id, host):"},{"line_number":248,"context_line":"        \"\"\"Return all existing snat_router_interface ports.\"\"\""},{"line_number":249,"context_line":"        filters \u003d {\u0027device_id\u0027: [router_id],"},{"line_number":250,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_29d196cd","line":247,"in_reply_to":"1ae5cdf2_493474fb","updated":"2014-06-09 18:18:40.000000000","message":"If not used then I can remove it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":250,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":251,"context_line":"        return self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def add_csnat_router_interface_ports("},{"line_number":254,"context_line":"            self, context, router_id, network_id, subnet_payload):"},{"line_number":255,"context_line":"        \"\"\"Function to create SNAT router interface ports.\"\"\""},{"line_number":256,"context_line":"        snat_port \u003d self._core_plugin.create_port("}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_e2d7e421","line":253,"updated":"2014-06-09 07:11:41.000000000","message":"ports -\u003e port\n\nThis method creates only one interface port.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":250,"context_line":"                   \u0027device_owner\u0027: [l3_const.DEVICE_OWNER_ROUTER_SNAT]}"},{"line_number":251,"context_line":"        return self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def add_csnat_router_interface_ports("},{"line_number":254,"context_line":"            self, context, router_id, network_id, subnet_payload):"},{"line_number":255,"context_line":"        \"\"\"Function to create SNAT router interface ports.\"\"\""},{"line_number":256,"context_line":"        snat_port \u003d self._core_plugin.create_port("}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_69dabeea","line":253,"in_reply_to":"1ae5cdf2_e2d7e421","updated":"2014-06-09 18:18:40.000000000","message":"Yes, it creates only one port. I will fix it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":269,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":270,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def get_snat_interface_port_list(self, context, router_id, host):"},{"line_number":273,"context_line":"        \"\"\"Function to return the snat interface port list.\"\"\""},{"line_number":274,"context_line":"        port_list \u003d self.get_snat_interface_ports_for_router("},{"line_number":275,"context_line":"            context, router_id, host)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_82c70064","line":272,"updated":"2014-06-09 07:11:41.000000000","message":"Same comment as above. The method name is \"get_xxxx\" but, a port is created if not exist. It is better to have a better method name which indicates a port is created if necessary.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":269,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":270,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def get_snat_interface_port_list(self, context, router_id, host):"},{"line_number":273,"context_line":"        \"\"\"Function to return the snat interface port list.\"\"\""},{"line_number":274,"context_line":"        port_list \u003d self.get_snat_interface_ports_for_router("},{"line_number":275,"context_line":"            context, router_id, host)"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_89d70abf","line":272,"in_reply_to":"1ae5cdf2_82c70064","updated":"2014-06-09 18:18:40.000000000","message":"Yes will address it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    elif action \u003d\u003d \"del\":"},{"line_number":341,"context_line":"                        notify_action \u003d self.l3_rpc_notifier.del_arp_entry"},{"line_number":342,"context_line":"                    notify_action(context, router_id, arp_table)"},{"line_number":343,"context_line":"                    break"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def delete_csnat_router_interface_ports(self, context,"},{"line_number":346,"context_line":"                                            router, subnet_id\u003dNone):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_d98e5727","line":343,"updated":"2014-06-09 07:18:01.000000000","message":"Can you just return here instead so it\u0027s clear nothing else is supposed to happen in this function?","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def delete_csnat_router_interface_ports(self, context,"},{"line_number":346,"context_line":"                                            router, subnet_id\u003dNone):"},{"line_number":347,"context_line":"        # FIXME(swami): what is the use case for passing a subnet_id?"},{"line_number":348,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":349,"context_line":"        device_filter \u003d {"},{"line_number":350,"context_line":"            \u0027device_id\u0027: [router[\u0027id\u0027]],"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_9c501c0c","line":347,"updated":"2014-06-09 23:07:01.000000000","message":"+1 Please answer.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"\"\"Allow centralized -\u003e distributed state transition only.\"\"\""},{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            not router_res.get(\u0027distributed\u0027)):"},{"line_number":73,"context_line":"            # NOTE(armandp-migliaccio): tell the client that there is no"},{"line_number":74,"context_line":"            # going back for a distributed router, at least for now."},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_bd0164b1","line":73,"updated":"2014-06-17 06:05:39.000000000","message":"nit: *armando.  ;)","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"\"\"Allow centralized -\u003e distributed state transition only.\"\"\""},{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            not router_res.get(\u0027distributed\u0027)):"},{"line_number":73,"context_line":"            # NOTE(armandp-migliaccio): tell the client that there is no"},{"line_number":74,"context_line":"            # going back for a distributed router, at least for now."},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_9d5c847f","line":73,"in_reply_to":"1ae5cdf2_bd0164b1","updated":"2014-06-17 20:07:58.000000000","message":"Done","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \"\"\"Update the model to support the dvr case of a router.\"\"\""},{"line_number":80,"context_line":"        # FIXME(swami): revise logic of the following part: what do we use"},{"line_number":81,"context_line":"        # distributed for?"},{"line_number":82,"context_line":"        if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":83,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":84,"context_line":"            filters \u003d {\u0027device_id\u0027: [router_id]}"},{"line_number":85,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_d0d617f1","line":82,"updated":"2014-06-17 06:05:39.000000000","message":"Should this also check if data[distributed] is True and not just if data has the distributed attr?  Below, where it updates the ports\u0027 device_owner, should only be done if data[distributed] is True, right?","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \"\"\"Update the model to support the dvr case of a router.\"\"\""},{"line_number":80,"context_line":"        # FIXME(swami): revise logic of the following part: what do we use"},{"line_number":81,"context_line":"        # distributed for?"},{"line_number":82,"context_line":"        if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":83,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":84,"context_line":"            filters \u003d {\u0027device_id\u0027: [router_id]}"},{"line_number":85,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_b72ebca3","line":82,"in_reply_to":"1ae5cdf2_d0d617f1","updated":"2014-06-17 20:07:58.000000000","message":"FIXME to be handled.","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"            for p in ports:"},{"line_number":87,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":88,"context_line":"                # FIXME(swami): compare to DEVICE_OWNER_DVR_INTERFACE instead?"},{"line_number":89,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":90,"context_line":"                    port_db.update("},{"line_number":91,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_3082dbc8","line":89,"updated":"2014-06-17 06:05:39.000000000","message":"It seems to me like this code should be saying \"if the device_owner is not DEVICE_OWNER_DVR_INTERFACE then update it to be that.\"  That is why I originally flagged this comparison.  Please respond and let me know if I\u0027ve missed something.","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"            for p in ports:"},{"line_number":87,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":88,"context_line":"                # FIXME(swami): compare to DEVICE_OWNER_DVR_INTERFACE instead?"},{"line_number":89,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":90,"context_line":"                    port_db.update("},{"line_number":91,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_97062020","line":89,"in_reply_to":"1ae5cdf2_3082dbc8","updated":"2014-06-17 20:07:58.000000000","message":"FIXME to be handled.","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":173,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":174,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""},{"line_number":175,"context_line":"        # FIXME(swami): what is the \"break\" condition for fp_host to be"},{"line_number":176,"context_line":"        # returned to the caller?"},{"line_number":177,"context_line":"        fp \u003d self._get_sync_floating_ips(context, [router_id])"},{"line_number":178,"context_line":"        fp_host \u003d None"},{"line_number":179,"context_line":"        for fid in fp:"}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_d049b7b8","line":176,"updated":"2014-06-17 06:05:39.000000000","message":"Still awaiting a response.  The way this method is written doesn\u0027t make sense.  Only the last iteration of the loop is meaningful.  The other iterations are wasted.","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":173,"context_line":"    def check_for_floatingip_and_return_with_hostid(self, context, router_id):"},{"line_number":174,"context_line":"        \"\"\"Helper function to check for FIP and return Host id.\"\"\""},{"line_number":175,"context_line":"        # FIXME(swami): what is the \"break\" condition for fp_host to be"},{"line_number":176,"context_line":"        # returned to the caller?"},{"line_number":177,"context_line":"        fp \u003d self._get_sync_floating_ips(context, [router_id])"},{"line_number":178,"context_line":"        fp_host \u003d None"},{"line_number":179,"context_line":"        for fid in fp:"}],"source_content_type":"text/x-python","patch_set":25,"id":"1ae5cdf2_5a0cbd3b","line":176,"in_reply_to":"1ae5cdf2_d049b7b8","updated":"2014-06-17 20:07:58.000000000","message":"FIXME to be handled.","commit_id":"028db1b394e58a0186371efb5b9080c404f995f8"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":389,"context_line":"    except AttributeError:"},{"line_number":390,"context_line":"        # if not, try to see if it is a request body"},{"line_number":391,"context_line":"        requested_router_type \u003d router.get(\u0027distributed\u0027)"},{"line_number":392,"context_line":"    if attributes.is_attr_set(requested_router_type):"},{"line_number":393,"context_line":"        return requested_router_type"},{"line_number":394,"context_line":"    return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_3057d75b","line":392,"updated":"2014-06-19 00:07:29.000000000","message":"is it ok to use is_attr_set against a db value?  seems to depend on the implementation of is_attr_set.  would it be better to return requested_router_type in the try clause?","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":389,"context_line":"    except AttributeError:"},{"line_number":390,"context_line":"        # if not, try to see if it is a request body"},{"line_number":391,"context_line":"        requested_router_type \u003d router.get(\u0027distributed\u0027)"},{"line_number":392,"context_line":"    if attributes.is_attr_set(requested_router_type):"},{"line_number":393,"context_line":"        return requested_router_type"},{"line_number":394,"context_line":"    return cfg.CONF.router_distributed"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_eefbc6bb","line":392,"in_reply_to":"1ae5cdf2_3057d75b","updated":"2014-06-19 07:48:34.000000000","message":"request_router_type is not a db type, it\u0027s a bool in case it is set in line 387","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":215,"context_line":"                return"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":218,"context_line":"        self, context, network_id, host):"},{"line_number":219,"context_line":"        \"\"\"Function to return the FIP Agent GW port."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        This function will create a FIP Agent GW port"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_357df2b2","line":218,"updated":"2014-06-19 12:52:44.000000000","message":"Move below docstring","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":215,"context_line":"                return"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":218,"context_line":"        self, context, network_id, host):"},{"line_number":219,"context_line":"        \"\"\"Function to return the FIP Agent GW port."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        This function will create a FIP Agent GW port"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_ad7e1619","line":218,"in_reply_to":"1ae5cdf2_357df2b2","updated":"2014-06-19 15:13:11.000000000","message":"Can you please be more detailed? Move what below docstring?","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":215,"context_line":"                return"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":218,"context_line":"        self, context, network_id, host):"},{"line_number":219,"context_line":"        \"\"\"Function to return the FIP Agent GW port."},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        This function will create a FIP Agent GW port"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_ca232956","line":218,"in_reply_to":"1ae5cdf2_ad7e1619","updated":"2014-06-20 11:02:41.000000000","message":"Sorry, I mis-read the line. please ignore.","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def create_snat_intf_port_list_if_not_exists("},{"line_number":282,"context_line":"        self, context, router_id):"},{"line_number":283,"context_line":"        \"\"\"Function to return the snat interface port list."},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        This function will return the snat interface port list"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_f55d4a49","line":282,"updated":"2014-06-19 12:52:44.000000000","message":"ditto.","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def create_snat_intf_port_list_if_not_exists("},{"line_number":282,"context_line":"        self, context, router_id):"},{"line_number":283,"context_line":"        \"\"\"Function to return the snat interface port list."},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        This function will return the snat interface port list"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_cada494a","line":282,"in_reply_to":"1ae5cdf2_cd836201","updated":"2014-06-20 11:02:41.000000000","message":"Same here. Not sure what I read here.","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":279,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def create_snat_intf_port_list_if_not_exists("},{"line_number":282,"context_line":"        self, context, router_id):"},{"line_number":283,"context_line":"        \"\"\"Function to return the snat interface port list."},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        This function will return the snat interface port list"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_cd836201","line":282,"in_reply_to":"1ae5cdf2_f55d4a49","updated":"2014-06-19 15:13:11.000000000","message":"bah...","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":29,"id":"1ae5cdf2_6869ee8b","line":29,"updated":"2014-06-24 00:51:21.000000000","message":"Why is this necessary ? It seems it is not necessary to distinguish DEVICE_OWNER_DVR_INTERDACE from DEVICE_OWNER_ROUTER_INTERFACE.","commit_id":"1d042ca633bdfa187ce00346e7f8d806e8471b40"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_41588d57","line":29,"updated":"2014-06-24 03:52:59.000000000","message":"I think it is not necessary to distinguish DEVICE_OWNER_DVR_INTERDACE from DEVICE_OWNER_ROUTER_INTERFACE.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_6e6b8df1","line":29,"in_reply_to":"1ae5cdf2_0b75a0cb","updated":"2014-06-24 22:44:42.000000000","message":"What I don\u0027t understand is why it needs to be different. At least l3_agent does not refer device_owner.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_57c4cb40","line":29,"in_reply_to":"1ae5cdf2_41588d57","updated":"2014-06-24 05:32:01.000000000","message":"Can you elaborate what you mean? You don\u0027t leave much room to understand your -1, and what to do to address it.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_f76a37ec","line":29,"in_reply_to":"1ae5cdf2_57c4cb40","updated":"2014-06-24 06:05:38.000000000","message":"Would you explain why introducing the new device_owner value DEVICE_OWNER_DVR_INTERFACE is necessary instead of just using DEVICE_OWNER_ROUTER_INTERFACE for internal ports of distributed routers ?\nIt seems there is no necessity of distinction in the code though I may misunderstand the code.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_9992e156","line":29,"in_reply_to":"1ae5cdf2_6e6b8df1","updated":"2014-06-24 23:07:28.000000000","message":"OK, I found \"why\" by looking 102101, 102332; for port status.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DEVICE_OWNER_DVR_INTERFACE \u003d l3_const.DEVICE_OWNER_ROUTER_INTF_DISTRIBUTED"},{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_0b75a0cb","line":29,"in_reply_to":"1ae5cdf2_f76a37ec","updated":"2014-06-24 19:37:39.000000000","message":"DEVICE_OWNER_DVR_INTERFACE is the interface for a distributed router. It needs to be different from DEVICE_OWNER_ROUTER_INTERFACE because of the way DVR works","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \"\"\"Update the model to support the dvr case of a router.\"\"\""},{"line_number":80,"context_line":"        # FIXME(swami): revise logic of the following part: what do we use"},{"line_number":81,"context_line":"        # distributed for?"},{"line_number":82,"context_line":"        if not gw_info and \u0027distributed\u0027 in data:"},{"line_number":83,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":84,"context_line":"            filters \u003d {\u0027device_id\u0027: [router_id]}"},{"line_number":85,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_720c303a","line":82,"updated":"2014-06-25 16:38:52.000000000","message":"I think this needs to check data[\u0027distributed\u0027].  To be robust:\n\nif not gw_info and \u0027distributed\u0027 in data and data[\u0027distributed\u0027]:","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"},{"line_number":86,"context_line":"            for p in ports:"},{"line_number":87,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":88,"context_line":"                # FIXME(swami): compare to DEVICE_OWNER_DVR_INTERFACE instead?"},{"line_number":89,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":90,"context_line":"                    port_db.update("},{"line_number":91,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_92e53c3a","line":88,"updated":"2014-06-25 16:38:52.000000000","message":"Okay, I understand this now.  I had some sort of mental block preventing me from seeing the meaning of this code.  Please remove the readme.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"            for p in ports:"},{"line_number":87,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":88,"context_line":"                # FIXME(swami): compare to DEVICE_OWNER_DVR_INTERFACE instead?"},{"line_number":89,"context_line":"                if port_db[\u0027device_owner\u0027] !\u003d l3_db.DEVICE_OWNER_ROUTER_GW:"},{"line_number":90,"context_line":"                    port_db.update("},{"line_number":91,"context_line":"                        {\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_327e286b","line":89,"updated":"2014-06-25 16:38:52.000000000","message":"I would prefer that GW ports were filtered out with the filters on L84.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":178,"context_line":"        fp_host \u003d None"},{"line_number":179,"context_line":"        for fid in fp:"},{"line_number":180,"context_line":"            port_db \u003d self._core_plugin._get_port(context, fid[\u0027port_id\u0027])"},{"line_number":181,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027], port_db)"},{"line_number":182,"context_line":"        return fp_host"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_12d04cc8","line":181,"updated":"2014-06-25 16:38:52.000000000","message":"All of the return values from _get_port and get_vm_port_hostid are discarded except for the last iteration of the loop.\n\nAssuming this loop has more than 1 iteration, this is a problem.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":196,"context_line":"                    fip_count_on_host +\u003d 1"},{"line_number":197,"context_line":"            # If fip_count greater than 1 or equal to zero no action taken"},{"line_number":198,"context_line":"            # if the fip_count is equal to 1, then this would be last active"},{"line_number":199,"context_line":"            # fip in the host, so the agent gateway port can be deleted."},{"line_number":200,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":201,"context_line":"                return True"},{"line_number":202,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"1ae5cdf2_5d33c5f6","line":199,"updated":"2014-06-25 16:38:52.000000000","message":"I can\u0027t see anywhere in any of the DVR patches where this method is being called.  So, I can\u0027t fully understand the context.\n\nHowever, it seems overly complex.  This method could be much simpler if it checked to see if any floating ips still exist after the last one got deleted instead of before deleting it.","commit_id":"a1d544d793ac4e8b565496ef8dfb896a6971fb1f"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"},{"line_number":33,"context_line":"SNAT_ROUTER_INTF_KEY \u003d l3_const.SNAT_ROUTER_INTF_KEY"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"router_distributed_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_4d5a2051","line":33,"updated":"2014-06-26 05:48:50.000000000","message":"SNAT_ROUTER_INTF_KEY is not used. see comment in constants.py too.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"},{"line_number":33,"context_line":"SNAT_ROUTER_INTF_KEY \u003d l3_const.SNAT_ROUTER_INTF_KEY"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"router_distributed_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_844cde77","line":33,"in_reply_to":"1ae5cdf2_4d5a2051","updated":"2014-06-27 00:57:24.000000000","message":"The purpose of this key is to send down CSNAT interface information to the agent through the sync rpc\u0027s . Looks like some code is still to be added so that get_sync_data checks if gateway is set and any interfaces exist include the CSNAT interface information in the RPC response to the agent.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"DEVICE_OWNER_DVR_SNAT \u003d l3_const.DEVICE_OWNER_ROUTER_SNAT"},{"line_number":31,"context_line":"FLOATINGIP_AGENT_INTF_KEY \u003d l3_const.FLOATINGIP_AGENT_INTF_KEY"},{"line_number":32,"context_line":"DEVICE_OWNER_AGENT_GW \u003d l3_const.DEVICE_OWNER_AGENT_GW"},{"line_number":33,"context_line":"SNAT_ROUTER_INTF_KEY \u003d l3_const.SNAT_ROUTER_INTF_KEY"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"router_distributed_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_64d35201","line":33,"in_reply_to":"1ae5cdf2_844cde77","updated":"2014-06-27 01:32:47.000000000","message":"OK. I noticed it is recognized that SNAT function is not complete by L3 subteam meeting log. I wait its completion.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":108,"context_line":"        super(L3_NAT_with_dvr_db_mixin,"},{"line_number":109,"context_line":"              self)._create_gw_port(context, router_id,"},{"line_number":110,"context_line":"                                    router, new_network)"},{"line_number":111,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":112,"context_line":"            snat_p_list \u003d self.create_snat_intf_port_list_if_not_exists("},{"line_number":113,"context_line":"                context.elevated, router[\u0027id\u0027])"},{"line_number":114,"context_line":"            if not snat_p_list:"}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_cd1c707a","line":111,"updated":"2014-06-26 05:48:50.000000000","message":"if router.enable_snat is False, snat port creation is not necessary.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":256,"context_line":"        return self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def add_csnat_router_interface_port("},{"line_number":259,"context_line":"            self, context, router_id, network_id, subnet_payload):"},{"line_number":260,"context_line":"        \"\"\"Function to create SNAT router interface ports.\"\"\""},{"line_number":261,"context_line":"        snat_port \u003d self._core_plugin.create_port("},{"line_number":262,"context_line":"            context.elevated(),"}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_0d13b865","line":259,"updated":"2014-06-26 05:48:50.000000000","message":"This method is not used. see comment of 278 too.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"unresolved":false,"context_lines":[{"line_number":275,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def create_snat_intf_port_list_if_not_exists("},{"line_number":278,"context_line":"        self, context, router_id):"},{"line_number":279,"context_line":"        \"\"\"Function to return the snat interface port list."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        This function will return the snat interface port list"}],"source_content_type":"text/x-python","patch_set":33,"id":"1ae5cdf2_a843923d","line":278,"updated":"2014-06-26 05:48:50.000000000","message":"Once this method was called and one or more snat ports created, snat port for internal port created afterward is never created.\nIt seems there is no snat creation other than this method. May be it is necessary to call add_csnat_router_interface_port in anywhere.","commit_id":"433d3a7082e55867ff26d2e0aba1714b4556406c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            not router_res.get(\u0027distributed\u0027)):"},{"line_number":73,"context_line":"            # NOTE(armando-migliaccio): tell the client that there is no"},{"line_number":74,"context_line":"            # going back for a distributed router, at least for now."},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _update_distributed_attr("}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_efa1e4a9","line":74,"updated":"2014-06-27 22:45:03.000000000","message":"how? raising an exception which will cause a message to be returned in the response even if the response code would still be 200?\n\nI think documentation is enough in this case... maybe, I don\u0027t know. Whatever.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            not router_res.get(\u0027distributed\u0027)):"},{"line_number":73,"context_line":"            # NOTE(armando-migliaccio): tell the client that there is no"},{"line_number":74,"context_line":"            # going back for a distributed router, at least for now."},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _update_distributed_attr("}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_ded3ea5c","line":74,"in_reply_to":"1ae5cdf2_efa1e4a9","updated":"2014-06-28 00:18:58.000000000","message":"What I meant here is that if the user is trying to switch from distributed to centralized the Server will respond with 501, i.e. non implemented; in other words: if the user created a distributed server or he/she moved from centralized to distributed he/she cannot revert the operation.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":84,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"},{"line_number":85,"context_line":"            for p in ports:"},{"line_number":86,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":87,"context_line":"                port_db.update({\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":90,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_441632f3","line":87,"updated":"2014-06-27 22:45:03.000000000","message":"I\u0027d move DEVICE_OWNER_DVR_INTERFACE in neutron.common.constants\n\nThis is the old argument of whether constants should be all in one place or in the module where they\u0027re used. I prefer only in place, but if you prefer otherwise, no problem - we don\u0027t have a rule for this.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":84,"context_line":"            ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003dfilters)"},{"line_number":85,"context_line":"            for p in ports:"},{"line_number":86,"context_line":"                port_db \u003d self._core_plugin._get_port(admin_ctx, p[\u0027id\u0027])"},{"line_number":87,"context_line":"                port_db.update({\u0027device_owner\u0027: DEVICE_OWNER_DVR_INTERFACE})"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":90,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_9eb5e21a","line":87,"in_reply_to":"1ae5cdf2_441632f3","updated":"2014-06-28 00:18:58.000000000","message":"it is defined there, this is just an alias to avoid referencing the full l3_const. DEVICE_OWNER_DVR_INTERFACE","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":210,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":211,"context_line":"                return"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":214,"context_line":"        self, context, network_id, host):"},{"line_number":215,"context_line":"        \"\"\"Function to return the FIP Agent GW port."},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_6fe867df","line":213,"updated":"2014-06-27 22:45:03.000000000","message":"I might be missing something from the spec.\nwhat is a floating IP agent gateway port?","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":210,"context_line":"                                               p[\u0027id\u0027])"},{"line_number":211,"context_line":"                return"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":214,"context_line":"        self, context, network_id, host):"},{"line_number":215,"context_line":"        \"\"\"Function to return the FIP Agent GW port."},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_3ece8e83","line":213,"in_reply_to":"1ae5cdf2_6fe867df","updated":"2014-06-28 00:18:58.000000000","message":"This is equivalent to DEVICE_OWNER_FLOATINGIP; since DNAT is distributed across the compute hosts, the ports for DVR need to be set apart from the centralized DEVICE_OWNER_FLOATINGIP one.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":274,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":275,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def create_snat_intf_port_list_if_not_exists("},{"line_number":278,"context_line":"        self, context, router_id):"},{"line_number":279,"context_line":"        \"\"\"Function to return the snat interface port list."},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_44c4725f","line":277,"updated":"2014-06-27 22:45:03.000000000","message":"nit: create_snat_intf_ports_if_not_exists\n\nAlso I wonder how this will work when the SNAT is disabled for a router. Are we going to destroy this interfaces - or will we just keep there since they won\u0027t make any harm? or instead we\u0027d still need them to forward packets that will go through the uplink but will not be SNATted.\n\nNote: if the conclusion should be that we\u0027d better remove no-snat behaviour, then this is something we could do, but coordination is needed.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":274,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":275,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def create_snat_intf_port_list_if_not_exists("},{"line_number":278,"context_line":"        self, context, router_id):"},{"line_number":279,"context_line":"        \"\"\"Function to return the snat interface port list."},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_bea1beaa","line":277,"in_reply_to":"1ae5cdf2_44c4725f","updated":"2014-06-28 00:18:58.000000000","message":"I\u0027ll take care of the name change, as for the other topic, maybe we should raise during the DVR IRC meeting.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":286,"context_line":"            context, router_id)"},{"line_number":287,"context_line":"        # Now retrieve the router_interfaces"},{"line_number":288,"context_line":"        # For every router_interface we need to create a port on that"},{"line_number":289,"context_line":"        # interface"},{"line_number":290,"context_line":"        if port_list:"},{"line_number":291,"context_line":"            self._populate_subnet_for_ports(context, port_list)"},{"line_number":292,"context_line":"            return port_list"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_6496ce4a","line":289,"updated":"2014-06-27 22:45:03.000000000","message":"are you creating a port on a router interface or a SNAT port for a subnet? Perhaps this comment need to be made clearer.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":286,"context_line":"            context, router_id)"},{"line_number":287,"context_line":"        # Now retrieve the router_interfaces"},{"line_number":288,"context_line":"        # For every router_interface we need to create a port on that"},{"line_number":289,"context_line":"        # interface"},{"line_number":290,"context_line":"        if port_list:"},{"line_number":291,"context_line":"            self._populate_subnet_for_ports(context, port_list)"},{"line_number":292,"context_line":"            return port_list"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_1eab9288","line":289,"in_reply_to":"1ae5cdf2_6496ce4a","updated":"2014-06-28 00:18:58.000000000","message":"I\u0027ll reword or remove altogether.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":348,"context_line":"                    if action \u003d\u003d \"add\":"},{"line_number":349,"context_line":"                        notify_action \u003d self.l3_rpc_notifier.add_arp_entry"},{"line_number":350,"context_line":"                    elif action \u003d\u003d \"del\":"},{"line_number":351,"context_line":"                        notify_action \u003d self.l3_rpc_notifier.del_arp_entry"},{"line_number":352,"context_line":"                    notify_action(context, router_id, arp_table)"},{"line_number":353,"context_line":"                    return"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_2f91ff99","line":351,"updated":"2014-06-27 22:45:03.000000000","message":"I think this clarifies a comment I had on the l3 agent patch.\nHowever, how is this method used by the plugin?","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":348,"context_line":"                    if action \u003d\u003d \"add\":"},{"line_number":349,"context_line":"                        notify_action \u003d self.l3_rpc_notifier.add_arp_entry"},{"line_number":350,"context_line":"                    elif action \u003d\u003d \"del\":"},{"line_number":351,"context_line":"                        notify_action \u003d self.l3_rpc_notifier.del_arp_entry"},{"line_number":352,"context_line":"                    notify_action(context, router_id, arp_table)"},{"line_number":353,"context_line":"                    return"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_fe7ee619","line":351,"in_reply_to":"1ae5cdf2_2f91ff99","updated":"2014-06-28 00:18:58.000000000","message":"um...this may need to be looked at.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":245,"context_line":"            # fip in the host, so the agent gateway port can be deleted."},{"line_number":246,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":247,"context_line":"                return True"},{"line_number":248,"context_line":"            else:"},{"line_number":249,"context_line":"                return False"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def delete_floatingip_agent_gateway_port(self, context, host_id):"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab895d6_c5dcbd77","line":248,"updated":"2014-06-29 19:02:50.000000000","message":"nit: else not needed.","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":245,"context_line":"            # fip in the host, so the agent gateway port can be deleted."},{"line_number":246,"context_line":"            if fip_count_on_host \u003d\u003d 1:"},{"line_number":247,"context_line":"                return True"},{"line_number":248,"context_line":"            else:"},{"line_number":249,"context_line":"                return False"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def delete_floatingip_agent_gateway_port(self, context, host_id):"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_aeb968eb","line":248,"in_reply_to":"dab895d6_c5dcbd77","updated":"2014-06-30 20:18:27.000000000","message":"Done","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":292,"context_line":"                if agent_port:"},{"line_number":293,"context_line":"                    self._populate_subnet_for_ports(context, [agent_port])"},{"line_number":294,"context_line":"                    return agent_port"},{"line_number":295,"context_line":"                else:"},{"line_number":296,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":297,"context_line":"                    raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":298,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab895d6_e5d9c184","line":295,"updated":"2014-06-29 19:02:50.000000000","message":"nit: else not needed.","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":292,"context_line":"                if agent_port:"},{"line_number":293,"context_line":"                    self._populate_subnet_for_ports(context, [agent_port])"},{"line_number":294,"context_line":"                    return agent_port"},{"line_number":295,"context_line":"                else:"},{"line_number":296,"context_line":"                    msg \u003d _(\"Unable to create the Agent Gateway Port\")"},{"line_number":297,"context_line":"                    raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":298,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_cecdbc88","line":295,"in_reply_to":"dab895d6_e5d9c184","updated":"2014-06-30 20:18:27.000000000","message":"Done","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":320,"context_line":"                      \u0027name\u0027: \u0027\u0027}})"},{"line_number":321,"context_line":"        if snat_port:"},{"line_number":322,"context_line":"            return self._populate_subnet_for_ports(context, [snat_port])"},{"line_number":323,"context_line":"        else:"},{"line_number":324,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":325,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"dab895d6_05e79541","line":323,"updated":"2014-06-29 19:02:50.000000000","message":"nit: else not needed.","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":320,"context_line":"                      \u0027name\u0027: \u0027\u0027}})"},{"line_number":321,"context_line":"        if snat_port:"},{"line_number":322,"context_line":"            return self._populate_subnet_for_ports(context, [snat_port])"},{"line_number":323,"context_line":"        else:"},{"line_number":324,"context_line":"            msg \u003d _(\"Unable to create the SNAT Interface Port\")"},{"line_number":325,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_0ec89473","line":323,"in_reply_to":"dab895d6_05e79541","updated":"2014-06-30 20:18:27.000000000","message":"Done","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":140,"context_line":"        filters \u003d {\u0027device_id\u0027: router_ids,"},{"line_number":141,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_DVR_SNAT]}"},{"line_number":142,"context_line":"        interfaces \u003d self._core_plugin.get_ports(context, filters)"},{"line_number":143,"context_line":"        LOG.info(_(\"Return the SNAT ports: %s \"), interfaces)"},{"line_number":144,"context_line":"        if interfaces:"},{"line_number":145,"context_line":"            self._populate_subnet_for_ports(context, interfaces)"},{"line_number":146,"context_line":"        return interfaces"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_be3601e6","line":143,"updated":"2014-06-30 14:52:52.000000000","message":"Should this be LOG.debug?","commit_id":"0e05816382e7b058c63e6b04b61b5c02b11af4ec"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":140,"context_line":"        filters \u003d {\u0027device_id\u0027: router_ids,"},{"line_number":141,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_DVR_SNAT]}"},{"line_number":142,"context_line":"        interfaces \u003d self._core_plugin.get_ports(context, filters)"},{"line_number":143,"context_line":"        LOG.info(_(\"Return the SNAT ports: %s \"), interfaces)"},{"line_number":144,"context_line":"        if interfaces:"},{"line_number":145,"context_line":"            self._populate_subnet_for_ports(context, interfaces)"},{"line_number":146,"context_line":"        return interfaces"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_2e4638c0","line":143,"in_reply_to":"baada198_be3601e6","updated":"2014-06-30 20:23:35.000000000","message":"Done","commit_id":"0e05816382e7b058c63e6b04b61b5c02b11af4ec"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":"            if router[\u0027gw_port_id\u0027]:"},{"line_number":154,"context_line":"                snat_router_intfs \u003d self.get_snat_sync_interfaces(context,"},{"line_number":155,"context_line":"                                                                  router_ids)"},{"line_number":156,"context_line":"                LOG.info(_(\"SNAT ports returned : %s \"), snat_router_intfs)"},{"line_number":157,"context_line":"                router[SNAT_ROUTER_INTF_KEY] \u003d snat_router_intfs"},{"line_number":158,"context_line":"        return routers_dict"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_de4ad554","line":156,"updated":"2014-06-30 14:52:52.000000000","message":"LOG.debug?  same at 169, 173, 176","commit_id":"0e05816382e7b058c63e6b04b61b5c02b11af4ec"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":"            if router[\u0027gw_port_id\u0027]:"},{"line_number":154,"context_line":"                snat_router_intfs \u003d self.get_snat_sync_interfaces(context,"},{"line_number":155,"context_line":"                                                                  router_ids)"},{"line_number":156,"context_line":"                LOG.info(_(\"SNAT ports returned : %s \"), snat_router_intfs)"},{"line_number":157,"context_line":"                router[SNAT_ROUTER_INTF_KEY] \u003d snat_router_intfs"},{"line_number":158,"context_line":"        return routers_dict"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_0e4974d0","line":156,"in_reply_to":"baada198_de4ad554","updated":"2014-06-30 20:23:35.000000000","message":"Done","commit_id":"0e05816382e7b058c63e6b04b61b5c02b11af4ec"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                    router, new_network)"},{"line_number":111,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":112,"context_line":"            snat_p_list \u003d self.create_snat_intf_ports_if_not_exists("},{"line_number":113,"context_line":"                context.elevated, router[\u0027id\u0027])"},{"line_number":114,"context_line":"            if not snat_p_list:"},{"line_number":115,"context_line":"                LOG.debug(_(\"SNAT interface ports not created: %s\"),"},{"line_number":116,"context_line":"                          snat_p_list)"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_64792f93","line":113,"updated":"2014-06-30 21:12:51.000000000","message":"typo -- should be context.elevated()","commit_id":"666a5d95ecd86db295b8770fc86e5b4117a54f8a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                    router, new_network)"},{"line_number":111,"context_line":"        if router.extra_attributes.distributed:"},{"line_number":112,"context_line":"            snat_p_list \u003d self.create_snat_intf_ports_if_not_exists("},{"line_number":113,"context_line":"                context.elevated, router[\u0027id\u0027])"},{"line_number":114,"context_line":"            if not snat_p_list:"},{"line_number":115,"context_line":"                LOG.debug(_(\"SNAT interface ports not created: %s\"),"},{"line_number":116,"context_line":"                          snat_p_list)"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_e43b7f36","line":113,"in_reply_to":"baada198_64792f93","updated":"2014-06-30 21:30:14.000000000","message":"Done","commit_id":"666a5d95ecd86db295b8770fc86e5b4117a54f8a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                        context, fip_agent[\u0027id\u0027])"},{"line_number":176,"context_line":"                    LOG.debug(\"FIP Agent ports: %s\", floatingip_agent_intfs)"},{"line_number":177,"context_line":"                router_floatingips.append(floating_ip)"},{"line_number":178,"context_line":"                #router_floatingip_agent_intfs.append(floatingip_agent_intfs)"},{"line_number":179,"context_line":"                router[l3_const.FLOATINGIP_KEY] \u003d router_floatingips"},{"line_number":180,"context_line":"                router[l3_const.FLOATINGIP_AGENT_INTF_KEY] \u003d ("},{"line_number":181,"context_line":"                    floatingip_agent_intfs)"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_ae9cef6a","line":178,"updated":"2014-07-01 11:44:56.000000000","message":"remove?","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":175,"context_line":"                        context, fip_agent[\u0027id\u0027])"},{"line_number":176,"context_line":"                    LOG.debug(\"FIP Agent ports: %s\", floatingip_agent_intfs)"},{"line_number":177,"context_line":"                router_floatingips.append(floating_ip)"},{"line_number":178,"context_line":"                #router_floatingip_agent_intfs.append(floatingip_agent_intfs)"},{"line_number":179,"context_line":"                router[l3_const.FLOATINGIP_KEY] \u003d router_floatingips"},{"line_number":180,"context_line":"                router[l3_const.FLOATINGIP_AGENT_INTF_KEY] \u003d ("},{"line_number":181,"context_line":"                    floatingip_agent_intfs)"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_0fd792c2","line":178,"in_reply_to":"baada198_ae9cef6a","updated":"2014-07-01 14:23:03.000000000","message":"Done","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def get_vm_port_hostid(self, context, port_id, port\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":198,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":199,"context_line":"        if vm_port_db and ("},{"line_number":200,"context_line":"            \"compute:\" in vm_port_db[\u0027device_owner\u0027] or"},{"line_number":201,"context_line":"            DEVICE_OWNER_AGENT_GW in vm_port_db[\u0027device_owner\u0027] or"},{"line_number":202,"context_line":"            \"neutron:LOADBALANCER\" in vm_port_db[\u0027device_owner\u0027]):"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_8ef2cb98","line":199,"updated":"2014-07-01 11:44:56.000000000","message":"list comprehension alternative that\u0027s a little less repetitive.\n\nif vm_port_db and any(\n    [p in vm_port_db[\u0027device_owner\u0027]\n     for p in (\"compute:\", DEVICE_OWNER_AGENT_GW,\n               \"neutron:LOADBALANCER\")]):\n    return vm_port_db[portbindings.HOST_ID]","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def get_vm_port_hostid(self, context, port_id, port\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":198,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":199,"context_line":"        if vm_port_db and ("},{"line_number":200,"context_line":"            \"compute:\" in vm_port_db[\u0027device_owner\u0027] or"},{"line_number":201,"context_line":"            DEVICE_OWNER_AGENT_GW in vm_port_db[\u0027device_owner\u0027] or"},{"line_number":202,"context_line":"            \"neutron:LOADBALANCER\" in vm_port_db[\u0027device_owner\u0027]):"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_6fe56ea7","line":199,"in_reply_to":"baada198_8ef2cb98","updated":"2014-07-01 14:23:03.000000000","message":"I am not sure I appreciate the conciseness, however I\u0027ll try something different to simplify; thanks for the input!","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                   \u0027device_owner\u0027: DEVICE_OWNER_AGENT_GW}"},{"line_number":213,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":214,"context_line":"        for p in ports:"},{"line_number":215,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host and"},{"line_number":216,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":217,"context_line":"                return p"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_ce604338","line":215,"updated":"2014-07-01 11:44:56.000000000","message":"Maybe swap the order of these conditionals so get_vm_port_hostid doesn\u0027t have to be called unless agent_id matches.","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":212,"context_line":"                   \u0027device_owner\u0027: DEVICE_OWNER_AGENT_GW}"},{"line_number":213,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":214,"context_line":"        for p in ports:"},{"line_number":215,"context_line":"            if(self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host and"},{"line_number":216,"context_line":"               p[\u0027device_id\u0027] \u003d\u003d agent_id):"},{"line_number":217,"context_line":"                return p"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_8a8d507e","line":215,"in_reply_to":"baada198_ce604338","updated":"2014-07-01 14:23:03.000000000","message":"Done","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027], port_db)"},{"line_number":228,"context_line":"        return fp_host"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":231,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":232,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":233,"context_line":"        admin_ctx \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_aea78f4e","line":230,"updated":"2014-07-01 11:44:56.000000000","message":"This function name is a little misleading as it will return false if there are no or many floating IPs. Maybe \u0027check_single_fip_on_host\u0027?","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":227,"context_line":"            fp_host \u003d self.get_vm_port_hostid(context, port_db[\u0027id\u0027], port_db)"},{"line_number":228,"context_line":"        return fp_host"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":231,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":232,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":233,"context_line":"        admin_ctx \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_4a48982d","line":230,"in_reply_to":"baada198_aea78f4e","updated":"2014-07-01 14:23:03.000000000","message":"um...I am on the fence here...","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        LOG.info(_(\u0027SNAT interface port list does not exist,\u0027"},{"line_number":344,"context_line":"                   \u0027 so create one: %s\u0027), port_list)"},{"line_number":345,"context_line":"        for intf in int_ports:"},{"line_number":346,"context_line":"            if \u0027fixed_ips\u0027 in intf and intf[\u0027fixed_ips\u0027]:"},{"line_number":347,"context_line":"                # Passing the subnet for the port to make sure the IP\u0027s"},{"line_number":348,"context_line":"                # are assigned on the right subnet if multiple subnet"},{"line_number":349,"context_line":"                # exists"}],"source_content_type":"text/x-python","patch_set":42,"id":"baada198_0e3cfbe1","line":346,"updated":"2014-07-01 11:44:56.000000000","message":"if intf.get(\u0027fixed_ips\u0027):","commit_id":"f52723ee676d3b2b6a2551a6012fd392b9384595"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":"            if router[\u0027gw_port_id\u0027]:"},{"line_number":154,"context_line":"                snat_router_intfs \u003d self.get_snat_sync_interfaces(context,"},{"line_number":155,"context_line":"                                                                  router_ids)"},{"line_number":156,"context_line":"                LOG.info(_(\"SNAT ports returned : %s \"), snat_router_intfs)"},{"line_number":157,"context_line":"                router[SNAT_ROUTER_INTF_KEY] \u003d snat_router_intfs"},{"line_number":158,"context_line":"        return routers_dict"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_660f5431","line":156,"updated":"2014-07-01 15:23:46.000000000","message":"Did you miss this LOG.debug()?","commit_id":"b62a29ad3bcb6a31ce4adaa2b62145d8db12180f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":"            if router[\u0027gw_port_id\u0027]:"},{"line_number":154,"context_line":"                snat_router_intfs \u003d self.get_snat_sync_interfaces(context,"},{"line_number":155,"context_line":"                                                                  router_ids)"},{"line_number":156,"context_line":"                LOG.info(_(\"SNAT ports returned : %s \"), snat_router_intfs)"},{"line_number":157,"context_line":"                router[SNAT_ROUTER_INTF_KEY] \u003d snat_router_intfs"},{"line_number":158,"context_line":"        return routers_dict"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_e98df77c","line":156,"in_reply_to":"baada198_660f5431","updated":"2014-07-01 15:42:25.000000000","message":"I must have...too much churning :)","commit_id":"b62a29ad3bcb6a31ce4adaa2b62145d8db12180f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":171,"context_line":"                        context, l3_const.AGENT_TYPE_L3,"},{"line_number":172,"context_line":"                        floating_ip[\u0027host\u0027])"},{"line_number":173,"context_line":"                    LOG.debug(\"FIP Agent : %s \", fip_agent[\u0027id\u0027])"},{"line_number":174,"context_line":"                    floatingip_agent_intfs \u003d self.get_fip_sync_interfaces("},{"line_number":175,"context_line":"                        context, fip_agent[\u0027id\u0027])"},{"line_number":176,"context_line":"                    LOG.debug(\"FIP Agent ports: %s\", floatingip_agent_intfs)"},{"line_number":177,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":44,"id":"baada198_613f3326","line":174,"updated":"2014-07-01 20:50:31.000000000","message":"I get an exception on this.  This method does not seem to be implemented anywhere.","commit_id":"8d3308da6ebe1948a47567709eff738e149fbd0b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":171,"context_line":"                        context, l3_const.AGENT_TYPE_L3,"},{"line_number":172,"context_line":"                        floating_ip[\u0027host\u0027])"},{"line_number":173,"context_line":"                    LOG.debug(\"FIP Agent : %s \", fip_agent[\u0027id\u0027])"},{"line_number":174,"context_line":"                    floatingip_agent_intfs \u003d self.get_fip_sync_interfaces("},{"line_number":175,"context_line":"                        context, fip_agent[\u0027id\u0027])"},{"line_number":176,"context_line":"                    LOG.debug(\"FIP Agent ports: %s\", floatingip_agent_intfs)"},{"line_number":177,"context_line":"                router_floatingips.append(floating_ip)"}],"source_content_type":"text/x-python","patch_set":44,"id":"baada198_812287b7","line":174,"in_reply_to":"baada198_613f3326","updated":"2014-07-01 20:57:29.000000000","message":"Done","commit_id":"8d3308da6ebe1948a47567709eff738e149fbd0b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":196,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":197,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":198,"context_line":"        allowed_device_owners \u003d ("},{"line_number":199,"context_line":"            \"compute:\", \"neutron:LOADBALANCER\", DEVICE_OWNER_AGENT_GW"},{"line_number":200,"context_line":"        )"},{"line_number":201,"context_line":"        device_owner \u003d vm_port_db[\u0027device_owner\u0027] if vm_port_db else None"},{"line_number":202,"context_line":"        if device_owner in allowed_device_owners:"}],"source_content_type":"text/x-python","patch_set":44,"id":"baada198_011837d2","line":199,"updated":"2014-07-01 20:50:31.000000000","message":"In trying to test this code, I had a problem here when my port\u0027s device_owner was \"compute:nova\".  I\u0027ve also seen \"compute:az1\", etc.  This code will need to do something like checking if device_owner starts with \"compute:\"","commit_id":"8d3308da6ebe1948a47567709eff738e149fbd0b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":196,"context_line":"        \"\"\"Return the portbinding host_id.\"\"\""},{"line_number":197,"context_line":"        vm_port_db \u003d port or self._core_plugin.get_port(context, port_id)"},{"line_number":198,"context_line":"        allowed_device_owners \u003d ("},{"line_number":199,"context_line":"            \"compute:\", \"neutron:LOADBALANCER\", DEVICE_OWNER_AGENT_GW"},{"line_number":200,"context_line":"        )"},{"line_number":201,"context_line":"        device_owner \u003d vm_port_db[\u0027device_owner\u0027] if vm_port_db else None"},{"line_number":202,"context_line":"        if device_owner in allowed_device_owners:"}],"source_content_type":"text/x-python","patch_set":44,"id":"baada198_1c0a5c21","line":199,"in_reply_to":"baada198_011837d2","updated":"2014-07-01 20:57:29.000000000","message":"Done","commit_id":"8d3308da6ebe1948a47567709eff738e149fbd0b"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":"            if router[\u0027gw_port_id\u0027]:"},{"line_number":154,"context_line":"                snat_router_intfs \u003d self.get_snat_sync_interfaces(context,"},{"line_number":155,"context_line":"                                                                  router_ids)"},{"line_number":156,"context_line":"                LOG.info(_(\"SNAT ports returned : %s \"), snat_router_intfs)"},{"line_number":157,"context_line":"                router[SNAT_ROUTER_INTF_KEY] \u003d snat_router_intfs"},{"line_number":158,"context_line":"        return routers_dict"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_6fcb801e","line":156,"updated":"2014-07-02 14:27:21.000000000","message":"LOG.debug?","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":153,"context_line":"            if router[\u0027gw_port_id\u0027]:"},{"line_number":154,"context_line":"                snat_router_intfs \u003d self.get_snat_sync_interfaces(context,"},{"line_number":155,"context_line":"                                                                  router_ids)"},{"line_number":156,"context_line":"                LOG.info(_(\"SNAT ports returned : %s \"), snat_router_intfs)"},{"line_number":157,"context_line":"                router[SNAT_ROUTER_INTF_KEY] \u003d snat_router_intfs"},{"line_number":158,"context_line":"        return routers_dict"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_a8357cdb","line":156,"in_reply_to":"baada198_6fcb801e","updated":"2014-07-02 23:17:12.000000000","message":"Done","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":"        filters \u003d {\u0027device_id\u0027: [fip_agent_id],"},{"line_number":187,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_AGENT_GW]}"},{"line_number":188,"context_line":"        interfaces \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":189,"context_line":"        LOG.info(_(\"Return the FIP ports: %s \"), interfaces)"},{"line_number":190,"context_line":"        if interfaces:"},{"line_number":191,"context_line":"            self._populate_subnet_for_ports(context, interfaces)"},{"line_number":192,"context_line":"        return interfaces"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_afd598ba","line":189,"updated":"2014-07-02 14:27:21.000000000","message":"LOG.debug","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":"        filters \u003d {\u0027device_id\u0027: [fip_agent_id],"},{"line_number":187,"context_line":"                   \u0027device_owner\u0027: [DEVICE_OWNER_AGENT_GW]}"},{"line_number":188,"context_line":"        interfaces \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":189,"context_line":"        LOG.info(_(\"Return the FIP ports: %s \"), interfaces)"},{"line_number":190,"context_line":"        if interfaces:"},{"line_number":191,"context_line":"            self._populate_subnet_for_ports(context, interfaces)"},{"line_number":192,"context_line":"        return interfaces"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_e84e946e","line":189,"in_reply_to":"baada198_afd598ba","updated":"2014-07-02 23:17:12.000000000","message":"Done","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":9820,"name":"Liping Mao","email":"limao@cisco.com","username":"LipingMao"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            router_res.get(\u0027distributed\u0027) is False):"},{"line_number":73,"context_line":"            # NOTE(armando-migliaccio): distributed-\u003ecentralized not supported"},{"line_number":74,"context_line":"            LOG.info(_(\"Centralizing distributed router %s \""},{"line_number":75,"context_line":"                       \"is not supported\"), router_db[\u0027id\u0027])"},{"line_number":76,"context_line":"            raise NotImplementedError()"},{"line_number":77,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_ecf73ad1","line":74,"updated":"2014-07-05 05:41:10.000000000","message":"error log?","commit_id":"b968748ea37174e23f8da6d587054b5bb91c5109"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            router_res.get(\u0027distributed\u0027) is False):"},{"line_number":73,"context_line":"            # NOTE(armando-migliaccio): distributed-\u003ecentralized not supported"},{"line_number":74,"context_line":"            LOG.info(_(\"Centralizing distributed router %s \""},{"line_number":75,"context_line":"                       \"is not supported\"), router_db[\u0027id\u0027])"},{"line_number":76,"context_line":"            raise NotImplementedError()"},{"line_number":77,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_5dc8b254","line":74,"in_reply_to":"baada198_ecf73ad1","updated":"2014-07-07 14:00:09.000000000","message":"There is no need to trace at error level","commit_id":"b968748ea37174e23f8da6d587054b5bb91c5109"},{"author":{"_account_id":9820,"name":"Liping Mao","email":"limao@cisco.com","username":"LipingMao"},"unresolved":false,"context_lines":[{"line_number":286,"context_line":"        l3_agent_db \u003d self._get_agent_by_type_and_host("},{"line_number":287,"context_line":"            context, l3_const.AGENT_TYPE_L3, host)"},{"line_number":288,"context_line":"        if l3_agent_db:"},{"line_number":289,"context_line":"            LOG.info(_(\"Agent ID exists: %s\"), l3_agent_db[\u0027id\u0027])"},{"line_number":290,"context_line":"            # TODO(Swami): is this call still valid for external agent gw port?"},{"line_number":291,"context_line":"            f_port \u003d self.get_agent_gw_ports_exist_for_network("},{"line_number":292,"context_line":"                context, network_id, host, l3_agent_db[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_0c01ceae","line":289,"updated":"2014-07-05 05:41:10.000000000","message":"debug log?","commit_id":"b968748ea37174e23f8da6d587054b5bb91c5109"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":286,"context_line":"        l3_agent_db \u003d self._get_agent_by_type_and_host("},{"line_number":287,"context_line":"            context, l3_const.AGENT_TYPE_L3, host)"},{"line_number":288,"context_line":"        if l3_agent_db:"},{"line_number":289,"context_line":"            LOG.info(_(\"Agent ID exists: %s\"), l3_agent_db[\u0027id\u0027])"},{"line_number":290,"context_line":"            # TODO(Swami): is this call still valid for external agent gw port?"},{"line_number":291,"context_line":"            f_port \u003d self.get_agent_gw_ports_exist_for_network("},{"line_number":292,"context_line":"                context, network_id, host, l3_agent_db[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_bde0eecd","line":289,"in_reply_to":"baada198_0c01ceae","updated":"2014-07-07 14:00:09.000000000","message":"Done","commit_id":"b968748ea37174e23f8da6d587054b5bb91c5109"},{"author":{"_account_id":9820,"name":"Liping Mao","email":"limao@cisco.com","username":"LipingMao"},"unresolved":false,"context_lines":[{"line_number":429,"context_line":"                                              l3_port_check\u003dFalse)"},{"line_number":430,"context_line":"            else:"},{"line_number":431,"context_line":"                if p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id:"},{"line_number":432,"context_line":"                    LOG.info(_(\"Subnet matches: %s\"), subnet_id)"},{"line_number":433,"context_line":"                    self._core_plugin.delete_port(admin_ctx,"},{"line_number":434,"context_line":"                                                  p[\u0027id\u0027],"},{"line_number":435,"context_line":"                                                  l3_port_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_2cfe92ae","line":432,"updated":"2014-07-05 05:41:10.000000000","message":"debug log?","commit_id":"b968748ea37174e23f8da6d587054b5bb91c5109"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":429,"context_line":"                                              l3_port_check\u003dFalse)"},{"line_number":430,"context_line":"            else:"},{"line_number":431,"context_line":"                if p[\u0027fixed_ips\u0027][0][\u0027subnet_id\u0027] \u003d\u003d subnet_id:"},{"line_number":432,"context_line":"                    LOG.info(_(\"Subnet matches: %s\"), subnet_id)"},{"line_number":433,"context_line":"                    self._core_plugin.delete_port(admin_ctx,"},{"line_number":434,"context_line":"                                                  p[\u0027id\u0027],"},{"line_number":435,"context_line":"                                                  l3_port_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":50,"id":"baada198_fde6e6e6","line":432,"in_reply_to":"baada198_2cfe92ae","updated":"2014-07-07 14:00:09.000000000","message":"Done","commit_id":"b968748ea37174e23f8da6d587054b5bb91c5109"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"            raise NotImplementedError()"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            # TODO(carl_baldwin): revise centralized-\u003edistributed migration"},{"line_number":79,"context_line":"            LOG.info(_(\"Distributing centralized router: %s\"), router_db[\u0027id\u0027])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _update_distributed_attr("},{"line_number":82,"context_line":"        self, context, router_id, router_db, data, gw_info):"}],"source_content_type":"text/x-python","patch_set":51,"id":"baada198_c2d3efd2","line":79,"updated":"2014-07-07 21:30:03.000000000","message":"I think this should raise NotImplementedError for now because this migration is not implemented either.","commit_id":"4b47a0362aae15fb158e36473bc9119146b3e63e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"            raise NotImplementedError()"},{"line_number":77,"context_line":"        else:"},{"line_number":78,"context_line":"            # TODO(carl_baldwin): revise centralized-\u003edistributed migration"},{"line_number":79,"context_line":"            LOG.info(_(\"Distributing centralized router: %s\"), router_db[\u0027id\u0027])"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _update_distributed_attr("},{"line_number":82,"context_line":"        self, context, router_id, router_db, data, gw_info):"}],"source_content_type":"text/x-python","patch_set":51,"id":"baada198_38521a35","line":79,"in_reply_to":"baada198_c2d3efd2","updated":"2014-07-07 23:02:41.000000000","message":"Hi Carl,\r\nIn this case if we raise \"NotImplementedError\" for \"updating a router from centralized to distributed\".\r\nThen for both the cases in the \"if else statement\" it would return \"NotImplementedError\" and the Router update will fail.\r\n\r\nAm I right?","commit_id":"4b47a0362aae15fb158e36473bc9119146b3e63e"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":270,"context_line":"        if not network_id:"},{"line_number":271,"context_line":"            LOG.debug(\"No Network id exists\")"},{"line_number":272,"context_line":"            return"},{"line_number":273,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id,"},{"line_number":274,"context_line":"                   \u0027device_owner\u0027: DEVICE_OWNER_AGENT_GW}"},{"line_number":275,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":276,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_57f82dc4","line":273,"updated":"2014-07-09 19:23:58.000000000","message":"This should filter on device_id instead of L277.  I.e. add...\n\n\u0027device_id\u0027: agent_id,","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":270,"context_line":"        if not network_id:"},{"line_number":271,"context_line":"            LOG.debug(\"No Network id exists\")"},{"line_number":272,"context_line":"            return"},{"line_number":273,"context_line":"        filters \u003d {\u0027network_id\u0027: network_id,"},{"line_number":274,"context_line":"                   \u0027device_owner\u0027: DEVICE_OWNER_AGENT_GW}"},{"line_number":275,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":276,"context_line":"        for p in ports:"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_832fe83d","line":273,"in_reply_to":"baada198_57f82dc4","updated":"2014-07-09 20:34:17.000000000","message":"Will fix it.","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":275,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":276,"context_line":"        for p in ports:"},{"line_number":277,"context_line":"            if(p[\u0027device_id\u0027] \u003d\u003d agent_id and"},{"line_number":278,"context_line":"               self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host):"},{"line_number":279,"context_line":"                return p"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_97f005cb","line":278,"updated":"2014-07-09 19:23:58.000000000","message":"Why is this being checked?  In my testing, this test is failing and so it keeps creating a new port each time the agent gets restarted.  I think this test is redundant because of the filter on agent_id.  The agent is bound to a host.\n\nI\u0027m currently using the follow code:\n\n        filters \u003d {\u0027network_id\u0027: network_id,\n                   \u0027device_id\u0027: agent_id,\n                   \u0027device_owner\u0027: DEVICE_OWNER_AGENT_GW}\n        for p in self._core_plugin.get_ports(context.elevated(), filters):\n            return p","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":275,"context_line":"        ports \u003d self._core_plugin.get_ports(context.elevated(), filters)"},{"line_number":276,"context_line":"        for p in ports:"},{"line_number":277,"context_line":"            if(p[\u0027device_id\u0027] \u003d\u003d agent_id and"},{"line_number":278,"context_line":"               self.get_vm_port_hostid(context, p[\u0027id\u0027], p) \u003d\u003d host):"},{"line_number":279,"context_line":"                return p"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_4315d0e3","line":278,"in_reply_to":"baada198_97f005cb","updated":"2014-07-09 20:34:17.000000000","message":"Sure will take care. Yes it is redundant.","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":360,"context_line":"            {\u0027port\u0027: {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":361,"context_line":"                      \u0027network_id\u0027: network_id,"},{"line_number":362,"context_line":"                      \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":363,"context_line":"                      \u0027fixed_ips\u0027: [subnet_id],"},{"line_number":364,"context_line":"                      \u0027device_id\u0027: router_id,"},{"line_number":365,"context_line":"                      \u0027device_owner\u0027: DEVICE_OWNER_DVR_SNAT,"},{"line_number":366,"context_line":"                      \u0027admin_state_up\u0027: True,"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_43a87077","line":363,"updated":"2014-07-09 20:43:11.000000000","message":"This needs to be [{\u0027subnet_id\u0027: subnet_id}] because the create_port method expects a list of dictionaries where either the subnet_id or the ip_address is set.","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":360,"context_line":"            {\u0027port\u0027: {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":361,"context_line":"                      \u0027network_id\u0027: network_id,"},{"line_number":362,"context_line":"                      \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":363,"context_line":"                      \u0027fixed_ips\u0027: [subnet_id],"},{"line_number":364,"context_line":"                      \u0027device_id\u0027: router_id,"},{"line_number":365,"context_line":"                      \u0027device_owner\u0027: DEVICE_OWNER_DVR_SNAT,"},{"line_number":366,"context_line":"                      \u0027admin_state_up\u0027: True,"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_662662bc","line":363,"in_reply_to":"baada198_43a87077","updated":"2014-07-09 20:51:38.000000000","message":"This got lost somehow. Done","commit_id":"cff4c83a35acef27c9292304d2de5f1201753e03"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":307,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":308,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":309,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":310,"context_line":"            routers \u003d self._get_sync_routers(context, router_ids\u003dNone)"},{"line_number":311,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"}],"source_content_type":"text/x-python","patch_set":60,"id":"baada198_833501dd","line":308,"updated":"2014-07-10 17:19:50.000000000","message":"After line 308.\nMight have to elevate the context.\ncontext \u003d context.elevated(). \nOtherwise a non admin user will not be able to disassociate a FIP.","commit_id":"c59aa134079b49d43855c49b360fb79cd3da8e97"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":307,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":308,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":309,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":310,"context_line":"            routers \u003d self._get_sync_routers(context, router_ids\u003dNone)"},{"line_number":311,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"}],"source_content_type":"text/x-python","patch_set":60,"id":"baada198_83f3419e","line":308,"in_reply_to":"baada198_435cc9ed","updated":"2014-07-10 17:33:52.000000000","message":"Got it, thanks, I missed the caller part.","commit_id":"c59aa134079b49d43855c49b360fb79cd3da8e97"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def check_fips_availability_on_host(self, context, fip_id, host_id):"},{"line_number":307,"context_line":"        \"\"\"Query all floating_ips and filter by particular host.\"\"\""},{"line_number":308,"context_line":"        fip_count_on_host \u003d 0"},{"line_number":309,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":310,"context_line":"            routers \u003d self._get_sync_routers(context, router_ids\u003dNone)"},{"line_number":311,"context_line":"            router_ids \u003d [router[\u0027id\u0027] for router in routers]"}],"source_content_type":"text/x-python","patch_set":60,"id":"baada198_435cc9ed","line":308,"in_reply_to":"baada198_833501dd","updated":"2014-07-10 17:24:19.000000000","message":"the context has already been elevated by the caller.","commit_id":"c59aa134079b49d43855c49b360fb79cd3da8e97"},{"author":{"_account_id":9820,"name":"Liping Mao","email":"limao@cisco.com","username":"LipingMao"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"\"\"Allow centralized -\u003e distributed state transition only.\"\"\""},{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            router_res.get(\u0027distributed\u0027) is False):"},{"line_number":73,"context_line":"            LOG.info(_(\"Centralizing distributed router %s \""},{"line_number":74,"context_line":"                       \"is not supported\"), router_db[\u0027id\u0027])"},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_703862a0","line":73,"updated":"2014-07-14 01:36:16.000000000","message":"LOG.error?","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"\"\"Allow centralized -\u003e distributed state transition only.\"\"\""},{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            router_res.get(\u0027distributed\u0027) is False):"},{"line_number":73,"context_line":"            LOG.info(_(\"Centralizing distributed router %s \""},{"line_number":74,"context_line":"                       \"is not supported\"), router_db[\u0027id\u0027])"},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_e979d093","line":73,"in_reply_to":"baada198_178b7cc3","updated":"2014-07-14 19:41:06.000000000","message":"I don\u0027t think it is appropriate to log an error like this.  The error goes back to the user, not the operator.  info is the most critical that I would want this to be.  Keep it as is.","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":70,"context_line":"        \"\"\"Allow centralized -\u003e distributed state transition only.\"\"\""},{"line_number":71,"context_line":"        if (router_db.extra_attributes.distributed and"},{"line_number":72,"context_line":"            router_res.get(\u0027distributed\u0027) is False):"},{"line_number":73,"context_line":"            LOG.info(_(\"Centralizing distributed router %s \""},{"line_number":74,"context_line":"                       \"is not supported\"), router_db[\u0027id\u0027])"},{"line_number":75,"context_line":"            raise NotImplementedError()"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_178b7cc3","line":73,"in_reply_to":"baada198_703862a0","updated":"2014-07-14 19:35:17.000000000","message":"It\u0027s not an error we can recover from, so there\u0027s nothing to alert...","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":9820,"name":"Liping Mao","email":"limao@cisco.com","username":"LipingMao"},"unresolved":false,"context_lines":[{"line_number":118,"context_line":"            snat_p_list \u003d self.create_snat_intf_ports_if_not_exists("},{"line_number":119,"context_line":"                context.elevated(), router[\u0027id\u0027])"},{"line_number":120,"context_line":"            if not snat_p_list:"},{"line_number":121,"context_line":"                LOG.debug(\"SNAT interface ports not created: %s\", snat_p_list)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_30526ade","line":121,"updated":"2014-07-14 01:36:16.000000000","message":"LOG.info?","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":118,"context_line":"            snat_p_list \u003d self.create_snat_intf_ports_if_not_exists("},{"line_number":119,"context_line":"                context.elevated(), router[\u0027id\u0027])"},{"line_number":120,"context_line":"            if not snat_p_list:"},{"line_number":121,"context_line":"                LOG.debug(\"SNAT interface ports not created: %s\", snat_p_list)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_974cec9f","line":121,"in_reply_to":"baada198_30526ade","updated":"2014-07-14 19:35:17.000000000","message":"there\u0027s no need to pollute the log at info level with this trace.","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":118,"context_line":"            snat_p_list \u003d self.create_snat_intf_ports_if_not_exists("},{"line_number":119,"context_line":"                context.elevated(), router[\u0027id\u0027])"},{"line_number":120,"context_line":"            if not snat_p_list:"},{"line_number":121,"context_line":"                LOG.debug(\"SNAT interface ports not created: %s\", snat_p_list)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_device_owner(self, context, router\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Get device_owner for the specified router.\"\"\""}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_297028a3","line":121,"in_reply_to":"baada198_974cec9f","updated":"2014-07-14 19:41:06.000000000","message":"Agreed.  Keep it as is.","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":481,"context_line":"                    self._core_plugin.delete_port(context,"},{"line_number":482,"context_line":"                                                  p[\u0027id\u0027],"},{"line_number":483,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":484,"context_line":"                break"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def _is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_aa029f3b","line":484,"updated":"2014-07-11 22:54:53.000000000","message":"Remove line: 484. ( break statement).\nAlways only checks for the first subnet and not for the subsequent subnets because of the break statement.","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":481,"context_line":"                    self._core_plugin.delete_port(context,"},{"line_number":482,"context_line":"                                                  p[\u0027id\u0027],"},{"line_number":483,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":484,"context_line":"                break"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"def _is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":63,"id":"baada198_7751182f","line":484,"in_reply_to":"baada198_aa029f3b","updated":"2014-07-14 19:35:17.000000000","message":"Done","commit_id":"7929bef5e2b145e763fb9e779ccea4ca8f542554"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    router_device_owners \u003d ("},{"line_number":50,"context_line":"        l3_db.L3_NAT_db_mixin."},{"line_number":51,"context_line":"        router_device_owners + (DEVICE_OWNER_DVR_INTERFACE,))"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    extra_attributes \u003d ("},{"line_number":54,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes + [{"}],"source_content_type":"text/x-python","patch_set":64,"id":"baada198_3ebd91d8","line":51,"updated":"2014-07-15 17:07:37.000000000","message":"(suggestion only) I am not sure why the newline is located in the middle of l3_db.L3_NAT_db_mixin.router_device_owners. It is a single variable name and I think it is easier to read if the newline is moved around \u0027+\u0027.","commit_id":"a571835e9ed3fbfd8c38bab465d41db49b5f6fe3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    router_device_owners \u003d ("},{"line_number":50,"context_line":"        l3_db.L3_NAT_db_mixin."},{"line_number":51,"context_line":"        router_device_owners + (DEVICE_OWNER_DVR_INTERFACE,))"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    extra_attributes \u003d ("},{"line_number":54,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes + [{"}],"source_content_type":"text/x-python","patch_set":64,"id":"baada198_e2d537b8","line":51,"in_reply_to":"baada198_3ebd91d8","updated":"2014-07-15 20:05:44.000000000","message":"Done","commit_id":"a571835e9ed3fbfd8c38bab465d41db49b5f6fe3"}],"neutron/db/l3_rpc_base.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":126,"context_line":"            for fip_id in fips_to_disable:"},{"line_number":127,"context_line":"                l3_plugin.update_floatingip_status("},{"line_number":128,"context_line":"                    context, fip_id, constants.FLOATINGIP_STATUS_DOWN)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_agent_gateway_port(self, context, **kwargs):"},{"line_number":131,"context_line":"        \"\"\"Get Agent Gateway port for FIP."},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_e33b149a","line":129,"updated":"2014-06-03 08:18:23.000000000","message":"We need to increment RPC version of the server side when adding new methods.","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            for fip_id in fips_to_disable:"},{"line_number":127,"context_line":"                l3_plugin.update_floatingip_status("},{"line_number":128,"context_line":"                    context, fip_id, constants.FLOATINGIP_STATUS_DOWN)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def get_agent_gateway_port(self, context, **kwargs):"},{"line_number":131,"context_line":"        \"\"\"Get Agent Gateway port for FIP."},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_8377b039","line":129,"in_reply_to":"1ae5cdf2_e33b149a","updated":"2014-06-03 08:26:04.000000000","message":"we should, but it\u0027s not mandatory because they are additions.","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for this query."},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_c08fdc28","line":137,"updated":"2014-06-03 16:55:41.000000000","message":"Why not make host and network_id actual arguments instead of looking them up in kwargs?","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for this query."},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7daf852a","line":137,"in_reply_to":"1ae5cdf2_c08fdc28","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":141,"context_line":"            plugin_constants.L3_ROUTER_NAT]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_2316c555","line":138,"updated":"2014-06-03 20:14:18.000000000","message":"Don\u0027t overload context.  Use a different name like admin_context.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":141,"context_line":"            plugin_constants.L3_ROUTER_NAT]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_9da8d121","line":138,"in_reply_to":"1ae5cdf2_2316c555","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        will send a list to the L3 agent."},{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":159,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":160,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":161,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":162,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_407bcc27","line":159,"updated":"2014-06-03 16:55:41.000000000","message":"Same comment.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":156,"context_line":"        will send a list to the L3 agent."},{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":159,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":160,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":161,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":162,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bda58d48","line":159,"in_reply_to":"1ae5cdf2_407bcc27","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":159,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":160,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":161,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":162,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":163,"context_line":"            plugin_constants.L3_ROUTER_NAT]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_3e15f83f","line":160,"updated":"2014-06-03 20:14:18.000000000","message":"*admin_context","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":159,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":160,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":161,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":162,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":163,"context_line":"            plugin_constants.L3_ROUTER_NAT]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_dd65f91e","line":160,"in_reply_to":"1ae5cdf2_3e15f83f","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for this query."},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_99484fce","line":137,"updated":"2014-06-09 07:18:01.000000000","message":"Why aren\u0027t these function params?","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for this query."},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_ff002504","line":137,"in_reply_to":"1ae5cdf2_094f7a93","updated":"2014-06-10 08:38:12.000000000","message":"Not really. It\u0027s just that you always need just those two in this function and you don\u0027t pass them through to another function so it defeats the purpose of using them. \n\n135 and 136 could go way and 130 would become:\n\n def get_agent_gateway_port(self, context, network_id\u003dNone, host\u003dNone):","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for this query."},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        network_id \u003d kwargs.get(\u0027network_id\u0027)"},{"line_number":137,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":138,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":139,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":140,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_094f7a93","line":137,"in_reply_to":"1ae5cdf2_99484fce","updated":"2014-06-09 18:18:40.000000000","message":"Will this be an issue if we use Kwargs.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            context, network_id, host)"},{"line_number":144,"context_line":"        self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":145,"context_line":"                                      agent_port)"},{"line_number":146,"context_line":"        LOG.debug(_(\"Agent Gateway port returned : %s\"), agent_port)"},{"line_number":147,"context_line":"        return agent_port"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def get_snat_router_interface_ports(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_824aa053","line":146,"updated":"2014-06-09 07:11:41.000000000","message":"If we have network_id and host in the log message, it would be useful.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            context, network_id, host)"},{"line_number":144,"context_line":"        self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":145,"context_line":"                                      agent_port)"},{"line_number":146,"context_line":"        LOG.debug(_(\"Agent Gateway port returned : %s\"), agent_port)"},{"line_number":147,"context_line":"        return agent_port"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def get_snat_router_interface_ports(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_4949828a","line":146,"in_reply_to":"1ae5cdf2_824aa053","updated":"2014-06-09 18:18:40.000000000","message":"Will fix it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        will send a list to the L3 agent."},{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":159,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"},{"line_number":160,"context_line":"        context \u003d neutron_context.get_admin_context()"},{"line_number":161,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":162,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_393adb36","line":159,"updated":"2014-06-09 07:18:01.000000000","message":"Ditto","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                                               host)"},{"line_number":167,"context_line":"        for p in snat_port_list:"},{"line_number":168,"context_line":"            self._ensure_host_set_on_port(context, plugin, host, p)"},{"line_number":169,"context_line":"        LOG.debug(_(\"SNAT interface ports returned : %s\"), snat_port_list)"},{"line_number":170,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_a2479c4a","line":169,"updated":"2014-06-09 07:11:41.000000000","message":"ditto","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            context, network_id, host)"},{"line_number":144,"context_line":"        self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":145,"context_line":"                                      agent_port)"},{"line_number":146,"context_line":"        LOG.debug(_(\u0027Agent Gateway port returned : %(agent_port)s with \u0027"},{"line_number":147,"context_line":"                  \u0027host %(host)s\u0027), {\u0027agent_port\u0027: agent_port,"},{"line_number":148,"context_line":"                  \u0027host\u0027: host})"},{"line_number":149,"context_line":"        return agent_port"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_55ffde01","line":146,"updated":"2014-06-19 12:52:44.000000000","message":"Can remove i18n translation from debug level log message here and L170.","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            context, network_id, host)"},{"line_number":144,"context_line":"        self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":145,"context_line":"                                      agent_port)"},{"line_number":146,"context_line":"        LOG.debug(_(\u0027Agent Gateway port returned : %(agent_port)s with \u0027"},{"line_number":147,"context_line":"                  \u0027host %(host)s\u0027), {\u0027agent_port\u0027: agent_port,"},{"line_number":148,"context_line":"                  \u0027host\u0027: host})"},{"line_number":149,"context_line":"        return agent_port"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_0d79ca2e","line":146,"in_reply_to":"1ae5cdf2_55ffde01","updated":"2014-06-19 15:13:11.000000000","message":"Done","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"unresolved":false,"context_lines":[{"line_number":146,"context_line":"        LOG.debug(_(\u0027Agent Gateway port returned : %(agent_port)s with \u0027"},{"line_number":147,"context_line":"                  \u0027host %(host)s\u0027), {\u0027agent_port\u0027: agent_port,"},{"line_number":148,"context_line":"                  \u0027host\u0027: host})"},{"line_number":149,"context_line":"        return agent_port"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def get_snat_router_interface_ports(self, context, **kwargs):"},{"line_number":152,"context_line":"        \"\"\"Get SNAT serviced Router Port List."}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_9efde20b","line":149,"updated":"2014-06-28 01:00:50.000000000","message":"Shouldn\u0027t the RPC_API_VERSION in the L3RouterPluginRpcCallbacks class be incremented to 1.2?.  I think the get_agent_gateway_port and get_ports_by_subnet are being called as methods in instance of L3RouterPluginRpcCallbacks, not as instsance of the parent class l3_rpc_base.L3RpcCallbackMixin.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":146,"context_line":"        LOG.debug(_(\u0027Agent Gateway port returned : %(agent_port)s with \u0027"},{"line_number":147,"context_line":"                  \u0027host %(host)s\u0027), {\u0027agent_port\u0027: agent_port,"},{"line_number":148,"context_line":"                  \u0027host\u0027: host})"},{"line_number":149,"context_line":"        return agent_port"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def get_snat_router_interface_ports(self, context, **kwargs):"},{"line_number":152,"context_line":"        \"\"\"Get SNAT serviced Router Port List."}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_4141bf37","line":149,"in_reply_to":"1ae5cdf2_9efde20b","updated":"2014-06-28 01:15:32.000000000","message":"good catch","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            context, network_id, host)"},{"line_number":144,"context_line":"        self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":145,"context_line":"                                      agent_port)"},{"line_number":146,"context_line":"        LOG.debug(_(\u0027Agent Gateway port returned : %(agent_port)s with \u0027"},{"line_number":147,"context_line":"                  \u0027host %(host)s\u0027), {\u0027agent_port\u0027: agent_port,"},{"line_number":148,"context_line":"                  \u0027host\u0027: host})"},{"line_number":149,"context_line":"        return agent_port"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab895d6_258d797c","line":146,"updated":"2014-06-29 19:02:50.000000000","message":"remove i18n from debug level logs.","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            context, network_id, host)"},{"line_number":144,"context_line":"        self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":145,"context_line":"                                      agent_port)"},{"line_number":146,"context_line":"        LOG.debug(_(\u0027Agent Gateway port returned : %(agent_port)s with \u0027"},{"line_number":147,"context_line":"                  \u0027host %(host)s\u0027), {\u0027agent_port\u0027: agent_port,"},{"line_number":148,"context_line":"                  \u0027host\u0027: host})"},{"line_number":149,"context_line":"        return agent_port"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_4ea1aca8","line":146,"in_reply_to":"dab895d6_258d797c","updated":"2014-06-30 20:18:27.000000000","message":"Done","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":167,"context_line":"            context, router_id)"},{"line_number":168,"context_line":"        for p in snat_port_list:"},{"line_number":169,"context_line":"            self._ensure_host_set_on_port(context, plugin, host, p)"},{"line_number":170,"context_line":"        LOG.debug(_(\u0027SNAT interface ports returned : %(snat_port_list)s\u0027"},{"line_number":171,"context_line":"                  \u0027and on host  %(host)\u0027), {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab895d6_45e98d19","line":170,"updated":"2014-06-29 19:02:50.000000000","message":"Here too. Add space to end of string.","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":167,"context_line":"            context, router_id)"},{"line_number":168,"context_line":"        for p in snat_port_list:"},{"line_number":169,"context_line":"            self._ensure_host_set_on_port(context, plugin, host, p)"},{"line_number":170,"context_line":"        LOG.debug(_(\u0027SNAT interface ports returned : %(snat_port_list)s\u0027"},{"line_number":171,"context_line":"                  \u0027and on host  %(host)\u0027), {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_8eabc488","line":170,"in_reply_to":"dab895d6_45e98d19","updated":"2014-06-30 20:18:27.000000000","message":"Done","commit_id":"4ee38deacb15c4017071f3b2e76c3d4b3ed8ae15"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":168,"context_line":"        for p in snat_port_list:"},{"line_number":169,"context_line":"            self._ensure_host_set_on_port(context, plugin, host, p)"},{"line_number":170,"context_line":"        LOG.debug(\u0027SNAT interface ports returned : %(snat_port_list)s \u0027"},{"line_number":171,"context_line":"                  \u0027and on host  %(host) \u0027, {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_f025f60a","line":171,"updated":"2014-06-30 23:22:15.000000000","message":"Nit: blank at end of string.","commit_id":"13fb7c2b5bca188598f0cd2f0d9bb0fc8590ee1b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":168,"context_line":"        for p in snat_port_list:"},{"line_number":169,"context_line":"            self._ensure_host_set_on_port(context, plugin, host, p)"},{"line_number":170,"context_line":"        LOG.debug(\u0027SNAT interface ports returned : %(snat_port_list)s \u0027"},{"line_number":171,"context_line":"                  \u0027and on host  %(host) \u0027, {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_b0e8de7d","line":171,"in_reply_to":"baada198_f025f60a","updated":"2014-06-30 23:25:57.000000000","message":"doh!","commit_id":"13fb7c2b5bca188598f0cd2f0d9bb0fc8590ee1b"},{"author":{"_account_id":6876,"name":"stephen-ma","email":"stephenbma43@gmail.com","username":"stephen-ma"},"unresolved":false,"context_lines":[{"line_number":170,"context_line":"        LOG.debug(\u0027SNAT interface ports returned : %(snat_port_list)s \u0027"},{"line_number":171,"context_line":"                  \u0027and on host %(host)s\u0027, {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_60065b22","line":173,"updated":"2014-07-01 15:14:48.000000000","message":"Need to add the function for get_ports_by_subnet:\n\ndef get_ports_by_subnet(self, context, **kwargs):\n  ...","commit_id":"b62a29ad3bcb6a31ce4adaa2b62145d8db12180f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":170,"context_line":"        LOG.debug(\u0027SNAT interface ports returned : %(snat_port_list)s \u0027"},{"line_number":171,"context_line":"                  \u0027and on host %(host)s\u0027, {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_893abbcb","line":173,"in_reply_to":"baada198_46425011","updated":"2014-07-01 15:39:10.000000000","message":"I think I see what Stephen is getting at here.  Though this comment should be made on https://review.openstack.org/#/c/89413/ where the method is called.  I made a comment there on PS 8 that there are two RPC methods missing their implementations.","commit_id":"b62a29ad3bcb6a31ce4adaa2b62145d8db12180f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":170,"context_line":"        LOG.debug(\u0027SNAT interface ports returned : %(snat_port_list)s \u0027"},{"line_number":171,"context_line":"                  \u0027and on host %(host)s\u0027, {\u0027snat_port_list\u0027: snat_port_list,"},{"line_number":172,"context_line":"                  \u0027host\u0027: host})"},{"line_number":173,"context_line":"        return snat_port_list"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_46425011","line":173,"in_reply_to":"baada198_60065b22","updated":"2014-07-01 15:18:59.000000000","message":"I beg your pardon?","commit_id":"b62a29ad3bcb6a31ce4adaa2b62145d8db12180f"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def get_ports_by_subnet(self, context, **kwargs):"},{"line_number":131,"context_line":"        \"\"\"DVR: RPC called by dvr-agent to get all ports for subnet.\"\"\""},{"line_number":132,"context_line":"        subnet_id \u003d kwargs.get(\u0027subnet_id\u0027)"},{"line_number":133,"context_line":"        LOG.debug(_(\"DVR: subnet_id: %s\"), subnet_id)"},{"line_number":134,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":135,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":136,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_78ac2fa1","line":133,"updated":"2014-07-02 11:13:57.000000000","message":"Nit: remove i18n","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def get_ports_by_subnet(self, context, **kwargs):"},{"line_number":131,"context_line":"        \"\"\"DVR: RPC called by dvr-agent to get all ports for subnet.\"\"\""},{"line_number":132,"context_line":"        subnet_id \u003d kwargs.get(\u0027subnet_id\u0027)"},{"line_number":133,"context_line":"        LOG.debug(_(\"DVR: subnet_id: %s\"), subnet_id)"},{"line_number":134,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":135,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":136,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_e83854a2","line":133,"in_reply_to":"baada198_78ac2fa1","updated":"2014-07-02 23:17:12.000000000","message":"Done","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":133,"context_line":"        LOG.debug(_(\"DVR: subnet_id: %s\"), subnet_id)"},{"line_number":134,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":135,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":136,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"},{"line_number":137,"context_line":"        return ports"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_agent_gateway_port(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_78834f04","line":136,"updated":"2014-07-02 11:13:57.000000000","message":"can return here w/o temp variable.","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":133,"context_line":"        LOG.debug(_(\"DVR: subnet_id: %s\"), subnet_id)"},{"line_number":134,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet_id]}}"},{"line_number":135,"context_line":"        plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":136,"context_line":"        ports \u003d plugin.get_ports(context, filters\u003dfilters)"},{"line_number":137,"context_line":"        return ports"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_agent_gateway_port(self, context, **kwargs):"}],"source_content_type":"text/x-python","patch_set":47,"id":"baada198_083ca892","line":136,"in_reply_to":"baada198_78834f04","updated":"2014-07-02 23:17:12.000000000","message":"Done","commit_id":"2ee7e4ee75581070cea531b05d77e33946378883"}],"neutron/db/migration/alembic_migrations/versions/22e175157cb9_l3_distributed.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"8aa942a5266cc990065e98b2325eb5b9f13db336","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        return"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027distributed\u0027,"},{"line_number":48,"context_line":"                                       sa.Boolean()))"},{"line_number":49,"context_line":"    # Set enable distributed to False for existing routers"},{"line_number":50,"context_line":"    op.execute(\"UPDATE routers SET distributed\u003dFalse\")"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BLA%3D","line":48,"updated":"2014-03-31 20:38:20.000000000","message":"i think it may make sense to define default value for column to be False","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        return"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027distributed\u0027,"},{"line_number":48,"context_line":"                                       sa.Boolean()))"},{"line_number":49,"context_line":"    # Set enable distributed to False for existing routers"},{"line_number":50,"context_line":"    op.execute(\"UPDATE routers SET distributed\u003dFalse\")"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jeg%3D","line":48,"in_reply_to":"AAAAWH%2F9%2BLA%3D","updated":"2014-04-03 18:20:53.000000000","message":"Will do it.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"}],"neutron/db/migration/alembic_migrations/versions/3927f7f7c456_l3_extension_distributed_mode.py":[{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027distributed\u0027,"},{"line_number":46,"context_line":"                                       sa.Boolean(),"},{"line_number":47,"context_line":"                                       default\u003dFalse))"},{"line_number":48,"context_line":"    # Set enable distributed to False for existing routers"},{"line_number":49,"context_line":"    op.execute(\"UPDATE routers SET distributed\u003dFalse\")"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FyrU%3D","line":47,"updated":"2014-04-17 12:40:22.000000000","message":"See my comment in the extension file, it seems that the default value is False","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"597f85cb5d7a8fea80c8fd2ad1792718305fc3aa","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\"L3 extension distributed mode"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Revision ID: 3927f7f7c456"},{"line_number":19,"context_line":"Revises: 3e71e90dea39"},{"line_number":20,"context_line":"Create Date: 2014-04-02 23:26:19.303633"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"bad4c104_a0889ac7","line":19,"updated":"2014-04-29 01:00:00.000000000","message":"This needs to be 6be312499f9, which is the current content of sentinel file named HEAD in the same directory of this migration file. Then, HEAD needs to be updated with your revision id: 3927f7f7c456","commit_id":"e233a72bf3c03b6d62ad78a2010701b89c4ab001"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"597f85cb5d7a8fea80c8fd2ad1792718305fc3aa","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# revision identifiers, used by Alembic."},{"line_number":25,"context_line":"revision \u003d \u00273927f7f7c456\u0027"},{"line_number":26,"context_line":"down_revision \u003d \u00273e71e90dea39\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bad4c104_8072b6e3","line":26,"updated":"2014-04-29 01:00:00.000000000","message":"same here. Please change to 6be312499f9","commit_id":"e233a72bf3c03b6d62ad78a2010701b89c4ab001"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6115a96a716e26479daf708297fcfe564990f32e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"\"\"L3 extension distributed mode"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Revision ID: 3927f7f7c456"},{"line_number":19,"context_line":"Revises: 6be312499f9"},{"line_number":20,"context_line":"Create Date: 2014-04-02 23:26:19.303633"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_05b0fff2","line":19,"updated":"2014-05-14 15:54:16.000000000","message":"this needs to be 1b837a7125a9","commit_id":"bf9399a70f8c1fdc11bd877d0e62e390f1ba8fad"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6115a96a716e26479daf708297fcfe564990f32e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# revision identifiers, used by Alembic."},{"line_number":25,"context_line":"revision \u003d \u00273927f7f7c456\u0027"},{"line_number":26,"context_line":"down_revision \u003d \u00276be312499f9\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7adec928_2596db4c","line":26,"updated":"2014-05-14 15:54:16.000000000","message":"ditto","commit_id":"bf9399a70f8c1fdc11bd877d0e62e390f1ba8fad"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        return"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027routerextraattributess\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.ForeignKeyConstraint("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_fe1e305e","line":43,"updated":"2014-06-03 20:14:18.000000000","message":"nit:  s/ss/s/","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":40,"context_line":"        return"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027routerextraattributess\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.ForeignKeyConstraint("}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1d6cc107","line":43,"in_reply_to":"1ae5cdf2_fe1e305e","updated":"2014-06-03 21:49:29.000000000","message":"I\u0027ll override the __tablename__","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027routerextraattributess\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":47,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":48,"context_line":"        sa.PrimaryKeyConstraint(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_e7f684f8","line":45,"updated":"2014-06-04 15:17:43.000000000","message":"you also need to add server_default\u003dFalse, as model defines default value for the column","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027routerextraattributess\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse),"},{"line_number":46,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":47,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":48,"context_line":"        sa.PrimaryKeyConstraint(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_bb6bb1ef","line":45,"in_reply_to":"1ae5cdf2_e7f684f8","updated":"2014-06-04 16:35:51.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2670e1220bd9757dd943e9b46586f987c5eda59c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":54,"context_line":"        return"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    op.drop_table(\u0027routerextraattributess\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_1e24bcad","line":56,"updated":"2014-06-03 20:14:18.000000000","message":"nit: same as above.","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":54,"context_line":"        return"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    op.drop_table(\u0027routerextraattributess\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1ae5cdf2_7d76a5d8","line":56,"in_reply_to":"1ae5cdf2_1e24bcad","updated":"2014-06-03 21:49:29.000000000","message":"Done","commit_id":"d7589ffb6bc55f22252784a75d27581d3c0975f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"down_revision \u003d \u002710cd28e692e9\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"migration_for_plugins \u003d ["},{"line_number":28,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027"},{"line_number":29,"context_line":"]"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_72dbfe7b","line":28,"updated":"2014-06-05 01:39:49.000000000","message":"Should it be unconditional per new policy? It seems to be related to l3 plugin rather than ml2.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"down_revision \u003d \u002710cd28e692e9\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"migration_for_plugins \u003d ["},{"line_number":28,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027"},{"line_number":29,"context_line":"]"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_e52f453d","line":28,"in_reply_to":"1ae5cdf2_72dbfe7b","updated":"2014-06-05 07:28:43.000000000","message":"Done","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_b28ae661","line":45,"updated":"2014-06-05 01:39:49.000000000","message":"it\u0027s still not clear to me, why additional table is needed (see my comment for patchset #19)\nSo, all preexisting routers are not distributed - should we create an entry for each of preexisting routers with distributed\u003dFalse?","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":22,"id":"1ae5cdf2_65ea55dc","line":45,"in_reply_to":"1ae5cdf2_b28ae661","updated":"2014-06-05 07:28:43.000000000","message":"I\u0027ll reply on PS#19, why I believe this is needed. As for your other comment. I don\u0027t believe it\u0027s necessary, a centralized router won\u0027t have the row, when upgraded, the row will be added.","commit_id":"463e15abb91790156e46ce65ed08685dfb89dbc8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_dab9ad16","line":45,"updated":"2014-06-10 13:14:59.000000000","message":"I\u0027m sorry to raise this again.\nPer Armando\u0027s comment in PS#19, centralized router will not have a row in the new table, so... what\u0027s the point of having \u0027distributed\u0027 attribute at all? In fact, the very existence of a row in router_extra_attributes means that router with router_id is distributed.\n\nSo I think there are two options to preserve consistency here:\n 1) remove distributed attribute. Router is distributed if it has a row in router_extra_attributes table. (Different table name maybe?)\n\n 2) preserve disctributed attr.\nThen we need to add entries for every router, populating router_extra_attributes with rows where \u0027distributed\u0027 is False or True.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_a7e39cd7","line":45,"in_reply_to":"1ae5cdf2_434be82a","updated":"2014-06-12 08:54:07.000000000","message":"I meant consistency of how data models are used.\n\n\u003e less clear and less extensible\nI agree that keeping separate table will help to add attributes needed in the future, it\u0027s just doesn\u0027t seem to be right to have an attribute, which value expected to be always True (and at the same time the default value in model definition is False!)\nThat\u0027s what my -1 vote was for. \nIf you think it\u0027s the right way to do, I\u0027ll stay on the way of this patch :) (at least, for this particular matter)","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_acf52f52","line":45,"in_reply_to":"1ae5cdf2_a7e39cd7","updated":"2014-06-12 18:57:01.000000000","message":"I still don\u0027t understand what consistency of how data models are used means, as every model introduces a new concept, if you mean consistency with how things have been modeled for other resources in the past, then I might see what you\u0027re saying...but then I don\u0027t want to be consistent with the wrong way of doing things :)\n\n\u003e it\u0027s just doesn\u0027t seem to be right to have an attribute, which value expected to be always True\n\nYour assumption is wrong: for centralized routers the value will be False; I invite you to try the patch if you don\u0027t want to take my words for granted.\n\nIn my previous comments, I was only advocating to avoid running the data migration as it\u0027s needless for existing routers. If the admin wants to update the router to be distributed, then the entry gets added. If the admin wants to go back the router\u0027s attribute flips to False. If the router doesn\u0027t get touched, then there\u0027s nothing to do. If you feel that the data migration does need to happen I still don\u0027t see what would buy us (if not the cost of creating many rows at once) because the datastore should be opaque and inaccessible to the cloud operator.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_9b7a7586","line":45,"in_reply_to":"1ae5cdf2_a7e39cd7","updated":"2014-06-12 11:16:54.000000000","message":"typo: s/I\u0027ll stay/I will not stay","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_facf49b1","line":45,"in_reply_to":"1ae5cdf2_dab9ad16","updated":"2014-06-17 20:10:29.000000000","message":"Hi Eugene!\n\nAfter further consideration, I think it makes sense to take the bullet of data migration; after all it\u0027s a one-off cost. Thanks for pointing this out.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.create_table("},{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_434be82a","line":45,"in_reply_to":"1ae5cdf2_dab9ad16","updated":"2014-06-10 21:05:58.000000000","message":"Sorry if I dare ask, but preserve consistency with what?\n\nOption 2 seems like extra work just for the sake of it (as in it gives you nothing in return), and option 1 saves you very little in exchange to the cost of being less clear and less extensible...I frankly don\u0027t understand what your -1 is for. IMHO the way things are strikes just the right balance.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"        sa.PrimaryKeyConstraint(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"baada198_4c924d4c","line":46,"updated":"2014-07-10 10:04:13.000000000","message":"Please, use sqlalchemy.sql.false() instead of sa.text(\u0027false\u0027)","commit_id":"6adf2178cd0f7795e7a2910a4f8612abe483ef2b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \u0027router_extra_attributes\u0027,"},{"line_number":44,"context_line":"        sa.Column(\u0027router_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":45,"context_line":"        sa.Column(\u0027distributed\u0027, sa.Boolean(), nullable\u003dFalse,"},{"line_number":46,"context_line":"                  server_default\u003dsa.text(\u0027false\u0027)),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint("},{"line_number":48,"context_line":"            [\u0027router_id\u0027], [\u0027routers.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":49,"context_line":"        sa.PrimaryKeyConstraint(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"baada198_a80f4e87","line":46,"in_reply_to":"baada198_4c924d4c","updated":"2014-07-10 13:45:21.000000000","message":"Done","commit_id":"6adf2178cd0f7795e7a2910a4f8612abe483ef2b"}],"neutron/extensions/dvr.py":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"unresolved":false,"context_lines":[{"line_number":21,"context_line":"        DISTRIBUTED: {\u0027allow_post\u0027: True,"},{"line_number":22,"context_line":"                      \u0027allow_put\u0027: True,"},{"line_number":23,"context_line":"                      \u0027is_visible\u0027: True,"},{"line_number":24,"context_line":"                      \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":25,"context_line":"                      \u0027convert_to\u0027: attributes.convert_to_boolean_if_not_none,"},{"line_number":26,"context_line":"                      \u0027enforce_policy\u0027: True},"},{"line_number":27,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":28,"id":"1ae5cdf2_104611c0","line":24,"updated":"2014-06-20 19:23:28.000000000","message":"Could the default for this attribute be False?","commit_id":"a5a3d44d495fbacb57baddd069c07d23c9073b51"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":21,"context_line":"        DISTRIBUTED: {\u0027allow_post\u0027: True,"},{"line_number":22,"context_line":"                      \u0027allow_put\u0027: True,"},{"line_number":23,"context_line":"                      \u0027is_visible\u0027: True,"},{"line_number":24,"context_line":"                      \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":25,"context_line":"                      \u0027convert_to\u0027: attributes.convert_to_boolean_if_not_none,"},{"line_number":26,"context_line":"                      \u0027enforce_policy\u0027: True},"},{"line_number":27,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":28,"id":"1ae5cdf2_9a7f9816","line":24,"in_reply_to":"1ae5cdf2_104611c0","updated":"2014-06-21 00:20:35.000000000","message":"No, that would conflict with the server\u0027s option as specified in neutron.conf.","commit_id":"a5a3d44d495fbacb57baddd069c07d23c9073b51"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":19,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":20,"context_line":"    \u0027routers\u0027: {"},{"line_number":21,"context_line":"        DISTRIBUTED: {\u0027allow_post\u0027: True,"},{"line_number":22,"context_line":"                      \u0027allow_put\u0027: True,"},{"line_number":23,"context_line":"                      \u0027is_visible\u0027: True,"},{"line_number":24,"context_line":"                      \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":25,"context_line":"                      \u0027convert_to\u0027: attributes.convert_to_boolean_if_not_none,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_0f09b0dc","line":22,"updated":"2014-06-27 22:45:03.000000000","message":"it was not entirely clear to me whether the l3 agent changes support the case where one distributes a previously centralized router, or vice versa.\n\nCan you confirm the agents will support this scenario?","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":19,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":20,"context_line":"    \u0027routers\u0027: {"},{"line_number":21,"context_line":"        DISTRIBUTED: {\u0027allow_post\u0027: True,"},{"line_number":22,"context_line":"                      \u0027allow_put\u0027: True,"},{"line_number":23,"context_line":"                      \u0027is_visible\u0027: True,"},{"line_number":24,"context_line":"                      \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":25,"context_line":"                      \u0027convert_to\u0027: attributes.convert_to_boolean_if_not_none,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ae5cdf2_be045e7e","line":22,"in_reply_to":"1ae5cdf2_0f09b0dc","updated":"2014-06-28 00:18:58.000000000","message":"We do want to support this scenario; how this gets addressed though I am not 100% sure. We might end up doing this as a follow-up patch, if that\u0027s okay.","commit_id":"979b24f960cbf0012e392e5f4e0e91e69d4e9c0c"}],"neutron/extensions/l3.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":113,"context_line":"                        \u0027default\u0027: attr.ATTR_NOT_SPECIFIED,"},{"line_number":114,"context_line":"                        \u0027convert_to\u0027: attr.convert_to_boolean_if_not_none,"},{"line_number":115,"context_line":"                        \u0027required_by_policy\u0027: True,"},{"line_number":116,"context_line":"                        \u0027enforce_policy\u0027: True},"},{"line_number":117,"context_line":"        EXTERNAL_GW_INFO: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":118,"context_line":"                           \u0027is_visible\u0027: True, \u0027default\u0027: None,"},{"line_number":119,"context_line":"                           \u0027enforce_policy\u0027: True}"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_03f560ed","line":116,"updated":"2014-06-03 08:18:23.000000000","message":"Does \u0027distributed\u0027 flag a default attribute for \u0027l3\u0027 extension? At first I thought \u0027distributed\u0027 attribute exists only when \u0027l3-dvr\u0027 extension is enabled. Could you clarify?","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                        \u0027default\u0027: attr.ATTR_NOT_SPECIFIED,"},{"line_number":114,"context_line":"                        \u0027convert_to\u0027: attr.convert_to_boolean_if_not_none,"},{"line_number":115,"context_line":"                        \u0027required_by_policy\u0027: True,"},{"line_number":116,"context_line":"                        \u0027enforce_policy\u0027: True},"},{"line_number":117,"context_line":"        EXTERNAL_GW_INFO: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":118,"context_line":"                           \u0027is_visible\u0027: True, \u0027default\u0027: None,"},{"line_number":119,"context_line":"                           \u0027enforce_policy\u0027: True}"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_a3a90c7d","line":116,"in_reply_to":"1ae5cdf2_03f560ed","updated":"2014-06-03 08:26:04.000000000","message":"you\u0027re right, this should move elsewhere.","commit_id":"96f473289630df236951d0e55444028117d418f0"}],"neutron/extensions/l3_distributed.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"54d37f7c6a91ec0b607d336fbc40d16651a29170","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @classmethod"},{"line_number":71,"context_line":"    def get_description(cls):"},{"line_number":72,"context_line":"        return (\"Extension of the router abstraction for specifying whether \""},{"line_number":73,"context_line":"                \"ROUTER should be deployed distributed or centralized\")"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F904A%3D","line":72,"updated":"2014-04-01 21:19:03.000000000","message":"Does this need to be i18n? (I don\u0027t know, just asking).","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @classmethod"},{"line_number":71,"context_line":"    def get_description(cls):"},{"line_number":72,"context_line":"        return (\"Extension of the router abstraction for specifying whether \""},{"line_number":73,"context_line":"                \"ROUTER should be deployed distributed or centralized\")"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jc4%3D","line":72,"in_reply_to":"AAAAWH%2F904A%3D","updated":"2014-04-03 18:20:53.000000000","message":"I am not sure, I followed the other implementations.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    (c) Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":"#    All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Ms%3D","line":1,"updated":"2014-04-08 11:38:30.000000000","message":"Remove VIM line","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    (c) Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":4,"context_line":"#    All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4U4%3D","line":1,"in_reply_to":"AAAAWn%2F%2F8Ms%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"unresolved":false,"context_lines":[{"line_number":25,"context_line":"from neutron.common import exceptions as qexception"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class RouterCreateInvalidContext (qexception.BadRequest):"},{"line_number":29,"context_line":"    message \u003d _(\"Distributed Router cannot be created \""},{"line_number":30,"context_line":"                \"in a Non-Admin Contex: %(attr)s\")"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2F%2B3s%3D","line":28,"updated":"2014-04-09 03:50:21.000000000","message":"Consider to rename this exception to RouterCreateUpdateInvalidContext because it\u0027s also used in update_router of l3_distributed_db.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"                \"in a Non-Admin Contex: %(attr)s\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":34,"context_line":"    if data is not None:"},{"line_number":35,"context_line":"        return attrs.convert_to_boolean(data)"},{"line_number":36,"context_line":"    return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FysQ%3D","line":33,"updated":"2014-04-17 12:40:22.000000000","message":"Why having a boolean which accept a third state which None (True/False/None)","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"                \"in a Non-Admin Contex: %(attr)s\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":34,"context_line":"    if data is not None:"},{"line_number":35,"context_line":"        return attrs.convert_to_boolean(data)"},{"line_number":36,"context_line":"    return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FDn8%3D","line":33,"in_reply_to":"AAAAXH%2F%2FHTs%3D","updated":"2014-04-24 10:27:35.000000000","message":"Ok but what happens if None, is the router will be distributed or not ? So do we need to have 3 states : None, False, True ?\n\nMaybe you want to force the user to specify this parameter ? and raise an exception if nothing is specified ? in that case the required attribute has to be used for that.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"886755017c6776a2258057e4531f63339cf042ad","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                \"in a Non-Admin Contex: %(attr)s\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":34,"context_line":"    if data is not None:"},{"line_number":35,"context_line":"        return attrs.convert_to_boolean(data)"},{"line_number":36,"context_line":"    return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2FHTs%3D","line":33,"in_reply_to":"AAAAXH%2F%2FysQ%3D","updated":"2014-04-23 22:34:41.000000000","message":"Default would be None.\nThe Admin can configure it as either \"true\" or \"False\".\n#neutron router-create router-name --distributed\u003dTrue\nor\n#neutron router-create router-name --distributed\u003dFalse\n\nIf none, then the client has not passed any value for the \"distributed\" flag.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":48,"context_line":"                {\u0027allow_post\u0027: True,"},{"line_number":49,"context_line":"                 \u0027allow_put\u0027: True,"},{"line_number":50,"context_line":"                 \u0027is_visible\u0027: True,"},{"line_number":51,"context_line":"                 \u0027default\u0027: attrs.ATTR_NOT_SPECIFIED,"},{"line_number":52,"context_line":"                 \u0027convert_to\u0027: convert_to_boolean_if_not_none,"},{"line_number":53,"context_line":"                 \u0027validate\u0027: {\u0027type:boolean\u0027: None}"},{"line_number":54,"context_line":"                 }"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAXH%2F%2Fyrw%3D","line":51,"updated":"2014-04-17 12:40:22.000000000","message":"see my comment above","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"                \"in a Non-Admin Context: %(attr)s\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def convert_to_boolean_if_not_none(data):"},{"line_number":34,"context_line":"    if data is not None:"},{"line_number":35,"context_line":"        return attrs.convert_to_boolean(data)"},{"line_number":36,"context_line":"    return data"}],"source_content_type":"text/x-python","patch_set":7,"id":"bad4c104_3b8d907c","line":33,"updated":"2014-04-29 12:41:27.000000000","message":"Should be moved in the attributes class","commit_id":"5c1b03f972f9010fbe4a18ea4f7e09a14b4d3242"}],"neutron/services/l3_router/l3_router_plugin.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":65,"context_line":"    extraroute_db.ExtraRoute_db_mixin."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    supported_extension_aliases \u003d [\"router\", \"ext-gw-mode\","},{"line_number":68,"context_line":"                                   \"extraroute\", \"l3_agent_scheduler\"]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def __init__(self):"},{"line_number":71,"context_line":"        qdbapi.register_models(base\u003dmodel_base.BASEV2)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_8391709b","line":68,"updated":"2014-06-03 08:18:23.000000000","message":"Don\u0027t we use \u0027l3-dvr\u0027 extension alias here?","commit_id":"96f473289630df236951d0e55444028117d418f0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3ee7afc6e3e3d142d6fa597cce97fc161a355748","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    extraroute_db.ExtraRoute_db_mixin."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    supported_extension_aliases \u003d [\"router\", \"ext-gw-mode\","},{"line_number":68,"context_line":"                                   \"extraroute\", \"l3_agent_scheduler\"]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def __init__(self):"},{"line_number":71,"context_line":"        qdbapi.register_models(base\u003dmodel_base.BASEV2)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1ae5cdf2_c390d845","line":68,"in_reply_to":"1ae5cdf2_8391709b","updated":"2014-06-03 08:26:04.000000000","message":"good point.","commit_id":"96f473289630df236951d0e55444028117d418f0"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self.addCleanup(db.clear_db)"},{"line_number":32,"context_line":"        self.mixin \u003d l3_dvr_db.L3_NAT_with_dvr_db_mixin()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def _create_router(self, router):"},{"line_number":35,"context_line":"        with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":36,"context_line":"            return self.mixin._create_router_db(self.ctx, router, \u0027foo_tenant\u0027)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_f97dd3e8","line":34,"updated":"2014-06-09 07:18:01.000000000","message":"can you make \u0027tenant\u0027 a parameter here in case test cases add in multi-tenant tests later?","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"895bef141a58ed5549742fca0e939c8149d99656","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_b94a6baa","line":98,"updated":"2014-06-09 07:18:01.000000000","message":"Many of these test names have two underscores. Is there a reason for that?","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_24f37d0b","line":98,"in_reply_to":"1ae5cdf2_09369a03","updated":"2014-06-09 18:22:18.000000000","message":"It\u0027s not a typo, it\u0027s test_ plus the name of the method being tested.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ae5cdf2_09369a03","line":98,"in_reply_to":"1ae5cdf2_b94a6baa","updated":"2014-06-09 18:18:40.000000000","message":"It might be a typo. I will fix it.","commit_id":"03a1531d6bcb9eafed6dee831d8f953984c9c9a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_cbea86d7","line":98,"updated":"2014-06-19 00:07:29.000000000","message":"\u0027test__\u0027 --\u003e \u0027test_\u0027\n\na few places below, also","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_0ed39238","line":98,"in_reply_to":"1ae5cdf2_cbea86d7","updated":"2014-06-19 07:48:34.000000000","message":"The method name under test is _get_device_owner_centralized, so the convention here is test_ + _get_device_owner_centralized","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"},{"line_number":102,"context_line":"        self._test_get_device_owner("}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_6be7b212","line":99,"updated":"2014-06-19 00:07:29.000000000","message":"This looks identical to the previous test.","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(is_distributed\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"},{"line_number":102,"context_line":"        self._test_get_device_owner("}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_0edd5214","line":99,"in_reply_to":"1ae5cdf2_6be7b212","updated":"2014-06-19 07:48:34.000000000","message":"oops, I don\u0027t think this was my initial intention.","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":108,"context_line":"        result \u003d l3_dvr_db._is_distributed_router(router)"},{"line_number":109,"context_line":"        self.assertEqual(expected, result)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test__test__is_distributed_router_by_db_object(self):"},{"line_number":112,"context_line":"        router \u003d {\u0027name\u0027: \u0027foo_router\u0027, \u0027admin_state_up\u0027: True}"},{"line_number":113,"context_line":"        router_db \u003d self._create_router(router)"},{"line_number":114,"context_line":"        self.mixin._get_device_owner(mock.ANY, router_db)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_8ba07e91","line":111,"updated":"2014-06-19 00:07:29.000000000","message":"\u0027test__test__\u0027 --\u003e \u0027test_\u0027\n\ntwice more below also","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":108,"context_line":"        result \u003d l3_dvr_db._is_distributed_router(router)"},{"line_number":109,"context_line":"        self.assertEqual(expected, result)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test__test__is_distributed_router_by_db_object(self):"},{"line_number":112,"context_line":"        router \u003d {\u0027name\u0027: \u0027foo_router\u0027, \u0027admin_state_up\u0027: True}"},{"line_number":113,"context_line":"        router_db \u003d self._create_router(router)"},{"line_number":114,"context_line":"        self.mixin._get_device_owner(mock.ANY, router_db)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_cec36a56","line":111,"in_reply_to":"1ae5cdf2_8ba07e91","updated":"2014-06-19 07:48:34.000000000","message":"oops","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def test__test__is_distributed_router_by_db_object(self):"},{"line_number":112,"context_line":"        router \u003d {\u0027name\u0027: \u0027foo_router\u0027, \u0027admin_state_up\u0027: True}"},{"line_number":113,"context_line":"        router_db \u003d self._create_router(router)"},{"line_number":114,"context_line":"        self.mixin._get_device_owner(mock.ANY, router_db)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test__test__is_distributed_router_default(self):"},{"line_number":117,"context_line":"        router \u003d {\u0027id\u0027: \u0027foo_router_id\u0027}"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_eb8f4221","line":114,"updated":"2014-06-19 00:07:29.000000000","message":"what are we testing here?","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def test__test__is_distributed_router_by_db_object(self):"},{"line_number":112,"context_line":"        router \u003d {\u0027name\u0027: \u0027foo_router\u0027, \u0027admin_state_up\u0027: True}"},{"line_number":113,"context_line":"        router_db \u003d self._create_router(router)"},{"line_number":114,"context_line":"        self.mixin._get_device_owner(mock.ANY, router_db)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test__test__is_distributed_router_default(self):"},{"line_number":117,"context_line":"        router \u003d {\u0027id\u0027: \u0027foo_router_id\u0027}"}],"source_content_type":"text/x-python","patch_set":26,"id":"1ae5cdf2_0e2b92eb","line":114,"in_reply_to":"1ae5cdf2_eb8f4221","updated":"2014-06-19 07:48:34.000000000","message":"it verifies that the method is able to determine the type of the router when passing a db object.","commit_id":"0d2e95e868681302b431d95c128dacef835476a3"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(pass_router_id\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_d07dbc6e","line":98,"updated":"2014-06-19 12:52:44.000000000","message":"Suggestion: In general, maybe instead of indicating the name of the function being tested, you can indicate what the test is attempting to verify (for all the tests in this file). That will be more flexible (in case the method name changes), and provide a clearer intent on what the test is doing.","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(pass_router_id\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_7ebbb60e","line":98,"in_reply_to":"1ae5cdf2_2dc0462a","updated":"2014-06-20 11:02:41.000000000","message":"Understand the intention, and the target method name is descriptive. The (minor) suggestion is not to use the actual production code function name with double underscore as the test name. That way if the method name changes, the test name doesn\u0027t need to be updated. Subjectively more readable.\n\nCan use a test name that indicates the test goals, and supplement with docstring, if needed.\n\n    test_validation_for_router_migration()\n\n    test_get_centralizer_router_device_owner()\n    test_get_distributed_router_device_owner()\n    _test_is_distributed_router() or\n    _test_router_type(self, router, is_distributed)\n    test_default_router_type()\n    test_centralized_router_type()\n    test_distributed_router_type()","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(pass_router_id\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_54acceee","line":98,"in_reply_to":"1ae5cdf2_7ebbb60e","updated":"2014-06-24 01:44:16.000000000","message":"If the name changes, most likely the body will too, otherwise while going through the trouble? If that\u0027s the case the test needs to be revised anyway...","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(pass_router_id\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_421df80f","line":98,"in_reply_to":"1ae5cdf2_7ebbb60e","updated":"2014-06-23 20:57:45.000000000","message":"There is a clear precedent in the project for naming a test with this pattern.  I think we should keep keep it as is.","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_get_device_owner_by_router_id(self):"},{"line_number":96,"context_line":"        self._test_get_device_owner()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test__get_device_owner_centralized(self):"},{"line_number":99,"context_line":"        self._test_get_device_owner(pass_router_id\u003dFalse)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test__get_device_owner_distributed(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1ae5cdf2_2dc0462a","line":98,"in_reply_to":"1ae5cdf2_d07dbc6e","updated":"2014-06-19 15:13:11.000000000","message":"this is exactly my intention: _get_device_owner_(for a)centralized(router)\n\nWithout anything else this tests the happy path.\n\nDo you have a suggestion for a better name that fits the 80 char limit? If not, this suffices IMHO","commit_id":"051f1466ea004f5d9d7a06af325a3131b0ecb309"}],"neutron/tests/unit/test_extension_l3_distributed.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"54d37f7c6a91ec0b607d336fbc40d16651a29170","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                self._delete(\u0027routers\u0027, drouter[\u0027router\u0027][\u0027id\u0027])"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_dvr_router_create_default(self):"},{"line_number":148,"context_line":"        name \u003d \u0027router1\u0027"},{"line_number":149,"context_line":"        tenant_id \u003d _uuid()"},{"line_number":150,"context_line":"        expected_value \u003d [(\u0027name\u0027, name), (\u0027tenant_id\u0027, tenant_id),"},{"line_number":151,"context_line":"                          (\u0027admin_state_up\u0027, True),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F90wI%3D","line":148,"updated":"2014-04-01 21:19:03.000000000","message":"Can some of the common code be placed into setUp()?","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"14cd3cce033d854314fbda811e557fc9b6edb3ad","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                self._delete(\u0027routers\u0027, drouter[\u0027router\u0027][\u0027id\u0027])"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def test_dvr_router_create_default(self):"},{"line_number":148,"context_line":"        name \u003d \u0027router1\u0027"},{"line_number":149,"context_line":"        tenant_id \u003d _uuid()"},{"line_number":150,"context_line":"        expected_value \u003d [(\u0027name\u0027, name), (\u0027tenant_id\u0027, tenant_id),"},{"line_number":151,"context_line":"                          (\u0027admin_state_up\u0027, True),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9jcI%3D","line":148,"in_reply_to":"AAAAWH%2F90wI%3D","updated":"2014-04-03 18:20:53.000000000","message":"These functions I have always seen out of the setUp. I may be wrong.","commit_id":"62188ef44f959cd53fbb501230b5ce7f192120fd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# @author: Swaminathan Vasudevan, Hewlett-Packard."},{"line_number":18,"context_line":" "},{"line_number":19,"context_line":"import contextlib"},{"line_number":20,"context_line":"import mock"},{"line_number":21,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Ls%3D","line":18,"updated":"2014-04-08 11:38:30.000000000","message":"Looks like space on blank line. did you run pep8 on this change set?","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":"#"},{"line_number":17,"context_line":"# @author: Swaminathan Vasudevan, Hewlett-Packard."},{"line_number":18,"context_line":" "},{"line_number":19,"context_line":"import contextlib"},{"line_number":20,"context_line":"import mock"},{"line_number":21,"context_line":"from oslo.config import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Uw%3D","line":18,"in_reply_to":"AAAAWn%2F%2F8Ls%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    supported_extension_aliases \u003d [\"router\", \"l3-dvr\"]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    #def __init__(self):"},{"line_number":80,"context_line":"    #    qdbapi.register_models(base\u003dmodel_base.BASEV2)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    #def get_plugin_type(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8Lg%3D","line":79,"updated":"2014-04-08 11:38:30.000000000","message":"Remove dead code in this file...","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    supported_extension_aliases \u003d [\"router\", \"l3-dvr\"]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    #def __init__(self):"},{"line_number":80,"context_line":"    #    qdbapi.register_models(base\u003dmodel_base.BASEV2)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    #def get_plugin_type(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Uo%3D","line":79,"in_reply_to":"AAAAWn%2F%2F8Lg%3D","updated":"2014-04-08 19:18:53.000000000","message":"Done","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            data[\u0027router\u0027][\u0027admin_state_up\u0027] \u003d admin_state_up"},{"line_number":101,"context_line":"        #if ((distributed is True) or (distributed is False)):"},{"line_number":102,"context_line":"        #data[\u0027router\u0027][\u0027distributed\u0027] \u003d distributed"},{"line_number":103,"context_line":"        for arg in ((\u0027admin_state_up\u0027, \u0027tenant_id\u0027) + (arg_list or ())):"},{"line_number":104,"context_line":"            if arg in kwargs and kwargs[arg]:"},{"line_number":105,"context_line":"                data[\u0027router\u0027][arg] \u003d kwargs[arg]"},{"line_number":106,"context_line":"        router_req \u003d self.new_create_request(\u0027routers\u0027, data, fmt)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8KI%3D","line":103,"updated":"2014-04-08 11:38:30.000000000","message":"Unless the order of the args is important, could this be:\n\nfor arg in (arg_list or (\u0027admin_state_up\u0027, \u0027tenant_id\u0027)):","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            data[\u0027router\u0027][\u0027admin_state_up\u0027] \u003d admin_state_up"},{"line_number":101,"context_line":"        #if ((distributed is True) or (distributed is False)):"},{"line_number":102,"context_line":"        #data[\u0027router\u0027][\u0027distributed\u0027] \u003d distributed"},{"line_number":103,"context_line":"        for arg in ((\u0027admin_state_up\u0027, \u0027tenant_id\u0027) + (arg_list or ())):"},{"line_number":104,"context_line":"            if arg in kwargs and kwargs[arg]:"},{"line_number":105,"context_line":"                data[\u0027router\u0027][arg] \u003d kwargs[arg]"},{"line_number":106,"context_line":"        router_req \u003d self.new_create_request(\u0027routers\u0027, data, fmt)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F7nc%3D","line":103,"in_reply_to":"AAAAWn%2F%2F8KI%3D","updated":"2014-04-08 12:29:34.000000000","message":"Oops. Ignore this as it won\u0027t include both.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            data[\u0027router\u0027][\u0027admin_state_up\u0027] \u003d admin_state_up"},{"line_number":101,"context_line":"        #if ((distributed is True) or (distributed is False)):"},{"line_number":102,"context_line":"        #data[\u0027router\u0027][\u0027distributed\u0027] \u003d distributed"},{"line_number":103,"context_line":"        for arg in ((\u0027admin_state_up\u0027, \u0027tenant_id\u0027) + (arg_list or ())):"},{"line_number":104,"context_line":"            if arg in kwargs and kwargs[arg]:"},{"line_number":105,"context_line":"                data[\u0027router\u0027][arg] \u003d kwargs[arg]"},{"line_number":106,"context_line":"        router_req \u003d self.new_create_request(\u0027routers\u0027, data, fmt)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4UM%3D","line":103,"in_reply_to":"AAAAWn%2F%2F8KI%3D","updated":"2014-04-08 19:18:53.000000000","message":"This is how it is handled in other test cases, both does the same, unless you wanted me to change it to \"or\" instead of \u0027+\u0027","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        if external_gateway_info:"},{"line_number":119,"context_line":"            arg_list \u003d (\u0027external_gateway_info\u0027,) + (arg_list or ())"},{"line_number":120,"context_line":"        if distributed is not None:"},{"line_number":121,"context_line":"            arg_list \u003d (\u0027distributed\u0027,) + (arg_list or ())"},{"line_number":122,"context_line":"        res \u003d self._create_drouter("},{"line_number":123,"context_line":"            fmt, tenant_id, name,"},{"line_number":124,"context_line":"            admin_state_up,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F8H0%3D","line":121,"updated":"2014-04-08 11:38:30.000000000","message":"arg_list \u003d (\u0027distributed\u0027,) or arg_list?","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"9f73d92cb814bae607b7b8e628e22c4f150da41a","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        if external_gateway_info:"},{"line_number":119,"context_line":"            arg_list \u003d (\u0027external_gateway_info\u0027,) + (arg_list or ())"},{"line_number":120,"context_line":"        if distributed is not None:"},{"line_number":121,"context_line":"            arg_list \u003d (\u0027distributed\u0027,) + (arg_list or ())"},{"line_number":122,"context_line":"        res \u003d self._create_drouter("},{"line_number":123,"context_line":"            fmt, tenant_id, name,"},{"line_number":124,"context_line":"            admin_state_up,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F4Rs%3D","line":121,"in_reply_to":"AAAAWn%2F%2F8H0%3D","updated":"2014-04-08 19:18:53.000000000","message":"same as above","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500a19ec5ffaef71ebc50920387e66caa116695f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        if external_gateway_info:"},{"line_number":119,"context_line":"            arg_list \u003d (\u0027external_gateway_info\u0027,) + (arg_list or ())"},{"line_number":120,"context_line":"        if distributed is not None:"},{"line_number":121,"context_line":"            arg_list \u003d (\u0027distributed\u0027,) + (arg_list or ())"},{"line_number":122,"context_line":"        res \u003d self._create_drouter("},{"line_number":123,"context_line":"            fmt, tenant_id, name,"},{"line_number":124,"context_line":"            admin_state_up,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWn%2F%2F7nU%3D","line":121,"in_reply_to":"AAAAWn%2F%2F8H0%3D","updated":"2014-04-08 12:29:34.000000000","message":"same here.","commit_id":"e999e148213c0d0a1104061e0e40e586d4c7e6d5"}],"neutron/tests/unit/test_l3_plugin.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c69aa36e699245ba9ddc42e26ba72af22a5aa9f8","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"        if not plugin:"},{"line_number":1787,"context_line":"            plugin \u003d \u0027neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin\u0027"},{"line_number":1788,"context_line":"        # the L3 service plugin"},{"line_number":1789,"context_line":"        if not service_plugins: "},{"line_number":1790,"context_line":"            l3_plugin \u003d (\u0027neutron.tests.unit.test_l3_plugin.\u0027"},{"line_number":1791,"context_line":"                         \u0027TestL3NatServicePlugin\u0027)"},{"line_number":1792,"context_line":"            service_plugins \u003d {\u0027l3_plugin_name\u0027: l3_plugin}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2F%2FtI%3D","line":1789,"updated":"2014-04-16 22:48:57.000000000","message":"Pep8 error\nI will fix whitespace.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6775d71c62df2f81035a3ff5bd3ef3e8bcb1e358","unresolved":false,"context_lines":[{"line_number":1786,"context_line":"        if not plugin:"},{"line_number":1787,"context_line":"            plugin \u003d \u0027neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin\u0027"},{"line_number":1788,"context_line":"        # the L3 service plugin"},{"line_number":1789,"context_line":"        if not service_plugins: "},{"line_number":1790,"context_line":"            l3_plugin \u003d (\u0027neutron.tests.unit.test_l3_plugin.\u0027"},{"line_number":1791,"context_line":"                         \u0027TestL3NatServicePlugin\u0027)"},{"line_number":1792,"context_line":"            service_plugins \u003d {\u0027l3_plugin_name\u0027: l3_plugin}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2Feb8%3D","line":1789,"updated":"2014-04-14 11:28:04.000000000","message":"nit: PEP8 Looks like extra space at end of line.","commit_id":"fb34883222da45d6ea1ca64b47567871720db59e"}]}
